No primary server available when failover happens: MongoDB, Node.js, Mongoose -
i facing issue when failover happens in mongodb replica set. app fails reconnect newly elected primary server , fails perform subsequent write operations.
restarting app reconnects successfully.
the failover happens instantly , new primary elected. however, app fails connect new primary.
mongodb version: 3.2.6 mongoose version: 4.3.4 node.js version:0.10.26
any appreciated.
i have primary, secondary , arbiter set running in 3 different nodes. how connect using mongoose , failover works fine.
mongoose.connect('mongodb://user:pwd@a.com:27017,b.com:27017,c.com:27017/dbname');
so, expect mongodb:// variables.
Comments
Post a Comment