I had this “Connection Lost” in workflow editor for more than a week. tried everything found on the forums. Nothing worked. Then I reinstalled the n8n ( on GCP using Docker ), still error wasn’t fixed. So finally I decided give all my configurations and errors to chatGPT and ask to help. Finally it helped me to fix it. The issue was in the WebSockets.
nginx config : before fix
server {
server_name automation.webloomlabs.net;
location / {
proxy_pass http://localhost:5678;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/automation.webloomlabs.net/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/automation.webloomlabs.net/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = automation.webloomlabs.net) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name automation.webloomlabs.net;
return 404; # managed by Certbot
}
Excelente bro, muchas gracias. No hay prácticamente nada de ayuda en español y encontrarte llevó un tiempo… Lo que hice fue actualizar a la versión más actual de n8n (latest version), Para eso me tocó configurar la autenticación de dos pasos de GCP. Luego hagan la configuración de Nginx (algunos la pueden tener en Apache. Igual, lo explica con ese modo). Para ello, usé Gemini y fue paso a paso hasta lograrlo.
GREAT bro, thank you so much. There’s practically no help in Spanish, and finding you took a while… What I did was update to the latest version of n8n. For that, I had to configure GCP’s two-step authentication. Then, do the Nginx configuration (some might have it in Apache. It explains it that way too). For this, I used Gemini, and it was step-by-step until I got it.
Good question. The issue was that there was no connection between n8n and my server, in this case, Google Cloud Platform. I saw several tutorials that suggested it was due to an n8n update, so I updated it, but the problem persisted. Then I went to GCP, and when I tried to log in, it wouldn’t let me until I configured 2-Step Verification. I set it up, but the problem remained… so I re-entered my Google credentials in the nodes, and it still didn’t work. Finally, using Gemini throughout the process, I did the Nginx configuration, and it worked.
I’ve spent considerable time on this topic, testing various configuration options and switching from “sse” to “websockets,” but the issue kept recurring. To isolate the problem, I conducted an experiment where I bypassed nginx and connected directly to the latest version of n8n (1.93.0) using the WebSocket option. This worked successfully on a new dedicated port (other than 5678). However, when I reintroduced nginx, the problem resurfaced. Despite carefully checking all configuration lines, nothing seemed to resolve it.
I then created a fresh nginx configuration from scratch using the new experimental port, but it didn’t work initially. A standard nginx service restart didn’t help either. However, after restarting the entire VM on GCP (which forced nginx to start fresh) the issue was finally resolved. I’m sharing this in case it helps others facing a similar problem.
I upgraded to 1.94.0 with Docker and also now face the “Connection Lost” in workflow editors
I had that issue in the past and already have the sse parameter in the docker compose. The upgrade to 1.94.0 is the one that broke it for me (I hadn’t upgraded in 2 months).
As suggested in other posts, I tried:
editing the value for N8N_PUSH_BACKEND to websocket and back to sse. It didn’t work. I had no change to my apache config in a while, it’s something that changed with N8N.
moving from sse to websocket and adding a ProxyPass /ws/ ws://localhost:5678/ws/ line in my apache conf file. It didn’t work, I still have n8n running but “Connection Lost” on all workflow editors.
I am with Apache and many helpful comments are about nginx. Has anyone solved this issue with Apache in the recent weeks?