Search code examples
mongodbflutterstrapi

Strapi - Server wasn't able to start properly


I'm building app in Flutter. I have connected Strapi with Mongodb Atlas. Everything was fine until suddenly I'm getting this kind of error:

[2020-08-03T17:03:26.651Z] debug ⛔️ Server wasn't able to start properly.
[2020-08-03T17:03:26.652Z] error Error connecting to the Mongo database. Server selection timed out 
after 30000 ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! server@0.1.0 develop: `strapi develop`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server@0.1.0 develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

My cluster is connected and I know no idea what could go wrong. Any idea what should I do?


Solution

  • Apparently my ip has changed. So what i had to do is to add in mongodb atlas my new ip. In my Cluster -> SECURITY -> Netwrok Access - ADD IP ADDRESS.

    And thats its