Execution not found

Describe the issue/error/question

I am trying to Mock data from a Function Node, but once a run it, the execution workflow never stops. In the Logs, the process shows that Execution was not found.

What is the error message (if any)?

ERROR RESPONSE
ResponseError: Execution not found
at /usr/local/lib/node_modules/n8n/dist/src/Server.js:1566:23
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /usr/local/lib/node_modules/n8n/dist/src/ResponseHelper.js:90:26 {
httpStatusCode: 404

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

info     | Attempt to read execution was blocked due to insufficient permissions {"userId":"80e9f88a-4e1a-412c-bc03-c94788eec035","executionId":"4","file":"Server.js"}

Information on your n8n setup

  • **n8n version:lastest
  • **Database you’re using (default: SQLite):MYSQL
  • **Running n8n with the execution process [own(default), main]:own - queue -1 Worker
  • **Running n8n via [Docker, npm, n8n.cloud, desktop app]:Docker Compose

Hey @yurilima, I am sorry to hear you’re having trouble here.

I tried running your example workflow but didn’t have any trouble here, even in queue mode using the setup you have described. That’s when manually executing the workflow as well as when looking at a previous production execution.

For reference, this is the exact docker-compose.yml I've used here
version: '3.8'

services:
  mysqldb:
    image: mysql:8
    restart: unless-stopped
    environment:
      - MYSQL_ROOT_PASSWORD=MysqlPassword1234
      - MYSQL_DATABASE=n8n
      - MYSQL_USER=n8n
      - MYSQL_PASSWORD=n8n
    volumes:
      - C:\Users\Tom\Desktop\queue_test_mysql\db_data:/var/lib/mysql

  adminer:
    image: adminer
    restart: always
    ports:
      - 8080:8080

  n8n:
    depends_on:
      - mysqldb
      - redis
    image: n8nio/n8n:0.178.2
    restart: unless-stopped
    environment:
      - EXECUTIONS_MODE=queue
      - NODE_ENV=production
      - N8N_PORT=5678
      - N8N_DISABLE_PRODUCTION_MAIN_PROCESS=true
      - DB_TYPE=mysqldb
      - DB_MYSQLDB_HOST=mysqldb
      - DB_MYSQLDB_USER=n8n
      - DB_MYSQLDB_PASSWORD=n8n
      - QUEUE_BULL_REDIS_HOST=redis
      - QUEUE_BULL_REDIS_PORT=6379
      - N8N_LOG_LEVEL=debug
      - EXECUTIONS_DATA_PRUNE=true
      - EXECUTIONS_DATA_MAX_AGE=1
    ports:
      - 5678:5678
    volumes:
      - C:\Users\Tom\Desktop\queue_test_mysql\n8n_data:/home/node/.n8n

  n8nworker:
    depends_on:
      - mysqldb
      - redis
      - n8n
    image: n8nio/n8n:0.178.2
    restart: unless-stopped
    environment:
      - EXECUTIONS_MODE=queue
      - EXECUTIONS_PROCESS=main
      - NODE_ENV=production
      - N8N_PORT=5679
      - DB_TYPE=mysqldb
      - DB_MYSQLDB_HOST=mysqldb
      - DB_MYSQLDB_USER=n8n
      - DB_MYSQLDB_PASSWORD=n8n
      - QUEUE_BULL_REDIS_HOST=redis
      - QUEUE_BULL_REDIS_PORT=6379
      - N8N_LOG_LEVEL=debug
      - EXECUTIONS_DATA_PRUNE=true
      - EXECUTIONS_DATA_MAX_AGE=1
    ports:
      - 5679:5679
    volumes:
      - C:\Users\Tom\Desktop\queue_test_mysql\n8n_data:/home/node/.n8n
    command: n8n worker

  n8nwebhook:
    depends_on:
      - mysqldb
      - redis
      - n8n
    image: n8nio/n8n:0.178.2
    restart: unless-stopped
    environment:
      - EXECUTIONS_MODE=queue
      - EXECUTIONS_PROCESS=main
      - NODE_ENV=production
      - N8N_PORT=5680
      - DB_TYPE=mysqldb
      - DB_MYSQLDB_HOST=mysqldb
      - DB_MYSQLDB_USER=n8n
      - DB_MYSQLDB_PASSWORD=n8n
      - QUEUE_BULL_REDIS_HOST=redis
      - QUEUE_BULL_REDIS_PORT=6379
      - N8N_LOG_LEVEL=debug
      - EXECUTIONS_DATA_PRUNE=true
      - EXECUTIONS_DATA_MAX_AGE=1
    ports:
      - 5680:5680
    volumes:
      - C:\Users\Tom\Desktop\queue_test_mysql\n8n_data:/home/node/.n8n
    command: n8n webhook

  redis:
    image: redis
    ports:
      - 6379:6379
    restart: unless-stopped

Is the user you’re logged in with also the owner user of your n8n instance?

1 Like

@MutedJam thank you for replying me. I am gonna test your yaml file against of mine and see i ve done. Once i get any feedback i will reply you back.

1 Like

Thanks @yurilima. In the meantime @jan also shared a problem earlier with me where the main process can crash, which could potentially be what’s causing execution to seemingly not stop here.

We’ll of course confirm once this has been fixed.

Hi, I am also getting this issue, some of my workflows manually run (e.g. a single zulip), but some do not, and it seems to be ones that get data externally (google drive (both nodes), HTTP GET, google sheets etc.)

Every time I run them I get:

ERROR RESPONSE
ResponseError: Execution not found
at /usr/local/lib/node_modules/n8n/dist/src/Server.js:1566:23
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /usr/local/lib/node_modules/n8n/dist/src/ResponseHelper.js:90:26 {
httpStatusCode: 404
}
Attempt to read execution was blocked due to insufficient permissions

I am running in docker.
n8n version = 0.178.2
Database = Postgres 14
executions process = own

Oddly the timestamps are 1 hour off, GENERIC_TIMEZONE and TZ (and /etc/timezone) are correct, but the timestamps are still off. I don’t know if that’s affecting n8n’s ability to process data.

I also get:

 Attempt to read execution was blocked due to insufficient permissions {"userId":"my-user-id","executionId":"46","file":"Server.js"}

Is this something to do with docker, perhaps?

1 Like

@bocaz Hi, man could you please paste here you .yml file? I am not too sure yet but i think it is related to tha Volumes for each container. All of them i could realize that must be in the same folder.

I am still cheking if it was the main couse of the problem. I will tell you soon.

The possible solutions:

In the Docker Compose files

  1. Check Volumes for each n8n instance, they should have the same path.
n8n -> [you own path here]/n8n_data:/home/node/.n8n
n8n_worker_1 -> [you own path here]/n8n_data:/home/node/.n8n
n8n_worker_2 -> [you own path here]/n8n_data:/home/node/.n8n
n8n_webhook_1 -> [you own path here]/n8n_data:/home/node/.n8n
...
..
.
  1. Check N8N_PORT for each instance, they should have different ports

n8n -> N8N_PORT: 5678 -> 5678:5678
n8n_worker_1 -> N8N_PORT: 5679 -> 5679:5679
n8n_worker_2 -> N8N_PORT: 5680 -> 5680:5680
n8n_webhook_1 -> N8N_PORT: 5681 -> 5681:5681
...
..
.

I just did those modifications according to the docker-compose file @MutedJam posted and everything is working properly as never before. Thank you @MutedJam

@bocaz Did you have any other solution?

Hi. No, I haven’t

I have been unable to get n8n working again. I have tried a new server, I have tried running it on Cloudron, I have tried Ubuntu 18 and 22 (docker). I have tried restoring backups from a time n8n was working on my original server, and I have tried using different versions of n8n (from 167 to 179) and every time the workflow does not stop executing. I also get frequent connection drop-outs since I updated past about 176.

When I stop it manually, sometimes the data comes through, sometimes it continues to spin even though in the logs it shows “execution complete - UI updated” (or something).

Dear n8n team;

I am looking to move to Integromat (now ‘Make’) because, I do not have time for this.

I have created at least 5 new servers in the past 10 months (always Docker) because every so often, the whole thing just stops letting me run manual operations, or something else fails like connections.
Considering I have been running minimum 2GB VPS on Linode and now OVH, I am fairly sure it is not my VPS supplier.

I don’t know what or why things have changed, but I can’t keep spending hours troubleshooting this and hoping it goes well.

@bocaz I know may you are very upset about that. But let me see if I can help you. Could you please share your most recently docker-compose file or maybe the file which you were working on to solve the problem?

I am asking you, because, i was facing almost the same scenario and ended up knowing that all was a lack of knowledge.

I hope, we could solve your issue. Talk to you soon.

I am using CapRover, so the docker compose is re-written for that, you can find it here:

(This compose starts-up with v159.1 as default, but with my last server I upgraded with each new release so was up to date, and more recently with a server I started last month, I just went from v159, to v164 then straight to v179)

However, I have just setup a new server with Ubuntu 18, using a fresh domain, running v179, and so far things are smoother :slight_smile:

One thing to note, is that I am using Postgre (v14 or v14.3), I know that SQLite is the default, but I want to use CapRover, even though I am aware that may cause issues troubleshooting n8n on this forum. The main reason is I don’t have enough confidence with NGINX or Docker to setup SSL etc. for a vanilla Docker install, but logically it shouldn’t make too much difference because n8n is (more or less) still running a standard Docker setup.

As mentioned though, I have also tried this via Cloudron (v179.0) and I still had issues. The only place I didn’t have issues is the desktop version.

I’m persisting, but if the situation repeats where workflows just spin and spin, I will share all my logs here, but I will also need to start moving to another platform because I just don’t have any more time to waste fixing things that weren’t broken as recently as March.

@bocaz Look. If you set a new VPS and allow me to get the access temporarily, I could set it up for you.
If you still wanna do it by yourself I would recommend using Aapanel to manage a few things on the server-side with NGINX and CloudFare for DNS, it makes my life I little easier, so that’s the link aaPanel - Free and Open source Hosting control panel. One-click LAMP/LEMP.. Anyway, feel free to get in touch.

I will take a look at your Docker Compose however I’ve never use Cap Over before. If I have news I will let you know.

How are things, man? Did you have any problems since you have a new server??