newbie-jclouds with OpenStack

241 views
Skip to first unread message

yinying pan

unread,
Nov 16, 2012, 6:46:14 PM11/16/12
to jcl...@googlegroups.com
Hi all,

I just got started with OpenStack and jclouds this week. I followed the instructions in posts ” Getting started with jclouds”,”Logging in jclouds”,”OpenStack devstack on the Rackspace open cloud”, all went well. But when I tested jclouds with my own OpenStack deployment on Rackspace following the testing code in post “jclouds and OpenStack”, I got some errors, I couldn’t figure out why. Could anyone give me a hand? Here is the link where I paste errors with logging https://gist.github.com/4091218 

Btw, the server instance hosting Openstack will be running in the following days for testing purpose. You're welcome to test and verify by accessing the OpenStack dashboard @67.23.43.219 by browser. user:demo, password: devstack. 

Thanks.

Andrew Phillips

unread,
Nov 16, 2012, 7:46:30 PM11/16/12
to jcl...@googlegroups.com
Hi Yinying

Thanks for the detailed description and link to the error output. Your
issue looks similar to the one discussed at

https://groups.google.com/forum/?fromgroups=#!topic/jclouds/y6BihiuhLSQ

which was solved in a recent jclouds release. I see you're using 1.5.1
- could you try with 1.5.3 and see if the problem remains?

If so, could also create a Gist of the sample code you are actually
trying to run, which I'm guessing is a class called "JCloudsOpenStack"?

Thanks!


Andrew

Yinying PAN

unread,
Nov 17, 2012, 7:09:56 AM11/17/12
to jcl...@googlegroups.com, aphi...@qrmedia.com
Hi Andrew, 

Thanks for your quick response, I update to jclouds 1.5.3 and it works!

Yinying

Yinying PAN

unread,
Nov 20, 2012, 9:15:42 AM11/20/12
to jcl...@googlegroups.com, aphi...@qrmedia.com
Hi all, 

It's wired that the same pieces of sample code which worked several days ago failed today! I tried to list images(source code), then a Timeout Exception was raised(please see below). Almost the same error message when I tried to create a container on Openstack Swift(source code, error output). Any one has met similar problem?

-  >> "{"auth":{"passwordCredentials":{"username":"demo","password":"devstack"},"tenantName":"demo"}}"
-  >> Accept: application/json
-  >> Content-Type: application/json
-  >> Content-Length: 94
-  >> "{"auth":{"passwordCredentials":{"username":"demo","password":"devstack"},"tenantName":"demo"}}"
-  >> Accept: application/json
-  >> Content-Type: application/json
-  >> Content-Length: 94
-  >> "{"auth":{"passwordCredentials":{"username":"demo","password":"devstack"},"tenantName":"demo"}}"
-  >> Accept: application/json
-  >> Content-Type: application/json
-  >> Content-Length: 94
-  >> "{"auth":{"passwordCredentials":{"username":"demo","password":"devstack"},"tenantName":"demo"}}"
-  >> Accept: application/json
-  >> Content-Type: application/json
-  >> Content-Length: 94
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timeout waiting for task.
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2258)
at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
at org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule$2.get(KeystoneAuthenticationModule.java:206)
at org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule$2.get(KeystoneAuthenticationModule.java:202)
at org.jclouds.openstack.keystone.v2_0.suppliers.LocationIdToURIFromAccessForTypeAndVersion.get(LocationIdToURIFromAccessForTypeAndVersion.java:97)
at org.jclouds.openstack.keystone.v2_0.suppliers.LocationIdToURIFromAccessForTypeAndVersion.get(LocationIdToURIFromAccessForTypeAndVersion.java:56)
at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:91)
at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:72)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252)
at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:140)
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.util.Suppliers2$SupplierComposition.get(Suppliers2.java:179)
at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:91)
at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier$SetAndThrowAuthorizationExceptionSupplierBackedLoader.load(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:72)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252)
at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
at org.jclouds.rest.suppliers.MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.get(MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.java:140)
at org.jclouds.rest.internal.AsyncRestClientProxy.getInstanceOfTypeWithQualifier(AsyncRestClientProxy.java:224)
at org.jclouds.rest.internal.AsyncRestClientProxy.lookupValueFromGuice(AsyncRestClientProxy.java:179)
at org.jclouds.rest.internal.AsyncRestClientProxy.invoke(AsyncRestClientProxy.java:145)
at $Proxy62.getConfiguredZones(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jclouds.concurrent.internal.SyncProxy.invoke(SyncProxy.java:164)
at $Proxy63.getConfiguredZones(Unknown Source)
at JCloudsOpenStack.init(JCloudsOpenStack.java:54)
at JCloudsOpenStack.main(JCloudsOpenStack.java:26)
Caused by: java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timeout waiting for task.
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at org.jclouds.concurrent.RetryOnTimeOutExceptionFunction.apply(RetryOnTimeOutExceptionFunction.java:57)
at com.google.common.cache.CacheLoader$FunctionToCacheLoader.load(CacheLoader.java:146)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252)
... 42 more
Caused by: java.util.concurrent.TimeoutException: Timeout waiting for task.
at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:264)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:96)
at org.jclouds.concurrent.ExceptionParsingListenableFuture.get(ExceptionParsingListenableFuture.java:76)
at org.jclouds.concurrent.internal.SyncProxy.invoke(SyncProxy.java:170)
at $Proxy59.authenticateWithTenantNameAndCredentials(Unknown Source)
at org.jclouds.openstack.keystone.v2_0.functions.AuthenticatePasswordCredentials.authenticateWithTenantName(AuthenticatePasswordCredentials.java:45)
at org.jclouds.openstack.keystone.v2_0.functions.AuthenticatePasswordCredentials.authenticateWithTenantName(AuthenticatePasswordCredentials.java:33)
at org.jclouds.openstack.keystone.v2_0.functions.internal.BaseAuthenticator.apply(BaseAuthenticator.java:79)
at org.jclouds.openstack.keystone.v2_0.functions.internal.BaseAuthenticator.apply(BaseAuthenticator.java:36)
at org.jclouds.concurrent.RetryOnTimeOutExceptionFunction.apply(RetryOnTimeOutExceptionFunction.java:49)
... 47 more
java.lang.IllegalStateException: interrupted calling get() on [[method=AuthenticationAsyncApi.authenticateWithTenantNameAndCredentials, request=POST http://166.78.4.64:5000/v2.0/tokens HTTP/1.1]], so could not run listeners
at org.jclouds.concurrent.Futures$CallGetAndRunExecutionList.run(Futures.java:66)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:979)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:218)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at org.jclouds.concurrent.config.DescribedFuture.get(DescribedFuture.java:45)
at org.jclouds.concurrent.Futures$CallGetAndRunExecutionList.run(Futures.java:59)

Everett Toews

unread,
Nov 20, 2012, 12:52:28 PM11/20/12
to jcl...@googlegroups.com
The timeout you're getting makes me suspect one of the services (most likely Keystone) you're trying to use with jclouds isn't running properly. I'd suggest using curl to double check that the service you're trying to connect to is up. Have a look at the log output of the service in your devstack screen session to see how they're reacting to the curl commands.

For example,

curl -s -X POST http://166.78.4.64:5000/v2.0/tokens -d '{"auth": {"passwordCredentials": {"username":"demo", "password":"devstack"}, "tenantName":"demo"}}' -H "Content-type: application/json"

Everett


--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jclouds/-/hCpsUq1GaDIJ.
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.

Yinying PAN

unread,
Nov 26, 2012, 10:01:24 AM11/26/12
to jcl...@googlegroups.com
Thanks, Everett,

I've verified that the services of OpenStack are running properly, because all tests went well when I retried both sample codes at home. But when I tested them from inside school's network, the same timeout exception prompted up again, and the "curl" request got no reply. So it turns out this exception is caused by the configuration of our school's network.
 

Yinying

Adrian Cole

unread,
Nov 26, 2012, 10:54:07 AM11/26/12
to jcl...@googlegroups.com
Sounds like a proxy issue. Can you check with your school to see if
you are running in a proxy or if certain hosts are blocked?

-A
> https://groups.google.com/d/msg/jclouds/-/ZOeCngwJzi0J.
Reply all
Reply to author
Forward
0 new messages