UI Connection Lost - Server-Sent Events

Hi,

I’m getting this error yet I believe there is connection since the app works just fine when I interact with the UI, change or save something in a workflow.

image

This is happened after I configured a reverse proxy in front of n8n. Here is the setup:

  • n8n.example.com points to nginx server.
  • NGINX works as reverse proxy on nginx server. listen n8n.example.com 443 and redirects N8NServer:5678
  • n8n container works on N8NServer mapped to 5678:5678

n8n container deployed via docker-composed using below env. variables and using sqllite

environment:
  - N8N_PROTOCOL=https
  - N8N_HOST=n8n.example.com
  - VUE_APP_URL_BASE_API=https://n8n.example.com/
  - WEBHOOK_TUNNEL_URL=https://n8n.example.com/

Guess the problem is that the reverse proxy is not configured correctly to work with Server-Sent Events. For that reason do you see this error message. You should find the solution here:

Hello guys…
I’m on this issue “Lost Connection”… but my server is Apache… I’ve make a research and saw it’s very different from nginx configs and didn’t find anything here at community…
Do you have some hint?
Sometimes I get “404 page not found” too… and have to restart n8n…
Thanks.

@simeia sorry have even less knowledge about Apache than Nginx. I can only advise you to check the Nginx settings and then look online for settings in Apache which do the same.

Or you can search generally on Google for “server sent events” and Apache to find a possible configuration.

If none of it works for you I can sadly simply only advice you to use the default configuration with Nginx which can be found in the documentation.

Thanks @jan I’m just doing this…