Unable to connect to MongoDB from VS Code

I have tried severally to connect to MongoDB from VS Code but keep having the error below:

“Unable to connect: C07C6BB5477C0000:error:0A000438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:…/deps/openssl/openssl/ssl/record/rec_layer_s3.c:1605:SSL alert number 80 . It looks like this is a MongoDB Atlas cluster. Please ensure that your Network Access List allows connections from your IP”

OR when I try the preset connection/open form, the as below

“Unable to connect: connect ECONNREFUSED 127.0.0.1:27017, connect ECONNREFUSED ::1:27017”

Can someone please help?

The error message is probably correct.
Probably you have not configured your Atlas instance to allow connections. See Configure IP Access List Entries - Atlas - MongoDB Docs
If you’re trying to connect to Atlas, connecting to localhost at 127.0.0.1 certainly is no help.

1 Like