0

On Ubuntu 22.04.1 (AMD 3970x, 64GB RAM (memtest86 pass), several free TB on root filesystem, no SMART errors), I installed community mongodb with the standard directions here. Upon starting mongod in systemd, it failed with the journalctl -xe messages-

Apr 01 22:55:52 ganymede systemd[1]: Started MongoDB Database Server. ░░ Subject: A start job for unit mongod.service has finished successfully ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit mongod.service has finished successfully. ░░ ░░ The job identifier is 9623. Apr 01 22:55:52 ganymede sudo[427395]: pam_unix(sudo:session): session closed for user root Apr 01 22:55:52 ganymede mongod[427399]: {"t":{"$date":"2025-04-02T05:55:52.613Z"},"s":"I", "c":"CONTROL", "id":7484500, "ctx":"main","msg":"Environment variable MONGODB_CONFIG_OVERRIDE_NOFORK == 1, overriding \"processManagem> Apr 01 22:55:52 ganymede systemd[1]: mongod.service: Main process exited, code=exited, status=14/n/a ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ An ExecStart= process belonging to unit mongod.service has exited. ░░ ░░ The process' exit code is 'exited' and its exit status is 14. Apr 01 22:55:52 ganymede systemd[1]: mongod.service: Failed with result 'exit-code'. ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit mongod.service has entered the 'failed' state with result 'exit-code'. 

More specific error messages from the same start attempt appeared in /var/log/mongodb/mongod.log-

{"t":{"$date":"2025-04-01T22:55:52.617-07:00"},"s":"I", "c":"CONTROL", "id":20698, "ctx":"main","msg":"***** SERVER RESTARTED *****"} {"t":{"$date":"2025-04-01T22:55:52.620-07: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":"2025-04-01T22:55:52.620-07:00"},"s":"I", "c":"CONTROL", "id":5945603, "ctx":"main","msg":"Multi threading initialized"} {"t":{"$date":"2025-04-01T22:55:52.621-07:00"},"s":"I", "c":"NETWORK", "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set at least one of the related parameters","attr":{"relatedParameters":["tcpFastOpenServer","tcpFastOpenClient","tcpFastOpenQueueSize"]}} {"t":{"$date":"2025-04-01T22:55:52.621-07:00"},"s":"I", "c":"NETWORK", "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":25},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":25},"outgoing":{"minWireVersion":6,"maxWireVersion":25},"isInternalClient":true}}} {"t":{"$date":"2025-04-01T22:55:52.632-07:00"},"s":"F", "c":"ASSERT", "id":23095, "ctx":"main","msg":"Fatal assertion","attr":{"msgid":40475,"error":"FailedToParse: failed to parse time zone file for time zone identifier \"Asia/Riyadh87\": The version used in this timezone identifier is unsupported","file":"src/mongo/db/query/datetime/date_time_support.cpp","line":219}} {"t":{"$date":"2025-04-01T22:55:52.632-07:00"},"s":"F", "c":"ASSERT", "id":23096, "ctx":"main","msg":"\n\n***aborting after fassert() failure\n\n"} 

That seems to indicate a problem with the package tzdata, so I checked it a few ways-

  • dpkg --verify tzdata # no errors or output
  • Checking the apt logs, zgrep -i tzdata /var/log/apt/*.gz, there was an update yesterday (31 Mar 2025)
  • Checking the Riyadh tzdata files, find /usr/share/zoneinfo|grep "Riyadh"|xargs -n 1 zdump -v there were no error messages, though a few records had 'NULL' in them, but unclear if that indicates a problem.

So, I uninstalled that version (apt remove mongodb-org-server mongodb-org-shell mongodb-org-tools mongodb-org-mongos mongodb-org-database mongodb-org-database-tools-extra mongodb-mongosh mongodb-database-tools)

Then I installed previous versions from the community edition archive page by downloading .deb files, iterating through 8.0.5, 8.0.4, 8.0.3, 8.0.1 and 8.0.0. Installed each one by one, started it, checked if it failed -all failed- all with with the same "FailedToParse: failed to parse time zone file for time zone identifier "Asia/Riyadh87"" message in /var/log/mongodb/mongod.log.

This could be a "me problem," but it seems unlikely that a timezone file in tzdata with an unsupported format could get into Ubuntu's repository, and not affect any other services, and not get patched right away. However, I have run into tzdata issues previously on Ubuntu 22.04, and was able to resolve it with an apt reinstall.

I prefer to run services on bare metal, hence my efforts, so if anyone has some input, I'm grateful. For now I'll fire up mongodb on Docker and grit my teeth.

Update- Installing mongodb-server-org adds a default /etc/mongod.conf, which contains-

processManagement: timeZoneInfo: /usr/local/share/tzdb 

I tried starting with and without those lines, no difference, mongod still scans Ubuntu's built-in tzdb and fails the assertion.

So I downloaded tzdb and untarred it to /usr/local/share/mytzdb, pointed mongod.conf to that location, and started mongod -no joy, fails the same way.

Maybe there's an env var that overrides? For now I'm running under Docker, no issues.

Oh- this morning an Ubuntu update had a tzdb refresh, lol. Didn't fix mongod tho.

1 Answer 1

1

This was caused by spurious files under /usr/share/zoneinfo which weren't part of Debian package tzdata.

First, check whether the file mongodb is exiting on is actually provided by any installed package-

% dpkg -S /usr/share/zoneinfo/Asia/Riyadh87 ... "dpkg-query: no path found matching pattern /usr/share/zoneinfo/Asia/Riyadh87 

No.

Next, I diffed dpkg -L tzdata with find /usr/share/zoneinfo and, ignoring other files from tzdata.deb that aren't under that path, there are files like /usr/share/zoneinfo/Asia/Riyadh87, /usr/share/zoneinfo/posix/SystemV/CST6CDT and /usr/share/zoneinfo/Canada/East-Saskatchewan from October 2023. Unsure where they came from. Deleted them, now mongod starts. 🎉

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.