use "gremlin-driver" Reported abnormal “ Timed out waiting for an available host ”

654 views
Skip to first unread message

okuc

unread,
Jan 14, 2016, 7:28:20 PM1/14/16
to Aurelius
Hello everyone!
I follow the "http://s3.thinkaurelius.com/docs/titan/1.0.0/server.html" steps initiated titan service, and the use of "Gremlin Console" connection to run, it can run well.

But when I use the "gremlin-driver" to connect to it, reported the following error, who knows why? Thank you!

Exception in thread "main" 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:146)
 at org
.apache.tinkerpop.gremlin.driver.Client.submit(Client.java:130)
 at com
.heetian.TestTinkerpop.App.main(App.java:25)
Caused by: java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out waiting for an available host.
 at org
.apache.tinkerpop.gremlin.driver.Client.submitAsync(Client.java:194)
 at org
.apache.tinkerpop.gremlin.driver.Client.submitAsync(Client.java:174)
 at org
.apache.tinkerpop.gremlin.driver.Client.submit(Client.java:144)
 
... 2 more
Caused by: java.util.concurrent.TimeoutException: Timed out waiting for an available host.
 at org
.apache.tinkerpop.gremlin.driver.Client$ClusteredClient.chooseConnection(Client.java:342)
 at org
.apache.tinkerpop.gremlin.driver.Client.submitAsync(Client.java:189)
 
... 4 more


I use titan server is titan-1.0.0-hadoop2 comes, java code is as follows:

     Cluster cluster = Cluster.open (App.class.getClassLoader () getResource ("") getPath () +. "Com / abc / TestTinkerpop / remote.yaml".);
     
Client client = cluster.connect ();
   
     
ResultSet results = client.submit ("graph.addVertex ('name', 'stephen')");


<dependency>
   
<groupId> org.apache.tinkerpop </ groupId>
   
<artifactId> gremlin-driver </ artifactId>
   
<version> 3.1.0-incubating </ version>
</ dependency>

hosts: [192.168.31.249]
port
: 8182
serializer
: { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}

Stephen Mallette

unread,
Jan 19, 2016, 6:38:45 AM1/19/16
to Aurelius
If you can connect with the Gremlin Console and :remote then I would full expect for you to be able to use the same configuration file to connect with the driver.  I can only guess that:

Cluster.open (App.class.getClassLoader () getResource ("") getPath () +. "Com / abc / TestTinkerpop / remote.yaml".);

isn't pointing at the file as you think it is?

--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/5665dc5e-2dfb-4cea-bdb1-a0faa3150b4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

okuc

unread,
Jan 19, 2016, 8:07:20 AM1/19/16
to Aurelius
I guarantee that this is the same profile.
I tracked here, no problem, you can find the configuration file.

Thank you!

在 2016年1月19日星期二 UTC+8下午7:38:45,stephen mallette写道:

Stephen Mallette

unread,
Jan 19, 2016, 8:29:10 AM1/19/16
to Aurelius
Well - there is clearly some mis-configuration with the driver, but I don't see it from the information you've supplied. The :remote and :> commands use the driver internally to connect to Gremlin Server so I'm not sure how you could get into a state where one works and not the other unless there you really aren't using the configuration you think you are or some other environmental issue.  Perhaps you should simplify and validate that you can get the driver to connect from localhost...maybe that would give you some new clues.

okuc

unread,
Jan 20, 2016, 5:24:29 AM1/20/16
to Aurelius
I'll “gremlin-server-modern.yaml” profile host, from “host: localhost” change “host: 192.168.90.22”, it is normal, thank you!


在 2016年1月19日星期二 UTC+8下午9:29:10,stephen mallette写道:
Reply all
Reply to author
Forward
0 new messages