replset找不到具有id的slave

时间:2014-08-14 06:16:42

标签: mongodb sharding database

我对mongodb Replset设置有疑问。

主服务器日志消息:

2014-08-14T13:59:45.450+0800 [conn261130] end connection 192.168.1.4:41239 (10 connections now open)
2014-08-14T13:59:45.457+0800 [initandlisten] connection accepted from 192.168.1.6:46926 #261131 (11 connections now open)
2014-08-14T13:59:45.458+0800 [conn261131] replset couldn't find a slave with id 4, not tracking 52d253cf169c45b89a53a4b5
2014-08-14T13:59:45.459+0800 [conn261131] end connection 192.168.1.6:46926 (10 connections now open)
2014-08-14T13:59:45.952+0800 [initandlisten] connection accepted from 192.168.1.4:41240 #261132 (11 connections now open)
2014-08-14T13:59:45.953+0800 [conn261132] replset couldn't find a slave with id 4, not tracking 52d253cf169c45b89a53a4b5
2014-08-14T13:59:45.954+0800 [conn261132] end connection 192.168.1.4:41240 (10 connections now open)
2014-08-14T13:59:45.961+0800 [initandlisten] connection accepted from 192.168.1.6:46927 #261133 (11 connections now open)
2014-08-14T13:59:45.962+0800 [conn261133] replset couldn't find a slave with id 4, not tracking 52d253cf169c45b89a53a4b5
2014-08-14T13:59:45.963+0800 [conn261133] end connection 192.168.1.6:46927 (10 connections now open)
2014-08-14T13:59:46.461+0800 [initandlisten] connection accepted from 192.168.1.4:41241 #261134 (11 connections now open)
2014-08-14T13:59:46.462+0800 [conn261134] replset couldn't find a slave with id 4, not tracking 52d253cf169c45b89a53a4b5
2014-08-14T13:59:46.462+0800 [conn261134] end connection 192.168.1.4:41241 (10 connections now open)
2014-08-14T13:59:46.465+0800 [initandlisten] connection accepted from 192.168.1.6:46928 #261135 (11 connections now open)
2014-08-14T13:59:46.466+0800 [conn261135] replset couldn't find a slave with id 4, not tracking 52d253cf169c45b89a53a4b5
2014-08-14T13:59:46.467+0800 [conn261135] end connection 192.168.1.6:46928 (10 connections now open)
2014-08-14T13:59:46.965+0800 [initandlisten] connection accepted from 192.168.1.4:41242 #261136 (11 connections now open)
2014-08-14T13:59:46.966+0800 [conn261136] replset couldn't find a slave with id 4, not tracking 52d253cf169c45b89a53a4b5
2014-08-14T13:59:46.966+0800 [conn261136] end connection 192.168.1.4:41242 (10 connections now open)
2014-08-14T13:59:46.970+0800 [initandlisten] connection accepted from 192.168.1.6:46929 #261137 (11 connections now open)
2014-08-14T13:59:46.970+0800 [conn261137] replset couldn't find a slave with id 4, not tracking 52d253cf169c45b89a53a4b5
2014-08-14T13:59:46.971+0800 [conn261137] end connection 192.168.1.6:46929 (10 connections now open)
2014-08-14T13:59:47.469+0800 [initandlisten] connection accepted from 192.168.1.4:41243 #261138 (11 connections now open)
2014-08-14T13:59:47.470+0800 [conn261138] replset couldn't find a slave with id 4, not tracking 52d253cf169c45b89a53a4b5
2014-08-14T13:59:47.470+0800 [conn261138] end connection 192.168.1.4:41243 (10 connections now open)
2014-08-14T13:59:47.474+0800 [initandlisten] connection accepted from 192.168.1.6:46930 #261139 (11 connections now open)
2014-08-14T13:59:47.474+0800 [conn261139] replset couldn't find a slave with id 4, not tracking 52d253cf169c45b89a53a4b5
2014-08-14T13:59:47.475+0800 [conn261139] end connection 192.168.1.6:46930 (10 connections now open)

yspmongo:PRIMARY> rs.isMaster()

{
    "setName" : "yspmongo",
    "setVersion" : 263706,
    "ismaster" : true,
    "secondary" : false,
    "hosts" : [
        "192.168.1.5:20012",
        "192.168.1.6:20013",
        "192.168.1.4:20011"
    ],
    "arbiters" : [
        "192.168.1.7:20014"
    ],
    "primary" : "192.168.1.5:20012",
    "me" : "192.168.1.5:20012",
    "maxBsonObjectSize" : 16777216,
    "maxMessageSizeBytes" : 48000000,
    "maxWriteBatchSize" : 1000,
    "localTime" : ISODate("2014-08-14T06:02:56.542Z"),
    "maxWireVersion" : 2,
    "minWireVersion" : 0,
    "ok" : 1
}

yspmongo:PRIMARY> rs.status()

{
    "set" : "yspmongo",
    "date" : ISODate("2014-08-14T06:07:13Z"),
    "myState" : 1,
    "members" : [
        {
            "_id" : 11,
            "name" : "192.168.1.4:20011",
            "health" : 1,
            "state" : 2,
            "stateStr" : "SECONDARY",
            "uptime" : 62884,
            "optime" : Timestamp(1407996413, 9),
            "optimeDate" : ISODate("2014-08-14T06:06:53Z"),
            "lastHeartbeat" : ISODate("2014-08-14T06:07:12Z"),
            "lastHeartbeatRecv" : ISODate("2014-08-14T06:07:13Z"),
            "pingMs" : 1,
            "syncingTo" : "192.168.1.5:20012"
        },
        {
            "_id" : 12,
            "name" : "192.168.1.5:20012",
            "health" : 1,
            "state" : 1,
            "stateStr" : "PRIMARY",
            "uptime" : 65067,
            "optime" : Timestamp(1407996413, 9),
            "optimeDate" : ISODate("2014-08-14T06:06:53Z"),
            "electionTime" : Timestamp(1407932205, 2),
            "electionDate" : ISODate("2014-08-13T12:16:45Z"),
            "self" : true
        },
        {
            "_id" : 13,
            "name" : "192.168.1.6:20013",
            "health" : 1,
            "state" : 2,
            "stateStr" : "SECONDARY",
            "uptime" : 62884,
            "optime" : Timestamp(1407996413, 9),
            "optimeDate" : ISODate("2014-08-14T06:06:53Z"),
            "lastHeartbeat" : ISODate("2014-08-14T06:07:13Z"),
            "lastHeartbeatRecv" : ISODate("2014-08-14T06:07:12Z"),
            "pingMs" : 1,
            "syncingTo" : "192.168.1.5:20012"
        },
        {
            "_id" : 14,
            "name" : "192.168.1.7:20014",
            "health" : 1,
            "state" : 7,
            "stateStr" : "ARBITER",
            "uptime" : 62516,
            "lastHeartbeat" : ISODate("2014-08-14T06:07:13Z"),
            "lastHeartbeatRecv" : ISODate("2014-08-14T06:07:12Z"),
            "pingMs" : 0
        }
    ],
    "ok" : 1
}

我如何处理日志提示?

1 个答案:

答案 0 :(得分:0)

这是2.6中的错误 这不应该干扰其他副本节点的复制。

作为一种变通方法,您可以重新启动应该更新副本集缓存的主数据库。

https://jira.mongodb.org/browse/SERVER-15849