Mongodb not starting | failed to start mongod.service: unit mongod.service not found – vetechno

Follow below commands to fix mongodb not starting issue on Ubuntu System and other debian

sudo chown -R mongodb:mongodb /var/log/mongodb
sudo chown -R mongodb:mongodb /var/lib/mongodb
sudo chmod -R 755 /var/lib/mongodb
sudo chmod -R 755 /var/log/mongodb
sudo chown mongodb /tmp/mongodb-27017.sock
sudo chgrp mongodb /tmp/mongodb-27017.sock

Leave a Reply

Your email address will not be published. Required fields are marked *