不允许直接对此数据库进行写操作写入必须通过领导者这个服务器的作用是:FOLLOWER

问题描述

我使用 py2neo(2020.1.0) 连接并在 Neo4j 中进行查询,出现以下错误

No write operations are allowed directly on this database. Writes must pass through the leader. The role of this server is: FOLLOWER

我使用 neo4j+s: 方案进行连接,当我浏览文章neo4j+s: 将负责路由。但它似乎不起作用。有没有可能解决这个问题?

解决方法

如果你想打开与FOLLOWER的连接,你需要使用bolt+routing,但写要发送给LEADER:

  ./cypher-shell -a bolt+routing://the_follower:7637