宝塔面板mongodb无法启动连接不上的解决办法
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

宝塔面板mongodb安装v4.4.6面板上无法启动.service mongodb start命令行启动提示如下,打开配置文件找到fork改成false或直接注销,再次执行启动没有提示信息:
There doesn't seem to be a server running with dbpath: /www/server/mongodb/dataabout to fork child process, waiting until server is ready for connections.forked process: 10864ERROR: child process failed, exited with 14To see additional information in this output, start without the "--fork" option.There doesn't seem to be a server running with dbpath: /www/server/mongodb/dataabout to fork child process, waiting until server is ready for connections.forked process: 10864ERROR: child process failed, exited with 14To see additional information in this output, start without the "--fork" option.There doesn't seem to be a server running with dbpath: /www/server/mongodb/dataabout to fork child process, waiting until server is ready for connections.forked process: 10864ERROR: child process failed, exited with 14To see additional information in this output, start without the "--fork" option.mongod服务未启动,启动客户端mongo报错:
[root@test bin]# ./mongoMongoDB shell version v4.4.6connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodbError: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection used :connect@src/mongo/shell/mongo.js:374:17@(connect):2:6exception: connect failedexiting with code 1[root@test bin]# ./mongoMongoDB shell version v4.4.6connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodbError: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection used :connect@src/mongo/shell/mongo.js:374:17@(connect):2:6exception: connect failedexiting with code 1[root@test bin]# ./mongoMongoDB shell version v4.4.6connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodbError: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection used :connect@src/mongo/shell/mongo.js:374:17@(connect):2:6exception: connect failedexiting with code 1bindIp:0.0.0.0 不能是127.0.0.1
服务器上测试,一个窗口开启mongod:./mongod –dbpath /www/server/mongodb/data/,
另一个窗口开启mongo:./mongo是可以的,但这样肯定是不正常的。
sudo /etc/init.d/mongodb restart等各种方式都无法正常启动
最后发现是mongodb使用的端口27017未开放。宝塔卸载mongodb,删除/www/server/mongodb目录。阿里云开放入端口27017,源0.0.0.0/0,重新安装自动开启。
windows命令行开启mongodb:
D:\workplace\mongodb\bin>mongod.exe --config D:\workplace\mongodb\mongodb.conf --install --serviceName "mongodb" D:\workplace\mongodb\bin>net start mongodb #或者D:\workplace\mongodb\bin>sc start mongodb #打开windows服务查看D:\workplace\mongodb\bin>services.mscD:\workplace\mongodb\bin>mongod.exe --config D:\workplace\mongodb\mongodb.conf --install --serviceName "mongodb" D:\workplace\mongodb\bin>net start mongodb #或者D:\workplace\mongodb\bin>sc start mongodb #打开windows服务查看D:\workplace\mongodb\bin>services.mscD:\workplace\mongodb\bin>mongod.exe --config D:\workplace\mongodb\mongodb.conf --install --serviceName "mongodb" D:\workplace\mongodb\bin>net start mongodb #或者D:\workplace\mongodb\bin>sc start mongodb #打开windows服务查看D:\workplace\mongodb\bin>services.msc
[宝塔面板]历史优惠活动内容
猜你可能想看的VPS
- 教程 宝塔面板搭建妹子图片站 自带爬虫采集 94imm 程序全球[VPS测评]
- [黑五]HostDare→洛杉矶 CN2 GT KVM 七五折 年付 2全球[VPS测评]
- Internet Brothers→$18 月 1G 内存 30GB S虚拟空间(主机)
- 微信支付接入报错→签名错误全球[VPS测评]
- racknerd→“老板生日促销+送红包” $15.88 年 KVM 1全球[VPS测评]
- tp5 怎么使用 find_in_set thinkphp5 中 fin全球[VPS测评]
- 真实测评 RackNerd 洛杉矶 MC 机房测评数据全球[VPS测评]
- 搬瓦工 DC6 限量版补货,最便宜的美国 cn2vps,优质稳定靠谱的三美国VPS[主机]
- racknerd→16C 站群服务器(256IP) e3-1230v2 站群服务器[IP]
- JQuery 自动调整 textarea 内容高度全球[VPS测评]
- QQ 空间被封怎么办?QQ 空间被封如何填写申诉解封?虚拟空间(主机)
- PHP 防止 XSS 注入解决方案大全全球[VPS测评]
- Windows and Office ISO Downloader 从微WINDOWS
- WordPress保护后台登录插件:Login LockDown全球[VPS测评]
- WordPress建立数据库连接时出错怎么办?全球[VPS测评]
- ZJI 双十一 充值送 香港高防五折 阿里云香港线路立减270元香港VPS[主机]
- Liteserver荷兰G口大硬盘VPS和AMD高性能VPS复活节七五折全球[VPS测评]
- tgs.com.vn-越南- 1C1G20GB 不限流量 7.4$ 月全球[VPS测评]
- 创意加载进度HTML动画特效,SVG+CSS3实现的动画死神来了load全球[VPS测评]
- 蓝米云:美国cera vps/香港cn2vps套餐,1核2G/40G/1美国VPS[主机]
- 晚点独家丨拼多多9月上线跨境电商平台,首站美国美国VPS[主机]
- 从阿里云七代云服务器,谈云计算四大趋势全球[VPS测评]
- 精美的宠物医院网站WordPress主题 - Valkuta全球[VPS测评]
- 华纳云年终钜惠活动:云服务器半年低至280元,香港高防服务器999元香港VPS[主机]
- 樊云:香港CN2节点vps,最低月付22.5起,带宽5Mbps起步香港VPS[主机]
- 1分钟快速读懂云计算全球[VPS测评]
- LOCVPS:全球云美国洛杉矶CN2 VPS,香港云地Xen VPS七折美国VPS[主机]
- 阿里云香港服务器多少钱?阿里云香港服务器价格香港VPS[主机]
- 易梦云:香港/美国vps优惠活动,2核1G3M云主机仅16元/月美国VPS[主机]
- 极光KVM双12:全场月付/季付产品全部5折,永久优惠,年付最高立减15全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-163984.html











