-
Notifications
You must be signed in to change notification settings - Fork 685
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
The service did not respond to the start or control request in a timely fashion.HELP!!!!! #377
Comments
In your code, |
I am ALSO facing the same issue. |
Hey @brucealthompson. The issue you are facing is because on windows, the operating system will call the executable with some flags that your executable must respond to. |
The package does work. Here's some more info on how we solved the issue you are seeing and why it occurs: https://github.com/borderzero/border0-cli/blob/main/cmd/connector.go#L208-L234 Specifically this part (e.g. passing the service flag value to this library) https://github.com/borderzero/border0-cli/blob/main/cmd/connector.go#L224-L229 |
@adrianosela Thanks for the quick response on this. |
My understanding is for any windows service, the OS will invoke the service's executable with some value of "-service" to start it. And the executable must handle it. If the executable does not handle it by responding appropriately, the operating system will consider it unhealthy/not-started. Those are those "failed to respond" error messages you see. I figured this library would handle control messages appropriately by calling the "Control" function in this library with the value of the flag. I'm not a windows person and I didnt really dive into it as the above worked for me |
I think I get it now. My service application is already handling the -service flag but not all the verbs that go with it (like start and stop). I will try it. |
Well.... IMHO, there is clearly something wrong with kardianos/service having to do with its Windows implementation. |
Final word on this. |
So do you know waht can i do to run the executable as service in Windows ? |
I ended up just creating a small service executable that issues os.Exec() on the executable that I want to run as a service. |
Why can deleting ”
Executable: "C:\\Windows\\System32\\cmd.exe"
“ be successfulExecutable: "C:\\Windows\\System32\\cmd.exe"
will result in error deletion:The service did not respond to the start or control request in a timely fashion.The text was updated successfully, but these errors were encountered: