hi Developer,
On my system am trying to add connection in mongodb compass, but showing this kind of error, due any one have solution for it.

hi Developer,
On my system am trying to add connection in mongodb compass, but showing this kind of error, due any one have solution for it.

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amira BedhiafiPosted Aug 3, 2025, 5:18 PM
Hello Ajay !
MongoDB Compass is trying to connect to ayour local MongoDB server on port 27017, but the connection is being refused. It is either your MongoDB service is not running or not listening on the expected port.
You can run this command in your terminal:
or on Windows :
The error messages also includes
::1:27017(IPv6 loopback), which means that Compass is trying both IPv4 and IPv6. If MongoDB is not configured to listen on::1, it may fail. You can disable IPv6 for testing or verify if MongoDB is listening on both by setting this in your config file (mongod.conf):