zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

Mongodb报错:ERROR: child process failed, exited with error number 1

MongoDBFailed 报错 Error number with Process child
2023-09-11 14:22:41 时间

Mongodb在启动时报错:

2018-10-16T11:18:54.533+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
about to fork child process, waiting until server is ready for connections.
forked process: 1462
ERROR: child process failed, exited with error number 1
To see additional information in this output, start without the "--fork" option.

 

网上的大部分说的原因是,mongodb服务没有正常关闭,例如使用了kill -9 PID杀掉,mongod 被锁。

如何解决这种问题:

  1. 删除 mongod.lock 文件和日志文件 mongodb.log ,如果有必要把 log日志全部删除

  2. mongod --repair --dbpath /data/db / --repairpath /tmp/mongodb

 

我是首次安装,肯定不是这种情况,于是检查了下,MongoDB的数据存储目录和日志目录,发现权限有问题,修改权限后就可以了。