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'成功。這是爲什麼? –