question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MongoDB - "Connection failed! Error: Connection string failed."

See original GitHub issue

Cheers!

Okay so right as I’m trying to get to connect to my mongodb server I set up in unRAID (because unRAID doesn’t really have docker-compose (it’s a topic of its own…)) via docker I just cannot get it to connect to it.

I found out that the connection is refused…

Apparently there are no environment flags to set a password and user in ytdl-m and hence I’m running it without any initialized user or password… Sooo…

Yes I made sure I’m using the official mongo repo. No I don’t know what I’m doing, because I’m a complete novice with mongo 😛 Anything else I could say? idk

So far testing the connection string always results in that message in the title of this issue, so…

What do? Oh and I did set my mongodb container to use the network host mode, so I can call it by my server’s host IP. I can ping to it sucessfully from the bash inside the ytdl-m container, so… mongodb itself must be cranky?

Yeah idk… the mongodb container log doesn’t look too happy:

{"t":{"$date":"2021-07-22T05:52:07.041+02:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2021-07-22T05:52:07.044+02:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2021-07-22T05:52:07.044+02:00"},"s":"I", "c":"NETWORK", "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
{"t":{"$date":"2021-07-22T05:52:07.045+02:00"},"s":"I", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":1,"port":27017,"dbPath":"/data/db","architecture":"64-bit","host":"Ahri"}}
{"t":{"$date":"2021-07-22T05:52:07.045+02:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.7","gitVersion":"abb6b9c2bf675e9e2aeaecba05f0f8359d99e203","openSSLVersion":"OpenSSL 1.1.1f 31 Mar 2020","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2004","distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2021-07-22T05:52:07.045+02:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"20.04"}}}
{"t":{"$date":"2021-07-22T05:52:07.045+02:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"*"}}}}
{"t":{"$date":"2021-07-22T05:52:07.050+02:00"},"s":"I", "c":"STORAGE", "id":22270, "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger"}}
{"t":{"$date":"2021-07-22T05:52:07.052+02:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=23614M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}}
{"t":{"$date":"2021-07-22T05:52:08.177+02:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1626925928:177828][1:0x1479a9cbccc0], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 1 through 2"}}
{"t":{"$date":"2021-07-22T05:52:08.480+02:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1626925928:480775][1:0x1479a9cbccc0], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 2 through 2"}}
{"t":{"$date":"2021-07-22T05:52:08.828+02:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1626925928:828109][1:0x1479a9cbccc0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Main recovery loop: starting at 1/29696 to 2/256"}}
{"t":{"$date":"2021-07-22T05:52:09.188+02:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":2,"message":"[1626925929:188891][1:0x1479a9cbccc0], txn-recover: __posix_open_file, 805: /data/db/journal/WiredTigerLog.0000000001: handle-open: open: No such file or directory"}}
{"t":{"$date":"2021-07-22T05:52:09.189+02:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":2,"message":"[1626925929:189039][1:0x1479a9cbccc0], txn-recover: __wt_log_scan, 2428: WiredTiger is unable to read the recovery log: No such file or directory"}}
{"t":{"$date":"2021-07-22T05:52:09.189+02:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":2,"message":"[1626925929:189078][1:0x1479a9cbccc0], txn-recover: __wt_log_scan, 2431: This may be due to the log files being encrypted, being from an older version or due to corruption on disk: No such file or directory"}}
{"t":{"$date":"2021-07-22T05:52:09.189+02:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":2,"message":"[1626925929:189106][1:0x1479a9cbccc0], txn-recover: __wt_log_scan, 2434: You should confirm that you have opened the database with the correct options including all encryption and compression options: No such file or directory"}}
{"t":{"$date":"2021-07-22T05:52:09.189+02:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":2,"message":"[1626925929:189146][1:0x1479a9cbccc0], txn-recover: __wt_txn_recover, 1063: Recovery failed: No such file or directory"}}
{"t":{"$date":"2021-07-22T05:52:09.320+02:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":0,"message":"[1626925929:320199][1:0x1479a9cbccc0], connection: __wt_cache_destroy, 364: cache server: exiting with 3 pages in memory and 0 pages evicted"}}
{"t":{"$date":"2021-07-22T05:52:09.320+02:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":0,"message":"[1626925929:320362][1:0x1479a9cbccc0], connection: __wt_cache_destroy, 367: cache server: exiting with 18453 image bytes in memory"}}
{"t":{"$date":"2021-07-22T05:52:09.320+02:00"},"s":"E", "c":"STORAGE", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error","attr":{"error":0,"message":"[1626925929:320420][1:0x1479a9cbccc0], connection: __wt_cache_destroy, 370: cache server: exiting with 19110 bytes in memory"}}
{"t":{"$date":"2021-07-22T05:52:09.413+02:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1626925929:413425][1:0x1479a9cbccc0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global recovery timestamp: (0, 0)"}}
{"t":{"$date":"2021-07-22T05:52:09.413+02:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1626925929:413542][1:0x1479a9cbccc0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global oldest timestamp: (0, 0)"}}
{"t":{"$date":"2021-07-22T05:52:09.441+02:00"},"s":"I", "c":"STORAGE", "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":2389}}
{"t":{"$date":"2021-07-22T05:52:09.441+02:00"},"s":"I", "c":"RECOVERY", "id":23987, "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2021-07-22T05:52:09.519+02:00"},"s":"I", "c":"STORAGE", "id":4366408, "ctx":"initandlisten","msg":"No table logging settings modifications are required for existing WiredTiger tables","attr":{"loggingEnabled":true}}
{"t":{"$date":"2021-07-22T05:52:09.520+02:00"},"s":"I", "c":"STORAGE", "id":22262, "ctx":"initandlisten","msg":"Timestamp monitor starting"}
{"t":{"$date":"2021-07-22T05:52:09.533+02: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"]}
{"t":{"$date":"2021-07-22T05:52:09.534+02:00"},"s":"W", "c":"CONTROL", "id":22167, "ctx":"initandlisten","msg":"You are running on a NUMA machine. We suggest launching mongod like this to avoid performance problems: numactl --interleave=all mongod [other options]","tags":["startupWarnings"]}
{"t":{"$date":"2021-07-22T05:52:09.534+02: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"]}
{"t":{"$date":"2021-07-22T05:52:09.534+02:00"},"s":"W", "c":"CONTROL", "id":22184, "ctx":"initandlisten","msg":"Soft rlimits too low","attr":{"currentValue":40960,"recommendedMinimum":64000},"tags":["startupWarnings"]}
{"t":{"$date":"2021-07-22T05:52:09.556+02:00"},"s":"I", "c":"STORAGE", "id":20320, "ctx":"initandlisten","msg":"createCollection","attr":{"namespace":"admin.system.version","uuidDisposition":"provided","uuid":{"uuid":{"$uuid":"81952c6b-d069-4308-989e-b01467018ec7"}},"options":{"uuid":{"$uuid":"81952c6b-d069-4308-989e-b01467018ec7"}}}}
{"t":{"$date":"2021-07-22T05:52:09.595+02:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"initandlisten","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"admin.system.version","index":"_id_","commitTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2021-07-22T05:52:09.595+02:00"},"s":"I", "c":"COMMAND", "id":20459, "ctx":"initandlisten","msg":"Setting featureCompatibilityVersion","attr":{"newVersion":"4.4"}}
{"t":{"$date":"2021-07-22T05:52:09.601+02:00"},"s":"I", "c":"STORAGE", "id":20536, "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"}
{"t":{"$date":"2021-07-22T05:52:09.602+02:00"},"s":"I", "c":"STORAGE", "id":20320, "ctx":"initandlisten","msg":"createCollection","attr":{"namespace":"local.startup_log","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"af73741f-177d-4f16-ae08-c18acd4dbec1"}},"options":{"capped":true,"size":10485760}}}
{"t":{"$date":"2021-07-22T05:52:09.645+02:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"initandlisten","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"local.startup_log","index":"_id_","commitTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2021-07-22T05:52:09.645+02:00"},"s":"I", "c":"FTDC", "id":20625, "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"/data/db/diagnostic.data"}}
{"t":{"$date":"2021-07-22T05:52:09.649+02:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-27017.sock"}}
{"t":{"$date":"2021-07-22T05:52:09.649+02:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"0.0.0.0"}}
{"t":{"$date":"2021-07-22T05:52:09.649+02:00"},"s":"I", "c":"NETWORK", "id":23016, "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}}
{"t":{"$date":"2021-07-22T05:52:09.661+02: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"}}
{"t":{"$date":"2021-07-22T05:52:09.661+02:00"},"s":"I", "c":"STORAGE", "id":20320, "ctx":"LogicalSessionCacheRefresh","msg":"createCollection","attr":{"namespace":"config.system.sessions","uuidDisposition":"generated","uuid":{"uuid":{"$uuid":"5a2e2040-a8cc-4dc6-bcea-bad8e040bf6e"}},"options":{}}}
{"t":{"$date":"2021-07-22T05:52:09.722+02:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"LogicalSessionCacheRefresh","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"config.system.sessions","index":"_id_","commitTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2021-07-22T05:52:09.722+02:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"LogicalSessionCacheRefresh","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"config.system.sessions","index":"lsidTTLIndex","commitTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2021-07-22T05:53:09.529+02:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"WTCheckpointThread","msg":"WiredTiger message","attr":{"message":"[1626925989:529377][1:0x1479a80ad700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 34, snapshot max: 34 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0)"}}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:24 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
Tzahi12345commented, Aug 1, 2021

@martadinata666 This should be fixed! See commit here. Note it usually takes about an hour for the nightly to update.

@GlassedSilver This may resolve this issue as well.

1reaction
Tzahi12345commented, Aug 8, 2021

Closing as this should be resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: couldn't connect to server 127.0.0.1:27017 - MongoDB
Your connection from client to server is blocked by firewall or network configuration; A MongoDB server is not listening on the requested Host/ ......
Read more >
Couldn't connect to server 127.0.0.1:27017 - Stack Overflow
2. hi Nanhe Kumnar what is initial path in terminal. Is we should go to cd /usr/local/opt/mongodb/ folder or another, i'm facing following ......
Read more >
Smart ways to fix MongoDB not connecting error - Bobcares
MongoDB not connecting error happens due to failed MongoDB server, firewall restrictions, authentication failure, bad connection string, ...
Read more >
Mongoose v6.8.1: Connecting to MongoDB
This is the minimum needed to connect the myapp database running locally on the default port (27017). If connecting fails on your machine,...
Read more >
Connection String Invalid | MongoDB - OutSystems
You need to verify the connection string created in MongoDB. Follow the steps, in the below documents to create a valid connection string....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found