宝塔面板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
- DedeCMS 添加自定义函数的方法全球[VPS测评]
- STSDUST→$86 月 4 核 2B 内存 20GB 空间 20TB虚拟空间(主机)
- CloudCone→$2.2 月 KVM-1GB 20GB 2TB 洛杉全球[VPS测评]
- 疯狂猜成语 图猜成语一只手抓着草是什么成语?全球[VPS测评]
- spinservers→$79 30 分钟内上机 达拉斯服务器 2*e5全球[VPS测评]
- 玩具-Friendhosting→$1.75 起 首付 5 折 KVM 全球[VPS测评]
- DogYun→香港云服务器按小时计费 25.27 元 月起(0.0351香港VPS[主机]
- git push 提示 error: unable to rewind 全球[VPS测评]
- Moack.co.kr→29 美元韩国独立服务器每日限量抢独立服务器[U]
- 禁止 layer.msg()在回调时抖动全球[VPS测评]
- JQuery 动态获取 添加 修改 删除元素的 class全球[VPS测评]
- 忘记WordPress后台密码要如何找回或修改密码全球[VPS测评]
- DMIT 洛杉矶 Cloudflare 高防 CN2GIA 线路 LAX全球[VPS测评]
- Hotsingareas → 圣诞优惠 4.5€月付 1C2G20G硬盘全球[VPS测评]
- BuyukHosting → 1.3$ 月 土耳其 1C1G30G硬盘 全球[VPS测评]
- Micohosting-$5 月 2核2GB内存 100GB硬盘 G口1美国VPS[主机]
- Hostsolutions.ro → 五折- 1G 1T HDD 10T全球[VPS测评]
- 深圳市城市交通规划设计研究中心股份有限公司关于与腾讯云计算(北京)有限责全球[VPS测评]
- tmhhost:8折优惠,美国cn2 gia高防vps,香港NTT vp美国VPS[主机]
- 轻云互联,香港美国vps终身8.8折17元/月起,cn2直连线路,50G美国VPS[主机]
- 香港云服务器对于建站有什么便捷的地方?香港VPS[主机]
- 亿速互联怎么样?香港沙田vps,2核1G3M云主机仅98元/月,780元香港VPS[主机]
- CMIVPS,香港沙田大带宽vps特惠7折,CN2+BGP直连,100M香港VPS[主机]
- YYYHost:4核4G香港cn2vps,20G SSD/3Mbps不限香港VPS[主机]
- 中行升级服务力促跨境电商发展全球[VPS测评]
- 吸血鬼崛起服务器怎么快速搭建?全球[VPS测评]
- 全球云lovps,香港CN2线路vps 新品七折月付49元香港VPS[主机]
- 金斗云双12活动:全场8折起,美国圣何塞CN2 GIA高防VPS20元/美国VPS[主机]
- 一个纯CSS ToolTip提示工具组件,鼠标悬停的时候会出现气泡文字提全球[VPS测评]
- edgenat:韩国cn2+香港cn2,VPS八折优惠,8核8G/50gWINDOWS
转载请注明原文地址:http://140.238.13.167:12355/read-164311.html











