{"t":{"$date":"2022-08-25T12:45:23.666+07:00"},"s":"E", "c":"NETWORK", "id":23024, "ctx":"initandlisten","msg":"Failed to unlink socket file","attr":{"path":"/tmp/mongodb-27017.sock","error":"Operation not permitted"}}
To fix this error is very easy, you just need to go to /tmp folder, and remove the mongodb-27017.sock file, then you can restart the mongo DB in terminal again. When you remove the mongodb-27017.sock file, you need to take care about the file owner and permission. If only root user can remove this file, then you need to change to the root user to remove it.
# rm /tmp/mongodb-27017.sockRestart mongod service.
# systemctl restart mongodThat's it.