mongod.service: Failed with result 'exit-code' I'm trying to run mongodb server :
sudo systemctl start mongod

this gives me no error, but when I try to check the status, I get error saying :
mua@mua  ~  sudo systemctl status mongod               ✔  2916  14:07:16 

● mongod.service - MongoDB Database Server
   Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: e
   Active: failed (Result: exit-code) since Tue 2021-04-27 14:07:16 +06; 5s ago
     Docs: https://docs.mongodb.org/manual
  Process: 13625 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exite
 Main PID: 13625 (code=exited, status=1/FAILURE)

এপ্রিল 27 14:07:16 mua systemd[1]: Started MongoDB Database Server.
এপ্রিল 27 14:07:16 mua mongod[13625]: {&quot;t&quot;:{&quot;$date&quot;:&quot;2021-04-27T08:07:16.650Z&quot;},&quot;
এপ্রিল 27 14:07:16 mua systemd[1]: mongod.service: Main process exited, code=exit
এপ্রিল 27 14:07:16 mua systemd[1]: mongod.service: Failed with result 'exit-code'
lines 1-11/11 (END)...skipping...
● mongod.service - MongoDB Database Server
   Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2021-04-27 14:07:16 +06; 5s ago
     Docs: https://docs.mongodb.org/manual
  Process: 13625 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=1/FAILURE)
 Main PID: 13625 (code=exited, status=1/FAILURE)

এপ্রিল 27 14:07:16 mua systemd[1]: Started MongoDB Database Server.
এপ্রিল 27 14:07:16 mua mongod[13625]: {&quot;t&quot;:{&quot;$date&quot;:&quot;2021-04-27T08:07:16.650Z&quot;},&quot;s&quot;:&quot;F&quot;,  &quot;c&quot;:&quot;CONTROL&quot;,  &quot;id&quot;:20574,   &quot;ctx&quot;:&quot;main&quot;,&quot;msg&quot;:&quot;Err
এপ্রিল 27 14:07:16 mua systemd[1]: mongod.service: Main process exited, code=exited, status=1/FAILURE
এপ্রিল 27 14:07:16 mua systemd[1]: mongod.service: Failed with result 'exit-code'.
~
~


Here is some details :
MongoDB shell version v4.4.5
Build Info: {
    &quot;version&quot;: &quot;4.4.5&quot;,
    &quot;gitVersion&quot;: &quot;ff5cb77101b052fa02da43b8538093486cf9b3f7&quot;,
    &quot;openSSLVersion&quot;: &quot;OpenSSL 1.1.1  11 Sep 2018&quot;,
    &quot;modules&quot;: [],
    &quot;allocator&quot;: &quot;tcmalloc&quot;,
    &quot;environment&quot;: {
        &quot;distmod&quot;: &quot;ubuntu1804&quot;,
        &quot;distarch&quot;: &quot;x86_64&quot;,
        &quot;target_arch&quot;: &quot;x86_64&quot;
    }
}


Can anyone help me solving this problem ?
Here is the service
 mua@mua  /lib/systemd/system  cat mongod.service   127 ↵  3002  13:28:11 
[Unit]
Description=MongoDB Database Server
Documentation=https://docs.mongodb.org/manual
After=network-online.target
Wants=network-online.target

[Service]
User=mongodb
Group=mongodb
EnvironmentFile=-/etc/default/mongod
ExecStart=/usr/bin/mongod --config /etc/mongod.conf
PIDFile=/var/run/mongodb/mongod.pid
# 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
Looks familiar... If you check your mongod.service file (/lib/systemd/system/mongod.service), there should be line what tells where mongod.pid file is located (PIDFile=/tmp/mongod.pid). That same file (with path) should be found from your /etc/mongod.conf file.
processManagement:
  pidFilePath: /tmp/mongod.pid

Problem is that, after 5 second when you have said 'sudo systemctl start mongod.service', system will check &quot;is there mongod.pid&quot; and because it cannot find it, it will KILL that running mongod-process.