Guice creation error while posting REST client request

122 views
Skip to first unread message

myself.r...@gmail.com

unread,
Nov 3, 2014, 7:37:32 AM11/3/14
to simianar...@googlegroups.com
Hi,

Im getting following error message, when posting REST client request in Ubuntu 12.0.4:

Could someone please tell me what is the problem here,

*******************************************************************************************************************************************************************************************

simian@ip-----:~ $ curl -v -H "Content-Type: application/json" -d '{"eventType":"CHAOS_TERMINATION","groupType":"ASG","groupName":"dd","chaosType":"BurnCpu"}' http://localhost:8080/simianarmy/api/v1/chaos
* About to connect() to localhost port 8080 (#0)
*   Trying 127.0.0.1... connected
> POST /simianarmy/api/v1/chaos HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:8080
> Accept: */*
> Content-Type: application/json
> Content-Length: 115
>
* upload completely sent off: 115out of 115 bytes
< HTTP/1.1 500 failed to terminate instance i-137ca219
< Content-Type: text/html; charset=iso-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 12355
< Server: Jetty(6.1.25)
<
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 failed to terminate instance i-137ca219</title>
</head>

<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /simianarmy/api/v1/chaos. Reason:
<pre>    failed to terminate instance i-137ca219</pre></p><h3>Caused by:</h3><pre>java.lang.RuntimeException: failed to terminate instance i-137ca219
        at com.netflix.simianarmy.basic.chaos.BasicChaosMonkey.handleTerminationError(BasicChaosMonkey.java:202)
        at com.netflix.simianarmy.basic.chaos.BasicChaosMonkey.terminateInstance(BasicChaosMonkey.java:387)
        at com.netflix.simianarmy.basic.chaos.BasicChaosMonkey.terminateNow(BasicChaosMonkey.java:175)
        at com.netflix.simianarmy.resources.chaos.ChaosMonkeyResource.addTerminationEvent(ChaosMonkeyResource.java:213)
        at com.netflix.simianarmy.resources.chaos.ChaosMonkeyResource.addEvent(ChaosMonkeyResource.java:194)
        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.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
        at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
        at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
        at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
        at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
        at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
        at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: com.google.inject.CreationException: Guice creation errors:

1) org.jclouds.rest.config.SyncToAsyncHttpApiProvider&lt;org.jclouds.rest.HttpClient, A&gt; cannot be used as a key; It is not fully specified.

2) org.jclouds.rest.config.SyncToAsyncHttpApiProvider&lt;org.jclouds.ec2.EC2Client, A&gt; cannot be used as a key; It is not fully specified.

3) org.jclouds.rest.RestContext&lt;org.jclouds.ec2.EC2Client, A&gt; cannot be used as a key; It is not fully specified.

4) No implementation for org.jclouds.rest.HttpClient was bound.
  at org.jclouds.rest.config.BinderUtils.bindHttpApiProvider(BinderUtils.java:109)

5) No implementation for org.jclouds.ec2.EC2Client was bound.
  at org.jclouds.rest.config.BinderUtils.bindHttpApiProvider(BinderUtils.java:109)

5 errors
        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
        at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:154)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
        at com.google.inject.Guice.createInjector(Guice.java:95)
        at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:407)
        at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:331)
        at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:622)
        at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:602)
        at com.netflix.simianarmy.client.aws.AWSClient.getJcloudsComputeService(AWSClient.java:728)
        at com.netflix.simianarmy.client.aws.AWSClient.connectSsh(AWSClient.java:746)
        at com.netflix.simianarmy.chaos.ChaosInstance.connectSsh(ChaosInstance.java:123)
        at com.netflix.simianarmy.chaos.ScriptChaosType.apply(ScriptChaosType.java:76)
        at com.netflix.simianarmy.basic.chaos.BasicChaosMonkey.terminateInstance(BasicChaosMonkey.java:377)
        ... 39 more
</pre>
<h3>Caused by:</h3><pre>com.google.inject.CreationException: Guice creation errors:

1) org.jclouds.rest.config.SyncToAsyncHttpApiProvider&lt;org.jclouds.rest.HttpClient, A&gt; cannot be used as a key; It is not fully specified.

2) org.jclouds.rest.config.SyncToAsyncHttpApiProvider&lt;org.jclouds.ec2.EC2Client, A&gt; cannot be used as a key; It is not fully specified.

3) org.jclouds.rest.RestContext&lt;org.jclouds.ec2.EC2Client, A&gt; cannot be used as a key; It is not fully specified.

4) No implementation for org.jclouds.rest.HttpClient was bound.
  at org.jclouds.rest.config.BinderUtils.bindHttpApiProvider(BinderUtils.java:109)

5) No implementation for org.jclouds.ec2.EC2Client was bound.
  at org.jclouds.rest.config.BinderUtils.bindHttpApiProvider(BinderUtils.java:109)

5 errors
        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
        at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:154)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
        at com.google.inject.Guice.createInjector(Guice.java:95)
        at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:407)
        at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:331)
        at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:622)
        at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:602)
        at com.netflix.simianarmy.client.aws.AWSClient.getJcloudsComputeService(AWSClient.java:728)
        at com.netflix.simianarmy.client.aws.AWSClient.connectSsh(AWSClient.java:746)
        at com.netflix.simianarmy.chaos.ChaosInstance.connectSsh(ChaosInstance.java:123)
        at com.netflix.simianarmy.chaos.ScriptChaosType.apply(ScriptChaosType.java:76)
        at com.netflix.simianarmy.basic.chaos.BasicChaosMonkey.terminateInstance(BasicChaosMonkey.java:377)
        at com.netflix.simianarmy.basic.chaos.BasicChaosMonkey.terminateNow(BasicChaosMonkey.java:175)
        at com.netflix.simianarmy.resources.chaos.ChaosMonkeyResource.addTerminationEvent(ChaosMonkeyResource.java:213)
        at com.netflix.simianarmy.resources.chaos.ChaosMonkeyResource.addEvent(ChaosMonkeyResource.java:194)
        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.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
        at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
        at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
        at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
        at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
        at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
        at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

************************************************************************************************************************************************************************************************************************************************
Regards,
Rahul


Chris Feldman

unread,
Mar 16, 2016, 5:28:27 PM3/16/16
to Simian Army Users
Did you ever solve this? I think I'm having a very similar problem.
Reply all
Reply to author
Forward
0 new messages