Help needed with Docker Compose + Traefik2 Install

Describe the issue/error/question

I have been struggling to get n8n working behind my Traefik2 Reverse Proxy for a few days. I have closely followed the directions from:

https://docs.n8n.io/getting-started/installation/advanced/server-setup.html#docker-compose-example

The Front end loads correctly with SSL/TLS enabled, I can Open/Save workflows. But as soon as I try to execute a basic one, I am not seeing it complete.

What is the error message (if any)?

  1. Can’t run any workflows at all. There are no errors seen, just the Execution button spins forever. If I try to hit the stop button. It starts spinning too forever.
    image

  2. Eventually instance shows β€œConnection Lost”
    image

Please share the workflow

Share the output returned by the last node

Here are the errors I see in the Dev Console:

Here is the Debug log from starting my instance to when the Execution button starts spinning forever:

{"level":"debug","message":"No codex available for: N8nTrainingCustomerDatastore.node.js","metadata":{"file":"LoadNodesAndCredentials.js","function":"addCodex","timestamp":"2022-03-16T05:53:19.322Z"}}
{"level":"debug","message":"No codex available for: N8nTrainingCustomerMessenger.node.js","metadata":{"file":"LoadNodesAndCredentials.js","function":"addCodex","timestamp":"2022-03-16T05:53:19.323Z"}}
{"level":"debug","message":"Wait tracker querying database for waiting executions","metadata":{"file":"WaitTracker.js","function":"getwaitingExecutions","timestamp":"2022-03-16T05:53:20.102Z"}}
{"level":"debug","message":"Add editor-UI session","metadata":{"file":"Push.js","function":"add","sessionId":"ea9mpqmjeg","timestamp":"2022-03-16T05:53:20.603Z"}}
{"level":"debug","message":"Add editor-UI session","metadata":{"file":"Push.js","function":"add","sessionId":"c68jyu8m55","timestamp":"2022-03-16T05:53:20.892Z"}}
{"level":"debug","message":"Wait tracker querying database for waiting executions","metadata":{"file":"WaitTracker.js","function":"getwaitingExecutions","timestamp":"2022-03-16T05:54:20.120Z"}}
{"level":"debug","message":"Wait tracker querying database for waiting executions","metadata":{"file":"WaitTracker.js","function":"getwaitingExecutions","timestamp":"2022-03-16T05:55:20.138Z"}}
{"level":"debug","message":"Add editor-UI session","metadata":{"file":"Push.js","function":"add","sessionId":"l2ydtnqyyvc","timestamp":"2022-03-16T05:55:28.797Z"}}
{"level":"debug","message":"Add editor-UI session","metadata":{"file":"Push.js","function":"add","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:50.371Z"}}
{"level":"debug","message":"Received child process message of type start for execution ID 12.","metadata":{"executionId":"12","file":"WorkflowRunner.js","timestamp":"2022-03-16T05:55:57.762Z"}}
{"level":"verbose","message":"Initializing n8n sub-process","metadata":{"file":"WorkflowRunnerProcess.js","function":"runWorkflow","pid":21,"timestamp":"2022-03-16T05:55:57.771Z","workflowId":"4"}}
{"level":"verbose","message":"Workflow execution started","metadata":{"file":"WorkflowExecute.js","function":"processRunExecutionData","timestamp":"2022-03-16T05:55:57.781Z","workflowId":"4"}}
{"level":"debug","message":"Received child process message of type processHook for execution ID 12.","metadata":{"executionId":"12","file":"WorkflowRunner.js","timestamp":"2022-03-16T05:55:57.783Z"}}
{"level":"debug","message":"Executing hook (hookFunctionsPush)","metadata":{"executionId":"12","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteBefore","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.783Z","workflowId":"4"}}
{"level":"debug","message":"Send data of type \"executionStarted\" to editor-UI","metadata":{"dataType":"executionStarted","file":"Push.js","function":"send","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.784Z"}}
{"level":"debug","message":"Received child process message of type processHook for execution ID 12.","metadata":{"executionId":"12","file":"WorkflowRunner.js","timestamp":"2022-03-16T05:55:57.785Z"}}
{"level":"debug","message":"Executing hook on node \"Start\" (hookFunctionsPush)","metadata":{"executionId":"12","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteBefore","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.785Z","workflowId":"4"}}
{"level":"debug","message":"Send data of type \"nodeExecuteBefore\" to editor-UI","metadata":{"dataType":"nodeExecuteBefore","file":"Push.js","function":"send","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.785Z"}}
{"level":"debug","message":"Received child process message of type processHook for execution ID 12.","metadata":{"executionId":"12","file":"WorkflowRunner.js","timestamp":"2022-03-16T05:55:57.786Z"}}
{"level":"debug","message":"Executing hook on node \"Start\" (hookFunctionsPush)","metadata":{"executionId":"12","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteAfter","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.786Z","workflowId":"4"}}
{"level":"debug","message":"Send data of type \"nodeExecuteAfter\" to editor-UI","metadata":{"dataType":"nodeExecuteAfter","file":"Push.js","function":"send","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.786Z"}}
{"level":"debug","message":"Received child process message of type processHook for execution ID 12.","metadata":{"executionId":"12","file":"WorkflowRunner.js","timestamp":"2022-03-16T05:55:57.786Z"}}
{"level":"debug","message":"Executing hook on node \"Stop And Error\" (hookFunctionsPush)","metadata":{"executionId":"12","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteBefore","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.786Z","workflowId":"4"}}
{"level":"debug","message":"Send data of type \"nodeExecuteBefore\" to editor-UI","metadata":{"dataType":"nodeExecuteBefore","file":"Push.js","function":"send","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.787Z"}}
{"level":"debug","message":"Received child process message of type processHook for execution ID 12.","metadata":{"executionId":"12","file":"WorkflowRunner.js","timestamp":"2022-03-16T05:55:57.788Z"}}
{"level":"debug","message":"Executing hook on node \"Stop And Error\" (hookFunctionsPush)","metadata":{"executionId":"12","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteAfter","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.788Z","workflowId":"4"}}
{"level":"debug","message":"Send data of type \"nodeExecuteAfter\" to editor-UI","metadata":{"dataType":"nodeExecuteAfter","file":"Push.js","function":"send","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.788Z"}}
{"level":"debug","message":"Received child process message of type processHook for execution ID 12.","metadata":{"executionId":"12","file":"WorkflowRunner.js","timestamp":"2022-03-16T05:55:57.789Z"}}
{"level":"debug","message":"Executing hook (hookFunctionsSave)","metadata":{"executionId":"12","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter","timestamp":"2022-03-16T05:55:57.789Z","workflowId":"4"}}
{"level":"debug","message":"Received child process message of type end for execution ID 12.","metadata":{"executionId":"12","file":"WorkflowRunner.js","timestamp":"2022-03-16T05:55:57.790Z"}}
{"level":"debug","message":"Executing hook (hookFunctionsPush)","metadata":{"executionId":"12","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.805Z","workflowId":"4"}}
{"level":"debug","message":"Save execution progress to database for execution ID 12 ","metadata":{"executionId":"12","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter","timestamp":"2022-03-16T05:55:57.806Z","workflowId":"4"}}
{"level":"debug","message":"Send data of type \"executionFinished\" to editor-UI","metadata":{"dataType":"executionFinished","file":"Push.js","function":"send","sessionId":"zpjsgy5z9go","timestamp":"2022-03-16T05:55:57.806Z"}}
{"level":"debug","message":"Remove editor-UI session","metadata":{"file":"Push.js","sessionId":"l2ydtnqyyvc","timestamp":"2022-03-16T05:56:00.189Z"}}
{"level":"debug","message":"Remove editor-UI session","metadata":{"file":"Push.js","sessionId":"c68jyu8m55","timestamp":"2022-03-16T05:56:00.190Z"}}
{"level":"debug","message":"Wait tracker querying database for waiting executions","metadata":{"file":"WaitTracker.js","function":"getwaitingExecutions","timestamp":"2022-03-16T05:56:20.140Z"}}
{"level":"debug","message":"Wait tracker querying database for waiting executions","metadata":{"file":"WaitTracker.js","function":"getwaitingExecutions","timestamp":"2022-03-16T05:57:20.159Z"}}
{"level":"debug","message":"Wait tracker querying database for waiting executions","metadata":{"file":"WaitTracker.js","function":"getwaitingExecutions","timestamp":"2022-03-16T05:58:20.181Z"}}
{"level":"debug","message":"Wait tracker querying database for waiting executions","metadata":{"file":"WaitTracker.js","function":"getwaitingExecutions","timestamp":"2022-03-16T05:59:20.200Z"}}

Here is the info message when I try to hit the stop button:

{"level":"info","message":"Attempt to read execution was blocked due to insufficient permissions","metadata":{"executionId":"13","file":"Server.js","timestamp":"2022-03-16T06:07:36.395Z","userId":"ba6d41e8-a356-46e7-a44c-ca695b5ae0d1"}}

Here is my n8n Docker Compose Service definition:

  n8n:
    image: n8nio/n8n
    container_name: n8n
    restart: unless-stopped
    networks:
      - t2_proxy
    security_opt:
      - no-new-privileges:true
    environment:
      PUID: $PUID
      PGID: $PGID
      TZ: $TZ
      GENERIC_TIMEZONE: $TZ
      N8N_BASIC_AUTH_ACTIVE: "true"
      N8N_BASIC_AUTH_USER: "asdf"
      N8N_BASIC_AUTH_PASSWORD: "asdf"
      N8N_HOST: "n8n.$DOMAINNAME"
      N8N_PROTOCOL: "https"
      NODE_ENV: "production"
      WEBHOOK_URL: "https://n8n.$DOMAINNAME/"
      N8N_LOG_LEVEL: "debug"
      N8N_LOG_OUTPUT: "console,file"
      N8N_LOG_FILE_LOCATION: "/home/node/.n8n/n8n.log"
      N8N_LOG_FILE_MAXSIZE: 50
      N8N_LOG_FILE_MAXCOUNT: 60

    volumes:
      - $DOCKERDIR/n8n:/home/node/.n8n
      - $DOCKERDIR/n8n-local-files:/files
    labels:
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.n8n-rtr.entrypoints=https"
      - "traefik.http.routers.n8n-rtr.rule=(Host(`n8n.$DOMAINNAME`) || HostHeader(`n8n.$DOMAINNAME`))"
      - "traefik.http.routers.n8n-rtr.tls=true"
      ## Middlewares
      - "traefik.http.routers.n8n-rtr.middlewares=chain-oauth@file"
      ## HTTP Services
      - "traefik.http.routers.n8n-rtr.service=n8n-svc"
      - "traefik.http.services.n8n-svc.loadbalancer.server.port=5678"
      - "traefik.http.services.n8n-svc.loadbalancer.passHostHeader=true"

I believe my Traefik setup is correct, as I have set all the Middleware properties as directed. I have tried Traefik 2.5.6 and the latest release 2.6.1

I have about 55 other services successfully hosted behind the Traefik reverse proxy.

The only think I can think of is that my instance is sitting behind an Oauth2 redirect. So when I correctly log into the Oauth2 provider, I can see the instance and the rest API works on my browser.
For example loading this works once I have authenticated successfully:
https://n8n.example.com/rest/workflows
Yields:

{
  "data": [
    {
      "id": "2",
      "name": "Backs up n8n Workflows to GitHub",
      "active": false,
      "createdAt": "2022-03-15T15:52:57.605Z",
      "updatedAt": "2022-03-15T20:15:57.030Z",
      "tags": []
    },
    {
      "id": "4",
      "name": "My workflow",
      "active": false,
      "createdAt": "2022-03-16T05:02:03.660Z",
      "updatedAt": "2022-03-16T05:02:03.660Z",
      "tags": []
    }
  ]
}

EDIT 1: Removing the Oauth2 from the n8n service, does not fix the issue, It does provide a bit more info in the dev console, but I think that is just analytics being sent out…

Error with Permissions-Policy header: Unrecognized feature: 'vr'.
app.1c43a48a.js:1 
                                                                    //////
                                                                 ///////////
                                                               /////      ////
                                               ///////////////////         ////
                                             //////////////////////       ////
     ///////               ///////          ////                /////////////
  ////////////          ////////////       ////                    ///////
 ////       ////       ////       ////    ////
/////        /////////////         //////////
 /////     ////       ////       ////     ////
  ////////////          ////////////       ////           ////////
    ///////                //////           ////        /////////////
                                             /////////////        ////
                                                //////////        ////
                                                       ////      ////
                                                        ///////////
                                                          //////

Love n8n? Help us build the future of automation! https://n8n.io/careers

rudder-analytics.min.js:1 =====from analytics array, calling method::  identify
rudder-analytics.min.js:1 anonymousId:  de54ca30-558f-4482-8c38-c930e0f4e420
rudder-analytics.min.js:1 {"message":{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.5.0"},"traits":{"instance_id":"304c1a0bb49b422023148b285111123cdc1296ffa49042c3132bf8b8546c9868"},"library":{"name":"RudderLabs JavaScript SDK","version":"1.5.0"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36","locale":"en-US","os":{"name":"","version":""},"screen":{"density":1.2000000476837158,"width":2134,"height":1200,"innerWidth":1228,"innerHeight":1064},"device":null,"network":null,"campaign":{},"page":{"path":"/workflow/4","referrer":"$direct","referring_domain":"","search":"","title":"n8n - Workflow Automation","url":"https://n8n.example.com/workflow/4","tab_url":"https://n8n.example.com/workflow/4","initial_referrer":"$direct","initial_referring_domain":""}},"type":"identify","action":null,"messageId":"d161049b-d554-4aed-b891-c1cab8a62799","originalTimestamp":"2022-03-16T06:36:11.522Z","anonymousId":"de54ca30-558f-4482-8c38-c930e0f4e420","userId":"304c1a0bb49b422023148b285111123cdc1296ffa49042c3132bf8b8546c9868#ba6d41e8-a356-46e7-a44c-ca695b5ae0d1","event":null,"properties":null,"integrations":{"All":true},"user_properties":null}}
rudder-analytics.min.js:1 pushing in replay queue
rudder-analytics.min.js:1 identify is called 
rudder-analytics.min.js:1 =====from analytics array, calling method::  page
rudder-analytics.min.js:1 anonymousId:  de54ca30-558f-4482-8c38-c930e0f4e420
rudder-analytics.min.js:1 {"message":{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.5.0"},"traits":{"instance_id":"304c1a0bb49b422023148b285111123cdc1296ffa49042c3132bf8b8546c9868"},"library":{"name":"RudderLabs JavaScript SDK","version":"1.5.0"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36","locale":"en-US","os":{"name":"","version":""},"screen":{"density":1.2000000476837158,"width":2134,"height":1200,"innerWidth":1228,"innerHeight":1064},"device":null,"network":null,"campaign":{},"page":{"path":"/workflow/4","referrer":"$direct","referring_domain":"","search":"","title":"n8n - Workflow Automation","url":"https://n8n.example.com/workflow/4","tab_url":"https://n8n.example.com/workflow/4","initial_referrer":"$direct","initial_referring_domain":""}},"type":"page","action":null,"messageId":"f9541314-4f01-4223-81b8-98d05f75b4cb","originalTimestamp":"2022-03-16T06:36:11.530Z","anonymousId":"de54ca30-558f-4482-8c38-c930e0f4e420","userId":"304c1a0bb49b422023148b285111123cdc1296ffa49042c3132bf8b8546c9868#ba6d41e8-a356-46e7-a44c-ca695b5ae0d1","event":null,"properties":{"name":"NodeViewExisting","category":"Editor","path":"/workflow/4","referrer":"$direct","referring_domain":"","search":"","title":"n8n - Workflow Automation","url":"https://n8n.example.com/workflow/4","tab_url":"https://n8n.example.com/workflow/4","initial_referrer":"$direct","initial_referring_domain":""},"integrations":{"All":true},"user_properties":null,"name":"NodeViewExisting","category":"Editor"}}
rudder-analytics.min.js:1 pushing in replay queue
rudder-analytics.min.js:1 page is called 
rudder-analytics.min.js:1 status 200 calling callback
rudder-analytics.min.js:1 ===in process response=== 200
rudder-analytics.min.js:1 this.clientIntegrations:  []
rudder-analytics.min.js:1 supported intgs  {ADOBE_ANALYTICS: Ζ’, AM: Ζ’, APPCUES: Ζ’, BINGADS: Ζ’, BRAZE: Ζ’, …}ADOBE_ANALYTICS: Ζ’ e(t)AM: Ζ’ e(t,n)APPCUES: Ζ’ e(t)BINGADS: Ζ’ e(t)BRAZE: Ζ’ e(t,n)BUGSNAG: Ζ’ e(t)CHARTBEAT: Ζ’ e(t,n)CLEVERTAP: Ζ’ e(t)COMSCORE: Ζ’ e(t,n)CRITEO: Ζ’ e(t)CUSTOMERIO: Ζ’ e(t)DRIP: Ζ’ e(t)FACEBOOK_PIXEL: Ζ’ e(t)FULLSTORY: Ζ’ e(t,n)GA: Ζ’ e(t,n)GA4: Ζ’ e(t,n)GA360: Ζ’ n(e,r)GOOGLEADS: Ζ’ e(t)GOOGLE_OPTIMIZE: Ζ’ e(t)GTM: Ζ’ e(t)HEAP: Ζ’ e(t)HOTJAR: Ζ’ e(t)HS: Ζ’ e(t)INTERCOM: Ζ’ e(t)KEEN: Ζ’ e(t)KISSMETRICS: Ζ’ e(t)KLAVIYO: Ζ’ e(t)LAUNCHDARKLY: Ζ’ e(t)LINKEDIN_INSIGHT_TAG: Ζ’ e(t)LOTAME: Ζ’ e(t,n)LYTICS: Ζ’ e(t)MOENGAGE: Ζ’ e(t,n)MP: Ζ’ e(t)OPTIMIZELY: Ζ’ e(t,n)PENDO: Ζ’ e(t,n)PINTEREST_TAG: Ζ’ e(t,n)POSTHOG: Ζ’ e(t,n)POST_AFFILIATE_PRO: Ζ’ e(t)PROFITWELL: Ζ’ e(t)QUALTRICS: Ζ’ e(t)QUANTUMMETRIC: Ζ’ e(t)REDDIT_PIXEL: Ζ’ e(t)SENTRY: Ζ’ e(t)SNAP_PIXEL: Ζ’ e(t)TVSQUARED: Ζ’ e(t)VWO: Ζ’ e(t,n)[[Prototype]]: Object
rudder-analytics.min.js:1 ====== request processed successfully: 200
rudder-analytics.min.js:1 ====== request processed successfully: 200
rudder-analytics.min.js:1 anonymousId:  de54ca30-558f-4482-8c38-c930e0f4e420
rudder-analytics.min.js:1 {"message":{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.5.0"},"traits":{"instance_id":"304c1a0bb49b422023148b285111123cdc1296ffa49042c3132bf8b8546c9868"},"library":{"name":"RudderLabs JavaScript SDK","version":"1.5.0"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36","locale":"en-US","os":{"name":"","version":""},"screen":{"density":1.2000000476837158,"width":2134,"height":1200,"innerWidth":1228,"innerHeight":1064},"device":null,"network":null,"campaign":{},"page":{"path":"/workflow/4","referrer":"$direct","referring_domain":"","search":"","title":"n8n - ▢️ My workflow","url":"https://n8n.example.com/workflow/4","tab_url":"https://n8n.example.com/workflow/4","initial_referrer":"$direct","initial_referring_domain":""}},"type":"track","action":null,"messageId":"66e47763-400f-4f4b-ae5d-2b196454463e","originalTimestamp":"2022-03-16T06:36:46.658Z","anonymousId":"de54ca30-558f-4482-8c38-c930e0f4e420","userId":"304c1a0bb49b422023148b285111123cdc1296ffa49042c3132bf8b8546c9868#ba6d41e8-a356-46e7-a44c-ca695b5ae0d1","event":"User opened node modal","properties":{"node_type":"n8n-nodes-base.start","workflow_id":"4"},"integrations":{"All":true},"user_properties":null}}
rudder-analytics.min.js:1 pushing in replay queue
rudder-analytics.min.js:1 track is called 
rudder-analytics.min.js:1 ====== request processed successfully: 200
rudder-analytics.min.js:1 anonymousId:  de54ca30-558f-4482-8c38-c930e0f4e420
rudder-analytics.min.js:1 {"message":{"channel":"web","context":{"app":{"build":"1.0.0","name":"RudderLabs JavaScript SDK","namespace":"com.rudderlabs.javascript","version":"1.5.0"},"traits":{"instance_id":"304c1a0bb49b422023148b285111123cdc1296ffa49042c3132bf8b8546c9868"},"library":{"name":"RudderLabs JavaScript SDK","version":"1.5.0"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36","locale":"en-US","os":{"name":"","version":""},"screen":{"density":1.2000000476837158,"width":2134,"height":1200,"innerWidth":1228,"innerHeight":1064},"device":null,"network":null,"campaign":{},"page":{"path":"/workflow/4","referrer":"$direct","referring_domain":"","search":"","title":"n8n - ▢️ My workflow","url":"https://n8n.example.com/workflow/4","tab_url":"https://n8n.example.com/workflow/4","initial_referrer":"$direct","initial_referring_domain":""}},"type":"track","action":null,"messageId":"21c71138-a274-4950-9c68-8a9f1360a1eb","originalTimestamp":"2022-03-16T06:36:50.363Z","anonymousId":"de54ca30-558f-4482-8c38-c930e0f4e420","userId":"304c1a0bb49b422023148b285111123cdc1296ffa49042c3132bf8b8546c9868#ba6d41e8-a356-46e7-a44c-ca695b5ae0d1","event":"User clicked execute node button","properties":{"node_type":"Start","workflow_id":"4"},"integrations":{"All":true},"user_properties":null}}
rudder-analytics.min.js:1 pushing in replay queue
rudder-analytics.min.js:1 track is called 
rudder-analytics.min.js:1 ====== request processed successfully: 200

Is it possible to have n8n access itself locally? Any other ideas would be greatly appreciated.

Information on your n8n setup

  • n8n version: 0.168.1
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default)]:
  • Running n8n via [Docker]:

Just realized the Docker log is slightly different than the log file:

β”‚   2022-03-16T06:43:17.112Z [Rudder] debug: batch size is 1                                                                                                                                                                                                 β”‚
β”‚   2022-03-16T06:43:17.114Z [Rudder] debug: no existing flush timer, creating new one                                                                                                                                                                       β”‚
β”‚   2022-03-16T06:43:17.140895501Z                                                                                                                                                                                                                           β”‚
β”‚   Editor is now accessible via:                                                                                                                                                                                                                            β”‚
β”‚   https://n8n.example.com:5678/                                                                                                                                                                                                                           β”‚
β”‚   2022-03-16T06:43:17.612Z |  [34mdebug [39m    |  [34mAdd editor-UI session [39m {"sessionId":"ea9mpqmjeg","file":"Push.js","function":"add"}                                                                                                             β”‚
β”‚   2022-03-16T06:43:37.115Z [Rudder] debug: in flush                                                                                                                                                                                                        β”‚
β”‚   2022-03-16T06:43:37.116Z [Rudder] debug: cancelling existing timer...                                                                                                                                                                                    β”‚
β”‚   2022-03-16T06:43:37.116Z [Rudder] debug: cancelling existing flushTimer...                                                                                                                                                                               β”‚
β”‚   2022-03-16T06:43:37.117Z [Rudder] debug: batch size is 1                                                                                                                                                                                                 β”‚
β”‚   2022-03-16T06:43:57.681Z [Rudder] debug: in flush                                                                                                                                                                                                        β”‚
β”‚   2022-03-16T06:43:57.681Z [Rudder] debug: cancelling existing timer...                                                                                                                                                                                    β”‚
β”‚   2022-03-16T06:43:57.681Z [Rudder] debug: queue is empty, nothing to flush                                                                                                                                                                                β”‚
β”‚   2022-03-16T06:44:17.096Z |  [34mdebug [39m    |  [34mWait tracker querying database for waiting executions [39m {"file":"WaitTracker.js","function":"getwaitingExecutions"}                                                                              β”‚
β”‚   2022-03-16T06:45:17.101Z |  [34mdebug [39m    |  [34mWait tracker querying database for waiting executions [39m {"file":"WaitTracker.js","function":"getwaitingExecutions"}                                                                              β”‚
β”‚   2022-03-16T06:45:56.714Z |  [34mdebug [39m    |  [34mAdd editor-UI session [39m {"sessionId":"vwmsraekoq","file":"Push.js","function":"add"}                                                                                                             β”‚
β”‚   2022-03-16T06:46:03.598Z |  [34mdebug [39m    |  [34mReceived child process message of type start for execution ID 16. [39m {"executionId":"16","file":"WorkflowRunner.js"}                                                                              β”‚
β”‚   2022-03-16T06:46:03.607Z |  [36mverbose [39m  |  [36mInitializing n8n sub-process [39m {"pid":21,"workflowId":"4","file":"WorkflowRunnerProcess.js","function":"runWorkflow"}                                                                            β”‚
β”‚   2022-03-16T06:46:03.621Z |  [36mverbose [39m  |  [36mWorkflow execution started [39m {"workflowId":"4","file":"WorkflowExecute.js","function":"processRunExecutionData"}                                                                                 β”‚
β”‚   2022-03-16T06:46:03.623Z |  [34mdebug [39m    |  [34mReceived child process message of type processHook for execution ID 16. [39m {"executionId":"16","file":"WorkflowRunner.js"}                                                                        β”‚
β”‚   2022-03-16T06:46:03.623Z |  [34mdebug [39m    |  [34mStart processing node "Start" [39m {"node":"Start","workflowId":"4","file":"WorkflowExecute.js"}                                                                                                    β”‚
β”‚   2022-03-16T06:46:03.623Z |  [34mdebug [39m    |  [34mExecuting hook (hookFunctionsPush) [39m {"executionId":"16","sessionId":"vwmsraekoq","workflowId":"4","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteBefore"}                 β”‚
β”‚   2022-03-16T06:46:03.624Z |  [34mdebug [39m    |  [34mRunning node "Start" started [39m {"node":"Start","workflowId":"4","file":"WorkflowExecute.js"}                                                                                                     β”‚
β”‚   2022-03-16T06:46:03.624Z |  [34mdebug [39m    |  [34mSend data of type "executionStarted" to editor-UI [39m {"dataType":"executionStarted","sessionId":"vwmsraekoq","file":"Push.js","function":"send"}                                                  β”‚
β”‚   2022-03-16T06:46:03.624Z |  [34mdebug [39m    |  [34mRunning node "Start" finished successfully [39m {"node":"Start","workflowId":"4","file":"WorkflowExecute.js"}                                                                                       β”‚
β”‚   2022-03-16T06:46:03.625Z |  [34mdebug [39m    |  [34mReceived child process message of type processHook for execution ID 16. [39m {"executionId":"16","file":"WorkflowRunner.js"}                                                                        β”‚
β”‚   2022-03-16T06:46:03.625Z |  [34mdebug [39m    |  [34mExecuting hook on node "Start" (hookFunctionsPush) [39m {"executionId":"16","sessionId":"vwmsraekoq","workflowId":"4","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteBefore"}     β”‚
β”‚   2022-03-16T06:46:03.625Z |  [34mdebug [39m    |  [34mSend data of type "nodeExecuteBefore" to editor-UI [39m {"dataType":"nodeExecuteBefore","sessionId":"vwmsraekoq","file":"Push.js","function":"send"}                                                β”‚
β”‚   2022-03-16T06:46:03.625Z |  [34mdebug [39m    |  [34mStart processing node "Stop And Error" [39m {"node":"Stop And Error","workflowId":"4","file":"WorkflowExecute.js"}                                                                                  β”‚
β”‚   2022-03-16T06:46:03.626Z |  [34mdebug [39m    |  [34mReceived child process message of type processHook for execution ID 16. [39m {"executionId":"16","file":"WorkflowRunner.js"}                                                                        β”‚
β”‚   2022-03-16T06:46:03.626Z |  [34mdebug [39m    |  [34mRunning node "Stop And Error" started [39m {"node":"Stop And Error","workflowId":"4","file":"WorkflowExecute.js"}                                                                                   β”‚
β”‚   2022-03-16T06:46:03.626Z |  [34mdebug [39m    |  [34mExecuting hook on node "Start" (hookFunctionsPush) [39m {"executionId":"16","sessionId":"vwmsraekoq","workflowId":"4","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteAfter"}      β”‚
β”‚   2022-03-16T06:46:03.627Z |  [34mdebug [39m    |  [34mSend data of type "nodeExecuteAfter" to editor-UI [39m {"dataType":"nodeExecuteAfter","sessionId":"vwmsraekoq","file":"Push.js","function":"send"}                                                  β”‚
β”‚   2022-03-16T06:46:03.627Z |  [34mdebug [39m    |  [34mReceived child process message of type processHook for execution ID 16. [39m {"executionId":"16","file":"WorkflowRunner.js"}                                                                        β”‚
β”‚   2022-03-16T06:46:03.627Z |  [34mdebug [39m    |  [34mExecuting hook on node "Stop And Error" (hookFunctionsPush) [39m {"executionId":"16","sessionId":"vwmsraekoq","workflowId":"4","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteB   β”‚
β”‚   efore"}                                                                                                                                                                                                                                                  β”‚
β”‚   2022-03-16T06:46:03.627Z |  [34mdebug [39m    |  [34mSend data of type "nodeExecuteBefore" to editor-UI [39m {"dataType":"nodeExecuteBefore","sessionId":"vwmsraekoq","file":"Push.js","function":"send"}                                                β”‚
β”‚   2022-03-16T06:46:03.627Z |  [34mdebug [39m    |  [34mRunning node "Stop And Error" finished with error [39m {"node":"Stop And Error","workflowId":"4","file":"WorkflowExecute.js"}                                                                       β”‚
β”‚   2022-03-16T06:46:03.628Z |  [34mdebug [39m    |  [34mReceived child process message of type processHook for execution ID 16. [39m {"executionId":"16","file":"WorkflowRunner.js"}                                                                        β”‚
β”‚   2022-03-16T06:46:03.628Z |  [34mdebug [39m    |  [34mExecuting hook on node "Stop And Error" (hookFunctionsPush) [39m {"executionId":"16","sessionId":"vwmsraekoq","workflowId":"4","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteA   β”‚
β”‚   fter"}                                                                                                                                                                                                                                                   β”‚
β”‚   2022-03-16T06:46:03.628Z |  [36mverbose [39m  |  [36mWorkflow execution finished with error [39m {"error":{"name":"NodeOperationError","cause":{},"node":{"parameters":{"errorType":"errorMessage","errorMessage":"ERROR!!!!"},"name":"Stop And Error"   β”‚
β”‚   ,"type":"n8n-nodes-base.stopAndError","typeVersion":1,"position":[780,300],"notesInFlow":true},"timestamp":1647413163627,"message":"ERROR!!!!","stack":"NodeOperationError: ERROR!!!!\n    at Object.execute (/usr/local/lib/node_modules/n8n/node_mod   β”‚
β”‚   ules/n8n-nodes-base/dist/nodes/StopAndError/StopAndError.node.js:98:15)\n    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:526:37)\n    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core   β”‚
β”‚   /dist/src/WorkflowExecute.js:451:62\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)"},"workflowId":"4","file":"WorkflowExecute.js","function":"processSuccessExecution"}                                                      β”‚
β”‚   2022-03-16T06:46:03.628Z |  [34mdebug [39m    |  [34mSend data of type "nodeExecuteAfter" to editor-UI [39m {"dataType":"nodeExecuteAfter","sessionId":"vwmsraekoq","file":"Push.js","function":"send"}                                                  β”‚
β”‚   2022-03-16T06:46:03.629Z |  [34mdebug [39m    |  [34mReceived child process message of type processHook for execution ID 16. [39m {"executionId":"16","file":"WorkflowRunner.js"}                                                                        β”‚
β”‚   2022-03-16T06:46:03.629Z |  [34mdebug [39m    |  [34mExecuting hook (hookFunctionsSave) [39m {"executionId":"16","workflowId":"4","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter"}                                           β”‚
β”‚   2022-03-16T06:46:03.632Z |  [34mdebug [39m    |  [34mReceived child process message of type end for execution ID 16. [39m {"executionId":"16","file":"WorkflowRunner.js"}                                                                                β”‚
β”‚   2022-03-16T06:46:03.634Z [Rudder] debug: no existing flush timer, creating new one                                                                                                                                                                       β”‚
β”‚   2022-03-16T06:46:03.647Z |  [34mdebug [39m    |  [34mExecuting hook (hookFunctionsPush) [39m {"executionId":"16","sessionId":"vwmsraekoq","workflowId":"4","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter"}                  β”‚
β”‚   2022-03-16T06:46:03.647Z |  [34mdebug [39m    |  [34mSave execution progress to database for execution ID 16  [39m {"executionId":"16","workflowId":"4","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter"}                     β”‚
β”‚   2022-03-16T06:46:03.647Z |  [34mdebug [39m    |  [34mSend data of type "executionFinished" to editor-UI [39m {"dataType":"executionFinished","sessionId":"vwmsraekoq","file":"Push.js","function":"send"}                                                β”‚
β”‚   2022-03-16T06:46:17.110Z |  [34mdebug [39m    |  [34mWait tracker querying database for waiting executions [39m {"file":"WaitTracker.js","function":"getwaitingExecutions"}                                                                              β”‚
β”‚   2022-03-16T06:46:23.641Z [Rudder] debug: in flush                                                                                                                                                                                                        β”‚
β”‚   2022-03-16T06:46:23.641Z [Rudder] debug: cancelling existing flushTimer...                                                                                                                                                                               β”‚
β”‚   2022-03-16T06:46:23.642Z [Rudder] debug: batch size is 2                                                                                                                                                                                                 β”‚
β”‚   2022-03-16T06:46:44.205Z [Rudder] debug: in flush                                                                                                                                                                                                        β”‚
β”‚   2022-03-16T06:46:44.205Z [Rudder] debug: cancelling existing timer...                                                                                                                                                                                    β”‚
β”‚   2022-03-16T06:46:44.205Z [Rudder] debug: queue is empty, nothing to flush
β”‚   2022-03-16T06:46:47.786Z |  [32minfo [39m     |  [32mAttempt to read execution was blocked due to insufficient permissions [39m {"userId":"ba6d41e8-a356-46e7-a44c-ca695b5ae0d1","executionId":"16","file":"Server.js"}                                  β”‚
β”‚   2022-03-16T06:47:17.122Z |  [34mdebug [39m    |  [34mWait tracker querying database for waiting executions [39m {"file":"WaitTracker.js","function":"getwaitingExecutions"}   

Hey @Alex_Tzonkov,

If you ignore the traefik part for now and try connecting to n8n directly bypassing it does that work as expected? That would help us work out if it is something wrong with n8n itself or the traefik configuration.

I have given the example we provide a go and it is working as expected so I suspect it is something related to the configuration but it is always worth double checking.

Hi Jon, ignoring the traefik part and bypassing it is not really an option I can try at this point. Traefik is how the SSL certificates get automatically generated.

The only difference between my set-up and the example is the fact that my Traefik instance uses dnschallange instead of tlschallange for the certificatesResolvers. I agree with you it is most likely a configuration problem since many people are using the docker image and this seems specific to the Traefik proxy.

Is there any other debug steps I can try to narrow down the issue?

Another data point I just got is that does indeed seem to work if I use it internal to the Traefik network. I started A Firefox container on the same network as the n8n container, and from that container I was able to load the n8n Frontend and execute the simple example workflow and it worked.

So my issue does seem to be related to the fact that it is sitting behind the Reverse proxy.

I just verified a bit more complex than just erroring out workflow where n8n does an http request to a node-red container on the same Docker network and it works just fine.

So looking for advice on how to debug the Traefik part of the configuration/setup.

Can you try setting VUE_APP_URL_BASE_API and seeing if it helps, this tells the front end which url to use to reach the internal api.

When you connected directly did you check the browser tools to see what port and host it was connecting to for the /rest/ calls?

Tried to set it to the internal endpoint but it did not fix the issue.

I think based on this issue, I will not be able to use this ENV variable to fix the problem.

I know I use it on mine behind a reverse proxy with no issue :thinking:

Did you check the rest url when doing the direct connection?

So when I initially click the β€œExecute Workflow” button nothing shows up in the console. However when I click the β€œStop” button. I do see an error in the console:

chunk-vendors.39458c07.js:1          POST https://n8n.example.com/rest/executions-current/40/stop 404

Which is the external URL at the Traefik Ingest.

Also looking at the Console from the Browser running on the same Docker network as n8n, I see that the rest url is the local one http://n8n:5678/rest/push.

The connection to http://n8n:5678/rest/push?sessionId=q7r3baariso was interrupted while the page was loading. app.1c43a48a.js:1:281928

It does not seem to matter what the ENV vars are set to. I tried changing both: WEBHOOK_URL and VUE_APP_URL_BASE_API

does your container have sufficient permissions to the mounted directory?

Yes. It works fine if I access the front end from a Firefox container on the same network.

I thing @Jon is on the right track. The code is not able to access its own REST API. I just don’t know how to fix that.

I have narrowed the problem down a bit further. I no longer think it is a Traefik related issue. I tried using a different laptop and it worked fine. Going back to mine it fails the same way. Both were using the Chrome browser and they were both on the same wifi network.

Next I tried a different browser, first Edge, then Firefox. I saw the same exact behavior. β€œExecute Workflow” button spins forever.

This is on Windows 10, is there some OS security setting which could be at play?

My scenario seems very similar to what is described here:

UPDATE: Eeerily similar in fact. I modified my Testing Workflow to do an HTTP Request to one of my other containers:

Here is the exact sequence of events I see:

  1. Press β€œExecute Workflow” button it starts spinning
  2. On the node-red side I see the HTTP request come in just fine and gets a response
  3. The UI continues spinning until I STOP the docker container at which point the UI, comes back and shows successful Workflow execution/completion.

I tried to stop the docker container when the UI was in the spinning forever mode, and it indeed

That is interesting, I remember that other issue. Did you reproduce the issue on the other laptop at all?

I switched to Node-Red and never looked back. Things just work as expected in Node-Red and the community is full of examples and add-in nodes. N8N doesn’t seem fully baked.

1 Like

@anon3028993 can’t help to wonder why you still participate (in a non constructive way), when you apparently switched and never looked back?

2 Likes

Not exactly. So my β€œwork” laptop exhibits the issue 100% of the time. I poked around the group settings, but did not find anything useful. I suspect it is the enterprise McAfee that is messing up the traffic. There is no way for me to β€œdisable” McAfee to test that theory.

Another experiment I tried was to install Lubuntu VM in VirtualBox and used Firefox to do the test from inside the VM. It failed, but the signature was different. It complained that the CA (Certificate Authority) which is my Company’s CA is not happy with the certificate.

The strange thing is that all my other containers (55+) behind the Traefik Reverse Proxy seem to work fine. At this point I have moved on to trying to make n8n work for what I was trying to use it in the first place. I don’t know if I’ll go back to trying to figure out why it does not work on a β€œwork” laptop.

1 Like