-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows Service Cannot Start (ERROR_SERVICE_REQUEST_TIMEOUT) #68
Comments
Thank you @fugolmere, your feedback is very appreciated. I have not possibility to test all that related with Windows. @krysennn Could you handle this issue? |
Hi, My bad ... i will test the code with this: https://github.com/martinlindhe/wmi_exporter/blob/master/exporter.go I will fix it ASAP. |
FYI, I have a fix for this. I should be able to submit a pull request as early as later tonight or tomorrow. I'll explain further details in the pull request comment. |
Hi @krysennn, a PR has been created to make windows version daemonization work. Pls review. BTW, |
@neverland4u i think it's ok, i don't have test it ATM.
I think no, it's not the best solution. |
get the same error: |
Hi team, Observed this on 2008 and win 10 - just used the example from the repository.
master branch
Same happens when trying to control the service with |
get the same error: |
get the same error: |
go version:go version go1.13.3 windows/amd64 |
help,what's the best solution?@krysennn |
Same problem here |
@neverland4u @fugolmere There are news on this? |
@acamilleri @neverland4u @fugolmere
any update for this?? |
Problem
Attempting to start windows service results in a long pause and the following error returned:
I believe this problem is caused by the fact that that the service control manager is expecting a "status" to be returned from the underlying executable it's managing:
source: https://msdn.microsoft.com/en-us/library/windows/desktop/ms685990(v=vs.85).aspx
Solution
If
sc.exe
is desired to be used overnssm.exe
then I believe a more complex solution is required. Specifically a "SERVICE_RUNNING" status will need to be returned back to the windows service control manager.Take a look at the following that appears to effectively perform this action:
https://github.com/kardianos/service/blob/0ab6efe2ea51f0531a8ceaaa33416b3aab844c28/service_windows.go#L167
The text was updated successfully, but these errors were encountered: