宝塔面板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
- 限量促销 RackNerd→3 核 2G 内存套餐年付$22.22 E3独立服务器[U]
- 价格高-Akkocloud:月付 120 元 1G 内存 德国原全球[VPS测评]
- 特价促销 Rainbow cloud→Intel Xeon E3-12X香港VPS[主机]
- DNSPOD→个人专业版首年仅 18 元全球[VPS测评]
- $4 月 512M 内存 20G SSD 1Gbps 不限流量 KVM 日本VPS[主机]
- 阿里云 910 会员节 十年有礼 折扣回馈 爆款限时抢购 2 折起全球[VPS测评]
- vultr 韩国 vps 云服务器带宽速度及综合性能测评,1 核 1G 韩国VPS[主机]
- 促销 iON→圣何塞线路改善 8 折优惠一个月 1 核 2G 50G S全球[VPS测评]
- QuickPacket→$40 月-E3-1270 16GB 1TB 2全球[VPS测评]
- cmivps 香港沙田大带宽 vps 七折起,100M 带宽无限流量,三香港VPS[主机]
- LNMP与OneinStack一键安装包区别与选择建议全球[VPS测评]
- Wikihost CN2 香港虚拟主机 → 空间翻倍 三年七折虚拟空间(主机)
- DMIT 1核心 1G内存 10G SSD 1500G流量 100M带宽全球[VPS测评]
- HTML5绿色有机食品电商网站模板 - Organtio全球[VPS测评]
- 厘米云,江苏移动100G高防云服务器,4核4G内存20M带宽79元/月全球[VPS测评]
- 冀青云怎么样?香港CN2-GIA vps月28元/香港NTT 月9元香港VPS[主机]
- 野草云服务器怎么样?香港CN2+BGP带宽30M月付19元香港VPS[主机]
- 宏海数据9.9云服务器:香港VPS CN2线路1核1G 9.9/首月香港VPS[主机]
- 从阿里云七代云服务器,谈云计算四大趋势全球[VPS测评]
- HostXen:双十一新用户香港、日本vps,送20元代金券,充值300日本VPS[主机]
- 中概股扫描网传拼多多正筹备跨境电商平台首站登陆美国美国VPS[主机]
- 手帕云,便宜小带宽香港CN2 VPS,集群10G防御,双向CN2直连,仅香港VPS[主机]
- 阿里行癫:如何理解当下的云计算全球[VPS测评]
- 酷锐云:元旦钜惠_美国CN2VPS低至20元/月_1核2G香港云主机低至美国VPS[主机]
- 阳帝云双十二活动:1核1G10M大宽带香港BGP云服务器,月付14元香港VPS[主机]
- 桔子数据:香港CN2大带宽云服务器28元/月_1核/1G/10M带宽/C香港VPS[主机]
- 7月份,经济复苏边际趋缓,央行降息幅度先稳后升全球[VPS测评]
- 野草云怎么样?香港、美国圣何塞高防VPS 1核1G3M 月付19元美国VPS[主机]
- 2023年 IDC市场结构和方向的深度分析全球[VPS测评]
- 青云互联:香港CN2 GIA VPS,月付15.2起;日本CN2 VPS日本VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-164629.html











