linux中安装mongoDB之后,启动不了,出现下边的错误,网上搜原因,很多说需要删除.lock文件,需要bin/mongod --repair修复,但是都不成功,最后发现是配置文件中路径问题。

[root@wqd mongodb]# bin/mongod -f single/mongod.conf
about to fork child process, waiting until server is ready for connections.
forked process: 8962
ERROR: child process failed, exited with error number 1
To see additional information in this output, start without the "--fork" option.


解决:
先用bin/mongod --repair去修复,看一些信息

[root@wqd mongodb]# bin/mongod --repair
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten] MongoDB starting : pid=8972ort=27017 dbpath=/data/db 64-bit host=wqd
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten] db version v4.0.10
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten] git version: c389e7f69f637f1ac3cc9fae843b635f20b766
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten] allocator: tcmalloc
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten] modules: none
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten] build environment:
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten]     distarch: x86_64
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten]     target_arch: x86_64
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten] options: { repair: true }
2021-06-23T13:48:28.746+0800 I STORAGE  [initandlisten] exception in initAndListen:onExistentPath: Data directory /data/db not found., terminating
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten] now exiting
2021-06-23T13:48:28.746+0800 I CONTROL  [initandlisten] shutting down with code:1

最重要的是倒数第三句exception in initAndListen: NonExistentPath: Data directory /data/db not found., terminating
配置文件中data/db路径有问题
修改路径从根目录开始"/usr/local/mongodb/single/data/db"
全部配置如下:

再次启动成功

MongoDB出错:ERROR: child process failed, exited with error number 1 To see additional infor相关推荐

  1. mongodb启动时报错ERROR: child process failed, exited with error number 1

    转 http://www.cnblogs.com/zlslch/p/6932368.html 不多说,直接上干货! root@zhouls-virtual-machine:/usr/local/mon ...

  2. (linux)mongodb启动报错【ERROR:child process failed, exited with error number 1】

    这里写自定义目录标题 mongodb启动报错 报错提示 处理方法 mongodb启动报错 报错提示 ERROR:child process failed, exited with error numb ...

  3. mongo启动报错:ERROR: child process failed, exited with error number 1

    由于mongo被异常关闭,再次启动时可能会出现"ERROR: child process failed, exited with error number 1"的报错. 第一步 删 ...

  4. ERROR: child process failed, exited with error number 51

    1.ERROR: child process failed, exited with error number 51 异常的关闭再次重启时容易产生这样的错误,首先删除mongod.lock 文件  修 ...

  5. MongoDB 启动失败 ERROR: child process failed, exited with 1

    一 问题描述 之前做的用systemctl方式启动mongo,有一次节点被异常终止,同事手动启动mongo的时候没用systemctl方式起,而是用mongod -f 配置文件这种方式启动的.数据库起 ...

  6. mongodb启动不了:child process failed, exited with error number 100

    原文链接mongodb启动不了:child process failed, exited with error number 100 http://f.dataguru.cn/thread-10736 ...

  7. MongoDB启动报错 ERROR: child process failed, exited with 1

    1.启动报错 ERROR: child process failed, exited with 1 2.报错的原因 使用kill关闭进程导致的错误 3.解决 3.1.进入data中的目录,删除lock ...

  8. 阿里云ECS lnmp linux7 安装mongodb连接不上 child process failed, exited with error number

    linux安装mongodb安装网上有很多教程,我就不赘述了: ##安装mongodb连接:https://www.cnblogs.com/Lovebugs/p/8606000.html 我主要总结一 ...

  9. mongodb启动不了:child process failed, exited with err

    2019独角兽企业重金招聘Python工程师标准>>> [摘要:本日正在设置装备摆设mongodb时产生了以下几个毛病, 已被我办理了,供应给人人. 2015-05-12T09:30 ...

最新文章

  1. 服不服?40行Python代码,实现卷积特征可视化
  2. OpenERP 7.0版本发布
  3. 第一阶段:Java基础之变量
  4. Js_cookie保存登录名
  5. python搜索引擎和爬虫框架介绍
  6. linux 停用用户,linux – 如何禁用用户的网络访问?
  7. Qt 判断集合中的元素是否全部相同
  8. 单片机C语言字符串转数字
  9. 李珣动态爱心代码教程
  10. 音乐播放器——SoundManager API介绍
  11. VC之获取计算机网卡mac地址
  12. win7电脑蓝屏怎么办
  13. 3年级计算机的知识能力,三年级信息技术教案资料三篇
  14. 2023第八届少儿模特明星盛典 福州赛区 初赛圆满收官
  15. PanDownload 3.5.1 卢本伟修改版
  16. html 手机ar,vr与ar技术的区别有哪些
  17. WinSCP(5.11.2)绿色便携版,开源SCP/SFTP客户端
  18. Android X86更改屏幕分辨率
  19. layui-table表格根据条件更换表格背景颜色,高亮显示
  20. Mybatis-Plus进阶之扩展插件

热门文章

  1. [转载] Python numpy函数:all()和any()比较矩阵
  2. amie 规则挖掘_AMIE的完整形式是什么?
  3. json转string示例_C.示例中的String.Copy()方法
  4. Java FilePermission getActions()方法与示例
  5. stl中map函数_map :: max_size()函数,以及C ++ STL中的Example
  6. stl向量_如何检查C ++ STL中向量中是否存在元素?
  7. linux家用系统版本,查看linux系统版本
  8. python单步调试的方法_python断点调试方法
  9. setuptools安装_在Ubuntu 18.04系统上安装ERPNext ERP
  10. matlab写字,Matlab实现鼠标写字代码