MongoDB副本心跳请求时间已超过 [英] MongoDB replica heartbeat request time exceeded

查看:665
本文介绍了MongoDB副本心跳请求时间已超过的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有副本集(托管在亚马逊上),具有:

  • 主要
  • 中学
  • 仲裁者

所有这些都是3.2.6版,此副本正在我的分片群集中制作一个分片(如果那很重要,尽管我认为不重要).

当我在主计算机上键入rs.status()时,它说无法到达辅助计算机(仲裁器上也发生了同样的事情):

        {
        "_id" : 1,
        "name" : "secondary-ip:27017",
        "health" : 0,
        "state" : 8,
        "stateStr" : "(not reachable/healthy)",
        "uptime" : 0,
        "optime" : {
            "ts" : Timestamp(0, 0),
            "t" : NumberLong(-1)
        },
        "optimeDate" : ISODate("1970-01-01T00:00:00Z"),
        "lastHeartbeat" : ISODate("2016-07-20T15:40:50.479Z"),
        "lastHeartbeatRecv" : ISODate("2016-07-20T15:40:51.793Z"),
        "pingMs" : NumberLong(0),
        "lastHeartbeatMessage" : "Couldn't get a connection within the time limit",
        "configVersion" : -1
    }

(顺便看看 optimeDate O.o)

我的日志中的错误是:

[ReplicationExecutor] Error in heartbeat request to secondary-ip:27017; ExceededTimeLimit: Couldn't get a connection within the time limit

奇怪的是,当我继续学习并输入rs.status()时,一切看起来都很好.另外,我还可以从主实例(使用mongo --host secondary)连接到辅助实例,因此我认为这不是网络问题.昨天一切正常.

TL; DR ,我的主服务器看不到辅助服务器,仲裁器也看不到辅助服务器,而我的辅助服务器却看到主服务器,并且一天前一切正常,我可以从主实例手动连接到辅助服务器. /p>

任何人都知道会出什么问题吗?

Tnx, 伊万

解决方案

似乎第二个 optimeDate 是该错误的原因,了解此错误optimeDate原因的最佳方法是:调查辅助计算机的机器当前日期时间,因为它也可能是错误的.不确定您是否仍在寻找答案,但是optimedate是问题所在,而不是副本集计算机之间的连接.

I have replica set (hosted on amazon) which has:

  • primary
  • secondary
  • arbiter

All of them are version 3.2.6 and this replica is making one shard in my sharded cluster (if that is important although I think it is not).

When I type rs.status() on primary it says that cannot reach secondary (the same thing is on arbiter):

        {
        "_id" : 1,
        "name" : "secondary-ip:27017",
        "health" : 0,
        "state" : 8,
        "stateStr" : "(not reachable/healthy)",
        "uptime" : 0,
        "optime" : {
            "ts" : Timestamp(0, 0),
            "t" : NumberLong(-1)
        },
        "optimeDate" : ISODate("1970-01-01T00:00:00Z"),
        "lastHeartbeat" : ISODate("2016-07-20T15:40:50.479Z"),
        "lastHeartbeatRecv" : ISODate("2016-07-20T15:40:51.793Z"),
        "pingMs" : NumberLong(0),
        "lastHeartbeatMessage" : "Couldn't get a connection within the time limit",
        "configVersion" : -1
    }

(btw look at the optimeDate O.o)

Error in my log is:

[ReplicationExecutor] Error in heartbeat request to secondary-ip:27017; ExceededTimeLimit: Couldn't get a connection within the time limit

Strange thing is that when I go on secondary and type rs.status() everything looks OK. Also I am able to connect to secondary from my primary instance (with mongo --host secondary) so I guess it is not network issue. Yesterday it was all working fine.

TL;DR my primary cannot see secondary and arbiter cannot see secondary and my secondary sees primary and it was all working fine just day ago and I am able manually connect to secondary from primary instance.

Anyone has an idea what could go wrong?

Tnx, Ivan

解决方案

It seems the secondary optimeDate is responsible for the error, the best way to get to know the reasons for this wrong optimeDate is to investigate the secondary's machine current date time as it could be wrong as well. Not sure you are still looking for an answer but the optimedate is the problem and its not the connection between your replicaset machines.

这篇关于MongoDB副本心跳请求时间已超过的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆