Environment: centos 7 mongodb 2.6
Question:
Mongodb is installed and running.
If you restart this server, it should be added to auto start and Mongo should be auto start, but it didn't run, so I checked it.
/var/lib/mongo local could not be opened
This error message did not start.
I was testing it, so I boldly deleted all the contents of the folder, so it started.
But I don't want to do this when I actually do service, so I'd like to know a fundamental solution.
In the case of mongodb, when the server is restarted, does it not just restart? How can I restart mongodb after restarting the server... Please give me an answer.
mongodb linux
This is the self-answer I looked for while waiting for your answer.
The workaround is to delete the /var/lib/mongo/mongod.lock file After mongod ---repair, restart mongod and it will work normally.
However, I don't know why I have to do this yet. If there is anyone who knows in more detail, please give me an additional answer.
© 2024 OneMinuteCode. All rights reserved.