mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-11 06:16:50 -05:00
The service did not respond to the start or control request in a timely fashion #7072
Closed
opened 2025-11-02 07:15:05 -06:00 by GiteaMirror
·
24 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1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4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#7072
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @markburgessstl on GitHub (Mar 25, 2021).
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
@JulianOrteil commented on GitHub (Mar 25, 2021):
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.
@zeripath commented on GitHub (Mar 25, 2021):
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:
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.
@markburgessstl commented on GitHub (Mar 25, 2021):
I tried the STARTUP_TIMEOUT but it didn't make any difference.
Unfortunately I can't compile Gitea on Windows
@zeripath commented on GitHub (Mar 25, 2021):
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:
make release-windowsIt 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:
@JulianOrteil commented on GitHub (Mar 26, 2021):
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.
@markburgessstl commented on GitHub (Mar 26, 2021):
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.
gitea.log.txt
@JulianOrteil commented on GitHub (Mar 26, 2021):
Our log as well:
gitea.log
@zeripath commented on GitHub (Mar 26, 2021):
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.
@JulianOrteil commented on GitHub (Mar 29, 2021):
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.
@zeripath commented on GitHub (Mar 29, 2021):
OK
lets try:
https://eldritchkitty.com/~andrew/gitea-e5e9c67a03f4-windows-4.0-amd64.exe
sha256sum:
This adds some more logging
@markburgessstl commented on GitHub (Mar 29, 2021):
gitea.log
Here's my log. I tried three times to start the service.
Windows thinks the service is "starting" or "START_PENDING"
Thank you!
@zeripath commented on GitHub (Mar 30, 2021):
Please could you set
LOG_SQL=falsein the[database]section of your app.ini . Logging SQL statements is way too noisy and irrelevant to this problem.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.
@zeripath commented on GitHub (Mar 30, 2021):
But...
I do see this:
That means that gitea does think it's telling the SVC host it's running.
@markburgessstl commented on GitHub (Mar 30, 2021):
Yes, it thinks that but that's not happening.
Let me know if you need more logs or anything else to help get to the bottom of it
@JulianOrteil commented on GitHub (Mar 30, 2021):
@zeripath Here is our log file. We also had no luck with this exe, but thank you again for your work in helping solve this!
We are running Gitea on a Windows Server 2016 machine, just as a reminder.
gitea.log
@JulianOrteil commented on GitHub (Mar 30, 2021):
My apologies, Windows Server 2019*.
@zeripath commented on GitHub (Mar 30, 2021):
agh! I think I've found the issue!
@zeripath commented on GitHub (Mar 30, 2021):
f5b6dc9759/modules/graceful/manager_windows.go (L76-L81)The
IsInteractiveshould beIsWindowsServiceand should therefore be on line 81!isInteractive@zeripath commented on GitHub (Mar 30, 2021):
This is a regression from #14263
@JulianOrteil commented on GitHub (Mar 30, 2021):
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?
@zeripath commented on GitHub (Mar 30, 2021):
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.
@JulianOrteil commented on GitHub (Mar 31, 2021):
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.
@JulianOrteil commented on GitHub (Mar 31, 2021):
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.
@jolheiser commented on GitHub (Mar 31, 2021):
Once the build is done, it should be available (for 1.14) at https://dl.gitea.io/gitea/1.14