You are not logged in.

#1 2013-04-03 12:57:49

gigitek
Member
Registered: 2012-05-18
Posts: 12

Mongodb doesn't start using systemctl

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

Last edited by gigitek (2013-04-09 05:29:11)

Offline

#2 2013-04-09 05:30:15

gigitek
Member
Registered: 2012-05-18
Posts: 12

Re: Mongodb doesn't start using systemctl

UPDATE: This does not happen on another, updated, arch machine. Only on this new installation of mongo
I still haven't found a solution, any idea/clue  is appreciated.

Offline

#3 2013-04-15 21:49:58

outrobruno
Member
Registered: 2013-04-15
Posts: 4

Re: Mongodb doesn't start using systemctl

Exactaly same problem here.... with fresh install.... 64 bits

I have nginx and php-fpm too.

Is there any bug related?

Offline

#4 2013-04-16 07:51:22

gigitek
Member
Registered: 2012-05-18
Posts: 12

Re: Mongodb doesn't start using systemctl

I thought I was the only one here with this problem.
But a good news: It seems that an update from Friday fixed this... I just noticed that now mongodb starts ok.
Here is the log from that 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...

Offline

#5 2014-04-27 12:41:06

Innominate
Member
From: T440s
Registered: 2012-12-29
Posts: 12

Re: Mongodb doesn't start using systemctl

Similar problem here. By executing mongod from shell, it will start. However,

systemctl start mongodb

will not start MongoDB 2.6.0-1. Had the same problem with previous release as well, but this time thought I should fix it.

systemctl status -l  mongodb

gives me:

● mongodb.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/usr/lib/systemd/system/mongodb.service; disabled)
   Active: failed (Result: exit-code) since Sun 2014-04-27 15:18:46 EEST; 4min 45s ago
  Process: 4217 ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf (code=exited, status=14)
 Main PID: 4217 (code=exited, status=14)

Apr 27 15:18:46 Innominate mongod[4217]: /usr/bin/mongod(_ZN5mongo46_mongoInitializerFunction_ServerLogRedirectionEPNS_18InitializerContextE+0x72) [0x9bd252]
Apr 27 15:18:46 Innominate mongod[4217]: /usr/bin/mongod(_ZN5boost6detail8function17function_invoker1IPFN5mongo6StatusEPNS3_18InitializerContextEES4_S6_E6invokeERNS1_15function_bufferES6_+0xc) [0x779f0c]
Apr 27 15:18:46 Innominate mongod[4217]: /usr/bin/mongod(_ZNK5mongo11Initializer7executeERKSt6vectorISsSaISsEERKSt3mapISsSsSt4lessISsESaISt4pairIKSsSsEEE+0x20a) [0x786b7a]
Apr 27 15:18:46 Innominate mongod[4217]: /usr/bin/mongod(_ZN5mongo21runGlobalInitializersERKSt6vectorISsSaISsEERKSt3mapISsSsSt4lessISsESaISt4pairIKSsSsEEE+0x23) [0x787353]
Apr 27 15:18:46 Innominate mongod[4217]: /usr/bin/mongod(_ZN5mongo21runGlobalInitializersEiPKPKcS3_+0x30f) [0x78766f]
Apr 27 15:18:46 Innominate mongod[4217]: /usr/bin/mongod(main+0x7e) [0x745eae]
Apr 27 15:18:46 Innominate mongod[4217]: /usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7fa195bf7b05]
Apr 27 15:18:46 Innominate mongod[4217]: /usr/bin/mongod() [0x774ea7]
Apr 27 15:18:46 Innominate systemd[1]: mongodb.service: main process exited, code=exited, status=14/n/a
Apr 27 15:18:46 Innominate systemd[1]: Unit mongodb.service entered failed state.

Used Wiki to troubleshoot and

# sudo chown -R mongodb:mongodb .

gives me:

chown: invalid group: ‘mongodb:mongodb’

I don't know what other details to provide, system is up to date.

Offline

#6 2014-04-27 13:11:41

Spider.007
Member
Registered: 2004-06-20
Posts: 1,143
Website

Re: Mongodb doesn't start using systemctl

Mongodb works fine for me; try sudo chown -R mongodb: /var/{lib,log}/mongodb; the group is incorrect. I'll update the wiki

Offline

#7 2014-04-27 13:22:57

Innominate
Member
From: T440s
Registered: 2012-12-29
Posts: 12

Re: Mongodb doesn't start using systemctl

Thank you for the response and correcting the wiki. The group problem is solved, but for some reason I'm still unable to start mongodb with systemctl.

Last edited by Innominate (2014-04-27 13:52:39)

Offline

#8 2014-04-27 14:11:22

Spider.007
Member
Registered: 2004-06-20
Posts: 1,143
Website

Re: Mongodb doesn't start using systemctl

Well the .service contains nothing special. Does sudo -u mongodb /usr/bin/mongod --quiet --config /etc/mongodb.conf work for you?

Offline

#9 2014-04-27 14:16:04

Innominate
Member
From: T440s
Registered: 2012-12-29
Posts: 12

Re: Mongodb doesn't start using systemctl

Yes, it does.

Offline

#10 2014-04-27 14:32:43

Spider.007
Member
Registered: 2004-06-20
Posts: 1,143
Website

Re: Mongodb doesn't start using systemctl

Check your locales; do you have /etc/locale.conf and is the specified locale also generated when running `locale-gen`?

Offline

#11 2014-04-27 14:57:22

Innominate
Member
From: T440s
Registered: 2012-12-29
Posts: 12

Re: Mongodb doesn't start using systemctl

Looks like I had a typo in locale.conf - UFT isn't UTF.

But everything works now. Thank you very much for the help. The good thing is it wasn't all for nothing - there was something to fix in Wiki. Cheers!

Offline

#12 2014-04-27 17:23:21

Spider.007
Member
Registered: 2004-06-20
Posts: 1,143
Website

Re: Mongodb doesn't start using systemctl

Please remember to mark this thread as solved

Offline

#13 2014-04-27 19:04:29

Innominate
Member
From: T440s
Registered: 2012-12-29
Posts: 12

Re: Mongodb doesn't start using systemctl

I think I am unable to as I didn't start the thread. hmm

Offline

#14 2014-04-27 20:19:18

Spider.007
Member
Registered: 2004-06-20
Posts: 1,143
Website

Re: Mongodb doesn't start using systemctl

Innominate wrote:

I think I am unable to as I didn't start the thread. hmm

Ah, you're right. Maybe this fixes the ts' problem too

Offline

Board footer

Powered by FluxBB