宝塔面板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
- TmhHost:香港大带宽云服务器/季付8折/200带宽,120元/3月 香港VPS[主机]
- 极光KVM:4月G口新品发布美国大带宽vps;香港cn2+BGP直连云服 美国VPS[主机]
- 极光KVM:月末冲刺活动,美西/香港cn2云服务器,低至19元/月起 香港VPS[主机]
- aoyoyun:傲游主机/傲游vps/傲游云,香港vps,60M大带宽, WINDOWS
- 精美的宠物医院网站WordPress主题 - Valkuta 全球[VPS测评]
- 租用美国服务器有哪些安全方案 美国VPS[主机]
- 邢志宏:加快推动高质量建设跨境电商综试区起势成势 全球[VPS测评]
- CubeCloud,香港cn2,美国cn2 gia线路vps主机,2核1 美国VPS[主机]
- tudcloud,香港沙田大带宽vps特惠7折,CN2+BGP直连,10 香港VPS[主机]
- diyvm:香港vps/美国vps/日本vps/2核/2G内存/5M带宽 日本VPS[主机]
- 触摸云:香港BGP/香港CN2/美国GIA高防CN2 GIA云服务器2H 美国VPS[主机]
- 香港cn2线路服务器哪里好?香港cn2服务器推荐哪家好? 香港VPS[主机]
- 恒星云:香港沙田CN2VPS低至9.9元/起_国内BGP云服务器4核4G 香港VPS[主机]
- 56云服务器:国内云服务器2核2G5M仅377.46元/年;香港物理服务 香港VPS[主机]
- 无忧云:雅安/德阳100G高防云主机月付78元起,香港CN2云服务器月付 香港VPS[主机]
- edgenat:香港vps、韩国vps、洛杉矶vps买1送1,买多久送多 韩国VPS[主机]
- 天生云:香港沙田CN2 GIA VPS,1核1G40G/2M带宽,月付8 香港VPS[主机]
- 糖果主机(sugarhosts):春季优惠,云服务器/云vps/虚拟主机 全球[VPS测评]
- 恒创科技:开年采购季_香港CN2云服务器/美国CN2线路,低至299元/ 美国VPS[主机]
- ucloud云服务器全球购:香港/韩国/日本/台湾/越南/泰国服务器最低 日本VPS[主机]
- 樊云:香港cn2+美国cn2,36元/月起,9折优惠促销;云服务器+独立 独立服务器[U]
- Pia云:美国三网CN2 GIA线路,15元/月起;香港云主机1核/2G 美国VPS[主机]
- 八成企业看好出海投资 防止“溺水”需重视这一点 全球[VPS测评]
- 关键路径、资金情况、政策关键数据中心的可持续发展路径在哪里? 全球[VPS测评]
- 为什么要拥有一台VPS? 全球[VPS测评]
- Bloggar-移动端友好的新闻博客类HTML5模板 全球[VPS测评]
- 跨境电商洋码头生死攸关:买手流失资金被冻结保全 全球[VPS测评]
- earidc怎么样?香港三网cn2vps带宽1M月付29元 香港VPS[主机]
- 麻花云:香港CN2VPS月付19元起,安徽移动8核/16G/20M独服2 香港VPS[主机]
- Ubuntu关机命令是什么?Ubuntu关机命令介绍 全球[VPS测评]
转载请注明原文地址: http://140.238.13.167:12355/read-164182.html











