Why is PyMongo 3 giving ServerSelectionTimeoutError?

后端 未结 20 1091
我在风中等你
我在风中等你 2020-11-30 01:21

I\'m using:

  • Python 3.4.2
  • PyMongo 3.0.2
  • mongolab running mongod 2.6.9
  • uWSGI 2.0.10
  • CherryPy 3.7.0
  • nginx 1.6.2
20条回答
  •  借酒劲吻你
    2020-11-30 02:05

    In my case

    • I was using Mongo Atlas
    • I got another IP adress after a router reboot

    hence I had to add that IP to the whitelist on Mongo Atlas settings via

    MongoAtlas website -> Network Access -> IP Whitelist -> Add IP Address -> Add Current IP Address
    

    then wait for IP Address's status to change to Active and then try to run the app again

提交回复
热议问题