Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Mongodb Error Could not connect to a primary node for replica

    • 0
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 1.59k
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: