Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not connect to database using connectionString: mongodb://root:example@mongo:27017/" #506

Closed
chakrabortyanshu opened this issue Nov 6, 2021 · 5 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@chakrabortyanshu
Copy link

I am running docker-compose -f stack.yml up as mentioned in the hub.docker.com. It is not working for me.
The logs from both containers are available here.

(node:7) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [mongo:27017] on first connect [MongoNetworkTimeoutError: connection timed out
    at connectionFailureError (/node_modules/mongodb/lib/core/connection/connect.js:362:14)
    at Socket.<anonymous> (/node_modules/mongodb/lib/core/connection/connect.js:330:16)
    at Object.onceWrapper (events.js:420:28)
    at Socket.emit (events.js:314:20)
    at Socket._onTimeout (net.js:483:8)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)]
    at Pool.<anonymous> (/node_modules/mongodb/lib/core/topologies/server.js:441:11)
    at Pool.emit (events.js:314:20)
    at /node_modules/mongodb/lib/core/connection/pool.js:564:14
    at /node_modules/mongodb/lib/core/connection/pool.js:1000:11
    at /node_modules/mongodb/lib/core/connection/connect.js:32:7
    at callback (/node_modules/mongodb/lib/core/connection/connect.js:300:5)
    at Socket.<anonymous> (/node_modules/mongodb/lib/core/connection/connect.js:330:7)
    at Object.onceWrapper (events.js:420:28)
    at Socket.emit (events.js:314:20)
    at Socket._onTimeout (net.js:483:8)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
(node:7) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(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.```

Thanks in advance.
@wglambert wglambert added the question Usability question, not directly related to an error with the image label Nov 8, 2021
@wglambert
Copy link

You might've tried connecting before it was fully initialized. But it started successfully here and is waiting for incoming connections https://github.com/chakrabortyanshu/Issues/blob/5a6b677c588bb6dd98d188e89b2b3bfa10824bd0/mongodb/mongo_log.log#L173-L175

@chakrabortyanshu
Copy link
Author

Hi @wglambert
thank you for your response. Yes, the mongo is running fine as you have rightly pointed out. But mongo-express continues failing with the below log snippet. For some reason, the mongo-express is not able to find the URL mongodb://root:example@mongo:27017/. I am using the stack.yml from the link mongo docker hub example. Not sure what is going wrong?

FYI: I kept the dockers running for one hour complete. Later I restarted mongo-express but still the same result.

Any recommendation?

The Mongo-express Logs

Welcome to mongo-express
------------------------


(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.
Could not connect to database using connectionString: mongodb://root:example@mongo:27017/"
(node:7) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [mongo:27017] on first connect [MongoNetworkTimeoutError: connection timed out
    at connectionFailureError (/node_modules/mongodb/lib/core/connection/connect.js:362:14)
    at Socket.<anonymous> (/node_modules/mongodb/lib/core/connection/connect.js:330:16)
    at Object.onceWrapper (events.js:420:28)
    at Socket.emit (events.js:314:20)
    at Socket._onTimeout (net.js:483:8)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)]
    at Pool.<anonymous> (/node_modules/mongodb/lib/core/topologies/server.js:441:11)
    at Pool.emit (events.js:314:20)
    at /node_modules/mongodb/lib/core/connection/pool.js:564:14
    at /node_modules/mongodb/lib/core/connection/pool.js:1000:11
    at /node_modules/mongodb/lib/core/connection/connect.js:32:7
    at callback (/node_modules/mongodb/lib/core/connection/connect.js:300:5)
    at Socket.<anonymous> (/node_modules/mongodb/lib/core/connection/connect.js:330:7)
    at Object.onceWrapper (events.js:420:28)
    at Socket.emit (events.js:314:20)
    at Socket._onTimeout (net.js:483:8)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
(node:7) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Welcome to mongo-express
------------------------


(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.

@yosifkit
Copy link
Member

yosifkit commented Nov 9, 2021

I just tried locally with docker-compose -f stack.yml up and while it recreated the mongo-express container multiple times (usually failing with a similar log error, but starting a new one with the restart: always), after a few times mongo was finally ready for connections and the next start of mongo-express succeeded.

Interesting to note that mine failed with ECONNREFUSED, but yours has MongoNetworkTimeoutError: connection timed out. It seems like docker internal networking is being blocked or something. Maybe you need to restart docker or the host itself? Or maybe extra iptables rules being applied before docker's rules?

Logs:
Attaching to mongo-mongo-1, mongo-mongo-express-1
mongo-mongo-1          | about to fork child process, waiting until server is ready for connections.
mongo-mongo-1          | forked process: 30
mongo-mongo-1          | 
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.678+00:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"-","msg":"***** SERVER RESTARTED *****"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.679+00:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"-","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.681+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.681+00:00"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.681+00:00"},"s":"I",  "c":"NETWORK",  "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.682+00:00"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.682+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","ns":"config.tenantMigrationDonors"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.682+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","ns":"config.tenantMigrationRecipients"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.682+00:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":30,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"56102e208b5d"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.682+00:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"5.0.3","gitVersion":"657fea5a61a74d7a79df7aff8e4bcf0bc742b748","openSSLVersion":"OpenSSL 1.1.1f  31 Mar 2020","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2004","distarch":"x86_64","target_arch":"x86_64"}}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.682+00:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"20.04"}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.682+00:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"127.0.0.1","port":27017,"tls":{"mode":"disabled"}},"processManagement":{"fork":true,"pidFilePath":"/tmp/docker-entrypoint-temp-mongod.pid"},"systemLog":{"destination":"file","logAppend":true,"path":"/proc/1/fd/1"}}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.683+00:00"},"s":"I",  "c":"STORAGE",  "id":22297,   "ctx":"initandlisten","msg":"Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem","tags":["startupWarnings"]}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:15.683+00:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=31459M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}}
mongo-mongo-express-1  | Welcome to mongo-express
mongo-mongo-express-1  | ------------------------
mongo-mongo-express-1  | 
mongo-mongo-express-1  | 
mongo-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-mongo-express-1  | Could not connect to database using connectionString: mongodb://root:example@mongo:27017/"
mongo-mongo-express-1  | (node:7) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [mongo:27017] on first connect [Error: connect ECONNREFUSED 172.20.0.2:27017
mongo-mongo-express-1  |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
mongo-mongo-express-1  |   name: 'MongoNetworkError'
mongo-mongo-express-1  | }]
mongo-mongo-express-1  |     at Pool.<anonymous> (/node_modules/mongodb/lib/core/topologies/server.js:441:11)
mongo-mongo-express-1  |     at Pool.emit (events.js:314:20)
mongo-mongo-express-1  |     at /node_modules/mongodb/lib/core/connection/pool.js:564:14
mongo-mongo-express-1  |     at /node_modules/mongodb/lib/core/connection/pool.js:1000:11
mongo-mongo-express-1  |     at /node_modules/mongodb/lib/core/connection/connect.js:32:7
mongo-mongo-express-1  |     at callback (/node_modules/mongodb/lib/core/connection/connect.js:300:5)
mongo-mongo-express-1  |     at Socket.<anonymous> (/node_modules/mongodb/lib/core/connection/connect.js:330:7)
mongo-mongo-express-1  |     at Object.onceWrapper (events.js:421:26)
mongo-mongo-express-1  |     at Socket.emit (events.js:314:20)
mongo-mongo-express-1  |     at emitErrorNT (internal/streams/destroy.js:92:8)
mongo-mongo-express-1  |     at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
mongo-mongo-express-1  |     at processTicksAndRejections (internal/process/task_queues.js:84:21)
mongo-mongo-express-1  | (node:7) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
mongo-mongo-express-1  | (node:7) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.160+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1636420456:160725][30:0x7f57eff43c80], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global recovery timestamp: (0, 0)"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.160+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1636420456:160819][30:0x7f57eff43c80], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global oldest timestamp: (0, 0)"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.176+00:00"},"s":"I",  "c":"STORAGE",  "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":493}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.176+00:00"},"s":"I",  "c":"RECOVERY", "id":23987,   "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.200+00:00"},"s":"I",  "c":"STORAGE",  "id":4366408, "ctx":"initandlisten","msg":"No table logging settings modifications are required for existing WiredTiger tables","attr":{"loggingEnabled":true}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.200+00:00"},"s":"I",  "c":"STORAGE",  "id":22262,   "ctx":"initandlisten","msg":"Timestamp monitor starting"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.209+00:00"},"s":"W",  "c":"CONTROL",  "id":22120,   "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.210+00:00"},"s":"W",  "c":"CONTROL",  "id":22178,   "ctx":"initandlisten","msg":"/sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'","tags":["startupWarnings"]}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.211+00:00"},"s":"I",  "c":"STORAGE",  "id":20320,   "ctx":"initandlisten","msg":"createCollection","attr":{"namespace":"admin.system.version","uuidDisposition":"provided","uuid":{"uuid":{"$uuid":"2c9d462f-32b1-4824-8f4a-0f166b56102d"}},"options":{"uuid":{"$uuid":"2c9d462f-32b1-4824-8f4a-0f166b56102d"}}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.233+00:00"},"s":"I",  "c":"INDEX",    "id":20345,   "ctx":"initandlisten","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"admin.system.version","index":"_id_","commitTimestamp":null}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.233+00:00"},"s":"I",  "c":"REPL",     "id":20459,   "ctx":"initandlisten","msg":"Setting featureCompatibilityVersion","attr":{"newVersion":"5.0"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.233+00:00"},"s":"I",  "c":"NETWORK",  "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":13,"maxWireVersion":13},"outgoing":{"minWireVersion":13,"maxWireVersion":13},"isInternalClient":true}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.233+00:00"},"s":"I",  "c":"NETWORK",  "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":13,"maxWireVersion":13},"outgoing":{"minWireVersion":13,"maxWireVersion":13},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":13,"maxWireVersion":13},"outgoing":{"minWireVersion":13,"maxWireVersion":13},"isInternalClient":true}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.233+00:00"},"s":"I",  "c":"STORAGE",  "id":5071100, "ctx":"initandlisten","msg":"Clearing temp directory"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.233+00:00"},"s":"I",  "c":"CONTROL",  "id":20536,   "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.234+00:00"},"s":"I",  "c":"FTDC",     "id":20625,   "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"/data/db/diagnostic.data"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.234+00:00"},"s":"I",  "c":"STORAGE",  "id":20320,   "ctx":"initandlisten","msg":"createCollection","attr":{"namespace":"local.startup_log","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"608dfdd6-c5d3-413d-885e-1563b0e1eaf2"}},"options":{"capped":true,"size":10485760}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.256+00:00"},"s":"I",  "c":"INDEX",    "id":20345,   "ctx":"initandlisten","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"local.startup_log","index":"_id_","commitTimestamp":null}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.257+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-27017.sock"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.257+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"127.0.0.1"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.257+00:00"},"s":"I",  "c":"NETWORK",  "id":23016,   "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.257+00:00"},"s":"I",  "c":"CONTROL",  "id":20712,   "ctx":"LogicalSessionCacheReap","msg":"Sessions collection is not set up; waiting until next sessions reap interval","attr":{"error":"NamespaceNotFound: config.system.sessions does not exist"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.257+00:00"},"s":"I",  "c":"STORAGE",  "id":20320,   "ctx":"LogicalSessionCacheRefresh","msg":"createCollection","attr":{"namespace":"config.system.sessions","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"4bb9a491-d662-4de4-a7a7-a09fc5374ac3"}},"options":{}}}
mongo-mongo-1          | child process started successfully, parent exiting
mongo-mongo-express-1 exited with code 0
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.288+00:00"},"s":"I",  "c":"INDEX",    "id":20345,   "ctx":"LogicalSessionCacheRefresh","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"config.system.sessions","index":"_id_","commitTimestamp":null}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.288+00:00"},"s":"I",  "c":"INDEX",    "id":20345,   "ctx":"LogicalSessionCacheRefresh","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"config.system.sessions","index":"lsidTTLIndex","commitTimestamp":null}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.309+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:46892","uuid":"1bf6f0a9-b023-4c78-b2fb-8039493e29fc","connectionId":1,"connectionCount":1}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.310+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn1","msg":"client metadata","attr":{"remote":"127.0.0.1:46892","client":"conn1","doc":{"application":{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"5.0.3"},"os":{"type":"Linux","name":"Ubuntu","architecture":"x86_64","version":"20.04"}}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.314+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn1","msg":"Connection ended","attr":{"remote":"127.0.0.1:46892","uuid":"1bf6f0a9-b023-4c78-b2fb-8039493e29fc","connectionId":1,"connectionCount":0}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.453+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:46894","uuid":"91e621ff-6b5e-4db0-ab50-73a429f0e20b","connectionId":2,"connectionCount":1}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.453+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn2","msg":"client metadata","attr":{"remote":"127.0.0.1:46894","client":"conn2","doc":{"application":{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"5.0.3"},"os":{"type":"Linux","name":"Ubuntu","architecture":"x86_64","version":"20.04"}}}}
mongo-mongo-1          | ================
mongo-mongo-1          | Warning: the "mongo" shell has been superseded by "mongosh",
mongo-mongo-1          | which delivers improved usability and compatibility.The "mongo" shell has been deprecated and will be removed in
mongo-mongo-1          | an upcoming release.
mongo-mongo-1          | We recommend you begin using "mongosh".
mongo-mongo-1          | For installation instructions, see
mongo-mongo-1          | https://docs.mongodb.com/mongodb-shell/install/
mongo-mongo-1          | ================
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.484+00:00"},"s":"I",  "c":"STORAGE",  "id":20320,   "ctx":"conn2","msg":"createCollection","attr":{"namespace":"admin.system.users","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"7db5d683-e511-4097-b0e2-48d4d7d20cc6"}},"options":{}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.520+00:00"},"s":"I",  "c":"INDEX",    "id":20345,   "ctx":"conn2","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"admin.system.users","index":"_id_","commitTimestamp":null}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.520+00:00"},"s":"I",  "c":"INDEX",    "id":20345,   "ctx":"conn2","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"admin.system.users","index":"user_1_db_1","commitTimestamp":null}}
mongo-mongo-1          | Successfully added user: {
mongo-mongo-1          | 	"user" : "root",
mongo-mongo-1          | 	"roles" : [
mongo-mongo-1          | 		{
mongo-mongo-1          | 			"role" : "root",
mongo-mongo-1          | 			"db" : "admin"
mongo-mongo-1          | 		}
mongo-mongo-1          | 	]
mongo-mongo-1          | }
mongo-mongo-1          | Error saving history file: FileOpenFailed Unable to open() file /home/mongodb/.dbshell: No such file or directory
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.526+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn2","msg":"Connection ended","attr":{"remote":"127.0.0.1:46894","uuid":"91e621ff-6b5e-4db0-ab50-73a429f0e20b","connectionId":2,"connectionCount":0}}
mongo-mongo-1          | 
mongo-mongo-1          | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
mongo-mongo-1          | 
mongo-mongo-1          | 
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.544+00:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"-","msg":"***** SERVER RESTARTED *****"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.544+00:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.546+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.546+00:00"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.546+00:00"},"s":"I",  "c":"NETWORK",  "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.547+00:00"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.547+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","ns":"config.tenantMigrationDonors"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.547+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","ns":"config.tenantMigrationRecipients"}}
mongo-mongo-1          | killing process with pid: 30
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.547+00:00"},"s":"I",  "c":"CONTROL",  "id":23377,   "ctx":"SignalHandler","msg":"Received signal","attr":{"signal":15,"error":"Terminated"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.547+00:00"},"s":"I",  "c":"CONTROL",  "id":23378,   "ctx":"SignalHandler","msg":"Signal was sent by kill(2)","attr":{"pid":86,"uid":999}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.547+00:00"},"s":"I",  "c":"CONTROL",  "id":23381,   "ctx":"SignalHandler","msg":"will terminate after current cmd ends"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.547+00:00"},"s":"I",  "c":"REPL",     "id":4784900, "ctx":"SignalHandler","msg":"Stepping down the ReplicationCoordinator for shutdown","attr":{"waitTimeMillis":15000}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.547+00:00"},"s":"I",  "c":"REPL",     "id":4794602, "ctx":"SignalHandler","msg":"Attempting to enter quiesce mode"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.547+00:00"},"s":"I",  "c":"COMMAND",  "id":4784901, "ctx":"SignalHandler","msg":"Shutting down the MirrorMaestro"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"SHARDING", "id":4784902, "ctx":"SignalHandler","msg":"Shutting down the WaitForMajorityService"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"CONTROL",  "id":4784903, "ctx":"SignalHandler","msg":"Shutting down the LogicalSessionCache"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"NETWORK",  "id":20562,   "ctx":"SignalHandler","msg":"Shutdown: going to close listening sockets"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"NETWORK",  "id":23017,   "ctx":"listener","msg":"removing socket file","attr":{"path":"/tmp/mongodb-27017.sock"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"NETWORK",  "id":4784905, "ctx":"SignalHandler","msg":"Shutting down the global connection pool"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"CONTROL",  "id":4784906, "ctx":"SignalHandler","msg":"Shutting down the FlowControlTicketholder"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"-",        "id":20520,   "ctx":"SignalHandler","msg":"Stopping further Flow Control ticket acquisitions."}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"CONTROL",  "id":4784908, "ctx":"SignalHandler","msg":"Shutting down the PeriodicThreadToAbortExpiredTransactions"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"REPL",     "id":4784909, "ctx":"SignalHandler","msg":"Shutting down the ReplicationCoordinator"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"SHARDING", "id":4784910, "ctx":"SignalHandler","msg":"Shutting down the ShardingInitializationMongoD"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"REPL",     "id":4784911, "ctx":"SignalHandler","msg":"Enqueuing the ReplicationStateTransitionLock for shutdown"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"-",        "id":4784912, "ctx":"SignalHandler","msg":"Killing all operations for shutdown"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"-",        "id":4695300, "ctx":"SignalHandler","msg":"Interrupted all currently running operations","attr":{"opsKilled":3}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"TENANT_M", "id":5093807, "ctx":"SignalHandler","msg":"Shutting down all TenantMigrationAccessBlockers on global shutdown"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"COMMAND",  "id":4784913, "ctx":"SignalHandler","msg":"Shutting down all open transactions"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"REPL",     "id":4784914, "ctx":"SignalHandler","msg":"Acquiring the ReplicationStateTransitionLock for shutdown"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"INDEX",    "id":4784915, "ctx":"SignalHandler","msg":"Shutting down the IndexBuildsCoordinator"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"REPL",     "id":4784916, "ctx":"SignalHandler","msg":"Reacquiring the ReplicationStateTransitionLock for shutdown"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"REPL",     "id":4784917, "ctx":"SignalHandler","msg":"Attempting to mark clean shutdown"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"NETWORK",  "id":4784918, "ctx":"SignalHandler","msg":"Shutting down the ReplicaSetMonitor"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"SHARDING", "id":4784921, "ctx":"SignalHandler","msg":"Shutting down the MigrationUtilExecutor"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"ASIO",     "id":22582,   "ctx":"MigrationUtil-TaskExecutor","msg":"Killing all outstanding egress activity."}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"COMMAND",  "id":4784923, "ctx":"SignalHandler","msg":"Shutting down the ServiceEntryPoint"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"CONTROL",  "id":4784925, "ctx":"SignalHandler","msg":"Shutting down free monitoring"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.548+00:00"},"s":"I",  "c":"CONTROL",  "id":20609,   "ctx":"SignalHandler","msg":"Shutting down free monitoring"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"CONTROL",  "id":4784927, "ctx":"SignalHandler","msg":"Shutting down the HealthLog"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"CONTROL",  "id":4784928, "ctx":"SignalHandler","msg":"Shutting down the TTL monitor"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"INDEX",    "id":3684100, "ctx":"SignalHandler","msg":"Shutting down TTL collection monitor thread"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"INDEX",    "id":3684101, "ctx":"SignalHandler","msg":"Finished shutting down TTL collection monitor thread"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"CONTROL",  "id":4784929, "ctx":"SignalHandler","msg":"Acquiring the global lock for shutdown"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"CONTROL",  "id":4784930, "ctx":"SignalHandler","msg":"Shutting down the storage engine"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"STORAGE",  "id":22320,   "ctx":"SignalHandler","msg":"Shutting down journal flusher thread"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"STORAGE",  "id":22321,   "ctx":"SignalHandler","msg":"Finished shutting down journal flusher thread"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"STORAGE",  "id":22322,   "ctx":"SignalHandler","msg":"Shutting down checkpoint thread"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"STORAGE",  "id":22323,   "ctx":"SignalHandler","msg":"Finished shutting down checkpoint thread"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"STORAGE",  "id":20282,   "ctx":"SignalHandler","msg":"Deregistering all the collections"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"STORAGE",  "id":22261,   "ctx":"SignalHandler","msg":"Timestamp monitor shutting down"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.549+00:00"},"s":"I",  "c":"STORAGE",  "id":22317,   "ctx":"SignalHandler","msg":"WiredTigerKVEngine shutting down"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.550+00:00"},"s":"I",  "c":"STORAGE",  "id":22318,   "ctx":"SignalHandler","msg":"Shutting down session sweeper thread"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.550+00:00"},"s":"I",  "c":"STORAGE",  "id":22319,   "ctx":"SignalHandler","msg":"Finished shutting down session sweeper thread"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.550+00:00"},"s":"I",  "c":"STORAGE",  "id":4795902, "ctx":"SignalHandler","msg":"Closing WiredTiger","attr":{"closeConfig":"leak_memory=true,"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.551+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"SignalHandler","msg":"WiredTiger message","attr":{"message":"[1636420456:551179][30:0x7f57eff42700], close_ckpt: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 47, snapshot max: 47 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 1"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.601+00:00"},"s":"I",  "c":"STORAGE",  "id":4795901, "ctx":"SignalHandler","msg":"WiredTiger closed","attr":{"durationMillis":51}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.601+00:00"},"s":"I",  "c":"STORAGE",  "id":22279,   "ctx":"SignalHandler","msg":"shutdown: removing fs lock..."}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.601+00:00"},"s":"I",  "c":"-",        "id":4784931, "ctx":"SignalHandler","msg":"Dropping the scope cache for shutdown"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.601+00:00"},"s":"I",  "c":"FTDC",     "id":4784926, "ctx":"SignalHandler","msg":"Shutting down full-time data capture"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.601+00:00"},"s":"I",  "c":"FTDC",     "id":20626,   "ctx":"SignalHandler","msg":"Shutting down full-time diagnostic data capture"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.601+00:00"},"s":"I",  "c":"CONTROL",  "id":20565,   "ctx":"SignalHandler","msg":"Now exiting"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:16.601+00:00"},"s":"I",  "c":"CONTROL",  "id":23138,   "ctx":"SignalHandler","msg":"Shutting down","attr":{"exitCode":0}}
mongo-mongo-express-1  | Welcome to mongo-express
mongo-mongo-express-1  | ------------------------
mongo-mongo-express-1  | 
mongo-mongo-express-1  | 
mongo-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-mongo-express-1  | Could not connect to database using connectionString: mongodb://root:example@mongo:27017/"
mongo-mongo-express-1  | (node:7) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [mongo:27017] on first connect [Error: connect ECONNREFUSED 172.20.0.2:27017
mongo-mongo-express-1  |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
mongo-mongo-express-1  |   name: 'MongoNetworkError'
mongo-mongo-express-1  | }]
mongo-mongo-express-1  |     at Pool.<anonymous> (/node_modules/mongodb/lib/core/topologies/server.js:441:11)
mongo-mongo-express-1  |     at Pool.emit (events.js:314:20)
mongo-mongo-express-1  |     at /node_modules/mongodb/lib/core/connection/pool.js:564:14
mongo-mongo-express-1  |     at /node_modules/mongodb/lib/core/connection/pool.js:1000:11
mongo-mongo-express-1  |     at /node_modules/mongodb/lib/core/connection/connect.js:32:7
mongo-mongo-express-1  |     at callback (/node_modules/mongodb/lib/core/connection/connect.js:300:5)
mongo-mongo-express-1  |     at Socket.<anonymous> (/node_modules/mongodb/lib/core/connection/connect.js:330:7)
mongo-mongo-express-1  |     at Object.onceWrapper (events.js:421:26)
mongo-mongo-express-1  |     at Socket.emit (events.js:314:20)
mongo-mongo-express-1  |     at emitErrorNT (internal/streams/destroy.js:92:8)
mongo-mongo-express-1  |     at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
mongo-mongo-express-1  |     at processTicksAndRejections (internal/process/task_queues.js:84:21)
mongo-mongo-express-1  | (node:7) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
mongo-mongo-express-1  | (node:7) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
mongo-mongo-express-1 exited with code 0
mongo-mongo-1          | 
mongo-mongo-1          | MongoDB init process complete; ready for start up.
mongo-mongo-1          | 
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.567+00:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"-","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.568+00:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.569+00:00"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.569+00:00"},"s":"I",  "c":"NETWORK",  "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.570+00:00"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.570+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","ns":"config.tenantMigrationDonors"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.570+00:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","ns":"config.tenantMigrationRecipients"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.570+00:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":1,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"56102e208b5d"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.570+00:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"5.0.3","gitVersion":"657fea5a61a74d7a79df7aff8e4bcf0bc742b748","openSSLVersion":"OpenSSL 1.1.1f  31 Mar 2020","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2004","distarch":"x86_64","target_arch":"x86_64"}}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.570+00:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"20.04"}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.570+00:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"},"security":{"authorization":"enabled"}}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.571+00:00"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.571+00:00"},"s":"I",  "c":"STORAGE",  "id":22297,   "ctx":"initandlisten","msg":"Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem","tags":["startupWarnings"]}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:17.571+00:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=31459M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}}
mongo-mongo-express-1  | Welcome to mongo-express
mongo-mongo-express-1  | ------------------------
mongo-mongo-express-1  | 
mongo-mongo-express-1  | 
mongo-mongo-express-1  | (node:8) [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-mongo-express-1  | Could not connect to database using connectionString: mongodb://root:example@mongo:27017/"
mongo-mongo-express-1  | (node:8) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [mongo:27017] on first connect [Error: connect ECONNREFUSED 172.20.0.2:27017
mongo-mongo-express-1  |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
mongo-mongo-express-1  |   name: 'MongoNetworkError'
mongo-mongo-express-1  | }]
mongo-mongo-express-1  |     at Pool.<anonymous> (/node_modules/mongodb/lib/core/topologies/server.js:441:11)
mongo-mongo-express-1  |     at Pool.emit (events.js:314:20)
mongo-mongo-express-1  |     at /node_modules/mongodb/lib/core/connection/pool.js:564:14
mongo-mongo-express-1  |     at /node_modules/mongodb/lib/core/connection/pool.js:1000:11
mongo-mongo-express-1  |     at /node_modules/mongodb/lib/core/connection/connect.js:32:7
mongo-mongo-express-1  |     at callback (/node_modules/mongodb/lib/core/connection/connect.js:300:5)
mongo-mongo-express-1  |     at Socket.<anonymous> (/node_modules/mongodb/lib/core/connection/connect.js:330:7)
mongo-mongo-express-1  |     at Object.onceWrapper (events.js:421:26)
mongo-mongo-express-1  |     at Socket.emit (events.js:314:20)
mongo-mongo-express-1  |     at emitErrorNT (internal/streams/destroy.js:92:8)
mongo-mongo-express-1  |     at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
mongo-mongo-express-1  |     at processTicksAndRejections (internal/process/task_queues.js:84:21)
mongo-mongo-express-1  | (node:8) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
mongo-mongo-express-1  | (node:8) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.035+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1636420458:35742][1:0x7fb6b82a4c80], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 1 through 2"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.086+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1636420458:86583][1:0x7fb6b82a4c80], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 2 through 2"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.136+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1636420458:136596][1:0x7fb6b82a4c80], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Main recovery loop: starting at 1/31744 to 2/256"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.201+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1636420458:201949][1:0x7fb6b82a4c80], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 1 through 2"}}
mongo-mongo-express-1 exited with code 0
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.246+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1636420458:246464][1:0x7fb6b82a4c80], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 2 through 2"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.276+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1636420458:276931][1:0x7fb6b82a4c80], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global recovery timestamp: (0, 0)"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.276+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1636420458:276964][1:0x7fb6b82a4c80], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global oldest timestamp: (0, 0)"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.280+00:00"},"s":"I",  "c":"STORAGE",  "id":22430,   "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1636420458:280210][1:0x7fb6b82a4c80], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 1, snapshot max: 1 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 7"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.291+00:00"},"s":"I",  "c":"STORAGE",  "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":720}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.291+00:00"},"s":"I",  "c":"RECOVERY", "id":23987,   "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.293+00:00"},"s":"I",  "c":"STORAGE",  "id":4366408, "ctx":"initandlisten","msg":"No table logging settings modifications are required for existing WiredTiger tables","attr":{"loggingEnabled":true}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.294+00:00"},"s":"I",  "c":"STORAGE",  "id":22262,   "ctx":"initandlisten","msg":"Timestamp monitor starting"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.302+00:00"},"s":"W",  "c":"CONTROL",  "id":22178,   "ctx":"initandlisten","msg":"/sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'","tags":["startupWarnings"]}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.304+00:00"},"s":"I",  "c":"NETWORK",  "id":4915702, "ctx":"initandlisten","msg":"Updated wire specification","attr":{"oldSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true},"newSpec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":13,"maxWireVersion":13},"outgoing":{"minWireVersion":13,"maxWireVersion":13},"isInternalClient":true}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.304+00:00"},"s":"I",  "c":"STORAGE",  "id":5071100, "ctx":"initandlisten","msg":"Clearing temp directory"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.305+00:00"},"s":"I",  "c":"CONTROL",  "id":20536,   "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.306+00:00"},"s":"I",  "c":"FTDC",     "id":20625,   "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"/data/db/diagnostic.data"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.308+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-27017.sock"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.308+00:00"},"s":"I",  "c":"NETWORK",  "id":23015,   "ctx":"listener","msg":"Listening on","attr":{"address":"0.0.0.0"}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:18.308+00:00"},"s":"I",  "c":"NETWORK",  "id":23016,   "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}}
mongo-mongo-express-1  | Welcome to mongo-express
mongo-mongo-express-1  | ------------------------
mongo-mongo-express-1  | 
mongo-mongo-express-1  | 
mongo-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-mongo-1          | {"t":{"$date":"2021-11-09T01:14:19.045+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"172.20.0.3:57540","uuid":"190f5ddf-dca4-426c-a1d1-296516f10759","connectionId":1,"connectionCount":1}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:19.050+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn1","msg":"client metadata","attr":{"remote":"172.20.0.3:57540","client":"conn1","doc":{"driver":{"name":"nodejs","version":"3.7.3"},"os":{"type":"Linux","name":"linux","architecture":"x64","version":"5.10.0-9-amd64"},"platform":"'Node.js v12.22.7, LE (legacy)"}}}
mongo-mongo-1          | {"t":{"$date":"2021-11-09T01:14:19.063+00:00"},"s":"I",  "c":"ACCESS",   "id":20250,   "ctx":"conn1","msg":"Authentication succeeded","attr":{"mechanism":"SCRAM-SHA-256","speculative":true,"principalName":"root","authenticationDatabase":"admin","remote":"172.20.0.3:57540","extraInfo":{}}}
mongo-mongo-express-1  | Mongo Express server listening at http://0.0.0.0:8081
mongo-mongo-express-1  | Server is open to allow connections from anyone (0.0.0.0)
mongo-mongo-express-1  | basicAuth credentials are "admin:pass", it is recommended you change this in your config.js!

@chakrabortyanshu
Copy link
Author

Hi @yosifkit,
Thanks for your response.

Just to confirm that the containers are able to communicate, I executed the below commands.

  • Confirmed that both the containers are running on the same network.
    anshuman@anshuman:~$ docker inspect -f '{{range $key, $value := .NetworkSettings.Networks}}{{$key}} {{end}}' mongo
    mongodb_mongodb_default 
    anshuman@anshuman:~$ docker inspect -f '{{range $key, $value := .NetworkSettings.Networks}}{{$key}} {{end}}' mongo-express
    mongodb_mongodb_default 
    
  • Mongo-express is restarting frequently. But whenever it was available, I was able to ping the mongo container from the mongo-express container
     anshuman@anshuman:~$ docker exec mongo-express ping mongo -c2
     PING mongo (172.22.0.3): 56 data bytes
     64 bytes from 172.22.0.3: seq=0 ttl=64 time=0.078 ms
     64 bytes from 172.22.0.3: seq=1 ttl=64 time=0.141 ms
     
     --- mongo ping statistics ---
     2 packets transmitted, 2 packets received, 0% packet loss
     round-trip min/avg/max = 0.078/0.109/0.141 ms
    
  • Pinged mongo's IP from the container mongo-express
    anshuman@anshuman:~$ docker inspect -f '{{.NetworkSettings.Networks.mongodb_mongodb_default.IPAddress}}' mongo-express
    172.22.0.2
    anshuman@anshuman:~$ docker inspect -f '{{.NetworkSettings.Networks.mongodb_mongodb_default.IPAddress}}' mongo
    172.22.0.3
    anshuman@anshuman:~$ docker exec mongo-express ping 172.22.0.3 -c2
     PING 172.22.0.3 (172.22.0.3): 56 data bytes
     64 bytes from 172.22.0.3: seq=0 ttl=64 time=0.101 ms
     64 bytes from 172.22.0.3: seq=1 ttl=64 time=0.157 ms
     
     --- 172.22.0.3 ping statistics ---
     2 packets transmitted, 2 packets received, 0% packet loss
     round-trip min/avg/max = 0.101/0.129/0.157 ms
    
  • The Config file.
      anshuman@anshuman:~$ cat mongo.yml 
      version: '3.1'
      
      services:
      
        mongo:
          image: mongo
          restart: always
          container_name: mongo
          environment:
            MONGO_INITDB_ROOT_USERNAME: root
            MONGO_INITDB_ROOT_PASSWORD: example
          networks:
            - mongodb_default
      
        mongo-express:
          image: mongo-express
          restart: always
          container_name: mongo-express
          ports:
            - 8081:8081
          environment:
            ME_CONFIG_MONGODB_ADMINUSERNAME: root
            ME_CONFIG_MONGODB_ADMINPASSWORD: example
            ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/
          networks:
            - mongodb_default
              
      networks:
        mongodb_default:
          driver: bridge
    

Not sure what is going wrong. Any recommendation?

@tianon
Copy link
Member

tianon commented Jun 11, 2022

Sorry for the delay -- unfortunately, the best I can recommend is trying a dedicated support forum, such as the Docker Community Forums, the Docker Community Slack, or Stack Overflow. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

4 participants