Job for mongod.service failed because the control process exited with error code. See "systemctl status mongod.service" and "journalctl -xe" for details

For me its was the permission conflict on the sock file /tmp/mongodb-27017.sock

/tmp/mongodb-27017.sock was owned by root:root while mongod was not which cause permission denied error.
a quick fix was to
rm -rf /tmp/mongodb-27017.sock
and the rum
systemctl restart mongod

1 Like