Processes cannot complete + incorrect link in the webhook

Ubuntu 22 server. In addition to n8n, it has Apache, PHP, MySQL, phpMyAdmin, and Grafana installed.
n8n 1.65.2, node 18.20.04, database – SQLite, npm
Apache configuration for n8n:

<VirtualHost *:80>
    ServerName n8n.mydomain.com
    Redirect permanent / https://n8n.mydomain.com/
</VirtualHost>
<VirtualHost *:443>
    ServerName n8n.mydomain.com
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/n8n.mydomain.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/n8n.mydomain.com/privkey.pem
    ProxyPass / http://localhost:5678/
    ProxyPassReverse / http://localhost:5678/   
    ErrorLog ${APACHE_LOG_DIR}/n8n_error.log
    CustomLog ${APACHE_LOG_DIR}/n8n_access.log combined
</VirtualHost>

n8n settings at startup:

export N8N_PROTOCOL="https"
export N8N_HOST="n8n.mydomain.com"  
export N8N_PORT=5678
export WEBHOOK_TUNNEL_URL="https://n8n.mydomain.com"  

There are issues when running n8n:

  1. The webhook URL is specified as: https://n8n.mydomain.com:5678/webhook-test/12345. The problem is that the port is included. The URL displays <domain + port>, but it does not work. The link works.
  2. When running any block, for example, Set (Edit Fields), which sets name and value, the block records but cannot complete itself.
    Please advise on how to fix these issues?

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:

hello @raktanas

it should be WEBHOOK_URL. No tunnel inbetween.

plus according to the Apache config, your n8n should use the http protocol instead of https, so you can remove N8N_PROTOCOL, N8N_HOST and N8N_PORT envs, as they will be set to default

Thank you! I didn’t understand what exactly needs to be changed in the Apache settings. The following solution helped:

export WEBHOOK_URL="https://n8n.mydomain.com"
export WEBHOOK_TUNNEL_URL="https://n8n.mydomain.com"

However, the issue with the blocks hanging remains. The operation will hang under forced stop. If you forcibly click “stop operation,” the phrase “hellow” will appear in the Output block. An error is displayed in the ubuntu logs:

The session "3pvi3gfhgb" is not registered.
The session "3pvi3gfhgb" is not registered.
The session "3pvi3gfhgb" is not registered.

What could it be related to?


have you changed the n8n protocol to http by removing the N8N_PROTOCOL variable?

Yes, I executed that command. It didn’t help:

export N8N_PROTOCOL="http"

Enabling such settings helped solve the problems:

export N8N_PUSH_BACKEND=websocket

And adding to the Apache configuration:

# Поддержка WebSocket 
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:5678/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://localhost:5678/$1 [P,L]
1 Like

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