Estoy intentando configurar una instancia de MongoDB 4.2.X Community en mi ordenador local. Sin embargo, estoy recibiendo el siguiente mensaje de error:
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 ::
Connection refused : connect@src/mongo/shell/mongo.js:341:17
He seguido todas las instrucciones en https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/ y no he podido encontrar ninguna ayuda adecuada en Internet. ¿Alguien sabe cómo arreglar esto?
==> Summary
/usr/local/Cellar/mongodb-community/4.2.0: 21 files, 272.3MB, built in 5 seconds
Juliens-iMac:~ julien$ mongod --config /usr/local/etc/mongod.conf
Juliens-iMac:~ julien$ mongo
MongoDB shell version v4.2.0
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
2019-10-19T11:47:04.088+0200 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 :: Connection refused :
connect@src/mongo/shell/mongo.js:341:17
@(connect):2:6
2019-10-19T11:47:04.090+0200 F - [main] exception: connect failed
2019-10-19T11:47:04.091+0200 E - [main] exiting with code 1
Juliens-iMac:~ julien$ brew services list
Name Status User Plist
docker-machine started julien /Users/julien/Library/LaunchAgents/homebrew.mxcl.docker-machine.plist
mongodb-community started julien /Users/julien/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist