Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

mongoDB set name does not match

$
0
0

I have got 3 mongod demo replicates servers running on my machine. I have used following command to create replicated server:

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

Like this I have test1 on 27111 port, test2 on 27112 port and test3 on 27113 port. Yet at configuration I am getting an error:

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
}

Now what do I have to do to make it match ?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>