Mongodb无法启动->;显示奇怪的错误日志

Mongodb无法启动->;显示奇怪的错误日志,mongodb,ubuntu,Mongodb,Ubuntu,当我将我的环境从我的本地(mac)移动到我的服务器(ubuntu)时,我解压缩了我的目录和用npm install安装的服务器,没有错误或警告,但我的数据库失败了,所以我决定根据本教程重新安装它(好吧,apt remove mongo*首先) 但后来我得到了一份工作 Job for mongodb.service failed because the control process exited with error code. See "systemctl status mongodb.se

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

但后来我得到了一份工作

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'.

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


基本上,您的
/etc/mongod.conf
中列出的所有文件都运行以下命令,它对我有效

sudo apt-get install --reinstall mongodb

这就是问题所在。谢谢