尽管建立了连接,但没有来自 neo4j-shell 的命令响应
No command response from neo4j-shell, despite establishing connection
通过在此处找到的 CloudFormation 模板创建了新的 neo4j EC2 实例(ubuntu 主机)。
https://github.com/neo4j-contrib/ec2neo
Web 界面运行良好,DB 已启动并且 运行正在运行。
正在尝试从我的本地开发机器连接 neo4j-shell
,我能够建立到远程 EC2 服务器的连接。
$ neo4j-shell -host ec2-xx-xx-xx-xx.compute-1.amazonaws.com
Welcome to the Neo4j Shell! Enter 'help' for a list of commands
NOTE: Remote Neo4j graph database service 'shell' at port 1337
neo4j-sh (?)$
netstat
确认连接已 ESTABLISHED
tcp6 0 0 xx.xx.xx.xx:1337 my.local.ip.add:13785 ESTABLISHED
此时,我键入 help
或任何 neo4j 命令,但我没有从服务器返回任何响应。控制台只是挂起。一旦我停止服务器上的 neo4j 服务,我就会在客户端控制台上收到以下异常。
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.EOFException
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:229)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
at com.sun.proxy.$Proxy1.interpretLine(Unknown Source)
at org.neo4j.shell.impl.AbstractClient.evaluate(AbstractClient.java:149)
at org.neo4j.shell.impl.AbstractClient.evaluate(AbstractClient.java:133)
at org.neo4j.shell.impl.AbstractClient.grabPrompt(AbstractClient.java:101)
at org.neo4j.shell.StartClient.grabPromptOrJustExecuteCommand(StartClient.java:383)
at org.neo4j.shell.StartClient.startRemote(StartClient.java:330)
at org.neo4j.shell.StartClient.start(StartClient.java:196)
at org.neo4j.shell.StartClient.main(StartClient.java:135)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)
... 11 more
我对 neo4j-wrapper.conf
进行了以下更改:
wrapper.java.additional=-Djava.rmi.server.hostname=ec2-xx-xx-xx-xx.compute-1.amazonaws.com
全部iptables
都是"disabled",排除变量。我能够在服务器本身上 运行 neo4j-shell
到 127.0.0.1
我的网络配置或 neo4j 服务器配置中缺少什么?
尝试通过 ssh 进入实例并 运行 它在那里。由于底层 Java RMI 端口处理,远程连接长期以来一直很痛苦。
你也可以试试cycli,它支持http和auth。
通过在此处找到的 CloudFormation 模板创建了新的 neo4j EC2 实例(ubuntu 主机)。 https://github.com/neo4j-contrib/ec2neo
Web 界面运行良好,DB 已启动并且 运行正在运行。
正在尝试从我的本地开发机器连接 neo4j-shell
,我能够建立到远程 EC2 服务器的连接。
$ neo4j-shell -host ec2-xx-xx-xx-xx.compute-1.amazonaws.com
Welcome to the Neo4j Shell! Enter 'help' for a list of commands
NOTE: Remote Neo4j graph database service 'shell' at port 1337
neo4j-sh (?)$
netstat
确认连接已 ESTABLISHED
tcp6 0 0 xx.xx.xx.xx:1337 my.local.ip.add:13785 ESTABLISHED
此时,我键入 help
或任何 neo4j 命令,但我没有从服务器返回任何响应。控制台只是挂起。一旦我停止服务器上的 neo4j 服务,我就会在客户端控制台上收到以下异常。
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.EOFException
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:229)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
at com.sun.proxy.$Proxy1.interpretLine(Unknown Source)
at org.neo4j.shell.impl.AbstractClient.evaluate(AbstractClient.java:149)
at org.neo4j.shell.impl.AbstractClient.evaluate(AbstractClient.java:133)
at org.neo4j.shell.impl.AbstractClient.grabPrompt(AbstractClient.java:101)
at org.neo4j.shell.StartClient.grabPromptOrJustExecuteCommand(StartClient.java:383)
at org.neo4j.shell.StartClient.startRemote(StartClient.java:330)
at org.neo4j.shell.StartClient.start(StartClient.java:196)
at org.neo4j.shell.StartClient.main(StartClient.java:135)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)
... 11 more
我对 neo4j-wrapper.conf
进行了以下更改:
wrapper.java.additional=-Djava.rmi.server.hostname=ec2-xx-xx-xx-xx.compute-1.amazonaws.com
全部iptables
都是"disabled",排除变量。我能够在服务器本身上 运行 neo4j-shell
到 127.0.0.1
我的网络配置或 neo4j 服务器配置中缺少什么?
尝试通过 ssh 进入实例并 运行 它在那里。由于底层 Java RMI 端口处理,远程连接长期以来一直很痛苦。
你也可以试试cycli,它支持http和auth。