Pymongo keeps refusing the connection at 27017

前端 未结 9 759
灰色年华
灰色年华 2020-11-29 04:23

I am trying to run a simple connection to pymongo but it keeps returning that the connection was refused

Here is what I tried:

>>>from pymon         


        
9条回答
  •  离开以前
    2020-11-29 05:02

    Just try following commands in given order :

    sudo rm /var/lib/mongodb/mongod.lock
    
    sudo mongod --repair
    
    sudo service mongodb start
    
    sudo service mongodb status
    

    That's it now you could see following as output of last command:

    mongodb start/running, process 2796

提交回复
热议问题