【问题标题】:Getting Errors in creating a Neo4j cluster with two instance在创建具有两个实例的 Neo4j 集群时出错
【发布时间】:2016-01-12 06:13:43
【问题描述】:

我正在尝试创建一个带有两个实例的 neo4j 集群,其中的配置是

http://neo4j.com/docs/stable/ha-setup-tutorial.html

我尝试了很多东西,但是当我在 initial_hosts 条目中添加另一个 IP 并重新启动服务器时它无法运行。

当我运行命令 neo4j.bat

 INFO  Write transactions to database disabled  
 INFO  Initiating metrics..
 INFO  Attempting to join cluster of [IP of my pc:5001, ip of another pc:5001]

服务器已启动,但当我点击 localhost:7474 时,它无法正常工作。

我的其他配置在我的电脑中:

neo4j.properties

ha.cluster_server=my IP on my machine:5001
ha.server=IP of my pc:6363
ha.server_id=1
online_backup_server=ip of my pc:6366

neo4j-server.properties

org.neo4j.server.database.mode=HA
org.neo4j.server.webserver.address=0.0.0.0

我也启用了日志属性

org.neo4j.server.http.log.config=conf/neo4j-http-logging.xml

但没有创建日志文件。

【问题讨论】:

标签: neo4j


【解决方案1】:

对于每个节点,您需要使用不同的端口。

neo4j01/conf/neo4j.properties

ha.cluster_server=localhost:5001
ha.server=localhost:6363
ha.server_id=1
online_backup_server=localhost:6366
ha.initial_hosts=localhost:5001,localhost:5002

neo4j01/conf/neo4j-server.properties

org.neo4j.server.database.mode=HA
org.neo4j.server.webserver.address=0.0.0.0

neo4j02/conf/neo4j.properties

ha.cluster_server=localhost:5002
ha.server=localhost:6363
ha.server_id=2
online_backup_server=localhost:6366
ha.initial_hosts=localhost:5001,localhost:5002

neo4j02/conf/neo4j-server.properties

org.neo4j.server.database.mode=HA
org.neo4j.server.webserver.address=0.0.0.0

这是如何在本地机器上运行集群的示例 - https://github.com/MicTech/neo4j-ha-configuration

【讨论】:

  • @MicText 我已经完成了与您提供的相同的配置。但是当我做 neo4j.bat 服务器以 INFO Write transactions to database disabled INFO Initiating metrics.. INFO Attempting to join cluster of [localhost:5001, localhost:5002] 开始时,当我点击 localhost:7474 时它不会工作有没有创建集群所需的其他配置
  • 第一个实例我给出了 ha.initial_hosts=localhost:5001,第二个实例我给出了 ha.initial_hosts=localhost:5001,localhost :5002 那么只有我能够成功启动服务器,但我正在使用两台不适合我的不同机器应用同样的东西
  • @akshayjain:您能告诉我们日志中的信息吗?
猜你喜欢
  • 2019-12-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-03-28
  • 1970-01-01
  • 2019-02-24
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多