MongoDB shell version v4.0.10
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
2019-07-28T00:24:16.634+0530 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: No connection could be made because the target machine actively refused it. :
connect@src/mongo/shell/mongo.js:344:17
@(connect):2:6
exception: connect failed
Asked
Active
Viewed 97 times
0

sidgate
- 14,650
- 11
- 68
- 119
-
If your mongod is up and running, Can you try to connect using localhost:27017 or yourpublicIPAddress:27017 ? – whoami - fakeFaceTrueSoul Jul 28 '19 at 06:46
-
Possible duplicate of [mongo - couldn't connect to server 127.0.0.1:27017](https://stackoverflow.com/questions/13312358/mongo-couldnt-connect-to-server-127-0-0-127017) – whoami - fakeFaceTrueSoul Jul 28 '19 at 06:48