[SERVER-9273] Mongodb crashes using systemctl, else starts ok Created: 08/Apr/13  Updated: 10/Dec/14  Resolved: 14/Jan/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.4.1
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Gigi Assignee: Unassigned
Resolution: Done Votes: 0
Labels: crash, failed, start
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: updated archlinux, 64 bit
boost 1.53.0-2, boost-libs 1.53.0-2


Operating System: Linux
Steps To Reproduce:

On a recently installed arch machine I installed mongodb using pacman.
I tried to start it using systemctl start mongodb, this fails

Participants:

 Description   

I just installed mongodb on a relatively new system (1 week or so).
When I try to start the mongo service(systemctl start mongodb) I get this error in journalctl:

 
apr 03 15:48:01 echelon systemd[1]: Starting High-performance, schema-free document-oriented database...
apr 03 15:48:01 echelon systemd[1]: Started High-performance, schema-free document-oriented database.
apr 03 15:48:01 echelon mongod[1756]: Wed Apr  3 15:48:01.327 terminate() called, printing stack (if implemented for platform):
apr 03 15:48:01 echelon mongod[1756]: 0xb812d3 0x76c093 0x7f60471b5b26 0x7f60471b5b53 0x7f60471b5d7e 0x7f60472072d7 0x7f60471d31f4 0x7f60471c83f9 0x7f60471c952b 0x7f6047...a15 0x76bcd5
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x23) [0xb812d3]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(_ZN5mongo11myterminateEv+0x43) [0x76c093]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(+0x5eb26) [0x7f60471b5b26]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(+0x5eb53) [0x7f60471b5b53]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(+0x5ed7e) [0x7f60471b5d7e]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x67) [0x7f60472072d7]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(+0x7c1f4) [0x7f60471d31f4]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x49) [0x7f60471c83f9]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(_ZNSt6localeC1EPKc+0x71b) [0x7f60471c952b]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libboost_filesystem.so.1.53.0(_ZN5boost10filesystem4path7codecvtEv+0x4f) [0x7f6047adfb6f]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libboost_filesystem.so.1.53.0(_ZNK5boost10filesystem4path14root_directoryEv+0x114) [0x7f6047ae1344]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libboost_filesystem.so.1.53.0(_ZN5boost10filesystem8absoluteERKNS0_4pathES3_+0x3e) [0x7f6047add16e]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(_ZN5mongo27initializeServerGlobalStateEb+0xf3) [0x94fc73]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(main+0x234) [0x7591f4]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7f60468b7a15]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod() [0x76bcd5]
apr 03 15:48:01 echelon mongod[1756]: Wed Apr  3 15:48:01.329 Got signal: 6 (Aborted).
apr 03 15:48:01 echelon mongod[1756]: Wed Apr  3 15:48:01.332 Backtrace:
apr 03 15:48:01 echelon mongod[1756]: 0xb812d3 0x76c280 0x7f60468cb240 0x7f60468cb1c9 0x7f60468cc5c8 0x76c098 0x7f60471b5b26 0x7f60471b5b53 0x7f60471b5d7e 0x7f60472072d7...a15 0x76bcd5
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x23) [0xb812d3]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x100) [0x76c280]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libc.so.6(+0x35240) [0x7f60468cb240]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libc.so.6(gsignal+0x39) [0x7f60468cb1c9]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libc.so.6(abort+0x148) [0x7f60468cc5c8]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(_ZN5mongo11myterminateEv+0x48) [0x76c098]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(+0x5eb26) [0x7f60471b5b26]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(+0x5eb53) [0x7f60471b5b53]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(+0x5ed7e) [0x7f60471b5d7e]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x67) [0x7f60472072d7]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(+0x7c1f4) [0x7f60471d31f4]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x49) [0x7f60471c83f9]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(_ZNSt6localeC1EPKc+0x71b) [0x7f60471c952b]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libboost_filesystem.so.1.53.0(_ZN5boost10filesystem4path7codecvtEv+0x4f) [0x7f6047adfb6f]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libboost_filesystem.so.1.53.0(_ZNK5boost10filesystem4path14root_directoryEv+0x114) [0x7f6047ae1344]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libboost_filesystem.so.1.53.0(_ZN5boost10filesystem8absoluteERKNS0_4pathES3_+0x3e) [0x7f6047add16e]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(_ZN5mongo27initializeServerGlobalStateEb+0xf3) [0x94fc73]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(main+0x234) [0x7591f4]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7f60468b7a15]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod() [0x76bcd5]
apr 03 15:48:01 echelon systemd[1]: mongodb.service: main process exited, code=exited, status=14/n/a
apr 03 15:48:01 echelon systemd[1]: Unit mongodb.service entered failed state
 

 
# systemctl status mongodb
mongodb.service - High-performance, schema-free document-oriented database
	  Loaded: loaded (/usr/lib/systemd/system/mongodb.service; enabled)
	  Active: failed (Result: exit-code) since Mi 2013-04-03 15:48:01 EEST; 3min 13s ago
	 Process: 1756 ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf (code=exited, status=14)
 
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libstdc++.so.6(_ZNSt6localeC1EPKc+0x71b) [0x7f60471c952b]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libboost_filesystem.so.1.53.0(_ZN5boost10filesystem4path7codecvtEv+0x4f) [0x7f6047adfb6f]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libboost_filesystem.so.1.53.0(_ZNK5boost10filesystem4path14root_directoryEv+0x114) [0x7f6047ae1344]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libboost_filesystem.so.1.53.0(_ZN5boost10filesystem8absoluteERKNS0_4pathES3_+0x3e) [0x7f6047add16e]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(_ZN5mongo27initializeServerGlobalStateEb+0xf3) [0x94fc73]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod(main+0x234) [0x7591f4]
apr 03 15:48:01 echelon mongod[1756]: /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7f60468b7a15]
apr 03 15:48:01 echelon mongod[1756]: /usr/bin/mongod() [0x76bcd5]
apr 03 15:48:01 echelon systemd[1]: mongodb.service: main process exited, code=exited, status=14/n/a
apr 03 15:48:01 echelon systemd[1]: Unit mongodb.service entered failed state

But running the following command as root, works!

 
/usr/bin/mongod --quiet --config /etc/mongodb.conf

I left everything to their defaults

/etc/mongodb.conf:

 # See http://www.mongodb.org/display/DOCS/File+Based+Configuration for format details
# Run mongod --help to see a list of options
 
bind_ip = 127.0.0.1
quiet = true
dbpath = /var/lib/mongodb
logpath = /var/log/mongodb/mongod.log
logappend = true

Permissions of /var/lib/mongodb:

 
drwx------  4 mongodb daemon 4096 apr  3 14:11 mongodb

Permissions of /var/log/mongodb:

 
drwxr-xr-x  2 mongodb daemon   4096 apr  3 13:57 mongodb

I read somewhere that it may be related to locale:
output of locale -a:

 
C
en_US
en_US.iso88591
en_US.utf8
POSIX
romanian
ro_RO
ro_RO.iso88592
ro_RO.utf8

output of locale:

 
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=ro_RO.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Installed package versions:

 
# pacman -Qs mongo
local/mongodb 2.4.1-2
# pacman -Qs boost
local/boost 1.53.0-2
local/boost-libs 1.53.0-2

*UPDATE: * This does not happen on another, updated, arch machine. Only on this new installation of mongo



 Comments   
Comment by Eliot Horowitz (Inactive) [ 14/Jan/14 ]

Seems fixed.
Let us know if I mis-understood.

Comment by Gigi [ 18/Apr/13 ]

It seems that an recent Archlinux update fixed this... I just noticed that mongodb starts ok.
Here is the log from that archlinux update:

[2013-04-12 07:42] [PACMAN] upgraded glibc (2.17-4 -> 2.17-5)
[2013-04-12 07:42] [PACMAN] upgraded binutils (2.23.2-1 -> 2.23.2-2)
[2013-04-12 07:42] [PACMAN] upgraded firefox (20.0-1 -> 20.0.1-1)
[2013-04-12 07:42] [PACMAN] upgraded lib32-glibc (2.17-4 -> 2.17-5)
[2013-04-12 07:42] [PACMAN] upgraded lib32-libxi (1.7-1 -> 1.7.1-1)
[2013-04-12 07:42] [PACMAN] upgraded libcap (2.22-3 -> 2.22-4)
[2013-04-12 07:42] [PACMAN] upgraded systemd (200-1 -> 201-1)
[2013-04-12 07:42] [PACMAN] upgraded lib32-systemd (198-1 -> 200-1)
[2013-04-12 07:42] [PACMAN] upgraded libldap (2.4.34-1 -> 2.4.35-1)
[2013-04-12 07:42] [PACMAN] installed qtchooser (26-3)
[2013-04-12 07:42] [PACMAN] upgraded qt5-base (5.0.1-10 -> 5.0.2-1)
[2013-04-12 07:42] [PACMAN] upgraded qt5-jsbackend (5.0.1-10 -> 5.0.2-1)
[2013-04-12 07:42] [PACMAN] upgraded qt5-xmlpatterns (5.0.1-10 -> 5.0.2-1)
[2013-04-12 07:42] [PACMAN] upgraded qt5-declarative (5.0.1-10 -> 5.0.2-1)
[2013-04-12 07:42] [PACMAN] upgraded qt5-webkit (5.0.1-10 -> 5.0.2-1)
[2013-04-12 07:42] [PACMAN] upgraded qt5-script (5.0.1-10 -> 5.0.2-1)
[2013-04-12 07:42] [PACMAN] upgraded qt5-quick1 (5.0.1-10 -> 5.0.2-1)
[2013-04-12 07:42] [PACMAN] upgraded qt5-translations (5.0.1-10 -> 5.0.2-1)
[2013-04-12 07:42] [PACMAN] upgraded qt5-tools (5.0.1-10 -> 5.0.2-1)
[2013-04-12 07:42] [PACMAN] upgraded systemd-sysvcompat (200-1 -> 201-1)

I think it's related to systemd or glibc update...

Generated at Thu Feb 08 03:19:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.