在digitalocean错误上通过py2neo连接到neo4j

时间:2017-04-20 08:26:57

标签: neo4j digital-ocean py2neo

我在数字海洋上有一个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

0 个答案:

没有答案