启动 mongod fork,错误:子进程失败,以错误号 1 退出 [英] Starting mongod fork, ERROR: child process failed, exited with error number 1

查看:29
本文介绍了启动 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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆