New install, self-hosting. Execution never ends, keeps spinning

Describe the issue/error/question

Can’t execute any workflows. I click “Execute Workflow”, the spinner starts spinning and never stops. I click the “Stop” icon, another spinner appears and never stops spinning either.

Then I stop the docker container, and only then do I get a message in the UI about the workflow completing successfully.

docker-compose.yml

version: "2"

services:
  n8n:
    image: n8nio/n8n
    container_name: "n8n"
    hostname: "n8n"
    restart: always
    ports: 
      - 54356:5678
 
    environment:
      - NODE_ENV=production
      - GENERIC_TIMEZONE="Europe/Kiev"
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=user
      - N8N_BASIC_AUTH_PASSWORD=password
      - N8N_HOST=n8n.mysite.com
      - WEBHOOK_URL=https://n8n.mysite.com/
      - N8N_PROTOCOL=https
      - N8N_PERSONALIZATION_ENABLED=false
      - N8N_DIAGNOSTICS_ENABLED=false
      - N8N_LOG_LEVEL=debug
    volumes:
      - /home/user/n8n/data:/home/node/.n8n

What is the error message (if any)?

n8n    | 2022-01-13T16:58:52.835Z | debug    | Wait tracker querying database for waiting executions {"file":"WaitTracker.js","function":"getwaitingExecutions"}
n8n    | 2022-01-13T16:58:55.152Z | verbose  | Initializing n8n sub-process {"pid":22,"file":"WorkflowRunnerProcess.js","function":"runWorkflow"}
n8n    | 2022-01-13T16:58:55.159Z | debug    | Received child process message of type start for execution ID 5. {"executionId":"5","file":"WorkflowRunner.js"}
n8n    | 2022-01-13T16:58:55.209Z | verbose  | Workflow execution started {"file":"WorkflowExecute.js","function":"processRunExecutionData"}
n8n    | 2022-01-13T16:58:55.212Z | debug    | Start processing node "Start" {"node":"Start","file":"WorkflowExecute.js"}
n8n    | 2022-01-13T16:58:55.213Z | debug    | Received child process message of type processHook for execution ID 5. {"executionId":"5","file":"WorkflowRunner.js"}
n8n    | 2022-01-13T16:58:55.213Z | debug    | Running node "Start" started {"node":"Start","file":"WorkflowExecute.js"}
n8n    | 2022-01-13T16:58:55.215Z | debug    | Running node "Start" finished successfully {"node":"Start","file":"WorkflowExecute.js"}
n8n    | 2022-01-13T16:58:55.216Z | debug    | Executing hook (hookFunctionsPush) {"executionId":"5","sessionId":"jwcv7gc1wsj","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteBefore"}
n8n    | 2022-01-13T16:58:55.217Z | debug    | Send data of type "executionStarted" to editor-UI {"dataType":"executionStarted","sessionId":"jwcv7gc1wsj","file":"Push.js","function":"send"}
n8n    | 2022-01-13T16:58:55.218Z | verbose  | Workflow execution finished successfully {"file":"WorkflowExecute.js","function":"processSuccessExecution"}
n8n    | 2022-01-13T16:58:55.232Z | debug    | Received child process message of type processHook for execution ID 5. {"executionId":"5","file":"WorkflowRunner.js"}
n8n    | 2022-01-13T16:58:55.234Z | debug    | Executing hook on node "Start" (hookFunctionsPush) {"executionId":"5","sessionId":"jwcv7gc1wsj","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteBefore"}
n8n    | 2022-01-13T16:58:55.235Z | debug    | Send data of type "nodeExecuteBefore" to editor-UI {"dataType":"nodeExecuteBefore","sessionId":"jwcv7gc1wsj","file":"Push.js","function":"send"}
n8n    | 2022-01-13T16:58:55.237Z | debug    | Received child process message of type processHook for execution ID 5. {"executionId":"5","file":"WorkflowRunner.js"}
n8n    | 2022-01-13T16:58:55.238Z | debug    | Executing hook on node "Start" (hookFunctionsPush) {"executionId":"5","sessionId":"jwcv7gc1wsj","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteAfter"}
n8n    | 2022-01-13T16:58:55.239Z | debug    | Send data of type "nodeExecuteAfter" to editor-UI {"dataType":"nodeExecuteAfter","sessionId":"jwcv7gc1wsj","file":"Push.js","function":"send"}
n8n    | 2022-01-13T16:58:55.240Z | debug    | Received child process message of type processHook for execution ID 5. {"executionId":"5","file":"WorkflowRunner.js"}
n8n    | 2022-01-13T16:58:55.242Z | debug    | Executing hook (hookFunctionsSave) {"executionId":"5","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter"}
n8n    | 2022-01-13T16:58:55.248Z | debug    | Received child process message of type end for execution ID 5. {"executionId":"5","file":"WorkflowRunner.js"}
n8n    | 2022-01-13T16:58:55.265Z | debug    | Executing hook (hookFunctionsPush) {"executionId":"5","sessionId":"jwcv7gc1wsj","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter"}
n8n    | 2022-01-13T16:58:55.267Z | debug    | Save execution progress to database for execution ID 5  {"executionId":"5","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter"}
n8n    | 2022-01-13T16:58:55.268Z | debug    | Send data of type "executionFinished" to editor-UI {"dataType":"executionFinished","sessionId":"jwcv7gc1wsj","file":"Push.js","function":"send"}
n8n    | 2022-01-13T16:59:52.855Z | debug    | Wait tracker querying database for waiting executions {"file":"WaitTracker.js","function":"getwaitingExecutions"}
n8n    | 2022-01-13T17:00:52.875Z | debug    | Wait tracker querying database for waiting executions {"file":"WaitTracker.js","function":"getwaitingExecutions"}

Please share the workflow

{
  "nodes": [],
  "connections": {}
}

I’m just trying to get the app to work at all, so I’m only running the basic “Start” node

Share the output returned by the last node

There is not output, because execution gets stuck in a loop (at least as far as the UI is concerned) and never ends

Information on your n8n setup

  • n8n version: latest
  • Database you’re using (default: SQLite): default
  • Running n8n with the execution process [own(default), main]: default
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: docker

What else I tried

Was using the Brave browser initially. Tried with Chromium too. Then disabled every extension in Chromium and tried again. Got the same behavior every time :frowning:

Hey @elmaester,

Have you tried adding a set node to see if it does anything? Maybe it just fails if there is no nodes.

Hey @Jon

I initially tried to read an RSS feed and it behaved the same. Also Interval and cron job. There’s no difference

That is odd, have you tried deleting the container and the stored data from the volume and setting it up again?

It certainly is odd, seeing how nobody else seems to be having similar problems. I’m at a loss.

And yes, I have tried deleting the container and the data, before asking my question. Nothing changed.

I’m currently having the same problem; self-hosting as well. Originally, I was having a whole other problem where I was trying to run it behind a subpath with a Nginx Reverse Proxy. Turned out to be a problem with the latter versions:

So I backed up the version to 0.155.1 and it now comes up. However, now I create a simple workflow and it just spins. Try to cancel it… another spinner.

In terms of simple workflows, I’ve tried

  • just a start (which I don’t know if it works by itself, but figured it would just do nothing)
  • start->read rss (just like yours, just spins… click stop, another spinner)

Have you had any luck with this? Are you running behind a reverse proxy? on a sub path (ie https://bob.com/n8nio)?

@sillek you may wanna try Node-RED. It met all of my needs and did not have unsolvable issues. Cheers!

Hey @sillek,

What sort of configuration are you using for your setup? I setup a new instance today for testing behind nginx and it is working although because of the issue you found above it is not using a path and is just a sub domain.

In my compose file I used…

environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER
      - N8N_BASIC_AUTH_PASSWORD
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - NODE_ENV=production
      - VUE_APP_URL_BASE_API=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - WEBHOOK_TUNNEL_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
      - TZ=${GENERIC_TIMEZONE}

In the .env I have the subdomain and domain_name set to the URL I use for the instance. In my reverse proxy I then just direct subdomain.domain_name to http://internal_ip:5678 and everything is good.

Hi @Jon,
I’m not using docker-compose at the moment, just straight docker. Here is my run command:

docker run -it --rm --name n8n -e VUE_APP_URL_BASE_API="https://n8nio.sillek.com" -e N8N_LOG_LEVEL=debug -e N8N_BASIC_AUTH_ACTIVE="true" -e N8N_BASIC_AUTH_USER="xxxxx" -e N8N_BASIC_AUTH_PASSWORD="xxxxxxxx" -e WEBHOOK_URL="https://n8nio.sillek.com" -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n

For my reverse proxy, the following is in my location:


location / {
                proxy_pass http://localhost:5678;
                proxy_http_version 1.1;
        }
1 Like

@Jon oh, and I changed it to a subdomain instead of a sub path. No deployment issue, but I still get spinning wheels when I try to do a simple Start → HTTP Request to https://www.google.com

image

1 Like

Debug logs during the simple workflow execution:

2022-02-04T21:57:31.096Z | debug    | Remove editor-UI session {"sessionId":"bqqm3t1p3n5","file":"Push.js"}
2022-02-04T21:57:31.636Z | debug    | Add editor-UI session {"sessionId":"bgzikg83zcq","file":"Push.js","function":"add"}
2022-02-04T21:57:50.029Z | debug    | Wait tracker querying database for waiting executions {"file":"WaitTracker.js","function":"getwaitingExecutions"}
2022-02-04T21:58:12.776Z | debug    | Received child process message of type start for execution ID 2. {"executionId":"2","file":"WorkflowRunner.js"}
2022-02-04T21:58:12.794Z | verbose  | Initializing n8n sub-process {"pid":21,"file":"WorkflowRunnerProcess.js","function":"runWorkflow"}
2022-02-04T21:58:12.830Z | verbose  | Workflow execution started {"file":"WorkflowExecute.js","function":"processRunExecutionData"}
2022-02-04T21:58:12.835Z | debug    | Start processing node "Start" {"node":"Start","file":"WorkflowExecute.js"}
2022-02-04T21:58:12.836Z | debug    | Received child process message of type processHook for execution ID 2. {"executionId":"2","file":"WorkflowRunner.js"}
2022-02-04T21:58:12.837Z | debug    | Running node "Start" started {"node":"Start","file":"WorkflowExecute.js"}
2022-02-04T21:58:12.839Z | debug    | Running node "Start" finished successfully {"node":"Start","file":"WorkflowExecute.js"}
2022-02-04T21:58:12.840Z | debug    | Executing hook (hookFunctionsPush) {"executionId":"2","sessionId":"bgzikg83zcq","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteBefore"}
2022-02-04T21:58:12.841Z | debug    | Start processing node "HTTP Request" {"node":"HTTP Request","file":"WorkflowExecute.js"}
2022-02-04T21:58:12.843Z | debug    | Running node "HTTP Request" started {"node":"HTTP Request","file":"WorkflowExecute.js"}
2022-02-04T21:58:12.844Z | debug    | Send data of type "executionStarted" to editor-UI {"dataType":"executionStarted","sessionId":"bgzikg83zcq","file":"Push.js","function":"send"}
2022-02-04T21:58:12.848Z | debug    | Received child process message of type processHook for execution ID 2. {"executionId":"2","file":"WorkflowRunner.js"}
2022-02-04T21:58:12.849Z | debug    | Executing hook on node "Start" (hookFunctionsPush) {"executionId":"2","sessionId":"bgzikg83zcq","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteBefore"}
2022-02-04T21:58:12.850Z | debug    | Send data of type "nodeExecuteBefore" to editor-UI {"dataType":"nodeExecuteBefore","sessionId":"bgzikg83zcq","file":"Push.js","function":"send"}
2022-02-04T21:58:12.851Z | debug    | Proxying request to axios {"file":"NodeExecuteFunctions.js","function":"proxyRequestToAxios"}
2022-02-04T21:58:12.852Z | debug    | Received child process message of type processHook for execution ID 2. {"executionId":"2","file":"WorkflowRunner.js"}
2022-02-04T21:58:12.855Z | debug    | Executing hook on node "Start" (hookFunctionsPush) {"executionId":"2","sessionId":"bgzikg83zcq","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteAfter"}
2022-02-04T21:58:12.856Z | debug    | Send data of type "nodeExecuteAfter" to editor-UI {"dataType":"nodeExecuteAfter","sessionId":"bgzikg83zcq","file":"Push.js","function":"send"}
2022-02-04T21:58:12.858Z | debug    | Received child process message of type processHook for execution ID 2. {"executionId":"2","file":"WorkflowRunner.js"}
2022-02-04T21:58:12.859Z | debug    | Executing hook on node "HTTP Request" (hookFunctionsPush) {"executionId":"2","sessionId":"bgzikg83zcq","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteBefore"}
2022-02-04T21:58:12.861Z | debug    | Send data of type "nodeExecuteBefore" to editor-UI {"dataType":"nodeExecuteBefore","sessionId":"bgzikg83zcq","file":"Push.js","function":"send"}
2022-02-04T21:58:12.865Z | debug    | Received child process message of type sendMessageToUI for execution ID 2. {"executionId":"2","file":"WorkflowRunner.js"}
2022-02-04T21:58:12.867Z | debug    | Send data of type "sendConsoleMessage" to editor-UI {"dataType":"sendConsoleMessage","sessionId":"bgzikg83zcq","file":"Push.js","function":"send"}
2022-02-04T21:58:13.066Z | debug    | Running node "HTTP Request" finished successfully {"node":"HTTP Request","file":"WorkflowExecute.js"}
2022-02-04T21:58:13.068Z | verbose  | Workflow execution finished successfully {"file":"WorkflowExecute.js","function":"processSuccessExecution"}
2022-02-04T21:58:13.072Z | debug    | Received child process message of type processHook for execution ID 2. {"executionId":"2","file":"WorkflowRunner.js"}
2022-02-04T21:58:13.074Z | debug    | Executing hook on node "HTTP Request" (hookFunctionsPush) {"executionId":"2","sessionId":"bgzikg83zcq","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteAfter"}
2022-02-04T21:58:13.077Z | debug    | Send data of type "nodeExecuteAfter" to editor-UI {"dataType":"nodeExecuteAfter","sessionId":"bgzikg83zcq","file":"Push.js","function":"send"}
2022-02-04T21:58:13.091Z | debug    | Received child process message of type processHook for execution ID 2. {"executionId":"2","file":"WorkflowRunner.js"}
2022-02-04T21:58:13.093Z | debug    | Executing hook (hookFunctionsSave) {"executionId":"2","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter"}
2022-02-04T21:58:13.098Z | debug    | Received child process message of type end for execution ID 2. {"executionId":"2","file":"WorkflowRunner.js"}
2022-02-04T21:58:13.111Z | debug    | Executing hook (hookFunctionsPush) {"executionId":"2","sessionId":"bgzikg83zcq","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter"}
2022-02-04T21:58:13.111Z | debug    | Save execution progress to database for execution ID 2  {"executionId":"2","file":"WorkflowExecuteAdditionalData.js","function":"workflowExecuteAfter"}
1 Like

Hi, I have the same problem here.
I’ve tried many combinations (Windows + npx, Ubuntu + npm install, Ubuntu + docker, Ubuntu + docker-compose) but the result is the same.
The UI keeps hanging after starting the workflow both manual node / entire workflow.
When starting the workflow it actually runs but simply the UI does not update.
Later I can see the result in the executions.

Hey @Loris_Bogo,

Do you have a reverse proxy running in front of n8n or is it a direct connection? The issue Sillek had was fixed by tweaking the nginx config.

I am always connecting directly to the host where n8n is installed, to avoid introducing unknown variables to the equation.
The strange thing is that when I stop the n8n service, the UI wakes up and updates.
I believe it’s a UI problem, because both n8n service seems to run correctly the workflow and checking it’s database (I configured n8n to use an external Postgres installation) all seems right.

Do you see anything in the browser console or network tab?

Would you also be able to send the exact process you are using to setup n8n? So for me I start with installing NVM on a clean Ubuntu Server image, If you can start from that point it may help with reproducing the issue.

I did an NPM install yesterday on Ubuntu Server 20.04 which was running on a Digital Ocean droplet and it worked with no problems so it would be interesting to see what you are doing and if it is different to what I would normally do.

When I first click on “Execute workflow” it starts spinning and I see network activity.
The workflow actually starts, but I see nothing in the UI.
I cannot see anything either in the console.
If I try to stop it using the stop button, the worflows actually stops (if it was running) or it returns an error saying that it can’t find the execution (I presume because it is already terminated, if I waited enough).
These operation have been tested on the Ubuntu 20.04 server (VM) + docker compose install version.
I will try to do a fresh nvm + npm install on an Ubuntu 20.04 server (container) to check if I had missed something in the installation and then give feedback to you.
Thanks for your help!

1 Like

I tried to install nvm + npm in a Ubuntu 20.04 server in a container (LXC over proxmox hypervisor) but when I install n8n globally (-g) it gives me the error “command sh -c node install.js” “sh: 1: node: Permission denied”.
I made another try with a Ubuntu 20.04 server in a VM and the installation went good, but the problem arises as before.
I try to start the workflow and the UI stays frozen until I hit the stop button.
If the workflow was running it says that has been stopped, otherwise it gives the usual error saying that the execution does not exists.

Hey @Loris_Bogo,

Can you send over the commands you ran and the environment options you set so we can try and reproduce it?

I did another run of the nvm / npm install route yesterday and ran the docker setup process we document and both worked as expected, I am not sure what is going on but if we can follow what you did maybe we will hit the same problem.

Hi,
this weekend I tried to install n8n at home, using the same steps that I followed at my company.

  1. I’ve created a VM with Ubuntu 20.04.3 server
  2. Installed nvm with wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
  3. Restarted the shell
  4. Installed the lts node (v16) with nvm install --lts
  5. Installed n8n globally with npm install n8n -g
  6. Started n8n with n8n, but also created a systemd unit to start as service
  7. Tested from my PC and it seems to work correctly

Then I connected to my company with VPN to try to find differences between the two installation, but when I opened the browser on the company instance it also seemed to work.
This morning I am physically in my company and again it does not work from my PC, I’ve tried both Chrome and Edge (with IP address, only hostname and whole FQN, no matters).
From my collegue’s PC it works.
At this point I deduce that it must be something regarding my PC, maybe some sort of cache or similar.