...
After install mongod as a service in Window 7 64bit, when trying to start the service it fails to start. This problem starting coming in the 3.x update. Things already done for resolving the issue:- Ran the server as normal executable. The server starts normally and is working fine. (Not as a service) Added config directly to service as arguments eg. D:\servers\db\mongodb\bin\mongod.exe --dbpath=D:\servers\db\mongodb\data --logpath=D:\servers\db\mongodb\log\mongo.log --logappend --service The service still fails The same config checked with mongo 2.x works both as a service as well as a standalone server Tired server with fresh location for data. Still fails as a service. No mongo logs are recorded when the server is run as a service and it fails Window returns an error The service is not responding to the control function. More help is available by typing NET HELPMSG 2186.
ramon.fernandez commented on Thu, 18 Jun 2015 19:33:00 +0000: A service run from the CLI will run as the logged in user, whereas when run as a service it will run under the LocalSystem account. While the latter has extensive privileges, if your user has admin access it is possible to configure permissions/ACLs such that the user has all the right permissions but the LocalSystem user doesn't. We have not been able to reproduce this on our end. You can try using different, new directories for dbpath and logpath created from Explorer (as if you're using Cygwin permissions can get messed up), and examining carefully the permissions/ACLs of all the directories involved. Since we're not able to find evidence of a bug in the SERVER I'm closing this ticket, as the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group. Regards, Ramón. cosmosgenius commented on Fri, 5 Jun 2015 20:08:46 +0000: I still don't understand about the permission stuff? The server runs fine when run from the CLI. How does the permission effect the running of mongod Server when run as a service and though CLI? cosmosgenius commented on Fri, 5 Jun 2015 20:06:33 +0000: The output of sc qc MongoDB is [SC] QueryServiceConfig SUCCESS SERVICE_NAME: Mongodb TYPE : 10 WIN32_OWN_PROCESS START_TYPE : 2 AUTO_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : D:\servers\db\mongodb\bin\mongod.exe --dbpath D:\servers\db\mongodb\data --logpath D:\servers\db\mongodb\log\mongo.log --logappend --service LOAD_ORDER_GROUP : TAG : 0 DISPLAY_NAME : MongoDB DEPENDENCIES : SERVICE_START_NAME : LocalSystem I did the command you suggested, the result is the same the service does not start here is the output of sc qc after the service installation. [SC] QueryServiceConfig SUCCESS SERVICE_NAME: MongoDB TYPE : 10 WIN32_OWN_PROCESS START_TYPE : 2 AUTO_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : D:\servers\db\mongodb\bin\mongod.exe --dbpath=D:\servers\db\mongodb\data --logpath=D:\servers\db\mongodb\log\mongo.log --logappend --service LOAD_ORDER_GROUP : TAG : 0 DISPLAY_NAME : MongoDB DEPENDENCIES : SERVICE_START_NAME : LocalSystem mark.benvenuto commented on Fri, 5 Jun 2015 19:42:25 +0000: To help me understand the issue, please run the follow as administrator. sc.exe qc MongoDB If there are no logs, then MongoDB likely cannot open the log file due to a permission issue. Also, try installing the service as D:\servers\db\mongodb\bin\mongod.exe --dbpath=D:\servers\db\mongodb\data --logpath=D:\servers\db\mongodb\log\mongo.log --logappend --install cosmosgenius commented on Fri, 5 Jun 2015 19:00:16 +0000: It fails on step number 5 net start Mongodb Is there any drastic change from 2.x to 3.x in windows service? 2.x works fine with the same steps and same config file 3.x fails only as a service. If i try to run 3.x with the same config file from CLI it runs as expected. What kind of permission would be required for windows service? For Note i am running all operation under a user with admin access ramon.fernandez commented on Fri, 5 Jun 2015 17:57:10 +0000: cosmosgenius, can you please check the instructions for installing MongoDB on Windows and pinpoint at which step things fail to work? I'm guessing a permission issue, but it could also be using the wrong syntax; have you tried using "--dbpath ..." as opposed to "--dbpath=..."? That is, replacing the "=" above with " "?
1. Install mongod as a service in window with any config. 2. Try to start the mongodb service using "net start mongodb"