[Solved] Mongodb Error: Failed to start mongodb.service: Unit mongodb.service is masked.

error:

rico@ubuntu:/var/lib/mongodb$ sudo service mongodb start
Failed to start mongodb.service: Unit mongodb.service is masked.

Solution:

rico@ubuntu:/var/lib/mongodb$ sudo chown -R mongodb:mongodb /var/lib/mongodb
rico@ubuntu:/var/lib/mongodb$ sudo systemctl start mongod

Similar Posts:

Leave a Reply

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