问题:按照官方指南所示安装了 Repo Here
启动 mongod 后出现冻结:
service mongod start
Starting mongod (via systemctl):
它像这样停止
添加日志信息
cat /var/log/mongo/mongod.log
Tue Sep 3 14:03:40.431 [initandlisten] MongoDB starting : pid=32320 port=27017 dbpath=/var/lib/mongo 64-bit host=SLI.DOMnet
Tue Sep 3 14:03:40.431 [initandlisten] db version v2.4.6
Tue Sep 3 14:03:40.431 [initandlisten] git version: b9925db5eac369d77a3a5f5d98a145eaaacd9673
Tue Sep 3 14:03:40.431 [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
Tue Sep 3 14:03:40.431 [initandlisten] allocator: tcmalloc
Tue Sep 3 14:03:40.431 [initandlisten] options: { config: "/etc/mongod.conf", dbpath: "/var/lib/mongo", fork: "true", logappend: "true", logpath: "/var/log/mongo/mongod.log", pidfilepath: "/var/run/mongodb/mongod.pid" }
Tue Sep 3 14:03:40.444 [initandlisten] journal dir=/var/lib/mongo/journal
Tue Sep 3 14:03:40.444 [initandlisten] recover : no journal files present, no recovery needed
Tue Sep 3 14:03:40.458 [websvr] admin web console waiting for connections on port 28017
Tue Sep 3 14:03:40.458 [initandlisten] waiting for connections on port 27017
运行过程:
ps aux | grep mongo
root 5023 0.0 0.0 112664 932 pts/3 S+ 14:06 0:00 grep --color=auto mongo
root 32258 0.0 0.0 113280 1548 pts/0 S+ 14:03 0:00 /bin/sh /sbin/service mongod start
root 32304 0.0 0.0 115384 1516 pts/0 S+ 14:03 0:00 /bin/bash /etc/init.d/mongod start
root 32310 0.0 0.0 132988 1192 pts/0 S+ 14:03 0:00 /bin/systemctl start mongod.service
mongod 32320 0.2 0.2 451772 33772 ? Sl 14:03 0:00 /usr/bin/mongod -f /etc/mongod.conf
我可以mongo
在其他终端上运行,但是这个终端被冻结了,经过更长的时间我得到:
service mongod start
Starting mongod (via systemctl): Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.
[FAILED]
然后过程是这样的:
ps aux | grep mongo
root 15787 0.0 0.0 112664 928 pts/3 S+ 14:10 0:00 grep --color=auto mongo
mongod 32320 0.2 0.2 452800 34316 ? Sl 14:03 0:00 /usr/bin/mongod -f /etc/mongod.conf
但仍然可以使用mongo
控制台。那failed
部分呢?
journalctl -xn
-- Logs begin at sob 2013-07-27 13:53:59 CEST, end at wto 2013-09-03 14:08:40 CEST. --
wrz 03 14:03:40 mongod[32312]: Starting mongod: about to fork child process, waiting until server is ready for connections.
wrz 03 14:03:40 mongod[32312]: forked process: 32320
wrz 03 14:03:40 mongod[32312]: all output going to: /var/log/mongo/mongod.log
wrz 03 14:03:40 mongod[32312]: child process started successfully, parent exiting
wrz 03 14:03:40 runuser[32316]: pam_unix(runuser:session): session closed for user mongod
wrz 03 14:03:40 mongod[32312]: [ OK ]
wrz 03 14:03:40 systemd[1]: PID file /var/run/mongo/mongod.pid not readable (yet?) after start.
wrz 03 14:08:40 systemd[1]: mongod.service operation timed out. Terminating.
wrz 03 14:08:40 systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
-- Subject: Unit mongod.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
--
-- Unit mongod.service has failed.
--
-- The result is failed.
wrz 03 14:08:40 SLI.DOMnet systemd[1]: Unit mongod.service entered failed state.