Are you able to successfully run the compute-basics example from the jclouds-examples repository?
The README describes how to build and run the example and the GCE instructions are at the bottom: https://github.com/jclouds/jclouds-examples/tree/master/compute-basics More information on how to set up your projects and authenticate as a service account is here: https://jclouds.apache.org/guides/google/ Have you successfully authenticated and executed other commands against GCE? On Mon, Jul 20, 2015 at 8:05 AM, Asanka Sanjaya Herath <[email protected]> wrote: > Hi, > > I'm getting following error when I try to create an instance using Jclouds > API in GCE. > > java.util.concurrent.ExecutionException: java.lang.IllegalStateException: > operation failed. Http Error Code: 403 HttpError: FORBIDDEN > at > com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299) > at > com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286) > at > com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116) > at org.jclouds.concurrent.FutureIterables$1.run(FutureIterables.java:123) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.IllegalStateException: operation failed. Http Error > Code: 403 HttpError: FORBIDDEN > at > org.jclouds.googlecomputeengine.compute.GoogleComputeEngineServiceAdapter.waitOperationDone(GoogleComputeEngineServiceAdapter.java:434) > at > org.jclouds.googlecomputeengine.compute.GoogleComputeEngineServiceAdapter.createNodeWithGroupEncodedIntoName(GoogleComputeEngineServiceAdapter.java:185) > at > org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.createNodeWithGroupEncodedIntoName(AdaptingComputeServiceStrategies.java:195) > at > org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet$AddNode.call(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:79) > at > org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet$AddNode.call(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:63) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > at java.lang.Thread.getStackTrace(Thread.java:1589) > at > org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.createNodeInGroupWithNameAndTemplate(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:167) > at > org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:122) > at > org.jclouds.googlecomputeengine.compute.strategy.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:127) > at > org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37) > at com.sun.proxy.$Proxy116.createNodesInGroup(Unknown Source) > > > Any help is highly appreciated on this. > > -- > Thanks, > Regards, > ASH >
