2017-06-16 38 views
1

我有具有副本集(託管在亞馬遜):AWS MongoDB的[ReplicationExecutor]在心跳請求錯誤使用XXX ExceededTimeLimit:操作超時

  • 初級
  • 次級
  • 仲裁者

所有這些都是版本3.2.9和這個副本是在我的分片羣集中創建一個分片(如果這很重要,但我認爲它不是)。

當I型初級rs.status()它說,不能達到二次,二次無法到達仲裁器和仲裁器不能達到初級:

初級: { "set" : "rs0", "date" : ISODate("2017-06-16T18:43:23.992Z"), "myState" : 1, "term" : NumberLong(-1), "heartbeatIntervalMillis" : NumberLong(2000), "members" : [ { "_id" : 3, "name" : "secondaryIP:27017", "health" : 0, "state" : 8, "stateStr" : "(not reachable/healthy)", "uptime" : 0, "optime" : Timestamp(0, 0), "optimeDate" : ISODate("1970-01-01T00:00:00Z"), "lastHeartbeat" : ISODate("2017-06-16T18:43:22.767Z"), "lastHeartbeatRecv" : ISODate("2017-06-16T18:43:22.931Z"), "pingMs" : NumberLong(0), "lastHeartbeatMessage" : "Couldn't get a connection within the time limit", "configVersion" : -1 },

在次要的: {"set" : "rs0", "date" : ISODate("2017-06-16T19:08:23.364Z"), "myState" : 2, "term" : NumberLong(-1), "heartbeatIntervalMillis" : NumberLong(2000), "members" : [ { "_id" : 2, "name" : "ip-x-x-x-x:27017", "health" : 0, "state" : 8, "stateStr" : "(not reachable/healthy)", "uptime" : 0, "lastHeartbeat" : ISODate("2017-06-16T19:08:21.404Z"), "lastHeartbeatRecv" : ISODate("2017-06-16T19:08:21.424Z"), "pingMs" : NumberLong(0), "lastHeartbeatMessage" : "Couldn't get a connection within the time limit", "configVersion" : -1 }

在仲裁員: {"set" : "rs0", "date" : ISODate("2017-06-16T17:54:22.552Z"), "myState" : 7, "term" : NumberLong(-1), "heartbeatIntervalMillis" : NumberLong(2000), "members" : [ { "_id" : 4, "name" : "primaryIP:27017", "health" : 0, "state" : 8, "stateStr" : "(not reachable/healthy)", "uptime" : 0, "optime" : Timestamp(0, 0), "optimeDate" : ISODate("1970-01-01T00:00:00Z"), "lastHeartbeat" : ISODate("2017-06-16T17:54:13.027Z"), "lastHeartbeatRecv" : ISODate("2017-06-16T17:54:22.107Z"), "pingMs" : NumberLong(0), "lastHeartbeatMessage" : "Couldn't get a connection within the time limit", "configVersion" : -1 }

從錯誤登錄主服務器: 2017-06-16T18:40:25.030+0000 I NETWORK [initandlisten] connection accepted from appIP:60768 #256386 (23 connections now open) 2017-06-16T18:40:28.762+0000 I ASIO [NetworkInterfaceASIO-Replication-0] Failed to connect to secondaryIP:27017 - ExceededTimeLimit: Operation timed out 2017-06-16T18:40:28.762+0000 I REPL [ReplicationExecutor] Error in heartbeat request to secondaryIP:27017; ExceededTimeLimit: Operation timed out 2017-06-16T18:40:28.762+0000 I ASIO [NetworkInterfaceASIO-Replication-0] Connecting to secondaryIP:27017 2017-06-16T18:40:34.761+0000 I REPL [ReplicationExecutor] Error in heartbeat request to secondaryIP:27017; ExceededTimeLimit: Couldn't get a connection within the time limit 2017-06-16T18:40:46.761+0000 I REPL [ReplicationExecutor] Error in heartbeat request to secondaryIP:27017; ExceededTimeLimit: Couldn't get a connection within the time limit 2017-06-16T18:40:48.762+0000 I ASIO [NetworkInterfaceASIO-Replication-0] Failed to connect to secondaryIP:27017 - ExceededTimeLimit: Operation timed out 2017-06-16T18:40:48.762+0000 I REPL [ReplicationExecutor] Error in heartbeat request to secondaryIP:27017; ExceededTimeLimit: Operation timed out 2017-06-16T18:40:48.762+0000 I ASIO [NetworkInterfaceASIO-Replication-0] Connecting to secondaryIP:27017

我無法連接到任何具有mongo --host <IP>的IP,並且我超時。

所有副本集都在同一個EC2安全組中。

這與this issue非常相似,但我無法理解在這個問題上給出的答案。

如果需要,我可以提供更多信息。

數據庫在應用程序中仍然可以訪問和響應,但與數字和日誌有一些不一致,這可能是由於此連接錯誤引起的。

任何幫助,將不勝感激。

回答

0

我發現這個問題,AWS安全組沒有定義Custom TCP Rule中副本集的IP地址。 添加這些規則使複製副本回到連接狀態。