I installed mongodb following this tutorial here, no errors during the installation but when I try to start the mongod server using this command sudo systemctl start mongodb
as the tutorial mentions, i getting this error when i try to check whether it is running using this command sudo systemctl status mongodb
.
● mongodb.service - High-performance, schema-free document-oriented database Loaded: loaded (/etc/systemd/system/mongodb.service; enabled; vendor preset: Active: failed (Result: exit-code) since Rab 2016-06-01 18:04:20 MYT; 4s ago Process: 8241 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (cod Main PID: 8241 (code=exited, status=14) Jun 01 18:04:20 yasinya systemd[1]: Started High-performance, schema-free docume Jun 01 18:04:20 yasinya systemd[1]: mongodb.service: Main process exited, code=e Jun 01 18:04:20 yasinya systemd[1]: mongodb.service: Unit entered failed state. Jun 01 18:04:20 yasinya systemd[1]: mongodb.service: Failed with result 'exit-co lines 1-10/10 (END)
so can anyone tell what is wrong and how I can fix it.
MongoDB installs as a systemd service, which means that you can manage it using standard systemd commands alongside all other sytem services in Ubuntu. To verify the status of the service, type: sudo systemctl status mongodb.
Recently i have solved the same issue. I was unable to find the solution on googled, but i get come clues to, how get figure it out. In my case this issue was related to mongodb-27017.sock file.
Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted
So i have changed the permission of /tmp/mongodb-27017.sock file to default mongodb
user.
sudo chown mongodb /tmp/mongodb-27017.sock sudo chgrp mongodb /tmp/mongodb-27017.sock
After this sudo systemctl status mongodb
working fine and mongodb
is started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With