You are not logged in.

#1 2020-08-24 05:44:27

robo731
Member
From: Greater NY Area
Registered: 2016-12-24
Posts: 18

MongoDB not starting (codes 14/62)

I suddenly found that my previously working MongoDB installation was not running. I had not performed any updates, installed any new packages, or made any other changes to my system from when it was working.

The first thing I tried to do was update the system. That didn't work and the service was still exiting with code 14.

I then referred to the wiki and followed the troubleshooting steps here: https://wiki.archlinux.org/index.php/MongoDB#MongoDB_won't_start.

Unfortunately these haven't worked either and the service now exits with code 62:

● mongodb.service - High-performance, schema-free document-oriented database
     Loaded: loaded (/usr/lib/systemd/system/mongodb.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Mon 2020-08-24 14:19:35 JST; 19min ago
    Process: 4134 ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf (code=exited, status=62)
   Main PID: 4134 (code=exited, status=62)

There is a thread here (https://bbs.archlinux.org/viewtopic.php?id=233435) on the issue, but it involves starting over. There is also a user who apparently fixed the issue without losing data, but the method is predicated on the service running, which mine will not.

Any guidance on troubleshooting this, ideally without losing data that may still be there would be appreciated.

Offline

#2 2020-08-24 20:31:06

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: MongoDB not starting (codes 14/62)

Did you find the logs / journal for the service? Anything useful in there?

It took me less than 30 seconds to Google this:

MongoDB Manual wrote:

62 - Returned by mongod if the datafiles in --dbpath are incompatible with the version of mongod currently running.
Documented Exit codes

Offline

#3 2020-08-25 04:06:36

robo731
Member
From: Greater NY Area
Registered: 2016-12-24
Posts: 18

Re: MongoDB not starting (codes 14/62)

Forgot to check there, this is all I get out of it related to mongo though:

Aug 25 12:36:42 Arch audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mongodb comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 25 12:36:42 Arch kernel: random: mongod: uninitialized urandom read (128 bytes read)
Aug 25 12:36:44 Arch systemd[1]: mongodb.service: Main process exited, code=exited, status=62/n/a
Aug 25 12:36:44 Arch systemd[1]: mongodb.service: Failed with result 'exit-code'.
Aug 25 12:36:44 Arch audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mongodb comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

Thanks. Yes, it makes sense that it switched to 62 after I tried the upgrade. Not sure what the cause was of the original 14 though. I'll keep searching to see if I can resolve this 62 error, will post here if I find anything that works.

Offline

#4 2020-08-25 05:34:16

robo731
Member
From: Greater NY Area
Registered: 2016-12-24
Posts: 18

Re: MongoDB not starting (codes 14/62)

I decided it was not worth the time/trouble in my case to preserve the data. I deleted the whole

/var/lib/mongodb

folder.

It still would not work. However finally after changing the ownership of the temp file from this answer here: https://askubuntu.com/a/1103513/491784 I was successfully able to start the service.

It may have worked if I had found that before deleting the data, but I can't say for sure.

Offline

#5 2020-08-25 15:18:50

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: MongoDB not starting (codes 14/62)

FWIW - that same link I gave you in my first reply also documents mongodb's logging system and where to find the log files. It would be very likely the root cause would be provided there. You should also check older entries in those logs to make sure exit code 14 doesn't happen again, since it says that with exit code 14 "The system exits without performing a clean shutdown.", which can be deadly on a database in production environments.

Offline

#6 2020-08-28 03:07:19

robo731
Member
From: Greater NY Area
Registered: 2016-12-24
Posts: 18

Re: MongoDB not starting (codes 14/62)

Thanks, this is just my local database, but I will check the logs. Will report here if I find anything meaningful.

Offline

Board footer

Powered by FluxBB