Mongodb无法启动 - >提供奇怪的错误日志

问题描述 投票:1回答:2

当我将我的环境从本地(mac)移动到我的服务器(ubuntu)时,我解压缩了我的目录和安装了npm install的服务器没有错误或警告,但是我的数据库失败了所以我决定根据本教程重新安装它(好吧) ,apt-remove mongo*第一)

https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04

但后来我得到了

Job for mongodb.service failed because the control process exited with error code. See "systemctl status mongodb.service" and "journalctl -xe" for details.

有谁知道这意味着什么?

-- Unit mongodb.service has begun starting up.
Jun 20 03:54:18 ip-172-31-16-163 mongodb[25271]:  * Starting database mongodb
Jun 20 03:54:19 ip-172-31-16-163 mongodb[25271]:    ...fail!
Jun 20 03:54:19 ip-172-31-16-163 systemd[1]: mongodb.service: Control process exited, code=exited status=1
Jun 20 03:54:19 ip-172-31-16-163 sudo[25268]: pam_unix(sudo:session): session closed for user root
Jun 20 03:54:19 ip-172-31-16-163 systemd[1]: Failed to start LSB: An object/document-oriented database.
-- Subject: Unit mongodb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mongodb.service has failed.
-- 
-- The result is failed.
Jun 20 03:54:19 ip-172-31-16-163 systemd[1]: mongodb.service: Unit entered failed state.
Jun 20 03:54:19 ip-172-31-16-163 systemd[1]: mongodb.service: Failed with result 'exit-code'.
mongodb ubuntu
2个回答
0
投票

看起来很熟悉。检查文件的所有权。 dbPath中的文件,mongod.run -lock文件,密钥文件...

基本上所有那些文件列在你的/etc/mongod.conf


0
投票

运行以下命令,它适用于我

sudo apt-get install --reinstall mongodb
© www.soinside.com 2019 - 2024. All rights reserved.