tottishi05
tottishi05

Reputation: 577

Can I simply delete the mongod.lock file and restart the mongod process?

I use MongoDB 3.0 with WiredTiger engine.
I have a replication set with one primary and one arbiter.
The mongod process of my primary was killed with the signal '9'.
When I restart the mongod process, it gave the log message as below:
Detected unclean shutdown - /data2/mongodb3.0/shard02_2/data/mongod.lock is not empty.
Can I delete the mongod.lock file and restart the mongod process?

Upvotes: 1

Views: 3484

Answers (1)

MrfksIV
MrfksIV

Reputation: 930

I had the same problem. In the end I just removed it from the folder and re-ran mongod and everything worked fine. It just created a new mongod.lock file. However, I am not sure if this is the right way to go about it.

Upvotes: 2

Related Questions