宝塔面板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
- PHP 判断是否是手机等移动设备的方法全球[VPS测评]
- hosteons 美国无限流量服务器$85 起,高频 e3 双路 e5,美国VPS[主机]
- 无污染 dns 搭建→ChinaDNS 搭建无污染 DNS 教程全球[VPS测评]
- 疯狂猜成语 图猜成语一根棍子打草旁边一条蛇是什么成语?全球[VPS测评]
- MOACK→$29 月 2*E5-2630L 32G 内存 1TB 硬盘韩国VPS[主机]
- veesp→$1 月 KVM-512MB 10GB 100GB 圣彼得堡全球[VPS测评]
- PHP 获取图片指定点颜色及计算反色函数全球[VPS测评]
- VirMach - 存储型 VPS 少量补货 1T 硬盘$7 月全球[VPS测评]
- Linode正式更换至新的云管理面板全球[VPS测评]
- WordPress如何代码实现完全禁用REST API全球[VPS测评]
- 代码禁用WordPress程序图片裁剪功能全球[VPS测评]
- contabo新加坡机房测评,晚高峰丢包感人,三网绕道美国美国VPS[主机]
- RAKsmart 服务器限量秒杀,40G防御仅99刀,洛杉矶新品预售,美全球[VPS测评]
- hizhosting-土耳其 39里拉 月 2核2g内存40G硬盘 不限全球[VPS测评]
- CrownCloud → 512M内存 500G HDD 3T流量 1G全球[VPS测评]
- 跨境电商拔节生长关键期,宁波政协委员月谈会精准助力!全球[VPS测评]
- 20个温暖心灵的问题,抖音,朋友圈都可以拿去发。全球[VPS测评]
- 快速云:云服务器vps的区别是什么云服务器和vps哪个比较好2022-0全球[VPS测评]
- 什么是云计算?全球[VPS测评]
- WHMCS 8.1如何简化注册页面全球[VPS测评]
- 从阿里云七代云服务器,谈云计算四大趋势全球[VPS测评]
- 漂亮的Css3响应侧边栏菜单,动画风格侧边栏导航菜单样式全球[VPS测评]
- 六六云:香港BGP云服务器/80M大带宽,月付45元起,5折优惠码可用香港VPS[主机]
- edgeNAT:2021元旦vps促销_全场韩国/美国/香港VPS低至7韩国VPS[主机]
- 腾讯云免备案海外服务器:高速网络免备案,助力企业出海!全球[VPS测评]
- HostKvm:香港国际/美国洛杉矶七折优惠,其它业务全场八折,适合做站美国VPS[主机]
- 又一跨境电商产业园落户!中山石岐签约引进16个项目全球[VPS测评]
- 腾讯云海外云服务器怎么购买,香港2核4G云服务器661.2元/年,老用户香港VPS[主机]
- 曾经最大跨境电商平台团队收缩,只剩20人丨GoingGlobal周报全球[VPS测评]
- 云米科技:香港安畅/美国Cera/日本CN2机房,海外云服务器最低11元日本VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-164073.html











