Skip to content

External task runners timeout when N8N_ENDPOINT_HEALTH is set to non-default value (e.g. on Cloud Run) #25958

Description

@horiyee

Bug Description

External task runners never become ready when N8N_ENDPOINT_HEALTH is set to any value other than the default healthz. The task-runner-launcher logs Waiting for task broker to be ready... indefinitely, and Code nodes time out after 60 seconds.

This affects any environment where /healthz cannot be used as the public health endpoint — most notably Google Cloud Run, where paths ending in z are reserved by the platform.

The root cause is a mismatch between the task broker server and the task-runner-launcher binary. The broker registers its health endpoint using N8N_ENDPOINT_HEALTH (source):

// packages/cli/src/task-runners/task-broker/task-broker-server.ts
const healthPath = this.globalConfig.endpoints.health;
this.app.get(healthPath, (_, res) => { res.send({ status: 'ok' }); });

The task-runner-launcher binary hardcodes /healthz for the readiness check (source):

url := fmt.Sprintf("%s/healthz", taskBrokerURI)

Setting N8N_ENDPOINT_HEALTH=health moves the broker health endpoint to /health, but the launcher keeps checking /healthz, receiving 404 and retrying indefinitely.

To Reproduce

Set the following environment variables:

N8N_RUNNERS_MODE=external
N8N_ENDPOINT_HEALTH=health
N8N_RUNNERS_TASK_BROKER_URI=http://127.0.0.1:5679
  1. Start n8n with the above environment variables
  2. Start task-runner-launcher pointing at the same broker URI
  3. Execute any Code node

The launcher logs Waiting for task broker to be ready... forever, and the Code node times out after 60 seconds.

Expected behavior

Code node executes successfully.

Debug Info

Debug info

core

  • n8nVersion: 2.8.3
  • platform: docker (self-hosted)
  • nodeJsVersion: 22.22.0
  • nodeEnv: production
  • database: postgres
  • executionMode: regular
  • concurrency: -1
  • license: community
  • consumerId: unknown

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/144.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2026-02-18T19:26:12.637Z

Operating System

unknown

n8n Version

2.8.3

Node.js Version

v22.22.0

Database

PostgreSQL

Execution mode

main (default)

Hosting

self hosted

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions