-
Notifications
You must be signed in to change notification settings - Fork 691
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 can't stop without an error. #1352
Comments
Signed-off-by: Dinifarb <andreas.vogt89@bluewin.ch>
…top error every time Signed-off-by: Dinifarb <andreas.vogt89@bluewin.ch>
I have looked into that again and I was able to reproduce it with v0.24.0. But the stop error was not thrown every time just here and there. So I was thinking again of what I mentioned in #1258. Maybe sometimes the main thread/goroutine finishes before the subroutine which does the communication to the windows API has completed. To proof my point I have added a delay after the stop signal is sent to the main thread in the Execute func here: https://github.com/DiniFarb/windows_exporter/blob/aebd6df1e21760d887dd26041a402f14c5d79c33/pkg/initiate/initiate.go#L23-L46 with this delay of 100ms the stop error is thrown each time the service is stopped. I think the problem lies in that the I am running out of time right now but I can dig into this further in a few days .. well next year ^^ |
… in main() Signed-off-by: Dinifarb <andreas.vogt89@bluewin.ch>
Signed-off-by: Dinifarb <andreas.vogt89@bluewin.ch>
Signed-off-by: Dinifarb <andreas.vogt89@bluewin.ch>
@DiniFarb this issue can be close, right? |
Signed-off-by: Dinifarb <andreas.vogt89@bluewin.ch>
Signed-off-by: Dinifarb <andreas.vogt89@bluewin.ch>
With windows_exporter 0.24.0 we have again the same Issue like:
#1258
When I try to stop the windows_exporter service (v0.24.0), it always returns an error:
and the Process is still running in the Background.
The text was updated successfully, but these errors were encountered: