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

error:

[email protected]:/var/lib/mongodb$ sudo service mongodb start
Failed to start mongodb.service: Unit mongodb.service is masked.

Solution:

[email protected]:/var/lib/mongodb$ sudo chown -R mongodb:mongodb /var/lib/mongodb
[email protected]:/var/lib/mongodb$ sudo systemctl start mongod

Similar Posts:

Leave a Reply

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