0

Well i've start learning mongodb from today well after a while working and learning the basic of mongo i could not connect to mongo db anymore

when i get the status of the mongo.service

× mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2022-06-03 22:44:23 +0430; 7min ago
       Docs: https://docs.mongodb.org/manual
   Main PID: 23895 (code=exited, status=14)
        CPU: 626ms

Jun 03 22:44:22 user systemd[1]: Started MongoDB Database Server.
Jun 03 22:44:23 user systemd[1]: mongod.service: Main process exited, code=exited, status=14/n/a
Jun 03 22:44:23 user systemd[1]: mongod.service: Failed with result 'exit-code'.

well i searched in google and I've found following solutions

~ sudo chown -R mongodb:mongodb /var/log/mongodb
~ sudo chown -R mongodb:mongodb /tmp/mongodb-27017.sock
~ sudo systemctl restart mongod.service 

Also the following command returns nothing

~ netstat -an | grep 27017

I tried to reinstall the mongo-org package but still does not work :(

One more thing... i have not edit the /etc/mongo.conf

0 Answers0