宝塔面板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
- 疯狂猜成语 图猜成语一个人在推一座山是什么成语?全球[VPS测评]
- SKB Enterprise→€25 月 i3-8100 8G 内存 2全球[VPS测评]
- PHP 判断是否为支付宝客户端的函数全球[VPS测评]
- Kuai Che Dao→$18.3 季 512MB 内存 10GB S虚拟空间(主机)
- [11.11]DogYun→11.1-11.11 每日限量 65 折 香日本VPS[主机]
- 亲库 新人免费 0 元购撸实物全球[VPS测评]
- 企鹅小屋→180 元 年 1GB 内存 200GB 硬盘 1TB 流量 香港VPS[主机]
- wordpress 修改默认分页条数的方法全球[VPS测评]
- 引力主机双12九折优惠安徽联通NATVPS1G内存4T大流量200M大带全球[VPS测评]
- 腾讯云轻量应用服务器首购特惠,1H2G5M,首年仅需50元,附阿里云和百全球[VPS测评]
- 华纳云香港云服务器三折促销,双向CN2三网直连大陆,优惠后月付最低18元香港VPS[主机]
- EtherNetservers促销套餐 1G内存/30G硬盘/2个IP 全球[VPS测评]
- Windows and Office ISO Downloader 从微WINDOWS
- edgenat新上cera三网cuvip VPS云服务器,全场六折,1G全球[VPS测评]
- Porkbun域名注册优惠,.COM 仅 $4.75,.NET仅 $5.全球[VPS测评]
- WordPress5.2发布要求服务器配置不低于PHP5.6.20与My全球[VPS测评]
- 为什么大家都选择香港服务器建站香港VPS[主机]
- 春天的风最容易温暖心灵,适合朋友圈和抖音的12条文案全球[VPS测评]
- 人们为啥不爱吃海底捞了?海底捞上半年亏损达2.97亿 网友神评扎心全球[VPS测评]
- 众创逸云:1核2G云服务器,不限流量vps/5Mbps/KVM/香港CN香港VPS[主机]
- 恒创科技怎么样?香港美国云服务器/独服/高防全场2.5折起美国VPS[主机]
- 紫云服务器怎么样?紫云香港云服务器1核1G2M仅65元/月香港VPS[主机]
- 磐逸云:全场8折优惠,1核1G香港套餐月付24元,日本NNT线路套餐,月日本VPS[主机]
- 碳氧云,香港vps路由调整为沙田cn2,特价款6核6G仅80元/月香港VPS[主机]
- 56云服务器:国内云服务器2核2G5M仅377.46元/年;香港物理服务香港VPS[主机]
- Linux chown -R 指令介绍与使用全球[VPS测评]
- 欧亚云:新春优惠,洛杉矶CERA云主机仅25元/月起,香港CN2仅28元香港VPS[主机]
- 咖啡主机:新上香港云服务器、美国CN2轻量级KVM vps,香港15.6美国VPS[主机]
- 菜单选中标记CSS3动画效果全球[VPS测评]
- Pia云:美国三网CN2 GIA线路,15元/月起;香港云主机1核/2G美国VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-164182.html











