[SERVER-3623] [journal] User Assertion: 13646:stat() failed for file: /data/db/ errno:2 The system cannot find the file specified. Created: 17/Aug/11 Updated: 15/Aug/12 Resolved: 04/Mar/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 2.0.0-rc0 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Minor - P4 |
| Reporter: | Travis Paxton | Assignee: | Tad Marshall |
| Resolution: | Done | Votes: | 0 |
| Labels: | journal | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 7 Enterprise 64-bit, VMware Fusion |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
I'm getting this when I start mongod with the --journal option. Not sure if it's a bug, thanks! [journal] User Assertion: 13646:stat() failed for file: /data/db/ errno:2 The system cannot find the file specified. |
| Comments |
| Comment by Tad Marshall [ 20/Jan/12 ] |
|
For whatever reason (I haven't looked at the code), the mongod.lock file is never deleted on Windows on a clean exit, but it is reduced to zero bytes and this functions the same way that deleted the file works on Linux – it marks the directory as available for a new instance of mongod.exe. So, this isn't a problem and seems to be "by design". |
| Comment by Travis Paxton [ 08/Dec/11 ] |
|
I've attached mongodb_3.log. The assertion error no longer appears, but as Chris pointed out, the mongod.lock file does not get removed. |
| Comment by Tad Marshall [ 08/Dec/11 ] |
|
Most (or maybe even all) Win32 APIs accept the Unix-style path, but the Windows command prompt CMD.EXE doesn't at all. This is because of the legacy of using forward slash as a command line switch, which dates back to TOPS-10, TOPS-20 and CP/M. You may get mixed results with C and C++ APIs. |
| Comment by Mathias Stearn [ 17/Oct/11 ] |
|
have you tried 2.0.0-final |
| Comment by Chris Westin [ 23/Aug/11 ] |
|
Seems to work fine: $ ./mongod It created the lock file and journal directory. It did not remove mongod.lock when I stopped mongod, as it should. |
| Comment by Mathias Stearn [ 23/Aug/11 ] |
|
what if you have an existing but empty C:\data\db? |
| Comment by Chris Westin [ 19/Aug/11 ] |
|
Same as the above on 2.0.0-rc0-pre. |
| Comment by Chris Westin [ 19/Aug/11 ] |
|
I made sure I didn't have a c:\data\db. I commented out dbpath from my config file and started up current 1.9.2 head. I get Fri Aug 19 14:37:44 [initandlisten] exception in initAndListen: 10296 dbpath (/data/db/) does not exist, terminating |
| Comment by Mathias Stearn [ 19/Aug/11 ] |
|
@Chris Are you able to repro this on your Win7 box? Feel free to assign back to me. |
| Comment by Travis Paxton [ 19/Aug/11 ] |
|
Commands executed from c:\mongodb: bin\mongod.exe -vvvvv --journal --logpath mongodb.log --dbpath c:\data\db bin\mongod.exe -vvvvv --journal --logpath mongodb.log |
| Comment by Mathias Stearn [ 18/Aug/11 ] |
|
Could you include the full command line you use to launch mongod both with and without --dbpath? |
| Comment by Travis Paxton [ 18/Aug/11 ] |
|
I have only one drive. I'm launching mongod.exe from c:\mongodb\bin\mongod.exe |
| Comment by Mathias Stearn [ 18/Aug/11 ] |
|
Do you have more than one drive? Which drive is \data\db on? Which drive are you launching mongod from? |
| Comment by Travis Paxton [ 18/Aug/11 ] |
|
I tried the new nightly, but it looks like it's still throwing the assertion error (see mongodb_2.log). The error isn't thrown when I manually set the path. |
| Comment by Travis Paxton [ 17/Aug/11 ] |
|
I'll wait for a new nightly and test it tomorrow, thanks! |
| Comment by Mathias Stearn [ 17/Aug/11 ] |
|
Could you try either rebuilding mongodb with the patch mentioned above or try again with tomorrow's nightlies? |
| Comment by auto [ 17/Aug/11 ] |
|
Author: {u'login': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: localized fix for |
| Comment by Travis Paxton [ 17/Aug/11 ] |
|
It looks like setting the dbpath does fix it. I've uploaded an updated log. I'll go ahead and manually set the dbpath for now. Thanks! |
| Comment by Mathias Stearn [ 17/Aug/11 ] |
|
Hmm, this could be a Windows thing. Could you try using windows-style syntax for --dbpath (c:\data\db)? If that fixes it that will confirm where the bug is and it should be easy to fix. Luckily that assertion is thrown in a block of code that ignores errors because it is an optional optimization. Everything should still work, but you could be missing out on some performance |
| Comment by Travis Paxton [ 17/Aug/11 ] |
|
Eliot: MongoDB does continue to load and it even creates the journaling file under /data/db/journal so it should have read/write access to that location. Mathias: I've uploaded the log with full verbose output. Thanks! |
| Comment by Mathias Stearn [ 17/Aug/11 ] |
|
could you upload the full log file? |
| Comment by Eliot Horowitz (Inactive) [ 17/Aug/11 ] |
|
Do you have a /data/db directory that is readable by the user you're starting mongod with? |