But I needed to add authentication, so I added admin db the root user to all of them.
Then install the service with --auth for all of the three.
When I started the services for all, the primary and secondary all showing rs.OTHER
and arbitor showing rs.ARBITER
but my app cannot connect to them, because no primary exists.
Any idea of how to fix this?
You might have asked the same question on Stack Exchange recently, in any case, you want to use keyfile (with some password/shared key in it) with each member of the replica set so that they can authenticate to each other.
See more here:
http://docs.mongodb.org/
댓글 없음:
댓글 쓰기