如何使用 cypher-shell 不在本地主机上连接到 Bolt

Cod*_*joy 4 neo4j cypher

我真的很想从 Spark Slave 连接到 Bolt,但我想如果我能让它与 cypher-shell 一起工作,其余的就会到位。所以我可以这样做:

cypher-shell -a localhost
Run Code Online (Sandbox Code Playgroud)

连接良好

如果我在实际 ip 的盒子上执行此操作:

cypher-shell -a 172.20.0.71:7687
Run Code Online (Sandbox Code Playgroud)

连接被拒绝,我以为我所要做的就是在conf中做:

dbms.connector.bolt.address=0.0.0.0:7687
Run Code Online (Sandbox Code Playgroud)

这似乎不起作用,我还缺少其他东西吗?(或者至少上面的内容似乎不起作用,我确实重新启动了我的 neo4j 实例,因此它应该接受对 conf 的更改)。仅使用 cypher-shell 上的默认设置进行连接确实会给出以下结果:

Connected to Neo4j 3.3.0 at bolt://localhost:7687 as user neo4j.
Type :help for a list of available commands or :exit to exit the shell.
Note that Cypher queries must end with a semicolon.
Run Code Online (Sandbox Code Playgroud)

那么也许它没有完全重新启动并接受对 的更改neo4j.conf?或者更可能的是我错过了其他东西来让它按照我认为应该的方式工作。我可以在哪里从另一个 ip 或本地通过实际 ip 地址进行连接?

log*_*ima 5

您需要在您的neo4j.conf

dbms.connectors.default_listen_address=0.0.0.0
Run Code Online (Sandbox Code Playgroud)

重新启动服务器,然后使用 cypher-shell :

cypher-shell -a bolt://172.20.0.71:7687
Run Code Online (Sandbox Code Playgroud)