Could not connect to a primary node for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]
If you found above error then first check
sudo service mongodb status
If yes, then
run following command's:
1. sudo rm /var/lib/mongodb/mongo.lock
2. mongod --repair
3. sudo service mongodb start
After this your database will start working.
Enjoy!
0 Comment(s)