服务mongod无法在Centos8上启动

贝佐尔

我试图在Centos8上安装mongoDB,但是当我运行命令时

systemctl status mongod.service

我收到此错误:

● mongod.service - MongoDB Database Server
   Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2020-08-01 14:26:53 CEST; 11min ago
     Docs: https://docs.mongodb.org/manual
  Process: 1875 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
  Process: 1873 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
  Process: 1871 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
  Process: 1869 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)

Aug 01 14:26:53 db.localhost systemd[1]: Starting MongoDB Database Server...
Aug 01 14:26:53 db.localhost mongod[1875]: about to fork child process, waiting until server is ready for>
Aug 01 14:26:53 db.localhost mongod[1875]: forked process: 1877
Aug 01 14:26:53 db.localhost mongod[1875]: ERROR: child process failed, exited with 14
Aug 01 14:26:53 db.localhost mongod[1875]: To see additional information in this output, start without th>
Aug 01 14:26:53 db.localhost systemd[1]: mongod.service: Control process exited, code=exited status=14
Aug 01 14:26:53 db.localhost systemd[1]: mongod.service: Failed with result 'exit-code'.
Aug 01 14:26:53 db.localhost systemd[1]: Failed to start MongoDB Database Server.

我尝试检查以下文件夹的特权:/ var / lib / mongo和/ var / log / mongodb

#/var/lib/
drwxr-xr-x.  4 mongod  mongod  4096 Aug  1 14:44 mongo
#/var/log/
drwxr-xr-x.  2 mongod  mongod    50 Aug  1 14:14 mongodb

在其他一些帖子中,人们告诉尝试使用此命令:

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

但没有用户mongodb,我得到了错误:无效用户:'mongodb:mongodb'!

在我的/ etc / passwd文件中,mongo的唯一用户是:

mongod:x:994:992:mongod:/var/lib/mongo:/bin/false

有什么问题?为什么我不能运行mongod.service?

谢谢你的支持。


添加了更多信息:systemctl cat mongod

[root@db tmp]# systemctl cat mongod
# /usr/lib/systemd/system/mongod.service
[Unit]
Description=MongoDB Database Server
Documentation=https://docs.mongodb.org/manual
After=network.target

[Service]
User=mongod
Group=mongod
Environment="OPTIONS=-f /etc/mongod.conf"
EnvironmentFile=-/etc/sysconfig/mongod
ExecStart=/usr/bin/mongod $OPTIONS
ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb
ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb
ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb
PermissionsStartOnly=true
PIDFile=/var/run/mongodb/mongod.pid
Type=forking
# file size
LimitFSIZE=infinity
# cpu time
LimitCPU=infinity
# virtual memory size
LimitAS=infinity
# open files
LimitNOFILE=64000
# processes/threads
LimitNPROC=64000
# locked memory
LimitMEMLOCK=infinity
# total threads (user+kernel)
TasksMax=infinity
TasksAccounting=false
# Recommended limits for mongod as specified in
# https://docs.mongodb.com/manual/reference/ulimit/#recommended-ulimit-settings

[Install]
WantedBy=multi-user.target

mongod.conf

[root@db tmp]# cat /etc/mongod.conf
# ..
# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

# Where and how to store data.
storage:
  dbPath: /var/lib/mongo
  journal:
    enabled: true
#  engine:
#  wiredTiger:

# how the process runs
processManagement:
  fork: true  # fork and run in background
  pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile
  timeZoneInfo: /usr/share/zoneinfo

# network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1  # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.


#security:

#operationProfiling:

#replication:

#sharding:

## Enterprise-Only Options

#auditLog:

#snmp:

/ usr / bin / mongod -f /etc/mongod.conf

[root@db mongodb]# /usr/bin/mongod -f /etc/mongod.conf
about to fork child process, waiting until server is ready for connections.
forked process: 1959
child process started successfully, parent exiting
贝佐尔

由于某种原因,mongod想要该文件夹/data/db并忽略该文件mongod.conf

创建这些文件夹后,如果运行mongod命令(使用sudo),程序将“正确”启动。但是,如果我重新启动系统,该服务将在启动时失败,并继续出现问题。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

无法启动mongod服务

来自分类Dev

无法在CentOS 7上启动Postgresql服务

来自分类Dev

无法在CentOS 7上启动MongoDB 3.0.2服务

来自分类Dev

无法在centos 7服务器上启动Elasticsearch

来自分类Dev

dnsmasq无法在CentOS 7上启动dhcp服务器

来自分类Dev

无法在Centos Docker映像上启动ssh服务

来自分类Dev

MongoDB 3.2.9无法作为CentOS上的服务启动

来自分类Dev

.desktop文件不可在centos8上执行

来自分类Dev

在centos8上没有更多的“ ident”命令了吗?

来自分类Dev

尝试构建 Centos8 rootfs 和 docker 映像似乎挂在所需的用户交互上,无法访问

来自分类Dev

无法在 Ubuntu 16.04 LTS 上启动 mongod.service

来自分类Dev

如何在CentOS中使用其他参数执行“服务mongod启动”?

来自分类Dev

Tor隐藏服务设置无法允许tor.service在CentOS / Fedora上启动

来自分类Dev

在CentOS7上重新启动服务后无法连接到工件

来自分类Dev

CentOS8 Nginx:[emerg] bind()失败(99:无法分配请求的地址)

来自分类Dev

Centos8,以sudo权限运行gtk程序:无法打开显示::0

来自分类Dev

无法在CentOS 7上启动MongoDB 3.2.1

来自分类Dev

Elasticsearch无法在centos上启动,权限被拒绝

来自分类Dev

无法在centos 7上启动nginx

来自分类Dev

MySQL Daemon无法在centos上启动

来自分类Dev

无法在双启动Windows / CentOS 8(LVM + LUKS)上安装GRUB

来自分类Dev

Saxon-C CentOS8编译

来自分类Dev

在python Centos8中实现json

来自分类Dev

Jetty 8无法在AWS EC2服务器上启动Java Web App

来自分类Dev

启动 mongod 服务的 Ansible 任务永远挂起

来自分类Dev

无法在计算机“。”上启动服务。

来自分类Dev

无法使用配置文件启动mongod

来自分类Dev

sudo service mongod start:mongod:无法识别的服务

来自分类Dev

mongod:无法识别的服务,mongod.service已经存在

Related 相关文章

  1. 1

    无法启动mongod服务

  2. 2

    无法在CentOS 7上启动Postgresql服务

  3. 3

    无法在CentOS 7上启动MongoDB 3.0.2服务

  4. 4

    无法在centos 7服务器上启动Elasticsearch

  5. 5

    dnsmasq无法在CentOS 7上启动dhcp服务器

  6. 6

    无法在Centos Docker映像上启动ssh服务

  7. 7

    MongoDB 3.2.9无法作为CentOS上的服务启动

  8. 8

    .desktop文件不可在centos8上执行

  9. 9

    在centos8上没有更多的“ ident”命令了吗?

  10. 10

    尝试构建 Centos8 rootfs 和 docker 映像似乎挂在所需的用户交互上,无法访问

  11. 11

    无法在 Ubuntu 16.04 LTS 上启动 mongod.service

  12. 12

    如何在CentOS中使用其他参数执行“服务mongod启动”?

  13. 13

    Tor隐藏服务设置无法允许tor.service在CentOS / Fedora上启动

  14. 14

    在CentOS7上重新启动服务后无法连接到工件

  15. 15

    CentOS8 Nginx:[emerg] bind()失败(99:无法分配请求的地址)

  16. 16

    Centos8,以sudo权限运行gtk程序:无法打开显示::0

  17. 17

    无法在CentOS 7上启动MongoDB 3.2.1

  18. 18

    Elasticsearch无法在centos上启动,权限被拒绝

  19. 19

    无法在centos 7上启动nginx

  20. 20

    MySQL Daemon无法在centos上启动

  21. 21

    无法在双启动Windows / CentOS 8(LVM + LUKS)上安装GRUB

  22. 22

    Saxon-C CentOS8编译

  23. 23

    在python Centos8中实现json

  24. 24

    Jetty 8无法在AWS EC2服务器上启动Java Web App

  25. 25

    启动 mongod 服务的 Ansible 任务永远挂起

  26. 26

    无法在计算机“。”上启动服务。

  27. 27

    无法使用配置文件启动mongod

  28. 28

    sudo service mongod start:mongod:无法识别的服务

  29. 29

    mongod:无法识别的服务,mongod.service已经存在

热门标签

归档