3
跟进http://goo.gl/RSluPw连接到通过shell本地服务器拒绝(Neo4j的2.1.6)
无法通过外壳连接到本地服务器。
我安装了neo4j-community-2.1.6(没有任何修改),启动了服务器,然后想通过shell进行连接(如此处所述http://goo.gl/jI12RO)。我错过了什么?
这里是我的控制台输出:
[~/bin/neo4j]
$ ls
CHANGES.txt NOTICE.txt bin/ lib/
LICENSE.txt README.txt conf/ plugins/
LICENSES.txt UPGRADE.txt data/ system/
[~/bin/neo4j]
$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
[~/bin/neo4j]
$ ./bin/neo4j start
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow
Starting Neo4j Server...WARNING: not changing user
process [5481]... waiting for server to be ready............................................................................... OK.
http://localhost:7474/ is ready.
[~/bin/neo4j]
$ neo4j-shell
ERROR (-v for expanded information):
Exception creating connection to: 172.24.46.19; nested exception is:
java.net.SocketException: Host is down
-host Domain name or IP of host to connect to (default: localhost)
...
[~/bin/neo4j]
$ neo4j-shell -v
ERROR (-v for expanded information):
Connection refused
java.rmi.ConnectException: Connection refused to host: 172.24.46.19; nested exception is:
java.net.ConnectException: Operation timed out
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
at com.sun.proxy.$Proxy1.welcome(Unknown Source)
at org.neo4j.shell.impl.AbstractClient.sayHi(AbstractClient.java:215)
at org.neo4j.shell.impl.RemoteClient.findRemoteServer(RemoteClient.java:63)
at org.neo4j.shell.impl.RemoteClient.<init>(RemoteClient.java:55)
at org.neo4j.shell.impl.RemoteClient.<init>(RemoteClient.java:43)
at org.neo4j.shell.ShellLobby.newClient(ShellLobby.java:165)
at org.neo4j.shell.StartClient.startRemote(StartClient.java:297)
at org.neo4j.shell.StartClient.start(StartClient.java:175)
at org.neo4j.shell.StartClient.main(StartClient.java:120)
Caused by: java.net.ConnectException: Operation timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:147)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 14 more
-host Domain name or IP of host to connect to (default: localhost)
-port Port of host to connect to (default: 1337)
...
[~/bin/neo4j]
$
为什么外壳试图连接到主机172.24.46.19?关于http://goo.gl/R3iSzK的建议也没有帮助。
更新1:
我激活的远程炮弹在neo4j.properties
:
# Enable shell server so that remote clients can connect via Neo4j shell.
remote_shell_enabled=true
# The network interface IP the shell will listen on (use 0.0.0 for all interfaces)
remote_shell_host=127.0.0.1
# The port the shell will listen on, default is 1337
remote_shell_port=1337
仍然没有成功:
$ neo4j start
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow
Starting Neo4j Server...WARNING: not changing user
process [7104]... waiting for server to be ready............................................................................... OK.
http://localhost:7474/ is ready.
[~]
$ neo4j-shell
ERROR (-v for expanded information):
Exception creating connection to: 172.24.46.19; nested exception is:
java.net.SocketException: Host is down
...
[~]
$ neo4j-shell -host 127.0.0.1 -port 1337
ERROR (-v for expanded information):
Exception creating connection to: 172.24.46.19; nested exception is:
java.net.SocketException: Host is down
仍试图连接到172.24.46.19。
你可能正在那台机器上运行另一个java服务,它的RMI注册表干扰了Neo4j?你可以尝试明确使用'-host localhost -port 1337'吗? –
@MichaelHunger我试过'-host localhost -port 1337'没有任何成功。至于'ps -A',我无法识别任何进一步的java进程。 –
@MichaelHunger如果我从网络断开(拔掉LAN),并停止/启动'neo4j',则'neo4j-shell'成功。这是为什么? –