今天在配置MongoDB时发生了以下几个错误, 已经被我解决了,提供给大家.
2015-05-12T09:30:26.313+0800 I STORAGE [initandlisten] exception in initAndListen: 28574 Cannot start server. Detected data files in /root/Desktop/mongodb/data created by storage engine 'mmapv1'. The configured storage engine is 'wiredTiger'., terminating
2015-05-12T09:30:26.313+0800 I CONTROL [initandlisten] dbexit: rc: 100
2015-05-12T09:31:53.043+0800 I CONTROL ***** SERVER RESTARTED *****
2015-05-12T09:31:53.049+0800 I STORAGE [initandlisten] exception in initAndListen: 28574 Cannot start server. Detected data files in /root/Desktop/mongodb/data created by storage engine 'mmapv1'. The configured storage engine is 'wiredTiger'., terminating
2015-05-12T09:31:53.050+0800 I CONTROL [initandlisten] dbexit: rc: 100
补充一下:如果存储空间满了的话也会出现 rc:100错误。总线一下:rc:100是系统文件错误
错误原因: 之前使用mmapv1创建的数据库不能使用wiredTiger打开,需要重新指定dbpath
[root@localhost Desktop]# Python mongodb.py
about to fork child process, waiting until server is ready for connections.
about to fork child process, waiting until server is ready for connections.
forked process: 36411
forked process: 36412
about to fork child process, waiting until server is ready for connections.
forked process: 36414
ERROR: child process failed, exited with error number 100
ERROR: child process failed, exited with error number 100
ERROR: child process failed, exited with error number 100
错误原因: mongodb非正常关闭 删除mongod.lock文件即可.
ERROR: child process failed ,exited with error number 1
错误原因: dbpath文件的权限问题,增加写权限即可
mongodb.conf bind 不能写127.0.0.1否则其它主机连接不了
情况不唯一,这边只能当参考,大致就是这么几种解决思路
child process failed, exited with error number 1
![](/d/20211018/8ef1c373263c314a80678eb7ca9e5dea.gif)
child process failed, exited with error number 48
![](/d/20211018/40b4c085bf3563e4bf30a5e7590be339.gif)
child process failed, exited with error number 100
![](/d/20211018/413dd7e57767d1909cc44965613fc50b.gif)
前今天装了MongoDB后,今天早上启动服务的时候启动不了了,出现错误如下:
错误:
错误2:系统找不到指定文件
![](/d/20211018/dae298f88377e7770d0b0ce005209c5c.gif)
思考过程:
昨天做测试的时候,先后安装了两次MongoDB,后来我又删除(注意不是卸载)了一个MongoDB文件夹,当前这个服务是不是默认的MongoDB的安装地址错误呢?
查看服务属性,Mongo的地址是已经删除了的个地址,而不是当前我用的这个地址。当前用的地址是:E:\Program files\mongodb\bin
![](/d/20211018/902ef71bc0d8cf57a9eabeeea58405cd.gif)
解决方式:
先卸载原来的安装,再次安装新的。
Mongo卸载:
卸载:mongod.exe --remove --serviceName "MongoDB"
![](/d/20211018/41d61b98bc545a37d317cfab95386885.gif)
MongoDB安装为服务:
安装:mongod.exe --install --logpath="E:\Program files\mongodb\data\log\log.txt" --dbpath="E:\Program files\mongodb\data\db"
![](/d/20211018/590db1bb55fe381f6c5e7c16d4ea8e4f.gif)
安装后刷新服务,地址改变:
![](/d/20211018/fa80f83fc3479e456e80ce7c65490281.gif)
再次启动MongoDB服务,启动失败,出现1607错误。
错误:
![](/d/20211018/b455b296427641583baa3a738873bce6.gif)
错误原因:不明
解决方式:
删除E:\Program files\mongodb\data\db目录下的mongod.lock文件。
再次重启服务,启动成功。
总结:
接触一个新的东西的时候,难免出现错误,错误来了,就解决,不要躲着,拖着。
您可能感兴趣的文章:- MongoDb的"not master and slaveok=false"错误及解决方法
- 解决启动MongoDB错误:error while loading shared libraries: libstdc++.so.6:cannot open shared object file:
- 关于Mongodb参数说明与常见错误处理的总结
- MongoDB错误32-bit servers don''t have journaling enabled by default解决方法
- 解决mongodb在ubuntu下启动失败,提示couldn‘t remove fs lock errno:9 Bad file descriptor的错误
- mongodb错误tcmalloc: large alloc out of memory, printing stack and exiting解决办法
- 修复 Mac brew 安装 mongodb 报 Error: No available formula with the name ‘mongodb’ 问题详解