Problem Installing MongoDB as a Windows Service in Windows 8

63 views
Skip to first unread message

Ray Huang

unread,
Apr 18, 2014, 12:18:30 AM4/18/14
to mongod...@googlegroups.com
I've followed the instructions on the Official Site and other blog posts, but it seems I can't create the Windows Service in Windows 8.  I get no feed when I execute this command at the command prompt as Administrator:

C:\MongoDB\bin\mongod.exe --config "C:\MongoDB\mongod.cfg" --install --serviceName "MongoDB"

Anyone have any ideas or helpful suggestions?  Thanks.

Ashley Buss

unread,
Apr 20, 2014, 10:13:21 AM4/20/14
to mongod...@googlegroups.com
Ray,

I am having the same problem on Windows 8.1 with all the latest patches from Microsoft. If I step back to 2.4.10 Windows 64 bit it installs the Windows Service correctly as per the documentation on my Personal Computer but if I use the 2.6.0 it will not install a Windows Service. I even tried sc create "MongoDB" binpath="c\mongo\bin\mongod.exe" and entered the optional parameters in the Computer Management > Services and Applications > Services but it will still not start. I am sure like you the command works just fine from the command window, and the database is working its just if there is a reboot or you log out the database stops as you would expect. I am sorry that I can't be of direct help but I am having the same problem.

Take care,

Ashley 

Stephen Steneker

unread,
Apr 20, 2014, 6:46:05 PM4/20/14
to mongod...@googlegroups.com
Hi Ashley, Ray,

There is a known issue installing MongoDB 2.6.0 as a service using mongod --install; this is tracked as SERVER-13135 in the MongoDB issue tracker.

There are two workarounds noted on SERVER-13135:
 - manually create the Windows service after installing 2.6.0
 - if you already have an earlier MongoDB version installed as a service (eg. 2.4.10) you can keep the existing service definition and replace with newer MongoDB binaries

FYI, a fix has been committed for the 2.6.1 release. There is also a pending docs change to include an obvious note about this defect as well as the manual workaround instructions.

Regards,
Stephen

Ray Huang

unread,
Apr 23, 2014, 5:15:38 PM4/23/14
to mongod...@googlegroups.com
Hi Ashely, Stephen,

Thanks for the follow-up, Stephen.  I found your other post on the forum and figured it out.  I have a complete write-up on what on did here as well.

Stephen Steneker

unread,
Apr 23, 2014, 6:03:10 PM4/23/14
to mongod...@googlegroups.com
On Thursday, 24 April 2014 07:15:38 UTC+10, Ray Huang wrote:
Hi Ashely, Stephen,

Thanks for the follow-up, Stephen.  I found your other post on the forum and figured it out.  I have a complete write-up on what on did here as well.

Hi Ray,

Thanks for the write-up.

FYI, there is now a note on this issue with the workaround instructions in the manual:

Regards,
Stephen
Reply all
Reply to author
Forward
0 new messages