I did the setup guide. But we created a dns record before that. So we have one thats active.
But its does not work with the dns record. And thats not the problem. The dns records works fine, but i cant start it.
My docker-compose file is the same as in the guide and my n8n.env looks like this:
But i saw, that the docker-compose version is sadly not compatible with apache on the same server.
But it starts if i stop the apache2 service, but i cant open the interface with the domain. I dont get a secure connection.
Now i installed it on a new server without apache but it says now 4 warnings that variables of the .evn file are not set but they are in the n8n.env.
And the logs dont helping me in any way. It says that the file /home/node/.n8n exists but its definitly not. The folder node dont exists too.
Ah great to hear that you did figure it out. Because I read your answer and was confused why it would not work. Did somehow think you only wrote n8n.env to describe it and not that you actually named it that way. Sorry should have really caught that and then asked.
I got the same error this morning and I knew what the issue was. I connected to my company’s network using their proxy servers. Once I did, n8n workflow page said “connection lost” and when I disconnected from the proxy and directly connected to the internet, the error was gone. So, I guess it’s got something to do with the security that’s set by my company. People facing the same issues may test the same in a different PC/network etc to check if that solves the issue.
came here to leave a hint for everybody fighting with this problem.
From what I found, the issue is related to the compression. eg. If I remove the Accept-Encoding header from a curl request to /rest/push I get a quite prompt :ok response.
So for my case I’m running n8n in Kubernetes behind Traefik Proxy.
What I had to do was to edit the traefik configmap and disable the compression for both entry points:
I have the same problem.
For me, it looks like a nginx config problem (set as a reverse proxy).
I tried to disable buffering and enabled chunked encoding like the documentation showed but nothing works.
I observe one of the following behavior:
the push request returns to the browser correctly and a connection error is reported
the push request does not return, no connection error is reported but responses from execution of flows are not returned either (the ui is blocked in “Executing workflows”)
In my experience does really everything come with advantages but also disadvantages. There are for sure some problems with EventSource, but considering how many people are using n8n worldwide, are they still quite limited and normally a solution can be found. For that reason. am I very hesitant the change something which generally works, just to replace it with a new unkown set of problems, especially if we have currently very limited resources.
But generally agree that this is something we have to improve at some point. Sadly do we have currently already so much to do, with many other very high impact features and issues, that we have to prioritize and for that reason do not know when we can tackle this. Sorry.
For those who are in 2022 or later with this same problem of Connection lost when using nginx, traefik, or another reverse proxy.
The error is caused when the webUI tries to send a request to URI /rest/push?sessionId=12341234 expecting a text/event-stream response and the reverse proxy tries to compress or buffer the response coming from n8n. When trying to compress or buffer the response gets infinitely stuck on the reverse proxy and the webUI never receives a valid connection.
To solve this you need to add flags that disable buffering or compression of responses in the reverse proxy.
So I am seeing this as well, only I don’t have any reverse proxies involved. I saw this behaviour on my local docker so it didn’t even leave my machine. Ran great for a day, came in the next day and it’s not working. Moved it off to another docker server, same thing worked great for a day and then no beuno.
Is the log container still a thing? Obviously, I can’t change compression settings but am seriously toying with setting up Traefik just to see if it makes a difference. I come from node-red, so was looking forward to see what it can do with less work