My mongodb server failing to start/restart

Check the log now.

If you ran mongod as root earlier then some files may have been created with root permissions (why I said to run it with sudo -u mongodb)

You may have permissions that need to be reset on the data/log dirs and mongo socket.

chown -R mongodb:mongodb /var/lib/mongodb
chown -R mongodb:mongodb /var/log/mongodb
chown mongodb:mongodb /tmp/mongo*.sock
2 Likes