宝塔面板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
- 线路一般-SnowVPS→$18 年 2T 流量 美国芝加哥服务器美国VPS[主机]
- 搬瓦工 CN2 GIA 购买技巧 通过升降配置购买搬瓦工低价的 CN2 全球[VPS测评]
- 一堆数字 3 一堆数字 5 是什么成语?全球[VPS测评]
- hostflyte→新上洛杉矶 CN2 GT 线路 免费 WindowsWINDOWS
- 酷番云韩国 台湾 美国云服务器年付低至 138 元,CN2+直连!国内 韩国VPS[主机]
- DMIT→$48.88 季 1GB 内存 10GB SSD 空间 1TB虚拟空间(主机)
- 传家宝 PacificRack→三款特价套餐 1 核 400M 内存 1全球[VPS测评]
- iWFHosting→$57 月-E3 1230v2 16GB 2TB 全球[VPS测评]
- CN2 GIA 微基主机→美国高速虚拟主机 5 折优惠 5G 方案三年付美国VPS[主机]
- WordPress 网站自定义广告位占位/出租代码全球[VPS测评]
- Google发布nofollow标签新规则,有重大变化全球[VPS测评]
- 什么是阿里云 ECS 服务器全球[VPS测评]
- WordPress网站代码实现网站弹窗广告全球[VPS测评]
- 百度搜索将打击网站搜索内容需获取权限才能查看的情况全球[VPS测评]
- Linode正式更换至新的云管理面板全球[VPS测评]
- hostodo新增斯波坎机房,八月促销Nvme硬盘容量翻倍,赠送免费Di全球[VPS测评]
- 【黑五】ifog-折扣 欧洲VPS 瑞士 德国 英国 美国 最低季付10美国VPS[主机]
- RivenCloud 1G内存 10G SSD 2T流量 1G带宽 BG全球[VPS测评]
- 2020: UOVZ 1G 内存 20G SSD 200流量 徐州NAT全球[VPS测评]
- DMIT日本Pro → 三网高级线路公开测试(Openbeta) → 2日本VPS[主机]
- GreenCloudVPS → 日本INAP → 4G 20G NV日本VPS[主机]
- CentOS 7.x 系统安装和配置redis-7.0.4集群全球[VPS测评]
- WHMCS 8.1如何简化注册页面全球[VPS测评]
- 快速云:vps云服务器的区别是什么?2022-08-1913:32来源:全球[VPS测评]
- 7月份,经济复苏边际趋缓,央行降息幅度先稳后升全球[VPS测评]
- 麻花云怎么样?安徽移动vps月付29元/香港vps月付21元香港VPS[主机]
- 如何根据业务需求选择合适的云服务器配置?全球[VPS测评]
- 雪花云怎么样?雪花云香港云服务器1核1G2M仅19元/月香港VPS[主机]
- 腾讯云vps主机:288元/3年,1核/2G/50gSSD,北京/上海/美国VPS[主机]
- CoNoov:美国/日本/新加坡/英国/荷兰/西班牙/挪威/丹麦vps,日本VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-164460.html











