我在数字海洋上有一个Droplet并安装并运行neo4j,service neo4j status
的结果是:
Loaded: loaded (/etc/init.d/neo4j; bad; vendor preset: enabled)
Active: active (exited) since Wed 2017-04-19 10:35:43 UTC; 21h ago
Docs: man:systemd-sysv-generator(8)
Process: 725 ExecStop=/etc/init.d/neo4j stop (code=exited, status=0/SUCCESS)
Process: 806 ExecStart=/etc/init.d/neo4j start (code=exited, status=0/SUCCESS)
Tasks: 0
Memory: 0B
CPU: 0
但是当我运行pyhthon代码时,我得到了:
py2neo.packages.httpstream.http.SocketError: Connection refused
我已禁用身份验证。
在图中我明确提到了db:
G=Graph('http://localhost:7474/db/data')
会导致以下错误:
File "/usr/local/lib/python3.5/dist-packages/py2neo/packages/neo4j/v1/bolt.py", line 156, in _recv
raise ProtocolError("Server closed connection")
py2neo.packages.neo4j.v1.exceptions.ProtocolError: Server closed connection