好吧,我aliyun上面的MongoDB挂掉了,很惨很惨,急求原因!
怪我咯
怪我咯 2017-04-24 09:11:15
0
1
847

事情是这样的

就在刚才,两刻钟之前,我需要更新我服务器里的MongoDB中的数据,我本地测试机用mongodump方法导出了测试用的哦数据。在服务器上用mongorestore的方法想把数据导进去,但是给报错了(具体报什么错我现在也没法讲了,因为mongod跑不起来了),然后我就

sudo pkill mongod

然后我把我本地的库文件(dbpath下面的那俩文件)直接拷贝到服务的dbpath里面了。我按照平常的方式启动,但是 报错啦!!!!!!
然后我换指定dbpath的方式启动,还是报错!!!!!!
这个时候我就开始后悔了,至少刚才mongod还在跑着的,现在都不工作了。

报错的提示,看了一下没怎么看明白。坐等大神提示了,现在只有~~~~

服务器我不敢重启,因为里面跑了多少东西我到现在还没摸清楚(以前是俩人在管理服务器,后来他走了,很多事情没交代清楚)!!!!

以后我再也不敢这样没仔细测试就更新服务器的东西了,最近没有手动升级过东西,最近安装的软件也之后tree。
服务器环境:aliyun ubuntu12.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]
怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
黄舟

Judging from this stack, it is very likely that you did not set the correct locale, which caused a mongodb bug.

See this bug record for details: https://jira.mongodb.org/browse/SERVER-9032 You can try setting the correct locale in .bashrc as mentioned in the bug.

It doesn’t look like your operation steps can damage mongod. To shut down mongod normally, you just use kill, and mongorestore won’t damage the data, so it shouldn’t be a big problem.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template