Mongo::Error::NoServerAvailable: No primary server is available in cluster Mongo::Error::NoServerAvailable: No primary server is available in cluster docker docker

Mongo::Error::NoServerAvailable: No primary server is available in cluster


  1. Verify you are able to connect to the nodes using the MongoDB shell (mongo binary). Most likely you do not have connectivity.

  2. Set log level to debug (https://docs.mongodb.com/mongoid/master/tutorials/mongoid-configuration/#logging) which will tell you what the driver is doing as it is attempting to connect to the deployment.