mongodb 2.4.9 está travando em wheezy quando executando como root

2

Eu instalei o mongodb-10gen v2.4.9 em um debian Wheezy, e estou tendo um comportamento muito estranho: se eu rodar como root eu não consigo começar:

root@xx:~# /etc/init.d/mongodb stop
[ ok ] Stopping database: mongodb.
root@xx:~# /etc/init.d/mongodb start
[FAIL] Starting database: mongodb failed! 

Se eu executar manualmente, posso vê-lo falhando:

root@xx:~# /usr/bin/mongod --config /etc/mongodb.conf
Sat Mar  8 12:26:30.276 terminate() called, printing stack (if implemented for platform):
0xde46e1 0x6cf54e 0x7f28ae0fa996 0x7f28ae0fa9c3 0x7f28ae0fabee 0x7f28ae14c77d 0x7f28ae117814 0x7f28ae10c744 0x7f28ae10d77d 0xe01f3f 0xe0288b 0xdff530 0x9f257f 0x6dd820 0x6df5c9 0x7f28ad892ead 0x6cf339
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde46e1]
 /usr/bin/mongod(_ZN5mongo11myterminateEv+0x3e) [0x6cf54e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x63996) [0x7f28ae0fa996]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x639c3) [0x7f28ae0fa9c3]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x63bee) [0x7f28ae0fabee]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x5d) [0x7f28ae14c77d]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x80814) [0x7f28ae117814]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7f28ae10c744]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x65d) [0x7f28ae10d77d]
 /usr/bin/mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xe01f3f]
 /usr/bin/mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xe0288b]
 /usr/bin/mongod(_ZN5boost11filesystem38absoluteERKNS0_4pathES3_+0x40) [0xdff530]
 /usr/bin/mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9f257f]
 /usr/bin/mongod() [0x6dd820]
 /usr/bin/mongod(main+0x9) [0x6df5c9]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f28ad892ead]
 /usr/bin/mongod(__gxx_personality_v0+0x499) [0x6cf339]
Sat Mar  8 12:26:30.280 Got signal: 6 (Aborted).

Sat Mar  8 12:26:30.283 Backtrace:
0xde46e1 0x6d06c9 0x7f28ad8a64f0 0x7f28ad8a6475 0x7f28ad8a96f0 0x6cf553 0x7f28ae0fa996 0x7f28ae0fa9c3 0x7f28ae0fabee 0x7f28ae14c77d 0x7f28ae117814 0x7f28ae10c744 0x7f28ae10d77d 0xe01f3f 0xe0288b 0xdff530 0x9f257f 0x6dd820 0x6df5c9 0x7f28ad892ead
 /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde46e1]
 /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x399) [0x6d06c9]
 /lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x7f28ad8a64f0]
 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f28ad8a6475]
 /lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x7f28ad8a96f0]
 /usr/bin/mongod(_ZN5mongo11myterminateEv+0x43) [0x6cf553]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x63996) [0x7f28ae0fa996]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x639c3) [0x7f28ae0fa9c3]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x63bee) [0x7f28ae0fabee]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x5d) [0x7f28ae14c77d]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x80814) [0x7f28ae117814]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7f28ae10c744]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x65d) [0x7f28ae10d77d]
 /usr/bin/mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xe01f3f]
 /usr/bin/mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xe0288b]
 /usr/bin/mongod(_ZN5boost11filesystem38absoluteERKNS0_4pathES3_+0x40) [0xdff530]
 /usr/bin/mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9f257f]
 /usr/bin/mongod() [0x6dd820]
 /usr/bin/mongod(main+0x9) [0x6df5c9]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f28ad892ead]

Mas se eu executar com o sudo, está funcionando bem:

root@xx:~# su - franck
franck@xx:~$ sudo /etc/init.d/mongodb start
[ ok ] Starting database: mongodb.

Alguém tem uma ideia do porquê?

    
por franck 08.03.2014 / 12:34

1 resposta

0

Aparentemente, o código do idioma do root não está configurado corretamente.

Compare a saída de locale ao executar como franck vs. ao executar isso como root . Você pode corrigir o código do idioma do root modificando /root/.bashrc .

    
por 09.03.2014 / 01:49