Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
运行neo4j&;HA中的轨道(第2部分)_Neo4j - Fatal编程技术网

运行neo4j&;HA中的轨道(第2部分)

运行neo4j&;HA中的轨道(第2部分),neo4j,Neo4j,我已经配置了一个具有3个节点的HA集群。 第一个是Rails服务器,第二个是Rail控制台,最后一个是Neo4j服务器 我启动了Rails s和Rails c,然后启动了另一个实例,出现了错误 下面 以下是三台机器的配置: Rails服务器和控制台: 模块Neo4j module Rails module HaConsole class Railtie < Object::Rails::Railtie console do Ne

我已经配置了一个具有3个节点的HA集群。 第一个是Rails服务器,第二个是Rail控制台,最后一个是Neo4j服务器

我启动了Rails s和Rails c,然后启动了另一个实例,出现了错误 下面

以下是三台机器的配置:

Rails服务器和控制台:


模块Neo4j

  module Rails
    module HaConsole
      class Railtie < Object::Rails::Railtie
        console do
          Neo4j.config.use do |conf|
            server_id = 2
            conf['ha.server_id'] = server_id
            conf['ha.server'] = "localhost:600#{server_id}"
            conf['ha.cluster_server'] = "localhost:500#{server_id}"
            conf['storage_path'] = File.expand_path("db/ha_neo_#{server_id}", Object::Rails.root)
            puts "Re-Config HA cluster, ha.server_id: #{conf['ha.server_id']}, db: #{conf['storage_path']}"
          end
        end

        config.before_configuration do
          server_id = 1
          config.neo4j['enable_ha'] = true
          config.neo4j['ha.server_id'] = server_id
          config.neo4j['ha.server'] = "localhost:600#{server_id}"
          config.neo4j['ha.pull_interval'] = '500ms'
          config.neo4j['ha.discovery.enabled'] = false
          config.neo4j['ha.initial_hosts'] = [1,2,3].map{|id| "localhost:500#{id}"}.join(',')
          config.neo4j['ha.cluster_server'] = "localhost:500#{server_id}"
          config.neo4j.storage_path = File.expand_path("db/ha_neo_#{server_id}", Object::Rails.root)
          puts "Config HA cluster, ha.server_id: #{config.neo4j['ha.server_id']}, db: #{config.neo4j.storage_path}"
        end
      end
    end
  end
end

服务器也有一个超时(id=3),当端口7474可用时,与其他2个群集元素不同步。此外,7474控制台顶部有时会出现一条红色横幅,上面写着“与Neo4j失去联系”。请检查插头”

有人有主意吗

保罗


2013-11-21 23:48:57.473+0000信息[群集]正在尝试加入[127.0.0.1:5001127.0.0.1:50022127.0.0.1:5003]的群集 2013-11-21 23:49:02.568+0000信息[群集]加入群集:名称:neo4j.ha节点:{1=cluster://127.0.0.1:5001, 3=cluster://127.0.0.1:5003}角色:{coordinator=1} 2013-11-21 23:49:02.582+0000信息[群集]实例3(此服务器)已加入群集 2013-11-21 23:49:06.845+0000信息[集群]实例1当选为协调员 java.io.EOFException 位于java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2598) 位于java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1318) 位于java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990) 位于java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915) 位于java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) 位于java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) 位于java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) 位于org.neo4j.cluster.member.paxos.PaxosClusterMemberEvents$HighAvailabilitySnapshotProvider.setState(PaxosClusterMemberEvents.java:179) 位于org.neo4j.cluster.protocol.snapshot.SnapshotMessage$SnapshotState.setState(SnapshotMessage.java:91) 位于org.neo4j.cluster.protocol.snapshot.SnapshotState$2.handle(SnapshotState.java:105) 位于org.neo4j.cluster.protocol.snapshot.SnapshotState$2.handle(SnapshotState.java:89) 位于org.neo4j.cluster.statemachine.statemachine.handle(statemachine.java:88) 位于org.neo4j.cluster.StateMachines$1.run(StateMachines.java:135) 位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 位于java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
在java.lang.Thread.run(Thread.java:744)

这是哪个Neo4j版本?rails控制台的配置不应该与其他两个类似吗?看起来它与这个github问题有关:
online_backup_enabled=true
online_backup_server=localhost:6362
ha.server_id=3
ha.initial_hosts=localhost:5001,localhost:5002,localhost:5003
ha.server=localhost:6003
ha.cluster_server=localhost:5003
ha.pull_interval=1