我是 MongoDB 的新手,刚刚设置了一个由 3 台机器组成的集群来进行复制。所有状态的东西看起来都很好,但是没有数据被复制。我确实写信给主服务器,并希望它们出现在辅助服务器中,但似乎什么都没有发生。我确实尝试过 slaveOK 看看这是否会有所作为,但事实并非如此。当复制应该发生时,日志会显示此错误:
[rsSyncNotifier] replset tracking exception: exception: 9001 socket exception [SEND_ERROR]
我不知道是什么导致了这个错误。我通过双向连接 Mongo CL 验证了连接性。
有什么建议吗?
这是 rs.Status()
{
"set" : "mongors",
"date" : ISODate("2013-07-30T21:06:11Z"),
"myState" : 2,
"syncingTo" : "XXXX.cloudapp.net:27019",
"members" : [
{
"_id" : 0,
"name" : "XXXX.cloudapp.net:27018",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 8134,
"optime" : Timestamp(1375216199, 1),
"optimeDate" : ISODate("2013-07-30T20:29:59Z"),
"self" : true
},
{
"_id" : 1,
"name" : "XXXX.cloudapp.net:27019",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 7356,
"optime" : Timestamp(1375216199, 1),
"optimeDate" : ISODate("2013-07-30T20:29:59Z"),
"lastHeartbeat" : ISODate("2013-07-30T21:06:10Z"),
"lastHeartbeatRecv" : ISODate("2013-07-30T21:06:11Z"),
"pingMs" : 1
},
{
"_id" : 2,
"name" : "XXXX.cloudapp.net:27020",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 2171,
"optime" : Timestamp(1375216199, 1),
"optimeDate" : ISODate("2013-07-30T20:29:59Z"),
"lastHeartbeat" : ISODate("2013-07-30T21:06:09Z"),
"lastHeartbeatRecv" : ISODate("2013-07-30T21:06:10Z"),
"pingMs" : 1,
"syncingTo" : "beehivemongosvc.cloudapp.net:27019"
}
],
"ok" : 1
}
复制状态:
source: XXXX.cloudapp.net:27018
syncedTo: Tue Jul 30 2013 13:29:59 GMT-0700 (Pacific Daylight Time)
= 2701 secs ago (0.75hrs)
source: XXXX.cloudapp.net:27020
syncedTo: Tue Jul 30 2013 13:29:59 GMT-0700 (Pacific Daylight Time)
= 2701 secs ago (0.75hrs)