mongo-express_1 | Welcome to mongo-express
mongo-express_1 | ------------------------
mongo-express_1 |
mongo-express_1 |
mongo-express_1 | (node:7) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
mongo-express_1 | Could not connect to database using connectionString: mongodb://root:example@mongo:27017/"
mongo-express_1 | (node:7) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [mongo:27017] on first connect [MongoNetworkTimeoutError: connection timed out
mongo-express_1 | at connectionFailureError (/node_modules/mongodb/lib/core/connection/connect.js:362:14)
mongo-express_1 | at Socket. (/node_modules/mongodb/lib/core/connection/connect.js:330:16)
mongo-express_1 | at Object.onceWrapper (events.js:420:28)
mongo-express_1 | at Socket.emit (events.js:314:20)
mongo-express_1 | at Socket._onTimeout (net.js:483:8)
mongo-express_1 | at listOnTimeout (internal/timers.js:554:17)
mongo-express_1 | at processTimers (internal/timers.js:497:7)]
mongo-express_1 | at Pool. (/node_modules/mongodb/lib/core/topologies/server.js:441:11)
mongo-express_1 | at Pool.emit (events.js:314:20)
mongo-express_1 | at /node_modules/mongodb/lib/core/connection/pool.js:564:14
mongo-express_1 | at /node_modules/mongodb/lib/core/connection/pool.js:1000:11
mongo-express_1 | at /node_modules/mongodb/lib/core/connection/connect.js:32:7
mongo-express_1 | at callback (/node_modules/mongodb/lib/core/connection/connect.js:300:5)
mongo-express_1 | at Socket. (/node_modules/mongodb/lib/core/connection/connect.js:330:7)
mongo-express_1 | at Object.onceWrapper (events.js:420:28)
mongo-express_1 | at Socket.emit (events.js:314:20)
mongo-express_1 | at Socket._onTimeout (net.js:483:8)
mongo-express_1 | at listOnTimeout (internal/timers.js:554:17)
mongo-express_1 | at processTimers (internal/timers.js:497:7)
I am simply running
docker-compose up -dusing the compose file found on the docker page of mongo (https://hub.docker.com/_/mongo/) under the title "... via docker stack deploy or docker-compose"docker-compose.yml:
Output of running docker-compose logs
Waiting for MongoDB to start up wasn't the issue. It was still failing to connect after 10 minutes
Any ideas how to fix this? Host machine is running Ubuntu.