fix(core): Always serve /healthz on task broker regardless of N8N_ENDPOINT_HEALTH#1935
Closed
everettbu wants to merge 1 commit into
Closed
fix(core): Always serve /healthz on task broker regardless of N8N_ENDPOINT_HEALTH#1935everettbu wants to merge 1 commit into
everettbu wants to merge 1 commit into
Conversation
Author
|
Upstream PR was closed or merged. Code is synced via branch mirror. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror of n8n-io/n8n#25959
Original author: horiyee
Summary
This is a regression introduced by #25729, which made the health endpoint configurable across all servers including the task broker. The
task-runner-launcherbinary, however, hardcodes/healthzfor the broker readiness check. When users setN8N_ENDPOINT_HEALTH=health— required on platforms such as Google Cloud Run that reserve/healthzat the ingress — the broker began serving health at/healthwhile the launcher kept checking/healthz, receiving 404 and waiting forever. Code nodes would time out after 60 seconds.The task broker runs on an internal port (5679) that is never publicly exposed, so
N8N_ENDPOINT_HEALTHshould not affect it. This fix hardcodes/healthzon the task broker, decoupling it from the external health endpoint configuration.Root cause:
globalConfig.endpoints.health: task-broker-server.ts#L173–L174/healthz: check_until_broker_ready.go#L12Closes #25958
Testing
Added a unit test to
task-broker-server.test.tsthat verifies/healthzreturns 200 even whenN8N_ENDPOINT_HEALTHis overridden (e.g.endpoints: { health: '/health' }inGlobalConfig).Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)