Describe the problem/error/question
I’m running n8n in Google Cloud VM using docker-compose and traefik, but I’m not being able to properly work with task runners enabled, every time I get "WARN Found runner unresponsive"
and:
error | Task runner connection attempt failed with status code 403 {"file":"task-broker-server.js","function":"response.writeHead"}
And the same error keeps spamming in the logs, and I’m not able to execute any code node.
This only happens when I set N8N_RUNNERS_ENABLED=true
I’ve tried following what others have said in posts like this Self-hosted N8N - Task runner connection attempt failed with status code 403 but haven’t been able to fix it.
What is the error message (if any)?
error | Task runner connection attempt failed with status code 403 {"file":"task-broker-server.js","function":"response.writeHead"}
Please share your workflow
This is my current docker-compose file.
services:
traefik:
image: traefik:latest
restart: always
command:
- --api=true
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.websecure.address=:443
- --certificatesresolvers.mytlschallenge.acme.tlschallenge=true
- --certificatesresolvers.mytlschallenge.acme.email=${SSL_EMAIL}
- --certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json
- --log.level=DEBUG
- --accesslog=true
ports:
- "80:80"
- "443:443"
volumes:
- traefik_data:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- n8n-net
n8n:
image: docker.n8n.io/n8nio/n8n:latest
restart: always
ports:
- "127.0.0.1:5678:5678"
labels:
- traefik.enable=true
- traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)
- traefik.http.routers.n8n.tls=true
- traefik.http.routers.n8n.entrypoints=web,websecure
- traefik.http.routers.n8n.tls.certresolver=mytlschallenge
- traefik.http.routers.n8n.middlewares=n8n@docker
- traefik.http.middlewares.n8n.headers.SSLRedirect=true
- traefik.http.middlewares.n8n.headers.STSSeconds=${SECONDS}
- traefik.http.middlewares.n8n.headers.browserXSSFilter=true
- traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
- traefik.http.middlewares.n8n.headers.forceSTSHeader=true
- traefik.http.middlewares.n8n.headers.SSLHost=${DOMAIN_NAME}
- traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
- traefik.http.middlewares.n8n.headers.STSPreload=true
environment:
# Core
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
- N8N_METRICS=true
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
# Database
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=${DB_POSTGRESDB_HOST_VALUE}
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${DB_POSTGRESDB_DATABASE_VALUE}
- DB_POSTGRESDB_USER=${DB_POSTGRESDB_USER_VALUE}
- DB_POSTGRESDB_PASSWORD=${DB_POSTGRESDB_PASSWORD_VALUE}
- DB_POSTGRESDB_SCHEMA=${DB_POSTGRESDB_SCHEMA_VALUE}
# Task runners
- N8N_RUNNERS_ENABLED=true
# Permissions & logging
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
- N8N_LOG_LEVEL=debug
volumes:
- n8n_data:/home/node/.n8n
- ./local-files:/files
networks:
- n8n-net
volumes:
n8n_data:
traefik_data:
networks:
n8n-net:
driver: bridge
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup
- n8n version: latest
- Database (default: SQLite): postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main): main
- Running n8n via (Docker, npm, n8n cloud, desktop app): docker-compose
- Operating system: linux