我在Centos 7上安装了mongodb,并且所有工作都正常。mongodb不能启动centos 7
但是,如果我重新启动系统,mongodb无法启动了。如果我卸载并再次安装,工作正常。但重启后,不能再启动了。
当我尝试systemctl状态mongod.service显示:
mongod.service - High-performance, schema-free document-oriented database Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Dom 2016-11-27 09:49:36 BRT; 12min ago Docs: https://docs.mongodb.org/manual Process: 1471 ExecStart=/usr/bin/mongod $OPTIONS run (code=exited, status=1/FAILURE) Main PID: 1471 (code=exited, status=1/FAILURE)
Nov 27 09:49:19 localhost.localdomain systemd[1]: Started High-performance, schema-free document-oriented database. Nov 27 09:49:19 localhost.localdomain systemd[1]: Starting High-performance, schema-free document-oriented database... Nov 27 09:49:36 localhost.localdomain mongod[1471]: about to fork child process, waiting until server is ready for connections. Nov 27 09:49:36 localhost.localdomain mongod[1471]: forked process: 2828 Nov 27 09:49:36 localhost.localdomain mongod[1471]: ERROR: child process failed, exited with error number 1 Nov 27 09:49:36 localhost.localdomain systemd[1]: mongod.service: main process exited, code=exited, status=1/FAILURE Nov 27 09:49:36 localhost.localdomain systemd[1]: Unit mongod.service entered failed state. Nov 27 09:49:36 localhost.localdomain systemd[1]: mongod.service failed.
我已经尝试过:
*chcon -R -t mongod_var_lib_t /var/lib/mongo
*SElinux=disable
*chmod 7777 /var/lib/mongo
and nothing.
我记得当这个错误之前格式化我的电脑出现了,我需要把上的权限系统用一个简单的命令。但我找不到了。
我们需要更多的信息来调试此。来自mongodb日志文件的任何内容? – jaxxstorm