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)?
-
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.
-
Eventually instance shows βConnection Lostβ
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]: