Form trigger failing in production mode

Describe the problem/error/question

When I try in production mode the form trigger fails, in test mode it works normally. Is there a configuration missing?

What is the error message (if any)?

Web:

{"code":0,"message":"Workflow Webhook Error: Workflow could not be started!"}

Node (Form trigger):

ERROR: No default engine was specified and no extension was provided.

Information on your n8n setup

  • n8n version: 1.18.0
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): queue
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Linux

Hi @Wildson, I just tried reproucing the problem but did not have any trouble with the following setup:

docker-compose.yml
services:
  postgres:
    image: postgres:15
    restart: unless-stopped
    environment:
      - POSTGRES_USER=n8n
      - POSTGRES_PASSWORD=n8n
      - POSTGRES_DB=n8n
    volumes:
      - ./db_data:/var/lib/postgresql/data
    ports:
      - 5432:5432
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -h localhost -U n8n -d n8n']
      interval: 5s
      timeout: 5s
      retries: 10
  redis:
    image: redis:6-alpine
    restart: unless-stopped
    healthcheck:
      test: ['CMD', 'redis-cli', 'ping']
      interval: 5s
      timeout: 5s
      retries: 10
  n8n_main:
    image: n8nio/n8n:1.18.0
    restart: unless-stopped
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=n8n
      - QUEUE_HEALTH_CHECK_ACTIVE=true
      - N8N_DIAGNOSTICS_ENABLED=false
      - QUEUE_BULL_REDIS_HOST=redis
      - EXECUTIONS_MODE=queue
      - N8N_LOG_LEVEL=debug
    ports:
      - 5678:5678
    volumes:
      - ./n8n_data:/home/node/.n8n
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
  n8n_worker:
    image: n8nio/n8n:1.18.0
    restart: unless-stopped
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=n8n
      - QUEUE_HEALTH_CHECK_ACTIVE=true
      - N8N_DIAGNOSTICS_ENABLED=false
      - QUEUE_BULL_REDIS_HOST=redis
      - EXECUTIONS_MODE=queue
      - N8N_LOG_LEVEL=debug
    command: worker
    volumes:
      - ./n8n_data:/home/node/.n8n
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
      n8n_main:
        condition: service_started

This was using the below workflow:

Both production and manual executions are working as expected:

Are you by any chance using a custom image for n8n or have perhaps different versions of n8n running on your workers?

If you have ruled out these points and are still seeing the problem, can you share the exact setup using which the problem can be reproduced? Thank you!

My compose (Docker swarm):

version: "3.7"

x-web-environment: &web-environment
  image: n8nio/n8n:1.19.4
  environment:
    DB_TYPE: postgresdb
    DB_POSTGRESDB_DATABASE: n8n
    DB_POSTGRESDB_HOST: [...]
    DB_POSTGRESDB_PORT: 5432
    DB_POSTGRESDB_USER: postgres
    DB_POSTGRESDB_SCHEMA: public
    DB_POSTGRESDB_PASSWORD: [...]

    WEBHOOK_URL: https://n8n.[...].com.br/
    N8N_EDITOR_BASE_URL: https://n8n.[...].com.br
    N8N_SKIP_WEBHOOK_DEREGISTRATION_SHUTDOWN: "true"

    NODE_ENV: production
    N8N_ENCRYPTION_KEY: [...]

    EXECUTIONS_MODE: queue
    QUEUE_BULL_REDIS_HOST: redis
    QUEUE_BULL_REDIS_PORT: 6379
    NODE_FUNCTION_ALLOW_EXTERNAL: "*"
    NODE_FUNCTION_ALLOW_BUILTIN: "*"

    N8N_EMAIL_MODE: smtp
    N8N_SMTP_HOST: smtp.gmail.com
    N8N_SMTP_PORT: 465
    N8N_SMTP_USER: noreply@[...].com.br
    N8N_SMTP_PASS: [...]
    N8N_SMTP_SENDER: noreply@[...].com.br
    N8N_SMTP_SSL: "true"

    EXECUTIONS_DATA_MAX_AGE: 144
    EXECUTIONS_DATA_PRUNE_MAX_COUNT: 50000
    EXECUTIONS_DATA_SAVE_ON_SUCCESS: none

    GENERIC_TIMEZONE: America/Sao_Paulo
    QUEUE_WORKER_TIMEOUT: 60
    N8N_METRICS: "true"
    N8N_METRICS_INCLUDE_WORKFLOW_ID_LABEL: "true"
  networks:
    - n8n
    - traefik-public

services:
  server:
    <<: *web-environment
    deploy:
      labels:
        - traefik.enable=true
        - traefik.docker.network=traefik-public
        - traefik.constraint-label=traefik-public
        - traefik.http.routers.n8n-http.rule=Host(`n8n.[...].com.br`)
        - traefik.http.routers.n8n-http.entrypoints=http
        - traefik.http.routers.n8n-http.middlewares=https-redirect
        - traefik.http.routers.n8n-https.rule=Host(`n8n.[...].com.br`) && !PathPrefix(`/webhook/`)
        - traefik.http.routers.n8n-https.entrypoints=https
        - traefik.http.routers.n8n-https.tls=true
        - traefik.http.routers.n8n-https.tls.certresolver=le
        - traefik.http.services.n8n.loadbalancer.server.port=5678

  webhook:
    <<: *web-environment
    command: webhook
    deploy:
      mode: replicated
      replicas: 2
      labels:
        - traefik.enable=true
        - traefik.docker.network=traefik-public
        - traefik.constraint-label=traefik-public
        - traefik.http.routers.n8n-webhook.rule=Host(`n8n.[...].com.br`) && PathPrefix(`/webhook/`)
        - traefik.http.routers.n8n-webhook.entrypoints=https
        - traefik.http.routers.n8n-webhook.tls=true
        - traefik.http.routers.n8n-webhook.tls.certresolver=le
        - traefik.http.services.n8n-webhook.loadbalancer.server.port=5678

  worker:
    <<: *web-environment
    command: worker
    deploy:
      mode: replicated
      replicas: 4
      labels:
        - traefik.enable=false

  redis:
    image: redis:7.0.7
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
    networks:
      - n8n

networks:
  n8n:
  traefik-public:
    external: true

It is in version 1.19.4, with the same workflow as your example:

Could you test in queue mode, using webhook through a proxy?

Hi @Wildson, I actually used queue mode for testing, albeit using a slightly different docker compose file as shared above. Still no luck with reproducing this I am afraid.

@Jon, do you happen to have any idea why the form trigger node might throw such an error in queue mode when using a webhook worker?

I am not sure why it is doing it but we do have a dev ticket opened to fix it. The internal ID is NODE-888 and it is currently in the waiting to be picked up queue so it should be fixed fairly soon.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.