宝塔面板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
- 便宜 VPS $18 年 2 核 CPU 2G 内存 25G SSD 3全球[VPS测评]
- TP5 中 POST 接收数组出现→variable type erro全球[VPS测评]
- 便宜 RAKsmart→“抄底价 购实惠” 爆款 G 口 不限低至 19全球[VPS测评]
- 优优加速→香港 日本 新加坡等 CDN 不限流量 免费;付费版 支持 S日本VPS[主机]
- 一颗红心上面有一个患字是什么成语?全球[VPS测评]
- Colohub→$7 月 1GB 内存 25GB SSD 空间 1TB 虚拟空间(主机)
- vServer.site→€12 年 1GB 内存 5GB SSD 空间虚拟空间(主机)
- MoeCloud 香港 HKT 线路 VDS 补货,2 核 4G 折后 香港VPS[主机]
- DediPath→$175 月 E3-1270v2 16GB 内存 2T全球[VPS测评]
- 微信开发→redirect_url 参数错误全球[VPS测评]
- Vultr - 新增 High Frequency 高性能云服务器系列全球[VPS测评]
- HKServerSolution→299 元 月 2G 内存 20GB 虚拟空间(主机)
- Chrome插件Logo Grabber快速取得网站或品牌Logo全球[VPS测评]
- 购买VPS需要注意的30个问题全球[VPS测评]
- guzel-土耳其 59.9里拉 月 1核512MB内存20g硬盘 10全球[VPS测评]
- 20个温暖心灵的问题,抖音,朋友圈都可以拿去发。全球[VPS测评]
- 为什么大家都选择香港服务器建站香港VPS[主机]
- 跨境电商洋码头生死攸关:买手流失资金被冻结保全全球[VPS测评]
- 阿里行癫:如何理解当下的云计算全球[VPS测评]
- 桔子数据,香港安畅BGP大带宽VPS 首月五折体验 三网直连 14元/月香港VPS[主机]
- 港口雄开万里流丨不出国门海淘全球青岛跨境电商未来可期全球[VPS测评]
- 遨游主机:8折优惠,美国cn2 gia vps,54元/月,2G内存/1美国VPS[主机]
- SugarHosts糖果主机双十一大促销 虚拟主机最高6折优惠全球[VPS测评]
- 创新互联:免备案美国香港云主机4核2G仅558元/月,5580元/年美国VPS[主机]
- 文物、沉船、村落!干旱导致大量遗迹重见天日 2022年干旱还要持续多久?全球[VPS测评]
- 奇维云优惠活动:香港CN21核1G1M带宽云服务器免费领取香港VPS[主机]
- 云群网络怎么样?香港云服务器高端弹性云2核2G2M带宽,仅588元/年香港VPS[主机]
- 修罗云:1核/512MB/6GB空间/1TB流量/NAT/KVM/香港H虚拟空间(主机)
- LOCVPS:全球云美国洛杉矶CN2 VPS,香港云地Xen VPS七折美国VPS[主机]
- 性价比最高的VPS网络评测全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-164629.html











