我有3個mongod演示覆制服務器在我的機器上運行。我用下面的命令來創建複製服務器:mongoDB集名稱不匹配
F:\>mongod --replSet test2 --dbpath 2 --port 27112 --oplogSize 50 --logpath log.2 --logappend
all output going to: log.2
喜歡我對27111端口,test2的test1的關於27112端口和TEST3在27113端口。然而在配置中,我得到一個錯誤:
cfg = {
"_id" : "test1",
"members" : [
{
"_id" : 0,
"host" : "localhost:27111"
},
{
"_id" : 1,
"host" : "localhost:27112"
},
{
"_id" : 2,
"host" : "localhost:27113"
}
]
}
> rs.initiate(cfg)
{
"errmsg" : "couldn't initiate : set name does not match the set name host localhost:27112 expects",
"ok" : 0
}
現在我該怎麼做才能使它匹配?
試圖{主機: 「127.0.0.1:1:27111」}和它不工作。 – sadaf2605 2013-02-14 08:12:06