Describe the problem/error/question
I’m encountering a TypeError: Cannot read properties of undefined (reading ‘subscribe’) when running n8n in Docker with N8N_RUNNERS_ENABLED=true and Redis configured as the pub/sub provider.
The issue occurs during orchestration startup (Start.initOrchestration), preventing n8n from finishing initialization.
Even when I set N8N_RUNNERS_ENABLED=false, n8n still does not start properly, so the issue seems to be rooted in the orchestration/pubsub subsystem itself rather than the runners specifically.
I have already:
-
Confirmed Redis and Postgres containers are healthy and responding.
-
Verified that all
N8N_PUBSUB_*environment variables are correctly loaded in the container. -
Cleared the
n8n_datavolume multiple times and relaunched the stack.
Despite all of that, n8n crashes with the same .subscribe() error on startup.
What is the error message (if any)?
2025-10-23T01:57:14.289Z | error | TypeError: Cannot read properties of undefined (reading ‘subscribe’)
at Subscriber.subscribe (/usr/local/lib/node_modules/n8n/src/scaling/pubsub/subscriber.service.ts:60:21)
at Start.initOrchestration (/usr/local/lib/node_modules/n8n/src/commands/start.ts:273:20)
at Start.init (/usr/local/lib/node_modules/n8n/src/commands/start.ts:223:15)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at CommandRegistry.execute (/usr/local/lib/node_modules/n8n/src/command-registry.ts:66:4)
at /usr/local/lib/node_modules/n8n/bin/n8n:63:2
2025-10-23T01:57:14.292Z | error | Exiting due to an error.
2025-10-23T01:57:23.122Z | error | last session crashed {“file”:“crash-journal.js”,“function”:“init”}
Please share your workflow
(Not applicable – issue occurs on fresh startup, no workflow loaded.)
Share the output returned by the last node
(Not applicable – n8n does not finish startup, so no nodes execute.)
Information on your n8n setup
- n8n version:
1.116.2 - Database (default: SQLite):
PostgreSQL 15 - n8n EXECUTIONS_PROCESS setting (default: own, main): main
- Running n8n via (Docker, npm, n8n cloud, desktop app):
Docker (Docker Desktop on Windows) - Operating system:
Windows 10 (WSL2 Docker Engine)
services:
postgres:
image: postgres:15
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 3s
retries: 20
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 20
n8n:
image: docker.n8n.io/n8nio/n8n:1.116.2
restart: unless-stopped
ports:
- "5678:5678"
environment:
# Database
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: postgres
DB_POSTGRESDB_PORT: 5432
DB_POSTGRESDB_DATABASE: ${POSTGRES_DB}
DB_POSTGRESDB_USER: ${POSTGRES_USER}
DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD}
# Redis Queue
QUEUE_BULL_REDIS_HOST: redis
QUEUE_BULL_REDIS_PORT: 6379
# Pub/Sub for Runners
N8N_PUBSUB_PROVIDER: redis
N8N_PUBSUB_REDIS_HOST: redis
N8N_PUBSUB_REDIS_PORT: 6379
N8N_PUBSUB_REDIS_DB: "0"
# n8n Core
EXECUTIONS_MODE: main
N8N_RUNNERS_ENABLED: "true"
N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}
N8N_HOST: ${N8N_HOST}
N8N_PORT: 5678
N8N_PROTOCOL: http
WEBHOOK_URL: http://localhost:5678/
GENERIC_TIMEZONE: ${GENERIC_TIMEZONE}
N8N_DEFAULT_BINARY_DATA_MODE: filesystem
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS: "true"
N8N_LOG_LEVEL: debug
N8N_BLOCK_ENV_ACCESS_IN_NODE: "false"
N8N_GIT_NODE_DISABLE_BARE_REPOS: "true"
# AI / Model Runner
N8N_AI_ENABLED: "true"
N8N_AI_OPENAI_DEFAULT_BASE_URL: http://model-runner.docker.internal/engines/llama.cpp/v1
N8N_AI_DEFAULT_MODEL: ${N8N_AI_DEFAULT_MODEL}
volumes:
- n8n_data:/home/node/.n8n
- ./shared:/data/shared
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
pgdata:
redisdata:
n8n_data:
# Database Configuration
POSTGRES_DB=n8n
POSTGRES_USER=n8n
POSTGRES_PASSWORD=
# n8n Configuration
N8N_ENCRYPTION_KEY=dd3a0c8357bbce4b36097c4cf9bf3429e3a377abeff43959fff09db92c6c9c8c
N8N_HOST=localhost
GENERIC_TIMEZONE=America/New_York
# AI Model Configuration
N8N_AI_DEFAULT_MODEL=ai/llama3.2:3B



