Moped::Errors::ConnectionFailure Could not connect to any secondary or primary nodes for replica set

后端 未结 2 2037
逝去的感伤
逝去的感伤 2020-12-14 23:10

I had to forcefully shutdown my Ubuntu system after it got hanged. Now I get this error while trying to run my Rails app.

Moped::Er         


        
相关标签:
2条回答
  • 2020-12-14 23:27

    Uninstall mongodb using

    sudo apt-get autoremove mongodb-*
    

    then install with

    apt-get install mongodb-server
    

    run mongo
    it will solve the problem

    0 讨论(0)
  • 2020-12-14 23:46

    I was able to get it working by removing the mongod.lock file and restarting mongodb service

    sudo rm /var/lib/mongodb/mongod.lock
    sudo service mongodb start
    
    0 讨论(0)
提交回复
热议问题