auto start mongos on windows

余生颓废 提交于 2019-12-11 01:28:50

问题


I have a mongodb server shared by two computers.

I want to auto start the connexion between them when they reboot.

I created a config file for the mongod computer and it works as a windows service now.

I am not able to create a working config file for the mongos computer though.

This is what I tried :

sharding:
    configdb: "192.xxx.50:51213"
systemLog:
    destination: file
    path: "c:\data\log\mongos.log"
processManagement:
    fork: true

And I call it in an administrator command prompt as:

sc.exe create MongoDBS binPath= "C:\Program Files\mongodb\server\3.2\bin\mongos.exe 
--service --config=C:\mongodb\mongos.config"

The service is created.

Then when I start it:

net start MongoDBS

I get this error : The service is not responding to the control function.

来源:https://stackoverflow.com/questions/37843798/auto-start-mongos-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!