宝塔面板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
- 韩国 CN2 $59.5 月 E5-2450L*2 32G 内存 1T 韩国VPS[主机]
- 上新极光 KVM→美国洛杉矶 PZ 中美优化线路 KVM 123.45 美国VPS[主机]
- tp5 模板中使用自定义函数的方法全球[VPS测评]
- 疯狂猜成语 图猜成语一个人拿着枪丢掉一支笔是什么成语?全球[VPS测评]
- hkserversolution→cn2 高防 VPS 99 元 月 K全球[VPS测评]
- $5 月 2CPU 512M 内存 12G SSD 1.5T 1Gbps全球[VPS测评]
- 疯狂猜成语 图猜成语沙漠中有一株仙人掌和一颗枯树天上有太阳是什么成语?全球[VPS测评]
- 恒创科技→500 元 月 E3-1231v3 16GB 内存 2TB 硬全球[VPS测评]
- 樊云→洛杉矶 cn2 vps 40 元 2g 内存 2 核 30gSSD全球[VPS测评]
- 优惠 €13.46 半年 2 核 CPU 2G 内存 100G 硬盘 不全球[VPS测评]
- 疯狂猜成语 图猜成语一个美女和一滩水是什么成语?全球[VPS测评]
- 一个坐标上面有 NS 和辕辙是什么成语?全球[VPS测评]
- 华为云热门域名限时抢购 1 元起 com23 元 cn19 元全球[VPS测评]
- spinservers→超高配独立服务器 $319 2*e5-2683v独立服务器[U]
- 怎么才能保证WordPress网站搜索引擎SEO优化长期霸榜全球[VPS测评]
- EtherNetservers促销套餐 1G内存/30G硬盘/2个IP 全球[VPS测评]
- 知更鸟Begin主题代码实现外链转内链并base64加密全球[VPS测评]
- 搜索引擎喜欢什么样的反向链接,反向链接如何给博客SEO加分?全球[VPS测评]
- 建站云服务器选择高效云盘还是SSD硬盘?全球[VPS测评]
- Wikihost CN2 香港虚拟主机 → 独立IP → 限量446元独立服务器[U]
- 什么是IconFont ?iconfont 的使用和解析全球[VPS测评]
- 全球云lovps,香港CN2线路vps 新品七折月付49元香港VPS[主机]
- 跨境贸易和跨境电商的三大区别简单分析全球[VPS测评]
- 云计算的大门依旧没向雷军敞开全球[VPS测评]
- kvmcloud怎么样?香港BGP云服务器 月付12.9元香港VPS[主机]
- 麻花云:香港CN2VPS月付19元起,安徽移动8核/16G/20M独服2香港VPS[主机]
- 什么是linux面板?常见的Linux控制面板有哪些?全球[VPS测评]
- 潮科技|阿里云发布第七代高主频云服务器ECS和含光800云服务器全球[VPS测评]
- vpsplayer:新年活动_vps全部7.5折起_深圳BGP/美西Ce香港VPS[主机]
- 港网科技怎么样?国内BGP云主机,2核2G5M带宽仅377.46元/年全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-164311.html











