A few notes to save you some headaches while installing MongoDB as a service on Windows… It seems that it’s common to encounter the results below, so these are some things to remember.
Sat May 01 11:52:40 dbexit:
Sat May 01 11:52:40 shutdown: going to close listening sockets…
Sat May 01 11:52:40 shutdown: going to flush oplog…
Sat May 01 11:52:40 shutdown: going to close sockets…
Sat May 01 11:52:40 shutdown: waiting for fs preallocator…
Sat May 01 11:52:40 shutdown: closing all files…
Sat May 01 11:52:40 closeAllFiles() finished
Sat May 01 11:52:40 dbexit: really exiting now
- Create the data directory, by default that’s c:\data\db\
- It’s easy to forget, so remember to run cmd as Administrator! You won’t get UAC warnings, just the failures above.
- Install with the full path “c:\Program Files\mongodb-win32-x86_64-1.4.2\bin\mongod.exe” –install. If you don’t, the registry setting for the service won’t include the full path
- If you install from a path with spaces (i.e., Program Files) you’ll need to make sure it’s quoted in the registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MongoDB\ImagePath)
More on MongoDB in a later post…
John,
I suggest that you try out mongo 1.6.1. Windows service support has improved greatly. The 10gen guys have been improving windows support and I submitted a few fixes.
Unfortunately, mongos does not have windows service support. I will be fixing that.
If you find any other problems with mongodb on windows, open a bug, and let me know about it. Even if I don’t fix it myelf I’ll vote for if its legitimate.
Justin
Good call on the regedit
Thanks John! This is helping me to install Mongo on a new server!
MongoDB is the best document oriented database ever!