2
votes

I correctly start server:

~/Downloads/neo4j-community-3.2.1/bin $ ./neo4j start Active database: graph.db Directories in use: home:
/home/user/Downloads/neo4j-community-3.2.1 config:
/home/user/Downloads/neo4j-community-3.2.1/conf logs:
/home/user/Downloads/neo4j-community-3.2.1/logs plugins:
/home/user/Downloads/neo4j-community-3.2.1/plugins import:
/home/user/Downloads/neo4j-community-3.2.1/import data:
/home/user/Downloads/neo4j-community-3.2.1/data certificates: /home/user/Downloads/neo4j-community-3.2.1/certificates run:
/home/user/Downloads/neo4j-community-3.2.1/run Starting Neo4j. WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual. Started neo4j (pid 29246). It is available at http://localhost:7474/ There may be a short delay until the server is ready. See /home/user/Downloads/neo4j-community-3.2.1/logs/neo4j.log for current status.

then when I try to launch the neo4j-shell:

~/Downloads/neo4j-community-3.2.1/bin $ ./neo4j-shell -v ERROR (-v for expanded information): Connection refused java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused 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.newCall(UnicastRef.java:342) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at java.rmi.Naming.lookup(Naming.java:101) at org.neo4j.shell.impl.RmiLocation.getBoundObject(RmiLocation.java:191) at org.neo4j.shell.impl.RemoteClient.findRemoteServer(RemoteClient.java:72) at org.neo4j.shell.impl.RemoteClient.(RemoteClient.java:65) at org.neo4j.shell.impl.RemoteClient.(RemoteClient.java:46) at org.neo4j.shell.ShellLobby.newClient(ShellLobby.java:204) at org.neo4j.shell.StartClient.startRemote(StartClient.java:358) at org.neo4j.shell.StartClient.start(StartClient.java:229) at org.neo4j.shell.StartClient.main(StartClient.java:147) Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.(Socket.java:434) at java.net.Socket.(Socket.java:211) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:148) 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 -file File containing commands to execute, or '-' to read from stdin. After executing it the shell exits -readonly Connect in readonly mode (only for connecting with -path) -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 server is in its default initial configuration, the only thing I changed is the graph username and password.

1

1 Answers

6
votes

neo4j-shell is deprecated since version 3.1, you should use cypher-shell instead.

But you can enable it by adding this configuration : dbms.shell.enabled=true

Cheers.