I have installed Mongo 7.0 Community on my recently updated Droplet Ubuntu 18 -> 20. Following the instrctions from here https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-20-04.
when running the sudo systemctl status mongod
command I get
mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2023-09-07 19:35:20 UTC; 6s ago
Docs: https://docs.mongodb.org/manual
Process: 48528 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=14)
Main PID: 48528 (code=exited, status=14)
There were some SO that referred to changing the permissions on /var/lib/mongo
I have tried that as well to no avail.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
This may have not been the correct way to fix this but it worked for me. I deleted everything so don’t do this if you’re upgrading/ don’t have a backup. I didn’t need one.
Then started again with the directions from the post.
You can find more detailed information about the error in the MongoDB log files. By default, MongoDB logs to
/var/log/mongodb/mongodb.log
.You can view the log using a command like this:
Look for any error messages or stack traces that may provide more context about what went wrong during startup.
netstat
orss
command to check for processes listening on MongoDB’s port (default is 27017):Check for available disk space: MongoDB may fail to start if there isn’t enough disk space available on your Droplet. Check the available disk space using the
df
command:Restart MongoDB: Try restarting MongoDB to see if it resolves the issue:
Hope that this helps!
Heya,
From that information alone it would be very hard to pinpoint the exact issue.
Check your Error log and see what it say when you try to start your Mongo service. It should give a more detailed error and reason why this is happening.