I have 6 mongod server.
2 shard with replica set of two servers each(totally 4 mongod server) 2 config server 2 mongos which will run on shard server itself
I would like to enable authentication on sharded cluster. I tried enabling --auth while starting the 6 mongod instances but it throwing below error.
SHARDING [mongosMain] Error initializing sharding state, sleeping for 2 seconds and trying again :: caused by :: Unauthorized: could not get updated shard list from config server due to not authorized for query on config.shards
How to enable authentication in sharded cluster? I'm using mongodb 3.2.4 version.
How config server will communicate internally with other mongod server?
Do i need to create user on each mongod separately in admin db?
Please help me to understand this.
-Thanks in advance.