Troubleshooting n8n Docker Installation: “This session (id) is not registered” and “Problem stopping execution” Errors

I recently installed n8n using Docker (portioner) with the following configuration. However, I’m facing an issue where my workflows keep running indefinitely with an error message in the Docker console: “This session (id) is not registered.” Additionally, the JavaScript console consistently shows the error “problem stopping execution.”

Docker Configuration

Here is the Docker configuration I used for my n8n installation:

version: "3.7"

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    environment:
      - N8N_HOST=n8n.seio.org
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://n8n.seio.org/
      - GENERIC_TIMEZONE=Europe/Paris
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=userX
      - N8N_BASIC_AUTH_PASSWORD=passX
    volumes:
      - n8n_data:/home/node/.n8n
    ports:
      - "5678:5678"

volumes:
  n8n_data:
    external: true

Reverse Proxy Configuration

I am using Nginx as the reverse proxy for n8n.

Error Details

  1. Docker Console Error:
    This session (id) is not registered
    
  2. JavaScript Console Error:
    problem stopping execution
    

Steps Taken

  1. Checked Docker Logs: Verified that the Docker container logs show the session ID not being registered.
  2. Reviewed Configuration: Ensured that the Docker configuration and environment variables are correctly set.
  3. Checked Nginx Configuration: Confirmed that the Nginx reverse proxy settings are correct and the proxy is working as expected.
  4. Reinstalled n8n: Attempted reinstalling n8n and recreating the Docker container, but the issue persists.

Versions

  • n8n Version 1.45.1
  • Debian 10 (through OVH VPS)

Request for Assistance

I’m seeking assistance to resolve these issues. Specifically, I need help with:

  1. Understanding why the session ID is not being registered.
  2. Fixing the “problem stopping execution” error in the JavaScript console.
  3. Ensuring the Nginx reverse proxy is correctly configured for n8n.

Any insights or suggestions from the community would be greatly appreciated. If you have encountered similar issues or have any troubleshooting tips, please share them.

Thank you for your help!

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hi @Theo_Delannoy Welcome to the n8n community! :tada:

Please update your post with nginx conf.

I’m facing the same problem.
It only seems to appear when n8n is run out of a container.
when installing directly with node.js it seems fine.

I seem to have found the working solution, at least for me. But I think we have the same environment (OVH, Plesk, Docker)

This is what helped in my case:

you might need to add the following headers in the proxy configuration for n8n:

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

Insert the lines in the block where you define the n8n location. It should look something like this:

#extension docker begin
location ~ ^/.* {
    proxy_pass http://0.0.0.0:5678;
    proxy_set_header Host              $host;
    proxy_set_header X-Real-IP         $remote_addr;
    proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}
#extension docker end

The proxy_http_version 1.1;, proxy_set_header Upgrade $http_upgrade; and proxy_set_header Connection "upgrade"; configuration settings are needed for the correct handling of WebSocket connections through a proxy. Without them, the proxy might treat the WebSocket connection incorrectly, leading to issues.

After modifying the Nginx configuration, don’t forget to reload the Nginx service to apply the changes:

sudo service nginx reload

After adding those lines and restarting Nginx, try accessing your n8n instance again to see if the issue is resolved.


[Edit:] One caveat I found is that if you’re using OVH VPS together with PLESK, then there’s no real option to have this configured in PLESK. The proxy entry in the additional nginx directives doesn’t seem to be followed. When putting this directly in the nginx.conf it is working as expected, but as soon as PLESK thinks it has to rewrite the config, it’s gone again. :frowning:
Maybe somebody else has a solution for this.

1 Like

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