宝塔面板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
- Uovz→26 元 月 1GB 内存 20GB SSD 硬盘 200GB全球[VPS测评]
- WPS Office 2019 去掉广告的办法全球[VPS测评]
- 看奈飞 $30 月 1GB 内存 10GB SSD 3TB 流量 100全球[VPS测评]
- HostUp→$3.5 月 2GB 内存 25GB SSD 空间 1TB虚拟空间(主机)
- DedeCMS 友情链接去掉 li 标签 DedeCMS 怎么去掉友情链全球[VPS测评]
- KhanWebHost→$6.5 月 4 核 3GB 内存 80GB N虚拟空间(主机)
- 国人商家慎重-ManSora→港深 IPLC NAT 2 核 256M 全球[VPS测评]
- 疯狂猜成语 图猜成语一个脸红的男人看着一个美女还有两颗心是什么成语?全球[VPS测评]
- 疯狂猜成语 图猜成语一根棍子打草旁边一条蛇是什么成语?全球[VPS测评]
- 投稿 dedipath→32G 内存独立服务器低至$128 月 纯 SS独立服务器[U]
- 两个得字下面一个大的举字是什么成语?全球[VPS测评]
- Oneinstack一键开启安装ngx_lua_waf防火墙功能全球[VPS测评]
- RackNerd圣诞节1.5g内存20g硬盘2.5T大流量年付仅16.8全球[VPS测评]
- HostYun新上日本 AMD IIJ 线路 VPS,18元起/月,1G日本VPS[主机]
- ChicagoVPS 512M内存20g硬盘5T大流量月付仅2.5刀 O全球[VPS测评]
- Xver 泰国VPS野鸡测试(避坑)全球[VPS测评]
- Centos7的firewall 防火墙如何设置端口转发?全球[VPS测评]
- 虾皮跨境电商怎么样?虾皮跨境电商靠谱吗?全球[VPS测评]
- 咖啡主机怎么样?美国洛杉矶高防vps,cn2直连,香港沙田vps美国VPS[主机]
- 麻花云:香港CN2VPS月付19元起,安徽移动8核/16G/20M独服2香港VPS[主机]
- edgenat:韩国cn2+香港cn2,VPS八折优惠,8核8G/50gWINDOWS
- 私有云架设之优选拓普龙S465-24高密度存储服务器机箱评测解析全球[VPS测评]
- 咖啡主机怎么样?咖啡香港/美国/法国VPS主机价格及配置推荐美国VPS[主机]
- 六一云:香港CN2/洛杉矶高防85折优惠,CDN半年优惠,充值返利送水杯香港VPS[主机]
- 2022年亚马逊Prime会员日将于7月12日和13日举行,覆盖24个站全球[VPS测评]
- UCloud海外云服务器促销:全场1折起,香港cn2vps最低年付150香港VPS[主机]
- DMIT:香港/洛杉矶GIA等KVM VPS,黑五DMIT优惠码活动,稳香港VPS[主机]
- 宝塔面板在香港服务器安装启动不了nginx怎么办?香港VPS[主机]
- 热网互联:日本+香港 cn2 gia vps7折,日本服务器7.5折,全日本VPS[主机]
- tmhhost官网登录不上怎么办?日本软银/美国CN2 GIA/美国高防日本VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-164073.html











