You started mongodb server, but No matter what. However, when you run sudo status mongodb again, you’ll get mongodb stop/waiting instead of mongodb start/running
Note: This condition is largely due to an unclean shutdown, and results in the creation of a lockfile /var/lib/mongodb/mongod.lock
The fix is a quick two-step process as follows:
Remove the lockfile. Run the repair script. This is accomplished as follows: