I installed:
MongoDBv7.0.5 as a service on the Windows Server 2019.Mongoshv2.1.5 on the Windows 10
But when trying to connect the MongoDB server on the Windows Server 2019 from the Windows 10 I receive the following error:
MongoNetworkError: connect ECONNREFUSED 172.18.44.22:27017
I checked:
- MongoDB service is running
- The Windows Firewall is configured don't block port
27017(in/out)
I checked a lot of posts on StackOverflow: most of these related to Linux, the rest are describing solutions that don't help.
What might be problem?
When I launch mongosh locally on the Windows Server 2019 it is running without a problem.
Thanks
Double click on the service and have a look at "Path to Executable", should be something like
C:\Program Files\MongoDB\mongod.exe --config ...Have a look at the config file, most likely it contains these lines:
Which means, the MongoDB listens to
localhostand you can connect only from your local machine. To enable connections from other computers change it toand restart the service.