【问题标题】:Unable to start MongoDB server on Ubuntu 20.04无法在 Ubuntu 20.04 上启动 MongoDB 服务器
【发布时间】:2020-12-17 16:51:19
【问题描述】:

我正在Ubuntu 20.04(Focal Fossa)上安装最新的 MongoDB,它给出了以下错误。我该如何解决?

sudo systemctl status mongod

mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2020-08-28 23:40:03 IST; 1min 43s ago
       Docs: https://docs.mongodb.org/manual
   Main PID: 10901 (code=exited, status=217/USER)

systemd[1]: Started MongoDB Database Server.
systemd[10901]: mongod.service: Failed to determine user credentials: No such process
systemd[10901]: mongod.service: Failed at step USER spawning /usr/bin/mongod: No such process
systemd[1]: mongod.service: Main process exited, code=exited, status=217/USER
systemd[1]: mongod.service: Failed with result 'exit-code'.
systemd[1]: /lib/systemd/system/mongod.service:11: PIDFile= references a path below legacy directory >

【问题讨论】:

  • 请访问question并关注解决方案

标签: mongodb installation ubuntu-20.04 systemctl


【解决方案1】:

更改“/var/lib/mongodb”目录的所有权对我有用。 更改所有权的命令:

sudo chown -R mongodb:mongodb /var/lib/mongodb

【讨论】:

  • 还要检查你的信誉
  • chown: cannot access '/var/lib/mongodb': no such file or directory now show this error
猜你喜欢
  • 1970-01-01
  • 2017-08-31
  • 1970-01-01
  • 1970-01-01
  • 2022-06-14
  • 1970-01-01
  • 2021-07-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多