宝塔面板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
- Kuai Che Dao→$168 季 1GB 内存 10GB SSD 虚拟空间(主机)
- 限时优惠 iON 二十四小时快闪优惠 洛杉矶机房 CN2 线路机房可享 全球[VPS测评]
- Linux CentOS,Debian 用 iptables 屏蔽 IP全球[VPS测评]
- 搬瓦工 $33.83 季 2 核 1GB 20GB SSD 1TB@2.全球[VPS测评]
- 搬瓦工→DC6 机房 CN2 GIA 线路推出 10Gbps 带宽 VP全球[VPS测评]
- GigsGigsCloud 日本东京软银 VPS 预售,500M 大带宽日本VPS[主机]
- 新商家慎重-iara.cloud→日本 CN2 GIA 日本软银 KVM日本VPS[主机]
- 95IDC→香港 CN2 服务器 香港 CN2 站群服务器促销 终生七折站群服务器[IP]
- tp5 怎么使用 find_in_set thinkphp5 中 fin全球[VPS测评]
- KdaCloud→3878 元 月 2 核 4GB 内存 40GB 空间虚拟空间(主机)
- 传家宝 PacificRack→三款特价套餐 1 核 400M 内存 1全球[VPS测评]
- 特价 标准互联→洛杉矶 CN2 GT 线路套餐年付 240 元 BGP 全球[VPS测评]
- WordPress通过根据评论数量判断是否显示评论者链接全球[VPS测评]
- 咖啡主机 双十二 洛杉矶512M内存 40G硬盘 自带20Gbps高防 全球[VPS测评]
- 不要随意安装来路不明的破解WordPress主题全球[VPS测评]
- OneinStack如何启用 Brotli 压缩全球[VPS测评]
- 搬瓦工双十一 全场11%优惠码 BWH20201111 循环折扣终身八九全球[VPS测评]
- ottnec-hosting-2欧 月 德国 1核3GB内存40GB硬盘全球[VPS测评]
- FXTRANSIT-日本 香港 新加坡 VPS新年特惠 85折起日本VPS[主机]
- 修罗云 → 深港IPLC专线 → 1核 256M内存 6G硬盘 35G 全球[VPS测评]
- HostXen:双十一新用户香港、日本vps,送20元代金券,充值300日本VPS[主机]
- 麻花云怎么样?安徽移动VPS月付29元 香港VPS 2M月付21元香港VPS[主机]
- 跨境电商拔节生长关键期,宁波政协委员月谈会精准助力!全球[VPS测评]
- 弘速科技:香港安畅CN2 GIA/弹性云服务器10元/月,2核1GB/2香港VPS[主机]
- 易凡云:香港CN2 2核2G云服务器仅29.78元/月,357元/年香港VPS[主机]
- 福州职业技术学院获得世界职业院校技能大赛云计算赛项银牌全球[VPS测评]
- 2023年 IDC市场结构和方向的深度分析全球[VPS测评]
- 葫芦云:香港将军澳CN2云服务器24元/月,1核/1GB/25G硬盘/3香港VPS[主机]
- 向日葵-漏洞科普:海外云服务器三种漏洞修复方法快收藏起来!全球[VPS测评]
- 外贸无界烟台市有多少跨境电商?烟台跨境电商开发平台,烟台跨境电商选品全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-164182.html











