mongoDB-set-name stimmt nicht überein

Habe ich 3 mongod-demo repliziert Server läuft auf meinem Rechner. Benutzt habe ich folgenden Befehl zum erstellen der replizierten server:

F:\>mongod --replSet test2 --dbpath 2 --port 27112 --oplogSize 50 --logpath log.2 --logappend
all output going to: log.2

Wie diesem habe ich test1 auf 27111-Anschluss", "test2" auf 27112 Hafen und "test3" auf 27113-port. Aber bei der Konfiguration bekomme ich eine Fehlermeldung:

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
}

Nun, was muss ich tun, damit es passt ?

InformationsquelleAutor sadaf2605 | 2013-02-13
Schreibe einen Kommentar