宝塔面板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
- 腾讯云服务器岁末有礼:1 核 2G 2 核 4G 云服务器首年 99 元全球[VPS测评]
- 浩瀚星辰→1750 元 月 8 核 2GB 内存 120GB 空间 不限虚拟空间(主机)
- QN 机房-SmartHost→$6.95 月 4 核 8GB 内存 4虚拟空间(主机)
- 真不咋地-CrownCloud→$7 月 4 核 4GB 内存 60GB虚拟空间(主机)
- 一个大的材字旁边一个小的用字是什么成语?全球[VPS测评]
- 在 Ubuntu 系统下安装最新稳定版 qBittorrent全球[VPS测评]
- PCCW 线路 $17.1 半年 1G 内存 20G SSD 100Mb全球[VPS测评]
- VirMach - Merry Christmas!圣诞促销年付$15 全球[VPS测评]
- 便宜 VPS PacificRack→$9.99 每年 1 核 CPU 全球[VPS测评]
- 域名价格监控及注册查询网站汇总全球[VPS测评]
- 合字下面的口中有一个应字是什么成语?全球[VPS测评]
- 阿里云迎来 10 周年庆→9·10 会员节大促活动今日启动全球[VPS测评]
- 设置 select 某一项不可选 禁用 select 指定 option全球[VPS测评]
- 如何在 CentOS 7 服务器上使用 yum命令安装 PHP7.2全球[VPS测评]
- 谨防VPS商家跑路或运营风险,一定要做好数据备份全球[VPS测评]
- WordPress博客网站代码实现右键菜单功能修改全球[VPS测评]
- Debian 10 如何启用 BBR 加速全球[VPS测评]
- hostdare 洛杉矶 CN2GIA 便宜VPS九折优惠,电信CN2 全球[VPS测评]
- 1美元的便宜 VPS 推荐全球[VPS测评]
- 云服务器和云服务器租用,云服务器做什么??全球[VPS测评]
- 金斗云怎么样?香港CN2月付23元,圣何塞CN2月付22元香港VPS[主机]
- 虾皮跨境电商怎么样?虾皮跨境电商靠谱吗?全球[VPS测评]
- 香港云服务器的优势有哪些方面香港VPS[主机]
- YYYHost:4核4G香港cn2vps,20G SSD/3Mbps不限香港VPS[主机]
- 免备案服务器对权重和网站排名有影响吗?全球[VPS测评]
- 云米科技:香港/美国/日本等海外免备案vps云服务器,最低13元/月日本VPS[主机]
- 腾讯云香港/韩国/日本免备案服务器优惠促销活动日本VPS[主机]
- 腾讯云海外服务器优惠活动:全球购1核2G美国云服务器低至318元/年美国VPS[主机]
- SugarHosts:虚拟主机三折起,VPS五折起,续费也可以享受优惠全球[VPS测评]
- 青果云怎么样?美国/香港/日本云主机 买多久送多久日本VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-163984.html











