Thursday, 28 April 2022

MongoDB locally on Ubuntu 20.04 code=exited, status=14

 


$ sudo chown mongodb:mongodb /tmp/mongodb-27017.sock $ sudo systemctl status mongod $ sudo systemctl start mongodb Failed to start mongodb.service: Unit mongodb.service is masked. $ sudo systemctl unmask mongodb Removed /etc/systemd/system/mongodb.service. $ sudo systemctl start mongodb Job for mongodb.service failed because the control process exited with error code. See "systemctl status mongodb.service" and "journalctl -xe" for details.


$ sudo service mongod stop
$ sudo apt-get purge mongodb-org*
$ sudo rm -r /var/log/mongodb
$ sudo rm -r /var/lib/mongodb
$ sudo apt-get install -y mongodb-org

$ sudo systemctl start mongod
$ sudo systemctl status mongod
● mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
     Active: active (running) since

No comments:

Post a Comment