宝塔面板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
- VIRPUS 全场 VPS 四折 XEN 架构 西雅图机房 月付 2 美全球[VPS测评]
- 便宜 $13.99 年 512M 内存 20G SSD 250G 流量 全球[VPS测评]
- MySQL 中 alter 用法大全全球[VPS测评]
- 12 个免费 SSL 证书申请网站全球[VPS测评]
- Psychz→$10 月-Atom D525 4GB 500GB 30T全球[VPS测评]
- 五月促销 RAKsmart→美国站群首月半价 年付免费送 3 个月 I3站群服务器[IP]
- BOSSbirthday 促销 RackNerd→1 核 1.5G 20全球[VPS测评]
- raksmart→美国不限流量服务器(物理机) 100M 带宽~$61 美国VPS[主机]
- FlashFXP 错误 530 Login incorrect 解决方法全球[VPS测评]
- 搬瓦工 $29.88 年 2G 内存 40G SSD 1T 流量 KVM全球[VPS测评]
- 免费 VPS 日主机→美国三网 CN2 GIA 直连 年付 99 元起 美国VPS[主机]
- 保看奈飞 $18.75 月 2 核 CPU 1.5G 内存 30G SS日本VPS[主机]
- 2020 年最新国外便宜 VPS 盘点全球[VPS测评]
- bbr plus bbr 原版 bbr 魔改和锐速四合一脚本全球[VPS测评]
- YYYHost洛杉矶高防CN2GIA1G内存8m带宽外加100g防御 月全球[VPS测评]
- HostKvm 10月全场八折优惠 CN2优化线路VPS月付最低7.6刀全球[VPS测评]
- 美国知名 VPS 商家 linode 现在支持 PayPal 和 Goo美国VPS[主机]
- Myhost io-3€ 月 保加利亚 1核2G内存20G硬盘 10T流全球[VPS测评]
- 很简单的图片不规则布局样式,纯css样式实现的图片瀑布流布局全球[VPS测评]
- 详细介绍vps云服务器及其作用全球[VPS测评]
- HTML5绿色有机食品电商网站模板 - Organtio全球[VPS测评]
- 岚云:香港安迅/沙田CN2直连,75折起,1核/1G/30G SSD/1香港VPS[主机]
- 华凯易佰同比扭亏跨境电商行业回暖H2旺季将至|中报追踪全球[VPS测评]
- uuuvps:香港大带宽vps低至239元/年;香港服务器720元/e3香港VPS[主机]
- 咖啡主机:美国高防vps、香港vps 可享受6-7折促销 每月仅需14元美国VPS[主机]
- 什么是IconFont ?iconfont 的使用和解析全球[VPS测评]
- 源云主机,香港沙田VPS CN2 1核1G 24/月 NTT 50M 9香港VPS[主机]
- 阿里云香港vps怎么样?阿里云香港、新加坡云主机如何购买?香港VPS[主机]
- 什么是VPS?国内VPS有哪些?全球[VPS测评]
- 快速云:云服务器和vps区别是什么云服务器和vps哪个比较安全2022-全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-164460.html











