宝塔面板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
- 2020 年美国虚拟主机 空间推荐 排名不分先后虚拟空间(主机)
- 极光 KVM 五月优惠→美西双程 CN2_GIA 免费升级 189 年起日本VPS[主机]
- raksmart 美国大陆优化服务器带宽速度及综合性能测评,raksma独立服务器[U]
- 景文互联→VPS 全场 7 折 年付内存翻倍 充值 1000 元送 30全球[VPS测评]
- Cubecloud - 魔方云春节 75 折优惠 香港新加坡等机房可选香港VPS[主机]
- iSmile→香港 台湾虚拟主机 100GB 空间 100GB 月流量 虚拟空间(主机)
- 不限流量 VPS 主机全球[VPS测评]
- 超兽 VPS→120 元 年 1GB 内存 10GB 空间 100GB 虚拟空间(主机)
- GigsGigsCloud→新上小内存美国 CN2 GIA 套餐 1 核美国VPS[主机]
- 疯狂猜成语 图猜成语一个富字一个贵字在云彩上是什么成语?全球[VPS测评]
- TypeScript 动态创建类的方法全球[VPS测评]
- Laravel→SQLSTATE[42000]: Syntax erro全球[VPS测评]
- OneVPS - 日本新加坡机房 IP 可用保证日本VPS[主机]
- $59 月 Intel Xeon X3363 8G 内存 2T HDD 全球[VPS测评]
- 阿里云参与测试得 200 元代金券全球[VPS测评]
- 疯狂猜成语 图猜成语前面一个人拿着刀在跑后面一个人站着中间有个坑是什么成全球[VPS测评]
- 超便宜 PacificRack→1 核 512M 内存 10G 硬盘 5全球[VPS测评]
- 不要再相信这4个错误的Google 搜索引擎SEO优化观念全球[VPS测评]
- 如何不需要使用插件就可以实现WordPress代码高亮功能全球[VPS测评]
- HKServerSolution → 2G 内存 20G HDD 2T单全球[VPS测评]
- 一万网络双蛋狂欢活动:2核2G5M云服务器仅377.46元/年全球[VPS测评]
- 为什么要拥有一台VPS?全球[VPS测评]
- 深圳市城市交通规划设计研究中心股份有限公司关于与腾讯云计算(北京)有限责全球[VPS测评]
- 恒创科技:香港/美国云服务器2折起,年度特价低至13元/月,新购送京东E美国VPS[主机]
- 野草云:香港CN2VPS年付36折,137元/年;独立服务器350元月起独立服务器[U]
- 2022年黄河流域跨境电商博览会将于8月26日至28日在青岛西海岸新区举全球[VPS测评]
- 30个美容院抖音唯美文案,看到就直接拿去发吧全球[VPS测评]
- 消费复苏形势良好,我们将多措并举实施扩大内需政策全球[VPS测评]
- 一篇漫画,看懂云计算全球[VPS测评]
- 柚子互联:美国洛杉矶CN2 vps,防御100G/带宽10M,28元/月美国VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-164311.html











