Issue when listing nodes from OpenStack (using jclouds 1.5.0-beta.9)

134 views
Skip to first unread message

Daniel Stein (ChoreOS)

unread,
Aug 6, 2012, 4:05:25 PM8/6/12
to jcl...@googlegroups.com
I`m trying to list nodes, but after creating the computeservice (no errors there) using the same code available on the examples, jclouds stays waiting until one of its threads time out.

I use  

Set<? extends ComputeMetadata> cloudNodes = client.listNodes(); 

to list nodes abter obtaining the client with :

     String provider = "openstack-nova";

    String identity = OP_TENANT + ":" + OP_USER;

    String credential = OP_PASS;


    Properties properties = new Properties();

    properties.setProperty(Constants.PROPERTY_ENDPOINT, OP_AUTHURL);


        // example of injecting a ssh implementation

        Iterable<Module> modules = ImmutableSet.<Module> of();


        ContextBuilder builder = ContextBuilder.newBuilder(provider)

                                               .credentials(identity, credential)

                                               .modules(modules)

                                               .overrides(properties);

                                               

        System.out.printf(">> initializing %s%n", builder.getApiMetadata());


        ComputeService srv = builder.buildView(ComputeServiceContext.class).getComputeService();

        

        System.out.println(" OpenStack: client obtained!");

        

        return srv;

And after a while of waiting, i get this: 

java.lang.reflect.UndeclaredThrowableException

at $Proxy111.listServersInDetail(Unknown Source)

at org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceAdapter.listNodes(NovaComputeServiceAdapter.java:197)

at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listDetailsOnNodesMatching(AdaptingComputeServiceStrategies.java:115)

at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listNodes(AdaptingComputeServiceStrategies.java:110)

at org.jclouds.compute.internal.BaseComputeService.listNodes(BaseComputeService.java:342)

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 com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)

at $Proxy104.listNodes(Unknown Source)

at eu.choreos.nodepoolmanager.cloudprovider.OpenStackKeystoneCloudProvider.getNodes(OpenStackKeystoneCloudProvider.java:125)

at eu.choreos.nodepoolmanager.cloudprovider.OpenStackCloudProviderTest.shouldCreateNodeFromPool(OpenStackCloudProviderTest.java:38)

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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)

at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)

at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)

at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Caused by: java.util.concurrent.TimeoutException: Timeout waiting for task.

at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:259)

at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:91)

at org.jclouds.concurrent.ExceptionParsingListenableFuture.get(ExceptionParsingListenableFuture.java:76)

at org.jclouds.concurrent.internal.SyncProxy.invoke(SyncProxy.java:164)

... 39 more


The maintainer of the openstack install says that he can list the nodes locally without problems.

The same happens when listing the images.


Richard Downer

unread,
Aug 7, 2012, 4:08:09 AM8/7/12
to jcl...@googlegroups.com
Daniel,

Here's one possible suggestion...
OpenStack is built from a few different services. When you log in to the identity service, it sends a service catalog for the different services provided. Each service has its own URL. The Compute service - where the list servers and list images queries go to - will be on a different URL, so it's possible that the log in to the identity services works but querying the compute service does not.

I would ask the maintainer check that the service catalog is correctly configured - it's possible that the catalog contains a bad URL for the compute service - for example, it is using an internal DNS name or IP address or even 'localhost' - that would mean that the maintainer would be able to access the services locally, but if you were on an external network you could not. Also the services tend to run on different TCP port numbers, so perhaps they have opened their firewall to allow access to the identity service port number but have overlooked the compute service port number.

I suggest you take a look at the "Wire Logging" section of this page:

If you can enable wire logging, then jclouds will display the exact requests and responses - if you can then post the logfile here, we'll be able to see the service catalog and other useful debugging info.

Richard.
 


--
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/-/Sr7ncAu70vwJ.
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

Daniel Stein (ChoreOS)

unread,
Aug 7, 2012, 3:30:14 PM8/7/12
to jcl...@googlegroups.com
After some testing with python-novaclient, it was found out that the issue was with the openstack server itself (getting the token was successful, but it was giving local ips, so jclouds was timing out since the ip was unreachable.) Once this problem is fixed, I`ll test again and see if more issues show up.
To unsubscribe from this group, send email to jclouds+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.

Adrian Cole

unread,
Aug 7, 2012, 7:32:05 PM8/7/12
to jcl...@googlegroups.com

Thanks for reporting back.

To view this discussion on the web visit https://groups.google.com/d/msg/jclouds/-/T_bscxbhGOYJ.

To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages