Connection to MongoDB suddenly stopped working

Connection to MongoDB suddenly stopped working and in migration topic now, i have not changed any env. after the successfully passing the test, what might be the issue at backend?

m2student is the username i am using for connection.

able to view the collections from mongoDB portal

Hi @Rama_krishna1,

To solve this issue make sure to add your IP address whitelisted.

Please feel free to reach out if you have any questions.

Thanks,
Kushagra

Thanks a lot Kesav, for your support .
coming back to issue, have configured the above network access while working with db connection task, and its not changed from then. while it used to work but not sure what changed , currently not able to connect to mflie/simple_fix db

Can you connect from shell?
This thread is about M001-mongobasics but you mentioned about migration topic
May be you are referring to M220 as your hostname also shows mflix…

Please clarify and check your Compass parameters

have you tried to install mongodb client on your local system and tried to connect?

1 Like

Thanks all,

Yes i have installed mongoDB compass community when i started working with the current exercise. it used to work fine,
@Ramachandra : connection used to work before when was working with db connection chapter.
currently am working with migration task and the connection suddenly stopped working.

my assumption would be, i have used the command npm update recently, by any chance this might created the problem?

here are my env details which i configure for db connection

SECRET_KEY=everyone_is_a_critic
MFLIX_DB_URI = mongodb+srv://m2student:pwd@mflix.kger2.mongodb.net/sample_mflix?authSource=admin
MFLIX_NS=sample_mflix
PORT=5000

Are you able to connect from shell with the connect string you have shown in your env. file?
It should work if it was working before
Are you using Compass favorites?
If yes drop it and create a new one and see

Were you able to solve this?