README "Running Application" Error: querySrv ENOTFOUND [SOLVED]

Hi, Im getting the error:
Error: querySrv ENOTFOUND _mongodb._tcp.m220flix-lqr7v.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (dns.js:197:19)
[nodemon] app crashed - waiting for file changes before starting…

I’ve followed the steps:
npm install,
changing the secret key,
mongo_db_uri to: mongodb+srv://m220student:m220password@m220flix-lqr7v.mongodb.net/test?retryWrites=true,
and changing the file to .env

Hi @Jason_Chiang_84661,

The parameters and steps you did are right. Please re-check your connection string. Also, check if you have IP whitelisted. Login to cloud.mongodb.com -> Select your Cluster -> Security -> IP Whitelist -> Add IP Address.

I am unable to connect through the below command.

mongo “mongodb+srv://m220flix-lqr7v.mongodb.net/test” --username m220student --password m220password

Kanika

I’ve done the correct ip address (allow from anywhere). I get this error when i try running that command

What works though it when i connect via mongo shell : mongo “mongodb+srv://mflix-lqr7v.mongodb.net/test” --username m220student

or
For connect your application:
mongodb+srv://m220student:m220password@mflix-lqr7v.mongodb.net/test?retryWrites=true

Alright, it looks like i found the solution. I had to talk to atlas support and see what the issue is. The support gave me the older connection string to put in the .env file:
MFLIX_DB_URI=mongodb://m220student:m220password@mflix-shard-00-00-lqr7v.mongodb.net:27017,mflix-shard-00-01-lqr7v.mongodb.net:27017,mflix-shard-00-02-lqr7v.mongodb.net:27017/test?ssl=true&replicaSet=mflix-shard-0&authSource=admin&retryWrites=true

which immediately worked right after and i was able to view localhost:5000.

Although worked, is this an issue within the course material?