replica set with multiple primary nodes
Posted
by
miguel
on Server Fault
See other posts from Server Fault
or by miguel
Published on 2012-10-02T02:02:51Z
Indexed on
2012/10/02
3:40 UTC
Read the original article
Hit count: 405
replication
|mongodb
I am trying to configure a replica set with three nodes: node A, B and C. I execute the rs.add()
's from node A and after that rs.status()
shows that the three nodes are PRIMARY. Moreover node B and C have 0 pingMs. If I execute rs.status()
from node B or C the only node listed is the self (As PRIMARY). I tried adding an arbiter but it didn't work (it behaved as the nodes B and C). I think this can be a networking problem but I can't figure it out.
Edit: This is the output for netstat -anp|grep 27017
:
tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN -
tcp 0 0 10.0.1.211:55772 10.0.1.213:27017 TIME_WAIT -
tcp 0 0 127.0.0.1:50509 127.0.0.1:27017 ESTABLISHED -
tcp 0 0 127.0.0.1:27017 127.0.0.1:50509 ESTABLISHED -
tcp 0 0 10.0.1.211:55774 10.0.1.213:27017 TIME_WAIT -
tcp 0 0 10.0.1.211:55776 10.0.1.213:27017 ESTABLISHED -
tcp 0 0 10.0.1.211:39180 10.0.1.212:27017 ESTABLISHED -
tcp 0 0 10.0.1.211:39178 10.0.1.212:27017 TIME_WAIT -
tcp 0 0 10.0.1.211:39176 10.0.1.212:27017 TIME_WAIT -
unix 2 [ ACC ] STREAM LISTENING 3291267 - /tmp/mongodb-27017.sock
the private ips for the node B and C are 10.0.1.212 and 10.0.1.213 respectively (they appear to have an established connection in the 27017 port according to the netstat output).
© Server Fault or respective owner