0

我在https://github.com/neo4j/neo4j-python-driver上使用两个环境运行了快速示例。1. 本地 linux => 运行良好 2. 远程 Windows => 似乎运行良好,但不会创建 graph.db。我怎么了?我在远程窗口上的调试日志:

2018-03-09 12:40:56,212  ~~ [CONNECT] ('192.168.1.90', 7687)
2018-03-09 12:40:56,213  ~~ [SECURE] 192.168.1.90
2018-03-09 12:40:56,221  C: [HANDSHAKE] 0x6060B017 [1, 0, 0, 0]
2018-03-09 12:40:56,224  S: [HANDSHAKE] 1
2018-03-09 12:40:56,227  C: INIT ('neo4j-python/1.5.3', {...})
2018-03-09 12:40:56,228  S: SUCCESS ({'server': 'Neo4j/3.3.2'})
2018-03-09 12:40:56,229  ~~ [CLOSE]
2018-03-09 12:40:56,231  C: RUN ('BEGIN', {})
2018-03-09 12:40:56,232  C: PULL_ALL ()
2018-03-09 12:40:56,234  C: RUN ('MERGE (a:Person {name: $name}) MERGE (a)-[:KNOWS]->(friend:Person {name: $friend_name})', {'name': 'Arthur', 'friend_name': 'Guinevere'})
2018-03-09 12:40:56,234  C: PULL_ALL ()
2018-03-09 12:40:56,237  S: SUCCESS ({'result_available_after': 0, 'fields': []})
2018-03-09 12:40:56,238  S: SUCCESS ({})
2018-03-09 12:40:56,239  S: SUCCESS ({'result_available_after': 1, 'fields': []})
2018-03-09 12:40:56,240  S: SUCCESS ({'stats': {'labels-added': 2, 'relationships-created': 1, 'nodes-created': 2, 'properties-set': 2}, 'result_consumed_after': 0, 'type': 'w'})
2018-03-09 12:40:56,241  C: RUN ('COMMIT', {})
2018-03-09 12:40:56,241  C: PULL_ALL ()
2018-03-09 12:40:56,245  S: SUCCESS ({'result_available_after': 1, 'fields': []})
2018-03-09 12:40:56,245  S: SUCCESS ({'bookmark': 'neo4j:bookmark:v1:tx829'})
2018-03-09 12:40:56,246  C: RUN ('BEGIN', {'bookmark': 'neo4j:bookmark:v1:tx829', 'bookmarks': ['neo4j:bookmark:v1:tx829']})
2018-03-09 12:40:56,247  C: PULL_ALL ()
2018-03-09 12:40:56,247  C: RUN ('', {'name': 'Arthur', 'friend_name': 'Lancelot'})
2018-03-09 12:40:56,248  C: PULL_ALL ()
2018-03-09 12:40:56,250  S: SUCCESS ({'result_available_after': 0, 'fields': []})
2018-03-09 12:40:56,251  S: SUCCESS ({'bookmark': 'neo4j:bookmark:v1:tx829'})
2018-03-09 12:40:56,251  S: SUCCESS ({'result_available_after': 1, 'fields': []})
2018-03-09 12:40:56,252  S: SUCCESS ({'stats': {'labels-added': 1, 'relationships-created': 1, 'nodes-created': 1, 'properties-set': 1}, 'result_consumed_after': 0, 'type': 'w'})
2018-03-09 12:40:56,253  C: RUN ('COMMIT', {})
2018-03-09 12:40:56,253  C: PULL_ALL ()
2018-03-09 12:40:56,256  S: SUCCESS ({'result_available_after': 1, 'fields': []})
2018-03-09 12:40:56,256  S: SUCCESS ({'bookmark': 'neo4j:bookmark:v1:tx830'})
2018-03-09 12:40:56,257  C: RUN ('BEGIN', {'bookmark': 'neo4j:bookmark:v1:tx830', 'bookmarks': ['neo4j:bookmark:v1:tx830']})
2018-03-09 12:40:56,258  C: PULL_ALL ()
2018-03-09 12:40:56,259  C: RUN ('', {'name': 'Arthur', 'friend_name': 'Merlin'})
2018-03-09 12:40:56,259  C: PULL_ALL ()
2018-03-09 12:40:56,262  S: SUCCESS ({'result_available_after': 0, 'fields': []})
2018-03-09 12:40:56,263  S: SUCCESS ({'bookmark': 'neo4j:bookmark:v1:tx830'})
2018-03-09 12:40:56,264  S: SUCCESS ({'result_available_after': 1, 'fields': []})
2018-03-09 12:40:56,265  S: SUCCESS ({'stats': {'labels-added': 1, 'relationships-created': 1, 'nodes-created': 1, 'properties-set': 1}, 'result_consumed_after': 0, 'type': 'w'})
2018-03-09 12:40:56,265  C: RUN ('COMMIT', {})
2018-03-09 12:40:56,266  C: PULL_ALL ()
2018-03-09 12:40:56,269  S: SUCCESS ({'result_available_after': 1, 'fields': []})
2018-03-09 12:40:56,269  S: SUCCESS ({'bookmark': 'neo4j:bookmark:v1:tx831'})
2018-03-09 12:40:56,270  C: RUN ('BEGIN', {'bookmark': 'neo4j:bookmark:v1:tx831', 'bookmarks': ['neo4j:bookmark:v1:tx831']})
2018-03-09 12:40:56,271  C: PULL_ALL ()
2018-03-09 12:40:56,271  C: RUN ('MATCH (a:Person)-[:KNOWS]->(friend) WHERE a.name = $name RETURN friend.name ORDER BY friend.name', {'name': 'Arthur'})
2018-03-09 12:40:56,273  C: PULL_ALL ()
2018-03-09 12:40:56,275  S: SUCCESS ({'result_available_after': 0, 'fields': []})
2018-03-09 12:40:56,276  S: SUCCESS ({'bookmark': 'neo4j:bookmark:v1:tx831'})
2018-03-09 12:40:56,277  S: SUCCESS ({'result_available_after': 1, 'fields': ['friend.name']})
2018-03-09 12:40:56,277  S: RECORD * 3
2018-03-09 12:40:56,278  S: SUCCESS ({'result_consumed_after': 0, 'type': 'r'})
Guinevere
Lancelot
Merlin
2018-03-09 12:40:56,279  C: RUN ('COMMIT', {})
2018-03-09 12:40:56,279  C: PULL_ALL ()
2018-03-09 12:40:56,281  S: SUCCESS ({'result_available_after': 0, 'fields': []})
2018-03-09 12:40:56,282  S: SUCCESS ({'bookmark': 'neo4j:bookmark:v1:tx831'})

​</p>

4

1 回答 1

0

如果我从 driver = GraphDatabase.driver("bolt://192.168.1.90:7687", auth=("neo4j", "password")) 更改为 driver = GraphDatabase.driver("bolt://localhost:7687", auth=("neo4j", "password")) , auth=("neo4j", "password")),那么它运行良好。谁能解释为什么?

调试日志更改为

2018-03-09 12:55:47,944  ~~ [CONNECT] ('::1', 7687, 0, 0)
2018-03-09 12:55:47,945  ~~ [SECURE] ::1
2018-03-09 12:55:47,951  C: [HANDSHAKE] 0x6060B017 [1, 0, 0, 0]
2018-03-09 12:55:47,953  S: [HANDSHAKE] 1

2018-03-09 12:40:56,212  ~~ [CONNECT] ('192.168.1.90', 7687)
2018-03-09 12:40:56,213  ~~ [SECURE] 192.168.1.90
018-03-09 12:40:56,221  C: [HANDSHAKE] 0x6060B017 [1, 0, 0, 0]
2018-03-09 12:40:56,224  S: [HANDSHAKE] 1
于 2018-03-10T21:46:56.707 回答