No connection to MongoDB from Replit

I am glad you made this separate post with error details. Although the error family is the same, MongooseServerSelectionError, your is different than the one in the other post: getaddrinfo ENOTFOUND. This error comes up when there is a problem in the DNS server your app’s host uses.

However, I suspect the cause is the same: The container in which your app starts has the problem. Assuming your app is also a free one you may try the temporary solution I offered there: 8th answer in that post

also, check the given IP address along with the port test with this: curl http://portquiz.net:27017/. by the way, use the command in your repl’s shell.

I also suggest sending a bug report from within the repl (help button on bottom-left) about this problem so to make them replit team aware of the situation.

2 Likes