-1

I installed MongoDB on Ubuntu (23.04) based on this tutorial. Immediately after installing it, I found out that its systemd service doesn't work. Here's the error I got:

# systemctl status mongod
× mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sat 2023-08-12 17:22:10 +0330; 4s ago
   Duration: 430ms
       Docs: https://docs.mongodb.org/manual
    Process: 5732 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=14)
   Main PID: 5732 (code=exited, status=14)
        CPU: 429ms

Aug 12 17:22:10 rsubuntu systemd[1]: Started mongod.service - MongoDB Database Server.
Aug 12 17:22:10 rsubuntu mongod[5732]: {"t":{"$date":"2023-08-12T13:52:10.028Z"},"s":"I",  "c":"CONTROL",  "id":7484500, "ctx":"-","msg":"Environment variable MONGODB_CONFIG_OVERRIDE_NOFORK == 1, overriding \"processManagemen>
Aug 12 17:22:10 rsubuntu systemd[1]: mongod.service: Main process exited, code=exited, status=14/n/a
Aug 12 17:22:10 rsubuntu systemd[1]: mongod.service: Failed with result 'exit-code'.

I tried restarting the service, but same result. I tried installing MongoDB on Fedora 38, and it worked perfectly. After installing it, I started the service, and it was running. But on Ubuntu 23.04, It failed.

mongod service does NOT start.

And here's the contents of the log file (mongod.log). (the following output was repeated like a dozen times in the log file)

{"t":{"$date":"2023-08-13T10:47:15.752+03:30"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"-","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2023-08-13T10:47:15.752+03:30"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"-","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":17},"outgoing":{"minWireVersion":6,"maxWireVersion":17},"isInternalClient":true}}}
{"t":{"$date":"2023-08-13T10:47:15.753+03:30"},"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":"2023-08-13T10:47:15.754+03:30"},"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":"2023-08-13T10:47:15.759+03:30"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2023-08-13T10:47:15.759+03:30"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2023-08-13T10:47:15.759+03:30"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"ShardSplitDonorService","namespace":"config.tenantSplitDonors"}}
{"t":{"$date":"2023-08-13T10:47:15.759+03:30"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
{"t":{"$date":"2023-08-13T10:47:15.759+03:30"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":2629,"port":27017,"dbPath":"/var/lib/mongodb","architecture":"64-bit","host":"rsubuntu"}}
{"t":{"$date":"2023-08-13T10:47:15.760+03:30"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"6.0.8","gitVersion":"3d84c0dd4e5d99be0d69003652313e7eaf4cdd74","openSSLVersion":"OpenSSL 3.0.8 7 Feb 2023","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2204","distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2023-08-13T10:47:15.760+03:30"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"23.04"}}}
{"t":{"$date":"2023-08-13T10:47:15.760+03:30"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"config":"/etc/mongod.conf","net":{"bindIp":"127.0.0.1","port":27017},"processManagement":{"timeZoneInfo":"/usr/share/zoneinfo"},"storage":{"dbPath":"/var/lib/mongodb"},"systemLog":{"destination":"file","logAppend":true,"path":"/var/log/mongodb/mongod.log"}}}}
{"t":{"$date":"2023-08-13T10:47:15.760+03:30"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/var/lib/mongodb","storageEngine":"wiredTiger"}}
{"t":{"$date":"2023-08-13T10:47:15.760+03:30"},"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"]}
{"t":{"$date":"2023-08-13T10:47:15.760+03:30"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=3395M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,remove=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=2000),statistics_log=(wait=0),json_output=(error,message),verbose=[recovery_progress:1,checkpoint_progress:1,compact_progress:1,backup:0,checkpoint:0,compact:0,evict:0,history_store:0,recovery:0,rts:0,salvage:0,tiered:0,timestamp:0,transaction:0,verify:0,log:0],"}}
{"t":{"$date":"2023-08-13T10:47:16.125+03:30"},"s":"W",  "c":"STORAGE",  "id":22347,   "ctx":"initandlisten","msg":"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."}
{"t":{"$date":"2023-08-13T10:47:16.125+03:30"},"s":"F",  "c":"STORAGE",  "id":28595,   "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"95: Operation not supported"}}
{"t":{"$date":"2023-08-13T10:47:16.125+03:30"},"s":"F",  "c":"ASSERT",   "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":28595,"file":"src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp","line":708}}
{"t":{"$date":"2023-08-13T10:47:16.125+03:30"},"s":"F",  "c":"ASSERT",   "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}

P.S. I tried this and this (setting ulimit -n 64000) from stackoverflow, but it didn't work.

Askr Askr
  • 25
  • 3
  • Do you see and warnings/errors/fails in `mongod.log`? – rickhg12hs Aug 12 '23 at 14:55
  • I added the contents of the log file to the question NOW. – Askr Askr Aug 13 '23 at 11:18
  • From the log, there seems to be a WiredTiger problem. Do you have any old file contents in `/var/lib/mongodb`? – rickhg12hs Aug 13 '23 at 11:23
  • Does this answer your question? [Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade](https://stackoverflow.com/questions/73152973/failed-to-start-up-wiredtiger-under-any-compatibility-version-this-may-be-due-t) – rickhg12hs Aug 13 '23 at 11:27
  • The directory `/var/lib/mongodb` does NOT exist. – Askr Askr Aug 14 '23 at 06:54
  • In the _Directories_ section of the tutorial you are following: [_"If you installed via the package manager, the data directory `/var/lib/mongodb` and the log directory `/var/log/mongodb` are created during the installation."_](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/). Perhaps your install did not complete successfully? – rickhg12hs Aug 14 '23 at 13:21

0 Answers0