宝塔面板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
- ¥33.15 月 256M 内存 5G 硬盘 512G 流量 30Mbp全球[VPS测评]
- 优惠 Digital-VM→全场 7 折优惠 不限流量 亚洲机房 月付低全球[VPS测评]
- PacificRack→$6.52 年 KVM-512MB 10GB 5全球[VPS测评]
- 稳定 搬瓦工 DC9 机房 CN2 GIA 线路 512M 内存套餐补货全球[VPS测评]
- Linux 下端口被占用的解决办法全球[VPS测评]
- ZJI→独立服务器 6 折起 香港 CN2 日本 CN2 韩国 CN2 独立服务器[U]
- tp5.1 怎么获取当前模块名 控制器名 方法名?全球[VPS测评]
- JS 判断是否为微信浏览器(微信客户端)的函数全球[VPS测评]
- ¥26.98 月 256M 内存 4G 硬盘 100G@3Mbps KV韩国VPS[主机]
- 预售 CloudIPLC→HK-CMI KVM 1G 套餐季付 149 香港VPS[主机]
- 八月优惠 RAKsmart→美国 CN 直连服务器降至 399 元 月 美国VPS[主机]
- WordPress基于WPJAM BASIC开发的免费主题:Honey主全球[VPS测评]
- WordPress博客的百度快照怎么快速更新?全球[VPS测评]
- HostMem 洛杉矶亚洲优化线路 CN2GT 1g内存 60g硬盘 年全球[VPS测评]
- 我爱水煮鱼WordPress SEO 宝典:怎么才能让你的博客流量增长1全球[VPS测评]
- 长三角地区的算力需求规模到底有多大?全球[VPS测评]
- UCloud海外云服务器促销:全场1折起,香港cn2vps最低年付150香港VPS[主机]
- HostKvm:韩国香港vps10月份最新促销,海外VPS全场八折优惠韩国VPS[主机]
- kvmla,新加坡VPS、香港VPS、日本VPS,2核2G云主机仅425日本VPS[主机]
- 印象云:1核/1G/40G固态/800G/50Mbps/洛杉矶高防vps全球[VPS测评]
- 20个温暖心灵的问题,抖音,朋友圈都可以拿去发。全球[VPS测评]
- vpsplayer:新年活动_vps全部7.5折起_深圳BGP/美西Ce香港VPS[主机]
- 影速科技怎么样?影速科技海外云服务器价格多少钱?全球[VPS测评]
- HTML5绿色有机食品电商网站模板 - Organtio全球[VPS测评]
- 虾皮跨境电商怎么样?虾皮跨境电商靠谱吗?全球[VPS测评]
- 极客主机,美国高防/日本软银/新加坡双程CN2/香港VPS 折后39元/日本VPS[主机]
- 企鹅小屋怎么样?深港IPLC专线销售 500M大带宽/2核1G内存/55全球[VPS测评]
- 恒创科技:香港/美国云服务器2折起,年度特价低至13元/月,新购送京东E美国VPS[主机]
- 腾讯云香港轻量应用服务器 优惠活动最低月付仅24元香港VPS[主机]
- ERP库存管理系统HTML5模板 - DreamsPOS全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-164460.html











