title: Mongodb (code=exited, status=14) failed but not any clear errors
body: <p>I have VPS with <code>Ubuntu 18.04 LTS</code> with <code>Mongodb</code> and my script was working until 3 days ago fine, but suddenly my hosting server was rebooted (I purchased it from a hosting company) and when my server was boot again, I saw my website was not working and did not connect to database. The result of <code>systemctl status mongod</code> is:</p>
  <pre><code> mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2020-10-29 22:47:35 +0330; 17h ago
       Docs: https://docs.mongodb.org/manual
    Process: 2800 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=14)
   Main PID: 2800 (code=exited, status=14)
  
  Oct 29 22:47:35 MYHOSTNAME systemd[1]: Started MongoDB Database Server.
  Oct 29 22:47:35 MYHOSTNAME systemd[1]: mongod.service: Main process exited, code=exited, status=14/n/a
  Oct 29 22:47:35 MYHOSTNAME systemd[1]: mongod.service: Failed with result 'exit-code'.
  </code></pre>
  <p>When I restart the service, nothing happens. I checked <code>/var/log/mongodb/mongod.log</code> and this is the log:</p>
  <pre><code>2020-10-30T15:53:39.251+0330 I REPL     [signalProcessingThread] Stepping down the ReplicationCoordinator for shutdown, waitTime: 10000ms
  2020-10-30T15:53:39.458+0330 I CONTROL  [signalProcessingThread] Shutting down the LogicalSessionCache
  2020-10-30T15:53:39.460+0330 I NETWORK  [signalProcessingThread] shutdown: going to close listening sockets...
  2020-10-30T15:53:39.460+0330 I NETWORK  [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
  2020-10-30T15:53:39.461+0330 I NETWORK  [signalProcessingThread] Shutting down the global connection pool
  2020-10-30T15:53:39.461+0330 I STORAGE  [signalProcessingThread] Shutting down the PeriodicThreadToAbortExpiredTransactions
  2020-10-30T15:53:39.462+0330 I REPL     [signalProcessingThread] Shutting down the ReplicationCoordinator
  2020-10-30T15:53:39.462+0330 I SHARDING [signalProcessingThread] Shutting down the ShardingInitializationMongoD
  2020-10-30T15:53:39.463+0330 I COMMAND  [signalProcessingThread] Killing all open transactions
  2020-10-30T15:53:39.463+0330 I -        [signalProcessingThread] Killing all operations for shutdown
  2020-10-30T15:53:39.463+0330 I NETWORK  [signalProcessingThread] Shutting down the ReplicaSetMonitor
  2020-10-30T15:53:39.463+0330 I CONTROL  [signalProcessingThread] Shutting down free monitoring
  2020-10-30T15:53:39.464+0330 I CONTROL  [signalProcessingThread] Shutting down free monitoring
  2020-10-30T15:53:39.466+0330 I FTDC     [signalProcessingThread] Shutting down full-time data capture
  2020-10-30T15:53:39.466+0330 I FTDC     [signalProcessingThread] Shutting down full-time diagnostic data capture
  2020-10-30T15:53:39.470+0330 I STORAGE  [signalProcessingThread] Shutting down the HealthLog
  2020-10-30T15:53:39.471+0330 I STORAGE  [signalProcessingThread] Shutting down the storage engine
  2020-10-30T15:53:39.472+0330 I STORAGE  [signalProcessingThread] WiredTigerKVEngine shutting down
  2020-10-30T15:53:39.472+0330 I STORAGE  [signalProcessingThread] Shutting down session sweeper thread
  2020-10-30T15:53:39.472+0330 I STORAGE  [signalProcessingThread] Finished shutting down session sweeper thread
  2020-10-30T15:53:39.648+0330 I STORAGE  [signalProcessingThread] shutdown: removing fs lock...
  2020-10-30T15:53:39.648+0330 I -        [signalProcessingThread] Dropping the scope cache for shutdown
  2020-10-30T15:53:39.648+0330 I CONTROL  [signalProcessingThread] now exiting
  2020-10-30T15:53:39.648+0330 I CONTROL  [signalProcessingThread] shutting down with code:0
  </code></pre>
  <p>I did <code>telnet localhost 27017</code> and it works fine and connects (it's closed for remote connections).</p>
  <p>I removed <code>/tmp/mongodb-27017.sock</code> manually, checked ownership of <code>/var/log/mongodb</code> and <code>/var/lib/mongodb</code> and everything is correct. I also did <code>chown -R mongodb:mongodb</code> on both folders to correct them if any incorrect ownership has happened during sudden reboot, but nothing worked.</p>
  <p>By the way, when I run <code>/usr/bin/mongod --config /etc/mongod.conf</code> command, my website runs, I can login to my user account and etc. I am currently doing this in a <code>screen</code> to run my website currently, but I do not know how to find the problem and fix it.</p>
  <p>Would you help me to check what's wrong with MongoDB and how to fix it? Also like <code>nginx -t</code> that tests config file, is there any similar command? I read <code>man mongod</code> but found nothing.</p>
  <p><strong>edited to add <code>/etc/mongodb.conf</code> contents</strong>:</p>
  <pre><code># 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
  
  security:
    authorization: enabled
  
  #operationProfiling:
  
  #replication:
  
  #sharding:
  
  ## Enterprise-Only Options:
  
  #auditLog:
  
  #snmp:
  </code></pre>