Mongodb常见错误与解决⽅法⼩结(Mongodb中经常出现的错误)今天在配置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
exited补充⼀下:如果存储空间满了的话也会出现 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⽂件的权限问题,增加写权限即可
情况不唯⼀,这边只能当参考,⼤致就是这么⼏种解决思路
child process failed, exited with error number 1
child process failed, exited with error number 48
child process failed, exited with error number 100
前今天装了MongoDB后,今天早上启动服务的时候启动不了了,出现错误如下:错误:
错误2:系统不到指定⽂件
思考过程:
昨天做测试的时候,先后安装了两次MongoDB,后来我⼜删除(注意不是卸载)了⼀个MongoDB⽂件夹,当前这个服务是不是默认的MongoDB的安装地址错误呢?
查看服务属性,Mongo的地址是已经删除了的个地址,⽽不是当前我⽤的这个地址。当前⽤的地址是:E:\Program files\mongodb\bin
解决⽅式:
先卸载原来的安装,再次安装新的。
Mongo卸载:
卸载: --remove --serviceName "MongoDB"
MongoDB安装为服务:
安装: --install --logpath="E:\Program files\mongodb\data\" --dbpath="E:\Program files\mongodb\data\db"
安装后刷新服务,地址改变:
错误:
错误原因:不明
解决⽅式:
删除E:\Program files\mongodb\data\db⽬录下的mongod.lock⽂件。
再次重启服务,启动成功。
总结:
接触⼀个新的东西的时候,难免出现错误,错误来了,就解决,不要躲着,拖着。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论