[SERVER-3162] old lock file error even when using journaling Created: 27/May/11 Updated: 04/Jun/13 Resolved: 19/Aug/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Stability |
| Affects Version/s: | 1.8.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | pablo platt | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
ubuntu 11.04 64bit running as a vbox guest |
||
| Operating System: | Linux |
| Participants: |
| Description |
|
Mongodb can't start and I'm getting the old lock file error in the log although journaling is enabled journaling is enabled by adding the following to /etc/mongodb.conf: This is the log file: Fri May 27 09:49:13 got kill or ctrl c or hup signal 15 (Terminated), will terminate after current cmd ends |
| Comments |
| Comment by Paul Joey Clark [ 04/Jun/13 ] |
|
FWIW I am getting this with mongodb-server 1:2.0.6-1ubuntu4 on Ubuntu 12.10 running on a 32bit laptop. I had run 'halt' to shutdown the machine, but a few minutes later I saw shutdown had still not completed. Then I had to leave, and when I returned the machine had died due to loss of power. Tue Jun 4 18:33:36 [interruptThread] shutdown: final commit...
I have: Not too concerned about this happening on my dev machine, but I really want to make sure it doesn't happen on live! |
| Comment by Mathias Stearn [ 19/Aug/11 ] |
|
The solution is to use the new --shutdown flag in init scripts for 2.0. I don't think we will be backporting to 1.8.x |
| Comment by Mathias Stearn [ 21/Jun/11 ] |
|
I'm actually working on that now: https://jira.mongodb.org/browse/SERVER-3307. There should be a fix for this in master today. |
| Comment by pablo platt [ 21/Jun/11 ] |
|
"For a long term fix, I'd suggest modifying your init scripts to block on shutdown until the mongod successfully exits." I'm not the only one seeing this problem: That's a serious issue. If there is a power failure mongodb might not start. |
| Comment by Mathias Stearn [ 21/Jun/11 ] |
|
typically the last two lines in the log file after "removeJournalFiles" look like this: Tue Jun 21 11:16:35 [interruptThread] shutdown: removing fs lock... The fact that you don't have those implies that the mongod was killed before it got a chance to remove the lock file. It looks like you rebooted the server and mongod got the TERM signal, but your shutdown process didn't wait for it to finish before sending the KILL signal. Judging by where it failed it should be safe to just remove the lock file and continue (if you haven't already). For a long term fix, I'd suggest modifying your init scripts to block on shutdown until the mongod successfully exits. |