2017-04-16 1 views
1

設定サーバーのレプリカセットへの接続に問題があり、Mongosが多くのエラーを投げています。 Mongodbのバージョンは3.4.3です。私はAmazon LinuxとUbuntu 14.04で同じ問題に直面しています。 この問題は、スタンドアロンのMongoDB設定サーバーでも発生します。Mongosが起動してエラーをスローしていないため、分散ロックピンガーでpingが失敗しました。 MongoDB 3.4.3の問題

エラーは以下のとおりです。

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 } 

すべてのヘルプは非常に高く評価されます。以下のconfigサーバのいずれかの設定がある

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: 

答えて

1

さて、問題は設定していました。設定サーバーに書かれている懸念事項「過半数」の書き込みがありました。そして、私は、 "最適化"するために、設定サーバー上のジャーナルを無効にしました。

+0

結果を共有してくれてありがとう! – SpiXel

関連する問題