Mongos无法启动并引发错误,分布式锁pinger的ping失败。MongoDB 3.4.3版本

Mongos无法启动并引发错误,分布式锁pinger的ping失败。MongoDB 3.4.3版本,mongodb,Mongodb,我在连接配置服务器副本集时遇到问题,Mongos抛出了很多错误。 使用的Mongodb版本是3.4.3,我在AmazonLinux和Ubuntu14.04上遇到过同样的问题。 即使使用独立的MongoDB配置服务器,也会出现此问题 错误包括: 2017-04-17T01:00:19.368+0530 W SHARDING [replSetDistLockPinger] pinging failed for distributed lock pinger :: caused by :: Write

我在连接配置服务器副本集时遇到问题,Mongos抛出了很多错误。 使用的Mongodb版本是3.4.3,我在AmazonLinux和Ubuntu14.04上遇到过同样的问题。 即使使用独立的MongoDB配置服务器,也会出现此问题

错误包括:

2017-04-17T01:00:19.368+0530 W SHARDING [replSetDistLockPinger] pinging failed for distributed lock pinger :: caused by :: WriteConcernFailed: waiting for replication timed out. Error details: { wtimeout: true }

WriteConcernFailed: waiting for replication timed out. Error details: { wtimeout: true }
2017-04-17T00:53:48.230+0530 I NETWORK  [mongosMain] Marking host 127.0.0.1:27021 as failed :: caused by :: ExceededTimeLimit: Operation timed out, request was RemoteCommand 45 -- target:127.0.0.1:27021 db:config expDate:2017-04-17T00:53:48.229+0530 cmd:{ find: "version", readConcern: { level: "majority", afterOpTime: { ts: Timestamp 0|0, t: -1 } }, maxTimeMS: 30000 }
2017-04-17T00:53:48.230+0530 I SHARDING [mongosMain] Operation timed out  :: caused by :: ExceededTimeLimit: Operation timed out, request was RemoteCommand 45 -- target:127.0.0.1:27021 db:config expDate:2017-04-17T00:53:48.229+0530 cmd:{ find: "version", readConcern: { level: "majority", afterOpTime: { ts: Timestamp 0|0, t: -1 } }, maxTimeMS: 30000 }
2017-04-17T00:53:48.230+0530 W SHARDING [mongosMain] Error initializing sharding state, sleeping for 2 seconds and trying again :: caused by :: ExceededTimeLimit: Error loading clusterID :: caused by :: Operation timed out, request was RemoteCommand 45 -- target:127.0.0.1:27021 db:config expDate:2017-04-17T00:53:48.229+0530 cmd:{ find: "version", readConcern: { level: "majority", afterOpTime: { ts: Timestamp 0|0, t: -1 } }, maxTimeMS: 30000 }
非常感谢您的帮助

以下是我正在使用的配置的详细信息:

rsconfig:SECONDARY> rs.status()
{
    "set" : "rsconfig",
    "date" : ISODate("2017-04-16T19:25:52.382Z"),
    "myState" : 2,
    "term" : NumberLong(1),
    "syncingTo" : "127.0.0.1:27022",
    "configsvr" : true,
    "heartbeatIntervalMillis" : NumberLong(2000),
    "optimes" : {
        "lastCommittedOpTime" : {
            "ts" : Timestamp(0, 0),
            "t" : NumberLong(-1)
        },
        "appliedOpTime" : {
            "ts" : Timestamp(1492370750, 1),
            "t" : NumberLong(1)
        },
        "durableOpTime" : {
            "ts" : Timestamp(1492369489, 1),
            "t" : NumberLong(-1)
        }
    },
    "members" : [
        {
            "_id" : 0,
            "name" : "127.0.0.1:27020",
            "health" : 1,
            "state" : 2,
            "stateStr" : "SECONDARY",
            "uptime" : 1599,
            "optime" : {
                "ts" : Timestamp(1492370750, 1),
                "t" : NumberLong(1)
            },
            "optimeDate" : ISODate("2017-04-16T19:25:50Z"),
            "syncingTo" : "127.0.0.1:27022",
            "configVersion" : 1,
            "self" : true
        },
        {
            "_id" : 1,
            "name" : "127.0.0.1:27021",
            "health" : 1,
            "state" : 2,
            "stateStr" : "SECONDARY",
            "uptime" : 1260,
            "optime" : {
                "ts" : Timestamp(1492370750, 1),
                "t" : NumberLong(1)
            },
            "optimeDurable" : {
                "ts" : Timestamp(1492369489, 1),
                "t" : NumberLong(-1)
            },
            "optimeDate" : ISODate("2017-04-16T19:25:50Z"),
            "optimeDurableDate" : ISODate("2017-04-16T19:04:49Z"),
            "lastHeartbeat" : ISODate("2017-04-16T19:25:51.325Z"),
            "lastHeartbeatRecv" : ISODate("2017-04-16T19:25:51.333Z"),
            "pingMs" : NumberLong(0),
            "syncingTo" : "127.0.0.1:27022",
            "configVersion" : 1
        },
        {
            "_id" : 2,
            "name" : "127.0.0.1:27022",
            "health" : 1,
            "state" : 1,
            "stateStr" : "PRIMARY",
            "uptime" : 1260,
            "optime" : {
                "ts" : Timestamp(1492370750, 1),
                "t" : NumberLong(1)
            },
            "optimeDurable" : {
                "ts" : Timestamp(1492369489, 1),
                "t" : NumberLong(-1)
            },
            "optimeDate" : ISODate("2017-04-16T19:25:50Z"),
            "optimeDurableDate" : ISODate("2017-04-16T19:04:49Z"),
            "lastHeartbeat" : ISODate("2017-04-16T19:25:51.325Z"),
            "lastHeartbeatRecv" : ISODate("2017-04-16T19:25:50.792Z"),
            "pingMs" : NumberLong(0),
            "electionTime" : Timestamp(1492369500, 1),
            "electionDate" : ISODate("2017-04-16T19:05:00Z"),
            "configVersion" : 1
        }
    ],
    "ok" : 1
}
下面是其中一个配置服务器的配置。 #mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# Where and how to store data.
storage:
  dbPath: mongodb1
  journal:
    enabled: false
#  engine:
#  mmapv1:
#  wiredTiger:

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: mongod1.log

# network interfaces
net:
  port: 27020
  bindIp: 127.0.0.1


#processManagement:

#security:

#operationProfiling:

replication:
  replSetName: rsconfig
sharding:
  clusterRole: configsvr

## Enterprise-Only Options:

#auditLog:

#snmp:

嗯,问题在于配置。在配置服务器上有一些写问题为“多数”的写操作。为了“优化”,我禁用了配置服务器上的日志