neo4j/community — Issue #268: Cannot connect using neo4j-shell
Author: ceefour
Created: 2012-02-21 17:32:48+00:00
State: open

neo4j version: 1.6.

ceefour@annafi:/$ neo4j-shell -host localhost -v
NOTE: Remote Neo4j graph database service 'shell' at port 1337
[Reconnected to server]
ERROR (-v for expanded information):
Connection refused
java.lang.RuntimeException: java.rmi.ConnectException: Connection refused to host: 67.215.65.132; nested exception is:
java.net.ConnectException: Connection timed out
at org.neo4j.shell.impl.AbstractClient.possiblyGrabDefaultVariableFromServer(AbstractClient.java:244)
at org.neo4j.shell.impl.AbstractClient.init(AbstractClient.java:208)
at org.neo4j.shell.impl.AbstractClient.grabPrompt(AbstractClient.java:80)
at org.neo4j.shell.StartClient.grabPromptOrJustExecuteCommand(StartClient.java:364)
at org.neo4j.shell.StartClient.startRemote(StartClient.java:346)
at org.neo4j.shell.StartClient.start(StartClient.java:169)
at org.neo4j.shell.StartClient.main(StartClient.java:108)
Caused by: java.rmi.ConnectException: Connection refused to host: 67.215.65.132; nested exception is:
java.net.ConnectException: Connection 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:128)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
at $Proxy2.getProperty(Unknown Source)
at org.neo4j.shell.impl.AbstractClient.possiblyGrabDefaultVariableFromServer(AbstractClient.java:237)
... 6 more
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at java.net.Socket.(Socket.java:392)
at java.net.Socket.(Socket.java:206)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 13 more

-host Domain name or IP of host to connect to (default: localhost)
-port Port of host to connect to (default: 1337)
-name RMI name, i.e. rmi://:/ (default: shell)
-pid Process ID to connect to
-c Command line to execute. After executing it the shell exits
-readonly Connect in readonly mode
-path Points to a neo4j db path so that a local server can be started there
-config Points to a config file when starting a local server

Example arguments for remote:
-port 1337
-host 192.168.1.234 -port 1337 -name shell
-host localhost -readonly
...or no arguments for default values
Example arguments for local:
-path /path/to/db
-path /path/to/db -config /path/to/neo4j.config
-path /path/to/db -readonly

The above error needs about 5 minutes to show up, all the while it was blank. (neo4j-shell should output connection progress/logging etc. in order to have better diagnostics info)

And why connect to "67.215.65.132" ??? I specified -h localhost on the command line.

However I can access webadmin via browser successfully.