#neo4j ERROR [o.n.k.h.c.HighAvailabilityModeSwitcher]:尝试切换到slave时出错

时间:2014-01-23 02:44:29

标签: neo4j graph-databases

在ubuntu 13.04上将neo4j-ent 2.0加入集群作为奴隶的问题。服务器实例因试图成为奴隶而陷入困境。

  

ERROR [o.n.k.h.c.HighAvailabilityModeSwitcher]:尝试切换到奴隶时出错   org.neo4j.kernel.impl.nioneo.store.MismatchingStoreIdException:

群集设置:

1嵌入式neo4j 2.0前端java服务

1 neo4j-arbiter 2.0

1 neo4j-service 2.0

导致此群集状态的操作:

  1. 从neo4j嵌入式服务开始

  2. 启动仲裁实例

  3.   

    2014-01-23 02:03:59.903 + 0000 DEBUG [o.n.c.p.a.m.LearnerState $ 1]:LearnerState:start- [join] - > learner conversation-id:5/3#   2014-01-23 02:03:59.904 + 0000 DEBUG [o.n.c.p.a.m.AcceptorState $ 1]:AcceptorState:start- [join] - > acceptor conversation-id:5/3#   2014-01-23 02:03:59.929 + 0000 DEBUG [o.n.c.p.a.m.LearnerState $ 2]:从对话5/3#中学习并关闭实例2,内容为Change cluster config,join:5   2014-01-23 02:03:59.930 + 0000 DEBUG [oncpamLearnerState $ 2]:学习者状态:学习者 - [学习] - >学习者来自:cluster://192.168.0.3:5001实例:2 conversation-id:5 / 3#   2014-01-23 02:03:59.932 + 0000 DEBUG [o.n.c.p.a.m.AtomicBroadcastState $ 2]:AtomicBroadcastState:加入 - [broadcastResponse] - >加入conversation-id:5/3#   2014-01-23 02:03:59.934 + 0000 DEBUG [o.n.c.p.c.ClusterState $ 3]:ClusterState:join- [configurationChanged] - >输入的conversation-id:5/3#   2014-01-23 02:03:59.934 + 0000 INFO [onccClusterJoin]:已加入群集:名称:neo4j.ha节点:{3 = cluster://192.168.0.3:5001,5 = cluster://192.168.0.5 :5001}角色:{coordinator = 3}

    1. 从我们的第3台机器启动了后端neo4j-ent 2.0实例 仲裁者日志
    2.   

      ClusterState:输入 - [configurationRequest] - >已输入   来自:cluster://192.168.0.2:5001 conversation-id:1/12#2014-01-23   02:08:44.962 + 0000 INFO [o.n.c.c.NetworkSender]:   cluster://192.168.0.5:5001打开一个新通道到/192.168.0.2:5001   2014-01-23 02:08:44.981 + 0000 DEBUG [o.n.c.p.a.m.AcceptorState $ 2]:   AcceptorState:acceptor- [prepare] - > acceptor   来自:cluster://192.168.0.3:5001实例:3 conversation-id:1/12#   2014-01-23 02:08:44.990 + 0000 DEBUG [o.n.c.p.a.m.AcceptorState $ 2]:   AcceptorState:acceptor- [accept] - > acceptor   来自:cluster://192.168.0.3:5001实例:3 conversation-id:1/12#   2014-01-23 02:08:44.995 + 0000 DEBUG [o.n.c.p.a.m.LearnerState $ 2]:   从1/12#对话中学到并关闭了实例3和内容   是更改群集配置,加入:1 2014-01-23 02:08:44.996 + 0000 DEBUG   [o.n.c.p.a.m.LearnerState $ 2]:学习者状态:学习者 - [学习] - >学习者   来自:cluster://192.168.0.3:5001实例:3 conversation-id:1/12#   2014-01-23 02:08:44.996 + 0000 DEBUG   [o.n.c.p.a.m.AtomicBroadcastState $ 3]:AtomicBroadcastState:   broadcast- [broadcastResponse] - > broadcast conversation-id:1/12#   2014-01-23 02:08:44.997 + 0000 DEBUG [o.n.c.p.c.ClusterState $ 4]:   ClusterState:输入 - [configurationChanged] - >输入   conversation-id:1/12#2014-01-23 02:08:45.030 + 0000 DEBUG   [o.n.c.p.e.ElectionState $ 2]:ElectionState:   选举 - [投票:协调员] - >选举自:cluster://192.168.0.2:5001   conversation-id:1/13#2014-01-23 02:08:45.116 + 0000 DEBUG   [o.n.c.p.a.m.AcceptorState $ 2]:AcceptorState:   acceptor- [prepare] - > acceptor from:cluster://192.168.0.2:5001   实例:4 conversation-id:1/13#2014-01-23 02:08:45.130 + 0000 DEBUG   [o.n.c.p.a.m.AcceptorState $ 2]:AcceptorState:   acceptor- [accept] - > acceptor from:cluster://192.168.0.2:5001 instance:4   conversation-id:1/13#2014-01-23 02:08:45.144 + 0000 DEBUG   [o.n.c.p.a.m.LearnerState $ 2]:从中学习并关闭实例4   会话1/13#,内容是更改群集配置,   当选:3作为协调员2014-01-23 02:08:45.145 + 0000 DEBUG   [o.n.c.p.a.m.LearnerState $ 2]:学习者状态:学习者 - [学习] - >学习者   来自:cluster://192.168.0.2:5001实例:4 conversation-id:1/13#   2014-01-23 02:08:45.146 + 0000 DEBUG   [o.n.c.p.a.m.AtomicBroadcastState $ 3]:AtomicBroadcastState:   broadcast- [broadcastResponse] - > broadcast conversation-id:1/13#   2014-01-23 02:08:45.148 + 0000 DEBUG [o.n.c.p.c.ClusterState $ 4]:   ClusterState:输入 - [configurationChanged] - >输入   conversation-id:1/13#2014-01-23 02:08:45.154 + 0000 DEBUG   [o.n.c.p.a.m.AcceptorState $ 2]:AcceptorState:   acceptor- [prepare] - > acceptor from:cluster://192.168.0.3:5001   实例:5对话-id:3/17#2014-01-23 02:08:45.163 + 0000 DEBUG   [o.n.c.p.a.m.AcceptorState $ 2]:AcceptorState:   acceptor- [accept] - > acceptor from:cluster://192.168.0.3:5001 instance:5   conversation-id:3/17#2014-01-23 02:08:45.175 + 0000 DEBUG   [o.n.c.p.a.m.LearnerState $ 2]:从中学习并关闭实例5   会话3/17#,内容为MemberIsAvailable [作用:   master,InstanceId:3,角色URI:ha://192.168.0.3:6001?serverId = 3,   Cluster URI:cluster://192.168.0.3:5001] 2014-01-23 02:08:45.176 + 0000   DEBUG [o.n.c.p.a.m.LearnerState $ 2]:LearnerState:   学习者 - [学习] - >学习者来自:cluster://192.168.0.3:5001实例:5   conversation-id:3/17#2014-01-23 02:08:45.178 + 0000 DEBUG   [o.n.c.p.a.m.AtomicBroadcastState $ 3]:AtomicBroadcastState:   broadcast- [broadcastResponse] - > broadcast conversation-id:3/17#

      neo4j-enterprise messages.log

        

      尝试切换到从属时出错   org.neo4j.kernel.impl.nioneo.store.MismatchingStoreIdException:预期:StoreId [时间:1390358266388,id:-379881635520884869,商店版本:13843131341501958],遇到:StoreId [时间:1390358433121,id:-6272142992212225740,商店版本:13843131341501958 ]       在org.neo4j.com.Client.assertCorrectStoreId(Client.java:302)〜[neo4j-com-2.0.0.jar:2.0.0]       在org.neo4j.com.Client.sendRequest(Client.java:241)〜[neo4j-com-2.0.0.jar:2.0.0]       在org.neo4j.kernel.ha.MasterClient20.getMasterIdForCommittedTx(MasterClient20.java:359)〜[neo4j-ha-2.0.0.jar:2.0.0]       在org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher.checkDataConsistencyWithMaster(HighAvailabilityModeSwitcher.java:679)〜[neo4j-ha-2.0.0.jar:2.0.0]       在org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher.checkDataConsistency(HighAvailabilityModeSwitcher.java:498)〜[neo4j-ha-2.0.0.jar:2.0.0]       在org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher.access $ 900(HighAvailabilityModeSwitcher.java:110)~ [neo4j-ha-2.0.0.jar:2.0.0]       在org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher $ 2.run(HighAvailabilityModeSwitcher.java:393)〜[neo4j-ha-2.0.0.jar:2.0.0]       at java.util.concurrent.Executors $ RunnableAdapter.call(Unknown Source)[na:1.7.0_51]       at java.util.concurrent.FutureTask.run(Unknown Source)[na:1.7.0_51]       at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.access $ 201(Unknown Source)[na:1.7.0_51]       at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.run(Unknown Source)[na:1.7.0_51]       at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[na:1.7.0_51]       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(Unknown Source)[na:1.7.0_51]       at java.lang.Thread.run(Unknown Source)[na:1.7.0_51]   2014-01-23 02:37:10.968 + 0000 DEBUG [o.n.k.h.c.HighAvailabilityModeSwitcher]:试图在300s内切换到奴隶

      我们在neo4j-enterprise console.log中也有这个。

        

      2014-01-23 02:22:10.759 + 0000 INFO [Cluster] ServerId 1,移动到主服务器ha://192.168.0.3:6001?serverId = 3   2014-01-23 02:22:10.777 + 0000 INFO [Cluster]检查商店与master的一致性   2014-01-23 02:22:10.830 + 0000 INFO [Cluster]商店与master不代表同一个数据库。将从master中删除并获取一个新的   2014-01-23 02:27:10.839 + 0000 INFO [Cluster] ServerId 1,移动到主服务器ha://192.168.0.3:6001?serverId = 3   2014-01-23 02:27:10.850 + 0000 INFO [Cluster]检查与master的存储一致性   2014-01-23 02:27:10.873 + 0000 INFO [Cluster]商店不代表与master相同的数据库。将从master中删除并获取一个新的   2014-01-23 02:32:10.888 + 0000 INFO [Cluster] ServerId 1,移动到主服务器ha://192.168.0.3:6001?serverId = 3   2014-01-23 02:32:10.896 + 0000 INFO [Cluster]检查商店与master的一致性   2014-01-23 02:32:10.916 + 0000 INFO [Cluster]存储不代表与master相同的数据库。将从master中删除并获取一个新的   2014-01-23 02:37:10.926 + 0000 INFO [Cluster] ServerId 1,移动到主服务器ha://192.168.0.3:6001?serverId = 3   2014-01-23 02:37:10.935 + 0000 INFO [Cluster]检查商店与master的一致性   2014-01-23 02:37:10.958 + 0000 INFO [Cluster]商店与master不代表同一个数据库。将从主

      中删除并获取一个新的

      重复尝试从主数据库中获取新数据库

      有没有人知道为什么服务器是"挂"缺乏更好的条款?

1 个答案:

答案 0 :(得分:0)

我认为实例无法启动就是您所指的neo4j-service。此外,我假设嵌入式实例保存了图形数据库的实际数据。

在这种情况下,在neo4j-service(也就是服务器实例)上停止neo4j,删除$NEO4J_HOME/data/graph.db并重新启动它。然后它应该从嵌入式实例(我假设是主要的)同步graph.db的内容。