我是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)
答案 0 :(得分:0)
我完全重启了所有实例,并且复制开始工作。为了确保并且一切都继续工作,尝试了几次重新启动。
课程:初始设置后,重新启动所有内容以确保。