Try OpenStack for free (TryStack)

482 views
Skip to first unread message

Chris Strand

unread,
Feb 15, 2012, 3:17:41 PM2/15/12
to jcl...@googlegroups.com
Hey,

Thought some people here may be interested in trying out an OpenStack set up for free courtesy of the guys at TryStack. You have to apply to join via their Facebook page, but it only took them 5 minutes to let me in.

I don't think they provide any uptime guarantees so I suppose this really is for trying it out.

Chris

Andrew Phillips

unread,
Feb 15, 2012, 6:23:06 PM2/15/12
to jcl...@googlegroups.com
Thanks for the heads-up, Chris!

ap

On 15/02/2012 21:17, Chris Strand wrote:
> Hey,
>
> Thought some people here may be interested in trying out an OpenStack
> set up for free courtesy of the guys at TryStack

> <https://trystack.org/>. You have to apply to join via their Facebook


> page, but it only took them 5 minutes to let me in.
>
> I don't think they provide any uptime guarantees so I suppose this
> really is for trying it out.
>
> Chris
>

> --
> You received this message because you are subscribed to the Google
> Groups "jclouds" group.
> To post to this group, send email to jcl...@googlegroups.com.
> To unsubscribe from this group, send email to
> jclouds+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jclouds?hl=en.

--
Andrew Phillips
qrmedia

Unless expressly stated otherwise, this message is confidential.
Access to this e-mail by anyone else is unauthorised. If you are
not an addressee, any disclosure or copying of the contents of
this e-mail or any action taken (or not taken) in reliance on it
is unauthorised and may be unlawful. If you are not an addressee,
please inform the sender immediately.

This message is confidential and may not be redistributed or
broadcast in whole or part in any form, including but not limited
to any form of internet transmission including email, usenet,
newsgroups, www, irc, icq, etc.
All liability for errors and viruses is disclaimed.

Kenneth Nagin

unread,
Mar 20, 2012, 11:14:05 AM3/20/12
to jclouds
Thanks. I tried using the site. However, I am having problems
accessing it with jclouds.

This is a printout of the context:
context: [id=nova, endpoint=https://nova-api.trystack.org:5443/v2.0,
apiVersion=1.1, identity=facebook582447314, iso3166Codes=[]]

This is the exception:

org.jclouds.rest.AuthorizationException: com.ibm.jsse2.util.g: PKIX
path building failed: java.security.cert.CertPathBuilderException:
PKIXCertPathBuilderImpl could not build a valid CertPath.; internal
cause is:
java.security.cert.CertPathValidatorException: The certificate issued
by CN=PositiveSSL CA, O=Comodo CA Limited, L=Salford, ST=Greater
Manchester, C=GB is not trusted; internal cause is:
java.security.cert.CertPathValidatorException: Certificate chaining
error connecting to GET https://nova-api.trystack.org:5443/v2.0/v1.1
HTTP/1.1

Do you know how to fix this problem?

--Kenneth

On Feb 15, 10:17 pm, Chris Strand <clastr...@gmail.com> wrote:
> Hey,
>
> Thought some people here may be interested in trying out an OpenStack set
> up for free courtesy of the guys at TryStack <https://trystack.org/>. You

Adrian Cole

unread,
Mar 20, 2012, 11:17:50 AM3/20/12
to jcl...@googlegroups.com


This is typically solved with a jre update.

Also, you probably want to try openstack-nova from snapshot pointing at keystone url.  Once you figure out, let us know!

-A

Richard Downer

unread,
Mar 20, 2012, 11:19:22 AM3/20/12
to jcl...@googlegroups.com
Hi Kenneth,

Setting the property "jclouds.trust-all-certs" to true should help - either in the JVM system properties, or in code, pass this property into createContext() :

properties.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");

Richard.


--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.




--
Richard Downer • Lead Engineer • Cloudsoft Corporation • http://www.cloudsoftcorp.com
Skype richardcloudsoft • Twitter @FrontierTown

Kenneth Nagin

unread,
Mar 20, 2012, 11:53:29 AM3/20/12
to jclouds
Thanks "properties.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS,
"true");" fixed the problem.

However, though I get past authorization it is jclouds is not see the
account properly when I list server instances or server images.
It returns an empty list.

Any suggestions?

--Kenneth



On Mar 20, 5:19 pm, Richard Downer <richard.dow...@cloudsoftcorp.com>
wrote:
> Hi Kenneth,
>
> Setting the property "jclouds.trust-all-certs" to true should help - either
> in the JVM system properties, or in code, pass this property into
> createContext() :
>
> properties.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
>
> Richard.
>
> On 20 March 2012 17:14, Kenneth Nagin <kna...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > Thanks.  I tried using the site.  However, I am having problems
> > accessing it with jclouds.
>
> > This is a printout of the context:
> > context:  [id=nova, endpoint=https://nova-api.trystack.org:5443/v2.0,
> > apiVersion=1.1, identity=facebook582447314, iso3166Codes=[]]
>
> > This is the exception:
>
> > org.jclouds.rest.AuthorizationException: com.ibm.jsse2.util.g: PKIX
> > path building failed: java.security.cert.CertPathBuilderException:
> > PKIXCertPathBuilderImpl could not build a valid CertPath.; internal
> > cause is:
> >        java.security.cert.CertPathValidatorException: The certificate
> > issued
> > by CN=PositiveSSL CA, O=Comodo CA Limited, L=Salford, ST=Greater
> > Manchester, C=GB is not trusted; internal cause is:
> >        java.security.cert.CertPathValidatorException: Certificate chaining
> > error connecting to GEThttps://nova-api.trystack.org:5443/v2.0/v1.1

Kenneth Nagin

unread,
Mar 20, 2012, 12:06:56 PM3/20/12
to jclouds
I posted too quickly and did not check what I wrote.
The English is terrible! What I meant to say was:

Thanks, "properties.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS,
"true");" fixed the problem. I now get passed authorization.

However, jclouds does not seem to be able read information about the
account's state.
When listing server instances or server images it returns an empty
list.

Please note I am using the generic interface to fetch the data, e.g.
computeservice.listImages() and computeservice.listImages(),
computeservice.listNodes()

Adrian Cole

unread,
Mar 20, 2012, 4:00:45 PM3/20/12
to jcl...@googlegroups.com

Are you using "nova" or "openstack-nova"?

Kenneth Nagin

unread,
Mar 20, 2012, 5:23:02 PM3/20/12
to jclouds
I'm using "nova".
Since you brought the idea I tried "openstack-nova" but jclouds throws
a
Exception in thread "main" java.lang.IllegalArgumentException: The
specified provider "openstack-nova" is either not configured or
supported.
at
org.jclouds.rest.RestContextFactory.createContextSpec(RestContextFactory.java:
309)

Also, I did some more tests "nova" on trystack.
I tried with bogus Identity and Credential parameters.
It has no affect; jclouds does complain it just returns an empty list
of server images or server instances!
Something is wrong here.

--Kenneth

Adrian Cole

unread,
Mar 20, 2012, 5:49:25 PM3/20/12
to jcl...@googlegroups.com
It is probably that you are missing the dependency

<groupId>org.jclouds.labs</groupId>
<artifactId>openstack-nova</artifactId>
<version>1.5.0-SNAPSHOT</version>

-A

Kenneth Nagin

unread,
Mar 22, 2012, 11:16:12 AM3/22/12
to jclouds
openstack-nova 1.5.0-SNAPSHOT does not exist.
This is the maven package output:
[ERROR] Failed to execute goal on project jcloudsall: Could not
resolve dependen
cies for project com.ibm.pds:jcloudsall:jar:1.2-SNAPSHOT: Could not
find artifac
t org.jclouds.labs:openstack-nova:jar:1.5.0-SNAPSHOT -> [Help 1]
[ERROR]

I upgraded the whole jclouds stack to 1.4.0-rc.2 and added openstack-
nova lab dependency but this does
not fix the problem. Nova is still returning empty lists as if the
computeservice.listImages() and computeservice.listNodes()
are simply stubs.



This my 1.4.0-rc.2 pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.pds</groupId>
<artifactId>jcloudsall</artifactId>
<packaging>jar</packaging>
<version>1.2-SNAPSHOT</version>
<name>Jclouds-all</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-blobstore</artifactId>
<version>1.4.0-rc.2</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-allblobstore</artifactId>
<version>1.4.0-rc.2</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-compute</artifactId>
<version>1.4.0-rc.2</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-allcompute</artifactId>
<version>1.4.0-rc.2</version>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-sshj</artifactId>
<version>1.4.0-rc.2</version>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-enterprise</artifactId>
<version>1.4.0-rc.2</version>
</dependency>
<dependency>
<groupId>org.jclouds.labs</groupId>
<artifactId>openstack-nova</artifactId>
<version>1.4.0-rc.2</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.29</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.0</version>
</dependency>


<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>


</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<archive>
<manifest>
<mainClass>jcloudsall.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</
descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>jcloudsall.App</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

But it does not fix the problem with nova not

Adrian Cole

unread,
Mar 22, 2012, 11:40:50 AM3/22/12
to jcl...@googlegroups.com

Sorry.  To use snapshot, you need to add the repository to your pom.xml

> http://www.jclouds.org/documentation/userguide/installation-guide
>
> <repositories>
>    <repository>
>        <id>jclouds-snapshots</id>
>        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
>        <snapshots>
>             <enabled>true</enabled>
>        </snapshots>
>    </repository>
> </repositories>
>

Kenneth Nagin

unread,
Mar 22, 2012, 12:39:19 PM3/22/12
to jclouds
I added the repositories statement to my original pom but that did not
solve the with.

Then reworked the pom to follow the http://www.jclouds.org/documentation/userguide/installation-guide:

<repositories>
<repository>
<id>jclouds-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</
url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-allcompute</artifactId>
<version>1.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-allblobstore</artifactId>
<version>1.2.0-SNAPSHOT</version>
</dependency>
.....
</dependencies>



But now maven fails with:
[ERROR] Failed to execute goal on project jcloudsall: Could not resol
cies for project com.ibm.pds:jcloudsall:jar:1.2-SNAPSHOT: The followi
s could not be resolved: org.jclouds:jclouds-allcompute:jar:1.2.0-SNA
jclouds:jclouds-allblobstore:jar:1.2.0-SNAPSHOT: Failure to find org.
ouds-allcompute:jar:1.2.0-SNAPSHOT in https://oss.sonatype.org/conten
ies/snapshots was cached in the local repository, resolution will not
pted until the update interval of jclouds-snapshots has elapsed or up

What am I missing?
> > > >> > > > > To unsubscribe...
>
> read more »

Adrian Cole

unread,
Mar 22, 2012, 12:43:03 PM3/22/12
to jcl...@googlegroups.com

Hi kenneth.

So first you need version 1.5.0-SNAPSHOT.  Also you want groupid org.jclouds.labs and artifact openstack-nova

To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.

Kenneth Nagin

unread,
Mar 22, 2012, 1:06:53 PM3/22/12
to jclouds
Still getting the error:
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 39.622s
[INFO] Finished at: Thu Mar 22 19:03:21 IST 2012
[INFO] Final Memory: 12M/104M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal on project jcloudsall: Could not
resolve dependen
cies for project com.ibm.pds:jcloudsall:jar:1.2-SNAPSHOT: The
following artifact
s could not be resolved: org.jclouds.labs:jclouds-allcompute:jar:1.5.0-
SNAPSHOT,
org.jclouds.labs:jclouds-allblobstore:jar:1.5.0-SNAPSHOT: Could not
find artifa
ct org.jclouds.labs:jclouds-allcompute:jar:1.5.0-SNAPSHOT in jclouds-
snapshots (
https://oss.sonatype.org/content/repositories/snapshots) -> [Help 1]

This is the pom:
<repositories>
<repository>
<id>jclouds-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</
url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jclouds.labs</groupId>
<artifactId>jclouds-allcompute</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jclouds.labs</groupId>
<artifactId>jclouds-allblobstore</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jclouds.labs</groupId>
<artifactId>openstack-nova</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>
....
> > ouds-allcompute:jar:1.2.0-SNAPSHOT inhttps://oss.sonatype.org/conten
> ...
>
> read more »

Adrian Cole

unread,
Mar 22, 2012, 1:30:01 PM3/22/12
to jcl...@googlegroups.com
sorry, I meant add a dependency on org.jclouds.labs/openstack-nova,
not change all the existing ones.

https://github.com/jclouds/jclouds-examples/tree/master/compute-basics

This has an example of how to use openstack and also a pom.xml

Adrian Cole

unread,
Mar 22, 2012, 5:47:19 PM3/22/12
to jcl...@googlegroups.com, jclou...@googlegroups.com
I think it might well be best to make a provider for trystack?

wdyt?
-A

Adrian Cole

unread,
Mar 23, 2012, 12:05:18 PM3/23/12
to jcl...@googlegroups.com

Prayers are answered :)

In 1.5.0-alpha.1 we have a preconfigured "trystack-nova" provider.  See http://blog.jclouds.org for more!

Thanks for lending me your access ;)

-A

--

Chris Strand

unread,
Mar 23, 2012, 12:10:32 PM3/23/12
to jcl...@googlegroups.com
Glad I could help!

Chris

Kenneth Nagin

unread,
Mar 25, 2012, 4:09:57 AM3/25/12
to jclouds
I'm not sure if I'm making progress here but now I'm get getting a
HTTP/1.1 401 Unauthorized exception with input
provider= trystack-nova
identity = tenantId:facebook582447314
credential = password

The userid and password come from trystack's API page

This is the error output:
context: {provider=trystack-nova,
endpoint=memoizeWithExpiration(ExpiringMemoizingSupplier{delegate=RetryOnTimeOutExceptionSupplier(RetryOnTimeOutButNotOnAuthorizationExceptionSupplier(org.jclouds.location.suppliers.fromconfig.ProviderURIFromConfiguration@55e055e)),
durationNanos=60000000000}, seconds=60), apiVersion=1.1,
buildVersion=, identity=tenantId:na...@il.ibm.com, iso3166Codes=[US-
CA]}
org.jclouds.rest.AuthorizationException: POST https://nova-api.trystack.org:5443/v2.0/tokens
HTTP/1.1 -> HTTP/1.1 401 Unauthorized
at
org.jclouds.openstack.nova.v1_1.handlers.NovaErrorHandler.handleError(NovaErrorHandler.java:
63)
at
org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:
69)
at org.jclouds.http.internal.BaseHttpCommandExecutorService
$HttpResponseCallable.shouldContinue(BaseHttpCommandExecutorService.java:
192)
at org.jclouds.http.internal.BaseHttpCommandExecutorService
$HttpResponseCallable.call(BaseHttpCommandExecutorService.java:162)
at org.jclouds.http.internal.BaseHttpCommandExecutorService
$HttpResponseCallable.call(BaseHttpCommandExecutorService.java:130)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
at java.util.concurrent.FutureTask.run(FutureTask.java:149)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:736)
at
org.jclouds.concurrent.config.ExecutorServiceModule.getStackTraceHere(ExecutorServiceModule.java:
377)
at org.jclouds.concurrent.config.ExecutorServiceModule
$DescribingExecutorService.submit(ExecutorServiceModule.java:184)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.submit(BaseHttpCommandExecutorService.java:
127)
at
org.jclouds.http.TransformingHttpCommandExecutorServiceImpl.submit(TransformingHttpCommandExecutorServiceImpl.java:
54)
at
org.jclouds.http.TransformingHttpCommandImpl.execute(TransformingHttpCommandImpl.java:
73)
at
org.jclouds.rest.internal.AsyncRestClientProxy.createListenableFutureForHttpRequestMappedToMethodAndArgs(AsyncRestClientProxy.java:
248)
at
org.jclouds.rest.internal.AsyncRestClientProxy.invoke(AsyncRestClientProxy.java:
148)
at $Proxy90.authenticateTenantWithCredentials(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
60)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.jclouds.concurrent.internal.SyncProxy.invoke(SyncProxy.java:
159)
at $Proxy91.authenticateTenantWithCredentials(Unknown Source)
at
org.jclouds.openstack.keystone.v2_0.functions.AuthenticatePasswordCredentials.apply(AuthenticatePasswordCredentials.java:
51)
at
org.jclouds.openstack.keystone.v2_0.functions.AuthenticatePasswordCredentials.apply(AuthenticatePasswordCredentials.java:
30)
at
org.jclouds.concurrent.RetryOnTimeOutExceptionFunction.apply(RetryOnTimeOutExceptionFunction.java:
49)
at com.google.common.cache.CacheLoader
$FunctionToCacheLoader.load(CacheLoader.java:119)
at com.google.common.cache.LocalCache
$LoadingValueReference.loadFuture(LocalCache.java:3568)
at com.google.common.cache.LocalCache
$Segment.loadSync(LocalCache.java:2350)
at com.google.common.cache.LocalCache
$Segment.lockedGetOrLoad(LocalCache.java:2313)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:
2228)
at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
at com.google.common.cache.LocalCache
$LocalManualCache.get(LocalCache.java:4829)
at
org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule
$2.get(KeystoneAuthenticationModule.java:211)
at
org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule
$2.get(KeystoneAuthenticationModule.java:207)
at
org.jclouds.openstack.keystone.v2_0.suppliers.LocationIdToURIFromAccessForTypeAndVersionSupplier.get(LocationIdToURIFromAccessForTypeAndVersionSupplier.java:
61)
at
org.jclouds.openstack.keystone.v2_0.suppliers.LocationIdToURIFromAccessForTypeAndVersionSupplier.get(LocationIdToURIFromAccessForTypeAndVersionSupplier.java:
40)
at
org.jclouds.rest.suppliers.SetAndThrowAuthorizationExceptionSupplier.get(SetAndThrowAuthorizationExceptionSupplier.java:
49)
at
org.jclouds.concurrent.RetryOnTimeOutExceptionSupplier.get(RetryOnTimeOutExceptionSupplier.java:
47)
at
org.jclouds.util.Suppliers2$ExpiringMemoizingSupplier.get(Suppliers2.java:
130)
at
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:
64)
at
org.jclouds.location.suppliers.derived.ZoneIdsFromZoneIdToURIKeySet.get(ZoneIdsFromZoneIdToURIKeySet.java:
48)
at
org.jclouds.location.suppliers.derived.ZoneIdsFromZoneIdToURIKeySet.get(ZoneIdsFromZoneIdToURIKeySet.java:
36)
at
org.jclouds.rest.suppliers.SetAndThrowAuthorizationExceptionSupplier.get(SetAndThrowAuthorizationExceptionSupplier.java:
49)
at
org.jclouds.concurrent.RetryOnTimeOutExceptionSupplier.get(RetryOnTimeOutExceptionSupplier.java:
47)
at
org.jclouds.util.Suppliers2$ExpiringMemoizingSupplier.get(Suppliers2.java:
130)
at
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:
64)
at
org.jclouds.openstack.nova.v1_1.compute.NovaComputeServiceAdapter.listImages(NovaComputeServiceAdapter.java:
152)
at
org.jclouds.trystack.nova.TryStackNovaServiceAdapter.listImages(TryStackNovaServiceAdapter.java:
34)
at org.jclouds.compute.config.ComputeServiceAdapterContextModule
$3.get(ComputeServiceAdapterContextModule.java:139)
at org.jclouds.compute.config.ComputeServiceAdapterContextModule
$3.get(ComputeServiceAdapterContextModule.java:135)
at
org.jclouds.collect.TransformingSetSupplier.get(TransformingSetSupplier.java:
47)
at
org.jclouds.collect.TransformingSetSupplier.get(TransformingSetSupplier.java:
36)
at org.jclouds.compute.config.BaseComputeServiceContextModule
$9.get(BaseComputeServiceContextModule.java:256)
at org.jclouds.compute.config.BaseComputeServiceContextModule
$9.get(BaseComputeServiceContextModule.java:253)
at
org.jclouds.rest.suppliers.SetAndThrowAuthorizationExceptionSupplier.get(SetAndThrowAuthorizationExceptionSupplier.java:
49)
at
org.jclouds.concurrent.RetryOnTimeOutExceptionSupplier.get(RetryOnTimeOutExceptionSupplier.java:
47)
at
org.jclouds.util.Suppliers2$ExpiringMemoizingSupplier.get(Suppliers2.java:
130)
at
org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:
64)
at
org.jclouds.compute.internal.BaseComputeService.listImages(BaseComputeService.java:
351)


> Glad I could help!
>
> Chris
>

Richard Downer

unread,
Mar 25, 2012, 5:22:04 AM3/25/12
to jcl...@googlegroups.com
Hi Kenneth,

I gave TryStack a bash to see what would happen - took me a couple of attempts but was able to get something running.

The identity needs to be your username, twice, colon-separated - e.g. "facebook12345678:facebook12345678"

This little snippet of code worked for me. I also had a pom.xml dependency on <groupId>org.jclouds.provider</groupId> <artifactId>trystack-nova</artifactId>. I was using jclouds version 1.5.0-alpha.1.

--cut--
@Test
public class TryStackTest {

   private static final String TRYSTACK_USERNAME = "facebookSECRET";
   private static final String TRYSTACK_PASSWORD = "SECRET";
   private Logger logger;
   private ComputeServiceContext context;

   @BeforeClass
   public void testFixtureSetUp() {
      Properties overrides = new Properties();

      // Needs to be in the form of "<tenantId>:<userId>"
      // On TryStack these are both the same - your username
      String identity = TRYSTACK_USERNAME + ":" + TRYSTACK_USERNAME;

      context = new ComputeServiceContextFactory().createContext(
         "trystack-nova",
         identity,
         TRYSTACK_PASSWORD,
         ImmutableSet.<Module>of(new SLF4JLoggingModule()),
         overrides);

      logger = context.getUtils().getLoggerFactory().getLogger(TryStackTest.class.getName());
   }

   @Test
   public void test() throws Exception {
      ComputeService computeService = context.getComputeService();

      Template template = computeService.templateBuilder()
         .smallest()
         .build();
      logger.info("Selected hardware is: %s", template.getHardware().toString());
      logger.info("Selected template is: %s", template.getImage().toString());

      logger.info("Creating node and waiting for it to become available");
      Set<? extends NodeMetadata> nodes = computeService.createNodesInGroup("trystack-tryout", 1, template);

      logger.info("Shutting down");
      computeService.destroyNodesMatching(Predicates.in(nodes));
   }

}
--cut--

Richard.


--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.

Kenneth Nagin

unread,
Mar 25, 2012, 10:03:20 AM3/25/12
to jclouds
Richard:

Thanks, that worked! I will test some other functions and report
back if there are any problems.

I installed my own openstack using the instructions on http://devstack.org/.
It seems to install correctly and I can create server instances with
the gui.
However, when I try to access with the jclouds I can not successfully
list images or nodes.
Should the provider parameter be "nova", "openstack-nova", or
"trystack" ?
Should the identity parameter be <username> or <username>:<username>?
Should the credentials parameter be <password> or <accesskey>?

--Kenneth

On Mar 25, 11:22 am, Richard Downer <richard.dow...@cloudsoftcorp.com>
wrote:
> >        at...
>
> read more »

Adrian Cole

unread,
Mar 25, 2012, 1:15:29 PM3/25/12
to jcl...@googlegroups.com, jclou...@googlegroups.com

Richard, thanks for helping!

Kenneth,

Glad you progressed!

I've not tried devstack, yet.  In principle, there is only the need to know whether you use username/password or accesskey/secret key auth. 

Due to the security problems related to using user/password*, openstack-nova is configured for accesskey/secretkey by default. 

As such, you'll either need to generate an api key first, or switch jclouds to use user/password auth via the system property noted in compute-basics README

All that said, maybe we should consider resetting default to user/pass auth?  anyone in favor or against?

-A

* ex. If you lose your password, it is much more impactful than a secret key, which doesn't have console login rights, for ex.

Adrian Cole

unread,
Mar 25, 2012, 1:49:30 PM3/25/12
to Taylor, Monty, jclou...@googlegroups.com, jcl...@googlegroups.com

Sounds great.  We should hack on this tomorrow :)

-A

On Mar 25, 2012 10:29 AM, "Taylor, Monty" <monty....@hp.com> wrote:
Adrian -

In the OpenStack jenkins, we have some jobs that spin up a brand-new
devstack installation for each commit into the projects so that we can
run integration tests against them. I've been thinking for a while that
we should run jclouds' test suite against that (from our end, as it
would be helpful to know if a commit is breaking a known working
interface out there) BUT - spinning up devstack to test against it is
pretty straightforward to do... perhaps we should work on porting some
of the code we've got in devstack-gate for openstack into your test
framework. The general pattern is:

Spin up a cloud server on an existing cloud (jclouds can obviously
already do that)
Run the devstack script on that server (this should always successfully
have you end up with an openstack installation)
Run test suite against that openstack.

Yeah?

Monty


On 03/25/2012 10:15 AM, Adrian Cole wrote:
> Richard, thanks for helping!
>
> Kenneth,
>
> Glad you progressed!
>
> I've not tried devstack, yet.  In principle, there is only the need to
> know whether you use username/password or accesskey/secret key auth.
>
> Due to the security problems related to using user/password*,
> openstack-nova is configured for accesskey/secretkey by default.
>
> As such, you'll either need to generate an api key first, or switch
> jclouds to use user/password auth via the system property noted in
> compute-basics README
>
> All that said, maybe we should consider resetting default to user/pass
> auth?  anyone in favor or against?
>
> -A
>
> * ex. If you lose your password, it is much more impactful than a secret
> key, which doesn't have console login rights, for ex.
>
> On Mar 25, 2012 7:03 AM, "Kenneth Nagin" <kna...@gmail.com
> <mailto:kna...@gmail.com>> wrote:
>
>     Richard:
>
>     Thanks, that  worked!  I will test some other functions and report
>     back if there are any problems.
>
>     I  installed my own openstack using the instructions on
>     http://devstack.org/.
>     It seems to install correctly and I can create server instances with
>     the gui.
>     However, when I try to access with the jclouds I can not successfully
>     list images or nodes.
>     Should the provider parameter be "nova", "openstack-nova", or
>     "trystack" ?
>     Should the identity parameter be <username> or <username>:<username>?
>     Should the credentials parameter be <password> or <accesskey>?
>
>     --Kenneth
>
>     On Mar 25, 11:22 am, Richard Downer
>     <richard.dow...@cloudsoftcorp.com
>     >       logger.info <http://logger.info>("Selected hardware is: %s",
>     > template.getHardware().toString());
>     >       logger.info <http://logger.info>("Selected template is: %s",
>     > template.getImage().toString());
>     >
>     >       logger.info <http://logger.info>("Creating node and waiting

>     for it to become available");
>     >       Set<? extends NodeMetadata> nodes =
>     > computeService.createNodesInGroup("trystack-tryout", 1, template);
>     >
>     >       logger.info <http://logger.info>("Shutting down");

>     >       computeService.destroyNodesMatching(Predicates.in(nodes));
>     >    }
>     >
>     > }
>     >
>     > --cut--
>     >
>     > Richard.
>     >
>     > On 25 March 2012 10:09, Kenneth Nagin <kna...@gmail.com
>     <mailto:kna...@gmail.com>> wrote:
>     >
>     >
>     >
>     >
>     >
>     >
>     >
>     > > I'm not sure if I'm making progress here but now I'm get getting a
>     > > HTTP/1.1 401 Unauthorized exception with input
>     > > provider= trystack-nova
>     > > identity = tenantId:facebook582447314
>     > > credential = password
>     >
>     > > The userid and password come from trystack's API page
>     >
>     > > This is the error output:
>     > > context: {provider=trystack-nova,
>     >
>     > >
>     endpoint=memoizeWithExpiration(ExpiringMemoizingSupplier{delegate=RetryOnTimeOutExceptionSupplier(RetryOnTimeOutButNotOnAuthorizationExceptionSupplier(org.jclouds.location.suppliers.fromconfig.ProviderURIFromConfiguration@55e055e
>     > > )),
>     > > durationNanos=60000000000}, seconds=60), apiVersion=1.1,
>     > > buildVersion=, identity=tenantId:na...@il.ibm.com
>     <mailto:tenantId%3Ana...@il.ibm.com>, iso3166Codes=[US-
>     <mailto:jcl...@googlegroups.com>.

>     To unsubscribe from this group, send email to
>     jclouds+u...@googlegroups.com

Kenneth Nagin

unread,
Mar 26, 2012, 6:07:48 AM3/26/12
to jclouds
The devstack's nova-manage script is not working properly so I'm not
able
to get the necessary accesskey/secretkey credentials (I will work on
this on the side).
For the time being I'm trying to make some progress with the
tenateId:userid/password approach.

I think I uncovered a bug in openstack-nova. I think it is hard coded
locahost:5000 as its endpoint.

This is the exception:

[1] 11:05:57 AM Cannot JDKLogger.logError: retry after server
error, command has exceeded retry limit 5:
[method=ServiceAsyncClient.authenticateTenantWithCredentials,
request=POST http://localhost:5000/v2.0/tokens HTTP/1.1]
com.google.common.util.concurrent.UncheckedExecutionException:
org.jclouds.http.HttpResponseException: Connection refused: connect
connecting to POST http://localhost:5000/v2.0/tokens HTTP/1.1
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:
2234)
at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
at com.google.common.cache.LocalCache
$LocalManualCache.get(LocalCache.java:4829)
at
org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule
$2.get(KeystoneAuthenticationModule.java:211)
at
org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule
$2.get(KeystoneAuthenticationModule.java:207)
at
org.jclouds.openstack.keystone.v2_0.suppliers.LocationIdToURIFromAccessForTypeAndVersionSupplier.get(LocationIdToURIFromAccessForTypeAndVersionSupplier.java:
61)
at
org.jclouds.openstack.keystone.v2_0.suppliers.LocationIdToURIFromAccessForTypeAndVersionSupplier.get(LocationIdToURIFromAccessForTypeAndVersionSupplier.java:
40)
at
org.jclouds.rest.suppliers.SetAndThrowAuthorizationExceptionSupplier.get(SetAndThrowAuthorizationExceptionSupplier.java:
49)
at
org.jclouds.concurrent.RetryOnTimeOutExceptionSupplier.get(RetryOnTimeOutExceptionSupplier.java:
47)

This is a grep of the openstack-nova:
$ grep -R PROPERTY_ENDPOINT * | more
src/main/java/org/jclouds/openstack/nova/v1_1/
NovaPropertiesBuilder.java:import static
org.jclouds.Constants.PROPERTY_ENDPOINT;
src/main/java/org/jclouds/openstack/nova/v1_1/
NovaPropertiesBuilder.java:
properties.setProperty(PROPERTY_ENDPOINT, "http://localhost:5000");


Of course I could be way off on this one. Maybe it isn't a logic bug
but just a faulty error message. I expected to see a
getProperty(PROPERTY_ENDPOINT) in the grep.

--Kenneth
> ...
>
> read more »

Adrian Cole

unread,
Mar 26, 2012, 12:14:33 PM3/26/12
to jcl...@googlegroups.com
maybe we should switch default to user/pass anyway.

http://code.google.com/p/jclouds/issues/detail?id=887

the localhost thing is simply a default, if you are using
"openstack-nova" you should set "openstack-nova.endpoint" to the
keystone url.
ex. https://region-a.geo-1.identity.hpcloudsvc.com:35357

-A

Reply all
Reply to author
Forward
0 new messages