简体   繁体   English

在Ubuntu上启动mongod.service失败

[英]Failure with start mongod.service on Ubuntu

I try to start service with mongo and get an error: 我尝试使用mongo启动服务并收到错误:

* mongod.service - MongoDB Database Server
   Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-04-12 12:55:29 MSK; 9s ago
     Docs: https://docs.mongodb.org/manual
  Process: 15162 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=1/FAILURE)
 Main PID: 15162 (code=exited, status=1/FAILURE)

Apr 12 12:55:29 mx systemd[1]: Started MongoDB Database Server.
Apr 12 12:55:29 mx systemd[1]: mongod.service: Main process exited, code=exited, status=1/FAILURE
Apr 12 12:55:29 mx systemd[1]: mongod.service: Failed with result 'exit-code'.

If I start mongod by manual, all works good. 如果我通过手动启动mongod,一切都很好。

mongod.service: mongod.service:

[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target

mongod.config: mongod.config:

# mongod.conf

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

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

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

# network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1


# how the process runs
processManagement:
  timeZoneInfo: /usr/share/zoneinfo

I've set permissions for /var/lib/mongodb and /var/log/mongodb/mongod.log 我为/ var / lib / mongodb和/var/log/mongodb/mongod.log设置了权限

  • chown mongodb:mongodb /var/lib/mongodb -R
  • chown mongodb:mongodb /var/log/mongodb/mongod.log -R

What's wrong? 怎么了? What should I do? 我该怎么办? Any ideas? 有任何想法吗?

I've solved my porblem. 我已经解决了我的问题。 The solution is very simple, but I had a lot of headace. 解决方案很简单,但我有很多头疼。 Free disk space. 可用磁盘空间。 I have no anought free disk space in my server. 我的服务器中没有可用的可用磁盘空间。 Thats it! 而已!

I hope this will be helpfull for anybody... 我希望这对任何人都有帮助......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法启动 mongod.service:在 Ubuntu 20.04 上找不到单元 mongod.service - Failed to start mongod.service: Unit mongod.service not found on Ubuntu 20.04 无法在Ubuntu 16.04 LTS上启动mongod.service - Failed to start mongod.service on Ubuntu 16.04 LTS mongod.service 启动失败:未找到 Unit mongod.service - Failed to start mongod.service: Unit mongod.service not found 启动 mongod.service 失败:找不到单元 mongod.service,找不到 mongod.service? - Failed to start mongod.service: Unit mongod.service not found., unable to find the mongod.service? Mongod 未启动:mongod.service:失败,结果为“信号” - Mongod does not start: mongod.service: Failed with result 'signal' Mongod 未启动(mongod.service:失败,结果为“信号”) - Mongod does not start (mongod.service: Failed with result 'signal') Mongodb 4:无法启动mongod.service:找不到单元mongod.service - Mongodb 4: Failed to start mongod.service: Unit mongod.service not found 无法重新启动mongod.service:找不到单元mongod.service - Failed to restart mongod.service : Unit mongod.service not found 无法重新启动mongod.service:找不到单元mongod.service - Failed to restart mongod.service: Unit mongod.service not found 单元 mongod.service 输入失败 state。 当尝试在 Amazon Linux 中启动 mongod - Unit mongod.service entered failed state. When try to start mongod in Amazon Linux
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM