mozilla-services / heka

DEPRECATED: Data collection and processing made easy.
http://hekad.readthedocs.org/
Other
3.4k stars 531 forks source link

How to start heka as service in windows 7 #1963

Open vpriyada opened 7 years ago

vpriyada commented 7 years ago

I have built the windows package for heka. As of now if I start heka using hekad from comamnd prompt heka starts as expected. How do I start heka as a service in windows? If i create heka as a service using windows service utility and start the service I get the error "The service did not respond in a timely fashion". Can any of you share your experiences in running heka as service in windows

tianlin commented 7 years ago

I do it with nssm(https://nssm.cc/) call nssm.exe install hekad hekad call nssm.exe set hekad Application "%BIN_DIR%\hekad.exe" call nssm.exe set hekad AppDirectory "%BIN_DIR%" call nssm.exe set hekad AppParameters -config=\"%CONF_DIR%\hekad.toml\" call nssm.exe set hekad AppStopMethodSkip 0 call nssm.exe set hekad AppStopMethodConsole 10000 call nssm.exe set hekad AppStopMethodWindow 1500 call nssm.exe set hekad AppStopMethodThreads 10000 call nssm.exe set hekad AppStdout "%BASE_DIR%\log\hekad.stdout" call nssm.exe set hekad AppStderr "%BASE_DIR%\log\hekad.stderr" call nssm.exe start hekad