当前位置: 首页 > 工具软件 > neo4j-client > 使用案例 >

Neo4j-shell 报错Connection refused解决方案

龙德润
2023-12-01

Linux环境下

cd /usr/share/neo4j/bin
./neo4j-shell

报错如下:

ERROR (-v for expanded information):
	Connection refused

 -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://<host>:<port>/<name> (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

解决方案:

cd /etc/neo4j
vim neo4j.conf

去掉 #dbms.shell.enabled=true  前面的#  (位置246行)

更改后重启neo4j即可

 

 类似资料: