title: Service mongod does not start on Centos8
body: <p>I tried to install mongoDB on Centos8, but when I run the command</p>
  <pre><code>systemctl status mongod.service
  </code></pre>
  <p>I get this error:</p>
  <pre><code>● 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&gt;
  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&gt;
  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.
  </code></pre>
  <p>I tried to check privileges for the folders: /var/lib/mongo and /var/log/mongodb</p>
  <pre><code>#/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
  </code></pre>
  <p>In some other posts, people told to try this command:</p>
  <pre><code>sudo chown -R mongodb:mongodb /var/lib/mongodb/
  </code></pre>
  <p>but in don't have the user mongodb and I get the error: invalid user: 'mongodb:mongodb'!</p>
  <p>In my /etc/passwd file the only user for mongo is this:</p>
  <pre><code>mongod:x:994:992:mongod:/var/lib/mongo:/bin/false
  </code></pre>
  <p>What's the problem?
  Why I cannot run mongod.service?</p>
  <p>Thanks for your support.</p>
  <hr />
  <p>Added more informations:
  <strong>systemctl cat mongod</strong></p>
  <pre><code>[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=&quot;OPTIONS=-f /etc/mongod.conf&quot;
  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
  </code></pre>
  <p><em><strong>mongod.conf</strong></em></p>
  <pre><code>[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:
  </code></pre>
  <p><em><strong>/usr/bin/mongod -f /etc/mongod.conf</strong></em></p>
  <pre><code>[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
  </code></pre>