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

标签 mongodb ubuntu

当我将环境从本地(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'.

最佳答案

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

基本上是 /etc/mongod.conf 中列出的所有文件

关于Mongodb 无法启动 -> 显示奇怪的错误日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44643476/

相关文章:

python - 为什么我在尝试通过 python 插入数据 MongoDB 时遇到错误?

javascript - 仅对现有字段进行排序

mongodb - 使用 Golang mgo 进行用户搜索

ubuntu - 尝试使用 Vagrant 在 VirtualBox 机器内启动 VirtualBox 机器

apache - 为什么 .htaccess protected 目录在 http 上有效,但在 https 上无效?

java - MongoDb 3.0.1 java驱动程序GridFs错误

java - 使用 Spring data Mongo 搜索嵌入数组中的文本列表

php - Magento:创建发票时出现 500 内部服务器错误

python - 在 python3 中安装第三方模块 - Ubuntu

ubuntu - 如何在代码中回到wsl中的绿色下划线