I’ve set an instance of n8n behind a reverse proxy Apache, with n8n basic authentication
I can connect, browse, open WFs despite this orange message à top right, but I can’t execute them :
## Problem running workflow
There was a problem running the workflow:
No active connection to server. It is maybe down.
That is a sign that your reverse proxy is not configured correctly to work with Server-sent events.
Here are some other topics about it:
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.
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…
i have a problem with n8n. To start it i use the following command:
docker run -it --rm --name n8n -p 5678:5678 n8nio/n8n
Before that i installed nodejs and python, but nothing else. Server running ubuntu 18.04.
After starting with docker, i get access to the web panel if i write ServerIP:5678 in the browser, but it says at the top right “Connection Lost” and i cant save anything.
I hope anyone can help me.
I tried to install n8n on my server. I use nginx to make the bridge between n8n.mydomain and localhost:5678.
It works, I can access to the interface. The problem is that I have the message “Server connection could not be established. The server is down or there is a connection problem. It will reconnect automatically as soon as the backend can be reached.”
Is there a port to configure in addition to 5678?
I used 3 load-balanced reverse proxies, could it be the root cause despite n8n uses rest APIS ?
I’ve got no issue if I use a single reverse proxy with the same configuration for an other n8n instance
If it works with one then I guess that is the problem. Sadly have no experience with Apache so can not be much of a help there.
How do you detect this lost connection Jan ? I suppose you don’t trigger a socket to the caller of course.
Do you read 0 characters from the caller or something like that ? I need to know to inverstigate a little more proxy side - thanks Jan
There is no special code for that. All it does is that it tries to connect and if it can not or if the connection gets closed it displays “connection lost”.
It is not using WebSocket it is using Server-sent Events (EventSource) for that. For them to work properly through a reverse proxy it has to get configured in a special way. Examples for that can be found in the topics I linked above.
So I will dig the config for SSE indeed …
Just a little thing seen with tcpdump, at the first GET after basic authentication, I can see this strange answer, is it linked ?
.%l.....GET / HTTP/1.1
Authorization: Basic dmxhZGltaXI6bHV0aW9uaWFsZQ==
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Accept-Encoding: gzip, deflate
X-IWS-Via: 1.1 1EAA5587 (IWSS)
Via: 1.1 eaccxxxxxxxxxx.com
.....%l.HTTP/1.1 200 OK
Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, PATCH, DELETE^M
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, sessionid
Content-Type: text/html; charset=utf-8
Date: Thu, 13 Aug 2020 16:39:02 GMT
But just a Connection lost in GUI
The cause is our entreprise cisco VPN which seems to not support SSE
Uh, that is bad. Sorry but if there is no way to make SSE work then I can sadly not think of a way right now to use the n8n-Editor as it relies on it. But still very surprised. Extra chose that technology as it is very simple and is supported by almost everything.