运行neo4j&运行时遇到麻烦HA中的轨道(第2部分)

时间:2013-11-24 10:45:50

标签: neo4j

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

我启动了Rails和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

后者是:

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

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

有人有想法吗?


2013-11-21 23:48:57.473 + 0000 INFO [Cluster]尝试加入[127.0.0.1:5001,127.0.0.1:5002,127.0.0.1:5003]的群集 2013-11-21 23:49:02.568 + 0000 INFO [Cluster]加入群集:名称: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 INFO [Cluster] Instance 3(此服务器)加入了集群 2013-11-21 23:49:06.845 + 0000 INFO [集群]实例1当选为协调员 java.io.EOFException的     at java.io.ObjectInputStream $ BlockDataInputStream.peekByte(ObjectInputStream.java:2598)     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1318)     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)     at org.neo4j.cluster.member.paxos.PaxosClusterMemberEvents $ HighAvailabilitySnapshotProvider.setState(PaxosClusterMemberEvents.java:179)     at org.neo4j.cluster.protocol.snapshot.SnapshotMessage $ SnapshotState.setState(SnapshotMessage.java:91)     at 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)     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)     在java.lang.Thread.run(Thread.java:744)

0 个答案:

没有答案