Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to restart mongod.service: Unit mongod.service not found

Tags:

mongodb

While restart mongodb server using below command. its showing error like : Failed to restart mongod.service: Unit mongod.service not found.

sudo service mongod restart
like image 324
Dilip Kheni Avatar asked Dec 03 '22 12:12

Dilip Kheni


1 Answers

sudo rm /var/lib/mongodb/mongod.lock
mongod --repair
sudo service mongodb start
like image 100
Dilip Kheni Avatar answered Dec 27 '22 03:12

Dilip Kheni