-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 #15159
Comments
To avoid duplicating issues, I will append to this ticket. A coworker and I are also encountering this same issue in pretty much the exact same manner as @markburgessstl here and #15134. We attempted to follow the recommended "gitea migrate" commandlet metioned in #15134 but to no avail. Log:
This is running on a Windows Server 2016 machine. We are trying to fix our original problem see in #14167. |
hmm... This is very strange... just testing on linux here I can't see a reason why the SVC manager isn't being informed of a successful startup correctly. I guess it might be reasonable to set: [server]
...
STARTUP_TIMEOUT=30s and see if that improves things - but it doesn't look like there is a significant delay in the startup so it may simply delay the problem for 30 seconds. Are you able to compile gitea? If so it may be reasonable to add some logging in to the SVC handler. |
I tried the STARTUP_TIMEOUT but it didn't make any difference. |
Fine: https://eldritchkitty.com/~andrew/gitea-915748a93-windows-4.0-amd64.exe Is a build of: https://github.com/go-gitea/gitea/compare/release/v1.14...zeripath:logging-for-15159?expand=1 Using:
It should match the detached signature: https://eldritchkitty.com/~andrew/gitea-915748a93-windows-4.0-amd64.exe.asc which I will copy below:
Which is signed by my gpg key attached this account (and elsewhere) and can be obtained from: https://github.com/zeripath.gpg If you do not wish to check the signature. The file should have the sha256sum:
|
Awesome, thanks for the work. We will try this tomorrow morning and give you feedback (and logs) on what happens if there is no change. |
zeripath, thank you for the special build. I ran it this morning, and as expected it timed out after a few minutes. The log is attached. |
Our log as well: |
I can't see any log line saying starting SVC handler there and there should be 4 inform cleanups called but it looks like there's only two. This is weird and I am suspicious that something has unhitched this functionality - which is great because I don't completely remember how I got it wired in in the first place and I can't test it myself. |
Ok, no worries. For now, I can just start Gitea manually if needed since it runs fine from the command line (just not as a service). Let me know if you, or any other contributor/maintainer needs any more details from my side. |
OK lets try: https://eldritchkitty.com/~andrew/gitea-e5e9c67a03f4-windows-4.0-amd64.exe
sha256sum:
This adds some more logging |
Here's my log. I tried three times to start the service. Windows thinks the service is "starting" or "START_PENDING" Thank you! |
Please could you set This time it looks like we're getting the inform cleanups but I'm not seeing the new logging statements I put in. In particular I should see something like Graceful manager starting up logged at error level. |
But... I do see this:
That means that gitea does think it's telling the SVC host it's running. |
Yes, it thinks that but that's not happening. |
My apologies, Windows Server 2019*. |
agh! I think I've found the issue! |
gitea/modules/graceful/manager_windows.go Lines 76 to 81 in f5b6dc9
The |
This is a regression from #14263 |
…teractive sessions Unfortunately go-gitea#14623 changed from the deprecated IsInteractiveSession to IsWindowsService without recognising that they are the complement of each other. This means that Windows SVC control is not working correctly. This PR adds some Tracing statements but also fixes the bug. Fix go-gitea#15159 Signed-off-by: Andrew Thornton <art27@cantab.net>
…teractive sessions (go-gitea#15210) Backport go-gitea#15210 Unfortunately go-gitea#14623 changed from the deprecated IsInteractiveSession to IsWindowsService without recognising that they are the complement of each other. This means that Windows SVC control is not working correctly. This PR adds some Tracing statements but also fixes the bug. Fix go-gitea#15159 Signed-off-by: Andrew Thornton <art27@cantab.net>
Excellent work, thank you very much for the PR! To prevent this issue in the future, could we add a test to ensure the server will run as a service? I'm not a Go developer nor do I know your/the team's environment, so I don't know how feasible this would be. I know Github has Actions, so could it be done there? |
We don't run tests on Windows - Windows isn't free - and I'm not certain of how we would test this reliably as in almost all testing scenarios you wouldn't actually have the thing attach to the SVC host anyway. The particular bug is unlikely to be replicated in any case. All I can say is that we need people to test the RCs like you have done, bear with us if we find problems, and help us with logging etc. This isn't that different from any other debugging situation. |
Understandable. I looked more into GitHub Actions as I was going to counter with that, but it doesn't yet allow services on Windows nor MacOS, only Linux. Regardless, thought I'd give it a shot! Thanks for the clarification. |
…e sessions (#15210) Unfortunately #14623 changed from the deprecated IsInteractiveSession to IsWindowsService without recognising that they are the complement of each other. This means that Windows SVC control is not working correctly. This PR adds some Tracing statements but also fixes the bug. Fix #15159 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
…e sessions (#15210) (#15211) Backport #15210 Unfortunately #14623 changed from the deprecated IsInteractiveSession to IsWindowsService without recognising that they are the complement of each other. This means that Windows SVC control is not working correctly. This PR adds some Tracing statements but also fixes the bug. Fix #15159 Signed-off-by: Andrew Thornton <art27@cantab.net>
Hey, since this is now closed, can @markburgessstl and I get a built exe with these changes just to cover us until the official release? Thanks. |
Once the build is done, it should be available (for 1.14) at https://dl.gitea.io/gitea/1.14 |
…teractive sessions (go-gitea#15210) Unfortunately go-gitea#14623 changed from the deprecated IsInteractiveSession to IsWindowsService without recognising that they are the complement of each other. This means that Windows SVC control is not working correctly. This PR adds some Tracing statements but also fixes the bug. Fix go-gitea#15159 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Gitea does not start up when running as a Windows service. "The service did not respond to the start or control request in a timely fashion" . I have set the registry option ServicesPipeTimeout to 240000 which is 4 minutes. The gitea.exe process can be seen in the task manager, but it eventually dies.
Running gitea web, it starts up just fine.
Version 1.13.6 starts up fine as a service on the same machine.
gitea.log.txt
app.ini.txt
The text was updated successfully, but these errors were encountered: