启动mongod fork,错误:子进程失败,退出,错误号为1 [英] Starting mongod fork, ERROR: child process failed, exited with error number 1
本文介绍了启动mongod fork,错误:子进程失败,退出,错误号为1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试运行命令
mongod --fork --logpath /var/log/mongodb.log
在amazon ec2 32位实例(Amazon Linux AMI版本2014.09)上,我遇到以下错误:
On a amazon ec2 32 bit instance (Amazon Linux AMI release 2014.09), I run into the following error:
2015-02-18T18:14:09.007+0000
2015-02-18T18:14:09.007+0000 warning: 32-bit servers don't have journaling
enabled by default. Please use --journal if you want durability.
2015-02-18T18:14:09.007+0000
about to fork child process, waiting until server is ready for connections.
forked process: 17116
ERROR: child process failed, exited with error number 1
我还注意到在此过程中没有创建日志文件.
I also notice no log file is created in the process.
推荐答案
我也遇到了同样的问题,事实证明这是一个权限问题.如果子进程的所有者无法访问日志路径或日志路径不存在,它将失败.
I had the same thing and it turned out to be a permissions issue. If the owner of the child process cannot access the log path or the log path does not exist, it will fail.
我所做的是将日志目录放在主目录中:
What I did was put the log directory in my home directory:
mkdir ~/log
mongod --fork --logpath ~/log/mongodb.log
如果您确实要将其放在/var/log目录中,只需更改权限即可.
If you really want to put it in your /var/log directory, just change the permissions.
这篇关于启动mongod fork,错误:子进程失败,退出,错误号为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文