2016-04-25 48 views
3

我通过gremlin groovy shell连接到远程gremlin服务器。连接成功。但是对于我尝试执行的任何远程命令,都会出现超时错误。即使命令:> 1+1Gremlin远程命令失败,并显示超时错误:主机没有及时响应

gremlin> :remote connect tinkerpop.server conf/senthil.yaml 
==>Connected - 10.40.40.65/10.40.40.65:50080 

gremlin> :> 1+1 
Host did not respond in a timely fashion - check the server status and submit again. 
Display stack trace? [yN] 
org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException: Host did not respond in a timely fashion - check the server status and submit again. 
at org.apache.tinkerpop.gremlin.console.groovy.plugin.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:120) 
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215) 
at org.apache.tinkerpop.gremlin.console.commands.SubmitCommand.execute(SubmitCommand.groovy:41) 
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215) 
at org.codehaus.groovy.tools.shell.Shell.execute(Shell.groovy:101) 
at org.codehaus.groovy.tools.shell.Groovysh.super$2$execute(Groovysh.groovy) 
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:497) 

这是我的conf文件:remote.yaml

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

我使用dynamodb +泰坦。

回答

4

您可能没有真正成功的连接。控制台(和底层驱动程序)很乐观,因为它确实不会在发送请求之前连接失败,因为它预计服务器可能会“稍后”联机。我会回头调查服务器是否正在运行,是否拥有正确的IP,如果您正在远程连接,如果端口已打开,您使用的是兼容的IP地址,则host属性未设置为“localhost”版本的TinkerPop等。

+1

添加到斯蒂芬的回应中,确保Gremlin控制台'remote.yaml'和Gremlin服务器'gremlin-server.yaml'中的'host'和'port'值匹配。它看起来像你在'remote.yaml'中修改了它们的默认值。 –

相关问题