All right, I hung up MongoDB on aliyun. It’s very sad. Please ask for the reason.

  mongodb, question

The thing is this

Just now, two minutes ago, I needed to update the data in MongoDB in my server. My local tester used mongodump method to export the test data. On the server, mongorestore was used to import the data, but it was reported wrong (I can’t tell what the specific report is because Mongo can’t run), and then I just

sudo pkill mongod

Then I copied my local library files (the two files under dbpath) directly into the service’s dbpath. I started it in the usual way, but I made a mistake! ! ! ! ! !
Then I change the way I specify dbpath to start, or report an error! ! ! ! ! !
This is when I began to regret, at least mongod was still running just now, and now he doesn’t work.

I didn’t understand the hint of reporting the mistake after looking at it. Wait for the great god prompt, now only ~ ~ ~

I dare not restart the server, because I haven’t got a clear idea of how many things are running in it (two people were managing the server before, and then he left and didn’t explain many things clearly)! ! ! !

In the future, I dare not update the server without careful testing. I have not upgraded the server manually recently, and the recently installed software is also behind tree.
Server Environment: Aliyun Ubuntu 12.4 LTS Mongodb Shell Version: 2.4.9

sudo mongod --dbpath=./ --logpath=./mongod.log
Fri Jul 11 22:49:42.436 terminate() called, printing stack (if implemented for platform):
0xde46e1 0x6cf54e 0x7fc0a07a1846 0x7fc0a07a1873 0x7fc0a07a196e 0x7fc0a074ea07 0x7fc0a075e284 0x7fc0a0752a74 0x7fc0a0753b6b 0xe01f3f 0xe0288b 0xdff530 0x9f257f 0x6dd820 0x6df5c9 0x7fc09fe3b76d 0x6cf339 
 mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde46e1]
 mongod(_ZN5mongo11myterminateEv+0x3e) [0x6cf54e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7fc0a07a1846]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7fc0a07a1873]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7fc0a07a196e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x57) [0x7fc0a074ea07]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x72284) [0x7fc0a075e284]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7fc0a0752a74]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x73b) [0x7fc0a0753b6b]
 mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xe01f3f]
 mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xe0288b]
 mongod(_ZN5boost11filesystem38absoluteERKNS0_4pathES3_+0x40) [0xdff530]
 mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9f257f]
 mongod() [0x6dd820]
 mongod(main+0x9) [0x6df5c9]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fc09fe3b76d]
 mongod(__gxx_personality_v0+0x499) [0x6cf339]
Fri Jul 11 22:49:42.441 Got signal: 6 (Aborted).

Fri Jul 11 22:49:42.444 Backtrace:
0xde46e1 0x6d06c9 0x7fc09fe504a0 0x7fc09fe50425 0x7fc09fe53b8b 0x6cf553 0x7fc0a07a1846 0x7fc0a07a1873 0x7fc0a07a196e 0x7fc0a074ea07 0x7fc0a075e284 0x7fc0a0752a74 0x7fc0a0753b6b 0xe01f3f 0xe0288b 0xdff530 0x9f257f 0x6dd820 0x6df5c9 0x7fc09fe3b76d 
 mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde46e1]
 mongod(_ZN5mongo10abruptQuitEi+0x399) [0x6d06c9]
 /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7fc09fe504a0]
 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7fc09fe50425]
 /lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7fc09fe53b8b]
 mongod(_ZN5mongo11myterminateEv+0x43) [0x6cf553]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7fc0a07a1846]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7fc0a07a1873]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7fc0a07a196e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x57) [0x7fc0a074ea07]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x72284) [0x7fc0a075e284]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7fc0a0752a74]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x73b) [0x7fc0a0753b6b]
 mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xe01f3f]
 mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xe0288b]
 mongod(_ZN5boost11filesystem38absoluteERKNS0_4pathES3_+0x40) [0xdff530]
 mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9f257f]
 mongod() [0x6dd820]
 mongod(main+0x9) [0x6df5c9]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fc09fe3b76d]

antown@AY1403171442351355f0Z:/atdata/MongoDB_datas$ htop
antown@AY1403171442351355f0Z:/atdata/MongoDB_datas$ 
antown@AY1403171442351355f0Z:/atdata/MongoDB_datas$ ls
antown@AY1403171442351355f0Z:/atdata/MongoDB_datas$ mongo
mongo         mongodump     mongofiles    mongooplog    mongorestore  mongostat     
mongod        mongoexport   mongoimport   mongoperf     mongos        mongotop      
antown@AY1403171442351355f0Z:/atdata/MongoDB_datas$ sudo mongod --dbpath=./ --logpath=./mongod.log
Fri Jul 11 22:51:34.626 terminate() called, printing stack (if implemented for platform):
0xde46e1 0x6cf54e 0x7f169036f846 0x7f169036f873 0x7f169036f96e 0x7f169031ca07 0x7f169032c284 0x7f1690320a74 0x7f1690321b6b 0xe01f3f 0xe0288b 0xdff530 0x9f257f 0x6dd820 0x6df5c9 0x7f168fa0976d 0x6cf339 
 mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde46e1]
 mongod(_ZN5mongo11myterminateEv+0x3e) [0x6cf54e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7f169036f846]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7f169036f873]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7f169036f96e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x57) [0x7f169031ca07]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x72284) [0x7f169032c284]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7f1690320a74]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x73b) [0x7f1690321b6b]
 mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xe01f3f]
 mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xe0288b]
 mongod(_ZN5boost11filesystem38absoluteERKNS0_4pathES3_+0x40) [0xdff530]
 mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9f257f]
 mongod() [0x6dd820]
 mongod(main+0x9) [0x6df5c9]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f168fa0976d]
 mongod(__gxx_personality_v0+0x499) [0x6cf339]
Fri Jul 11 22:51:34.630 Got signal: 6 (Aborted).

Fri Jul 11 22:51:34.633 Backtrace:
0xde46e1 0x6d06c9 0x7f168fa1e4a0 0x7f168fa1e425 0x7f168fa21b8b 0x6cf553 0x7f169036f846 0x7f169036f873 0x7f169036f96e 0x7f169031ca07 0x7f169032c284 0x7f1690320a74 0x7f1690321b6b 0xe01f3f 0xe0288b 0xdff530 0x9f257f 0x6dd820 0x6df5c9 0x7f168fa0976d 
 mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde46e1]
 mongod(_ZN5mongo10abruptQuitEi+0x399) [0x6d06c9]
 /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7f168fa1e4a0]
 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f168fa1e425]
 /lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f168fa21b8b]
 mongod(_ZN5mongo11myterminateEv+0x43) [0x6cf553]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7f169036f846]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7f169036f873]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7f169036f96e]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt21__throw_runtime_errorPKc+0x57) [0x7f169031ca07]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x72284) [0x7f169032c284]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7f1690320a74]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x73b) [0x7f1690321b6b]
 mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xe01f3f]
 mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xe0288b]
 mongod(_ZN5boost11filesystem38absoluteERKNS0_4pathES3_+0x40) [0xdff530]
 mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9f257f]
 mongod() [0x6dd820]
 mongod(main+0x9) [0x6df5c9]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f168fa0976d]

Judging from this stack, it is very likely that you did not set the correct locale, causing mongodb’s bug.

See this bug record for details:https://jira.mongodb.org/browse/SERVER-9032You can try to do the same in bug.bashrcTry setting the correct locale in.

Look at your operation steps, it doesn’t look like you can damage mongod. Normally closing mongod is to use kill, and mongorestore won’t damage the data, so there should be no problem.