Mongodb中常见错误你遇到过吗?怎样解决呢?
Admin 2021-10-12 群英技术资讯 2368 次浏览
这篇文章主要给大家分享几个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

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卸载:
卸载:mongod.exe --remove --serviceName "MongoDB"

MongoDB安装为服务:
安装:mongod.exe --install --logpath="E:\Program files\mongodb\data\log\log.txt" --dbpath="E:\Program files\mongodb\data\db"

安装后刷新服务,地址改变:

再次启动MongoDB服务,启动失败,出现1607错误。
错误:

错误原因:不明
解决方式:
删除E:\Program files\mongodb\data\db目录下的mongod.lock文件。
再次重启服务,启动成功。
总结:
接触一个新的东西的时候,难免出现错误,错误来了,就解决,不要躲着,拖着。
关于Mongodb中的常见错误及解决方法就分享到这了,有需要的朋友可以参考,想要了解更多Mongodb常见错误及解决方法,大家可以继续浏览群英网络其他相关的文章。
文本转载自脚本之家
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
猜你喜欢
下面这篇文章主要来给大家说说看“mongodb同库联表怎么进行查询”的内容,对这方面比较感兴趣的朋友可以前来参考下,希望小编整理的内容能帮助到你。
mongodb聚合文档大于16M就会报内存不足,解决方法:可以打开使用磁盘解决,如:db.flowlog.aggregate([{$group:{_id:"$_id"}}],{allowDiskUse:true})。
在MongoDB中时间存储方式:1、将时间戳存为Number格式。2、使用MongoDB自带的日期格式存储。
Linux平台安装MongoDB MongoDB 提供了 linux 各个发行版本 64 位的安装包,你可以在官网下载安装包。 安装前我们需要安装各个 Linux 平台依赖包。 Red Hat/CentOS: sudo yum install libcurl openssl Ubuntu 18.04 LTS (“Bionic”)/Debian 10 “Buster”: sudo apt-get install libcurl4 o..
MongoDB 删除文档 在前面的几个章节中我们已经学习了 MongoDB 中如何为集合添加数据和更新数据。在本章节中我们将继续学习 MongoDB 集合的删除。 MongoDB remove() 函数是用来移除集合中的数据。 MongoDB 数据更新可以使用 update() 函数。在执行 remove() 函数前先执行 find() 命令来判断执行的条件是否正确,这是一个比较好的习惯。 语法 remove() 方法的基本语法格式如..
成为群英会员,开启智能安全云计算之旅
立即注册关注或联系群英网络
7x24小时售前:400-678-4567
7x24小时售后:0668-2555666
24小时QQ客服
群英微信公众号
CNNIC域名投诉举报处理平台
服务电话:010-58813000
服务邮箱:service@cnnic.cn
投诉与建议:0668-2555555
Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2020 群英 版权所有
增值电信经营许可证 : B1.B2-20140078 ICP核准(ICP备案)粤ICP备09006778号 域名注册商资质 粤 D3.1-20240008