Re: [TinkerPop] Connecting Gremlin via Java Driver - Time out exception

810 views
Skip to first unread message

Stephen Mallette

unread,
Jan 12, 2016, 2:49:12 PM1/12/16
to Gremlin-users
I don't know why you are getting these errors.  Can you try to provide some more information?  maybe share your "changed" gremlin-server.yaml file and demonstrate creating a Cluster/Client in the Gremlin Console and connect from there - then share that console output.  

On Fri, Jan 8, 2016 at 12:08 PM, <artofi...@gmail.com> wrote:
Hi,
I am new to Gremlin/Titan/Cassandara.
I am working on the POC. I am able to run the queries via gremlin console.
Now i am trying to connect via gremlin java driver and getting below issue. Its a timeout exception. posted the exception below.  I tried to run this sample class inside the server with standalone java and outside the server.
both the places I am getting same exception. I have changed the websocketchannalizer in gremlin.server.yaml and restarted the server.

1:54:39 [main] DEBUG io.netty.util.internal.JavassistTypeParameterMatcherGenerator - Generated: io.netty.util.internal.__matchers__.io.netty.handler.codec.http.websocketx.WebSocketFrameMatcher
11:54:39 [gremlin-driver-loop-1] DEBUG io.netty.util.internal.JavassistTypeParameterMatcherGenerator - Generated: io.netty.util.internal.__matchers__.io.netty.handler.codec.http.HttpObjectMatcher
11:54:39 [gremlin-driver-loop-1] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.noResourceLeakDetection: false
11:54:39 [gremlin-driver-loop-1] WARN  io.netty.channel.ChannelInitializer - Failed to initialize a channel. Closing: [id: 0x2a4ed403]
java.lang.NoSuchMethodError: io.netty.util.AttributeKey.valueOf(Ljava/lang/String;)Lio/netty/util/AttributeKey;
at org.apache.tinkerpop.gremlin.driver.Handler$GremlinSaslAuthenticationHandler.<clinit>(Handler.java:67) ~[gremlin-driver-3.0.2-incubating.jar:3.0.2-incubating]
at org.apache.tinkerpop.gremlin.driver.Channelizer$AbstractChannelizer.initChannel(Channelizer.java:140) ~[gremlin-driver-3.0.2-incubating.jar:3.0.2-incubating]
at org.apache.tinkerpop.gremlin.driver.Channelizer$AbstractChannelizer.initChannel(Channelizer.java:81) ~[gremlin-driver-3.0.2-incubating.jar:3.0.2-incubating]
at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:70) [netty-all-4.0.0.Final.jar:?]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRegistered(DefaultChannelHandlerContext.java:188) [netty-all-4.0.0.Final.jar:?]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRegistered(DefaultChannelHandlerContext.java:174) [netty-all-4.0.0.Final.jar:?]
at io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:730) [netty-all-4.0.0.Final.jar:?]
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:418) [netty-all-4.0.0.Final.jar:?]
at io.netty.channel.AbstractChannel$AbstractUnsafe.access$100(AbstractChannel.java:359) [netty-all-4.0.0.Final.jar:?]
at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:395) [netty-all-4.0.0.Final.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:353) [netty-all-4.0.0.Final.jar:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:366) [netty-all-4.0.0.Final.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [netty-all-4.0.0.Final.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_65]
11:54:39 [main] DEBUG org.apache.tinkerpop.gremlin.driver.Connection - Error opening connection on ws://155.111.203.23:8182/gremlin
11:54:39 [main] DEBUG org.apache.tinkerpop.gremlin.driver.ConnectionPool - Could not initialize connections in pool for Host{address=155.111.203.23/155.111.203.23:8182, hostUri=ws://155.111.203.23:8182/gremlin} - pool size at 0
11:54:39 [main] WARN  org.apache.tinkerpop.gremlin.driver.Client - Could not initialize connection pool for Host{address=155.111.203.23/155.111.203.23:8182, hostUri=ws://155.111.203.23:8182/gremlin} - will try later
Is connected=org.apache.tinkerpop.gremlin.driver.Client$ClusteredClient@45efd90f
11:54:39 [main] DEBUG org.apache.tinkerpop.gremlin.driver.Client - Submitted RequestMessage{, requestId=58200417-abec-4ca3-83c5-5f2c30a0caa1, op='eval', processor='', args={batchSize=64, gremlin=g.V()}} to - connection not initialized
java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out waiting for an available host.
at org.apache.tinkerpop.gremlin.driver.Client.submit(Client.java:135)
at org.apache.tinkerpop.gremlin.driver.Client.submit(Client.java:119)

Thanks,
Kalai.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/9c300b16-a156-453b-bc7f-2c1a398559d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

artofi...@gmail.com

unread,
Jan 13, 2016, 4:31:44 PM1/13/16
to Gremlin-users
Stephen,

I figured out. I dint read the exception properly. I am having multiple version of "Netty" jar . Replaced with the version in Gremlin server resolve the issue.
Thanks for your time reading and replying back.

Regards,
Kalai.
Reply all
Reply to author
Forward
0 new messages