求助,OpenVZ的vps下启动MongoDB错误。

2013-04-08 22:47:42 +08:00
 hiwljun
on Apr 8 18:46:45.631 [initandlisten] MongoDB starting : pid=5785 port=27017 dbpath=/data/db/ 64-bit host=server
Mon Apr 8 18:46:45.631 [initandlisten]
Mon Apr 8 18:46:45.631 [initandlisten] ** WARNING: You are running in OpenVZ. This is known to be broken!!!
Mon Apr 8 18:46:45.631 [initandlisten]
Mon Apr 8 18:46:45.631 [initandlisten] db version v2.4.1
Mon Apr 8 18:46:45.631 [initandlisten] git version: 1560959e9ce11a693be8b4d0d160d633eee75110
Mon Apr 8 18:46:45.631 [initandlisten] build info: Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49
Mon Apr 8 18:46:45.631 [initandlisten] allocator: tcmalloc
Mon Apr 8 18:46:45.631 [initandlisten] options: {}
Mon Apr 8 18:46:45.632 [initandlisten] exception in initAndListen std::exception: locale::facet::_S_create_c_locale name not valid, terminating
Mon Apr 8 18:46:45.632 dbexit:
Mon Apr 8 18:46:45.632 [initandlisten] shutdown: going to close listening sockets...
Mon Apr 8 18:46:45.632 [initandlisten] shutdown: going to flush diaglog...
Mon Apr 8 18:46:45.632 [initandlisten] shutdown: going to close sockets...
Mon Apr 8 18:46:45.632 [initandlisten] shutdown: waiting for fs preallocator...
Mon Apr 8 18:46:45.632 [initandlisten] shutdown: lock for final commit...
Mon Apr 8 18:46:45.632 [initandlisten] shutdown: final commit...
Mon Apr 8 18:46:45.632 [initandlisten] shutdown: closing all files...
Mon Apr 8 18:46:45.632 [initandlisten] closeAllFiles() finished
Mon Apr 8 18:46:45.632 [initandlisten] shutdown: removing fs lock...
Mon Apr 8 18:46:45.632 dbexit: really exiting now
5210 次点击
所在节点    MongoDB
10 条回复
chuangbo
2013-04-08 23:02:03 +08:00
世界上有一个网站叫做 Google
webflier
2013-04-08 23:13:59 +08:00
如果是ubuntu的话,
locale-gen en_US.UTF-8
dpkg-reconfigure locales
跑这两句话就好了

另外,openvz的方案,之后vswap的才能跑mongodb,带burst memory那种,不好跑mongodb的,数据量一大就会崩溃
webflier
2013-04-08 23:14:21 +08:00
只有vswap的才能跑mongodb
hiwljun
2013-04-08 23:45:53 +08:00
@chuangbo google无果。

@webflier 谢谢,我再尝试下。
ewangke
2013-04-09 01:00:00 +08:00
@webflier 借楼主的贴请教一下:是不是openvz的方案根本不适合mongodb? RAM不够的时候mongodb不是会直接读硬盘么?
webflier
2013-04-09 09:44:17 +08:00
@ewangke 大部分市面上openvz vps都不适合,因为他们都是Burstable RAM,这种内存管理会导致mongodb崩溃。
而基于vswap内存管理的openvz vps就没有这个问题。mongodb跑得妥妥的
但是vswap openvz市面上不多,属于新鲜事物,稳定性什么的还有待考验。。。。
https://jira.mongodb.org/browse/SERVER-1121

ram不够会直接读硬盘,不管vps还是dedicated server
shinwood
2013-04-09 09:50:20 +08:00
>>>WARNING: You are running in OpenVZ. This is known to be broken!!!

我看到这句了,估计人家不大乐意支持?
hiwljun
2013-04-09 10:12:34 +08:00
@webflier 嗯,后来我也搜索到他们的jiira了,看来只有作罢。感谢你的回复。
webflier
2013-04-09 10:34:22 +08:00
@hiwljun 找一家vswap openvz吧,或者kvm
newdongyuwei
2013-05-03 13:55:17 +08:00
kvm 的也遇到这个问题,export LC_ALL=C 再启动就ok了.

我的系统:
uname -a
Linux vps1273 3.2.0-27-virtual #43-Ubuntu SMP Fri Jul 6 14:45:58 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/65311

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX