Replica set seed nodes

24 views
Skip to first unread message

Barry Kaplan

unread,
May 23, 2015, 12:47:08 AM5/23/15
to mongoo...@googlegroups.com
It was my understanding that we can provide any replica member and mongo(ose) will discover the remaining members including the master.

I am using consul DNS to provide an ip to one of the members, eg

    uri = "mongodb://mongod.service.consul:27017/dbname?replicaSet=rsname"
    mongoose.connect(uri, options)

Consul's dns server will return a random member of the replica set. Mongoose indeed connects but on any insert I get the error "MongoError: not master".

1. Is my understanding that the mongoose or the driver will auto-discover the members incorrect?
2. Is there any way to enable some detailed logging so I can see what mongoose/driver is trying to do?

(There is no need in this case to provide the full list of members as consul health checking will ensure that only healthy members of the set will be provided.)

Barry Kaplan

unread,
May 27, 2015, 7:33:36 AM5/27/15
to mongoo...@googlegroups.com
Nobody using replica sets?
Reply all
Reply to author
Forward
0 new messages