Connect ECONNREFUSED (not OnPrem installation

Total newbie on MongoDB, so please be kind :wink:

I have installed MongoDB Server (community edition) on one server (Microsoft Windows Server 2022 Standard) (OnPrem) and are now trying to connect to it from another server.

Add first I had a problem just seeing the server, but I have made sure my network is now open to the server including port 27017. That part works!

I have also changed the mongod.cfg file so it is not only bound to

# network interfaces
  port: 27017
#  bindIp:

And after making the config-change, I have restarted my MongoDB service.

But I continue to get the “connect ECONNREFUSED :27017” (where is my ip-address to the server).

When trying to log on to MongoDB on the server directly using Mongosh, I can connect and it works. But when I try from my developer machine using MongoDBCompass, I get the above error.

MongoDB Community Edition 6.0.4
Compass version 1.35.0

What can I do from here?

Actually found the answer:

Instead of commenting out bindIp: I wrote:
bindIpAll: true

That worked!


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.