-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Connection lost" - Can't save workflows #6757
Comments
Hey @JoeyFenny, That looks like maybe your reverse proxy is not configured to support websockets. Has the CapRover reverse proxy got web sockets enabled? |
@JoeyFenny does this solve the issue for you? |
@netroy we started to facing this problem today in |
@dannyeuu what are you using for ingress ? not all ingress controllers support websockets out-of-the-box. |
This happens occasionally; some versions of n8n work, and some won't. In the past, I found a solution: |
Hey @Igcorreia, The default now is websocket this was a change introduced into 1.0 and should help resolve a lot of the issues around SSE. The previous option you linked to was to allow SSE to work nicely with nginx which you can also find further up in the same post. To get nginx working with websockets it should be a case of adding the 3 options below
So a full config could look something like...
|
@Joffcom, finally, I figured it out. The example code was what unblocked me. It works, but I had to manually change the Nginx settings in a Plesk server. I am actually going to try this with another application and report it back to Plesk. |
@netroy the problem was with nginx, too. Migrating to SSE, the problem solved. |
@dannyeuu n8n is migrating away from SSE. That's what we used prior to 1.x. |
If it helps in your research I have noticed the following:
You can verify this behavior through the /push endpoint. |
@luizeof I also have to remove the proxy for N8N to work. :/ |
Hey @luizeof, That sounds like there may be an additional configuration issue required if you are using a Cloudflare proxy and don't want it to reconnect, Cloudflare do also document that if Cloudflare push any code changes it will also restart websockets although it shouldn't cause any issues if they are reconnecting. The issue in this post is for when n8n does nothing but show connection lost which indicates that websockets are not allowed at all. To save on further confusion on this topic I am going to close this issue, If anyone in the future has an issue with the websockets or sees the connection lost message feel free to open a post on the support forum as this issue is more likely to be with the configuration of systems outside of n8n than n8n itself. |
@Joffcom thanks for your reply ;) from what i found cloudflare actually closes connections if there is no activity. In this post people recommend doing a type of ping to avoid this. Could the N8N make this tweak in doing a ping/heartbeat through the websocket to avoid this disconnect? Cloudflare is very popular among users and this will generate a lot of questions. |
@luizeof Coudflare document that they close the connection after around 100 seconds, This is however not the same as the original raised here and I would rather try to keep things on topic as much as possible so we don't mix feature requests in with configuration issues. As a general rule feature requests like this one should be opened on our support forum as well which is the preferred location for any support queries or feature requests. |
# [1.5.0](https://github.com/n8n-io/n8n/compare/[email protected]@1.5.0) (2023-08-31) ### Bug Fixes * **Agile CRM Node:** Fix issue with company address not working ([#6997](#6997)) ([2f81652](2f81652)) * **Code Node:** Switch over to vm2 fork ([#7018](#7018)) ([dfe0fa6](dfe0fa6)) * **core:** Invalid NODES_INCLUDE should not crash the app ([#7038](#7038)) ([04e3178](04e3178)), closes [#6683](#6683) * **core:** Setup websocket keep-live messages ([#6866](#6866)) ([8bdb07d](8bdb07d)), closes [#6757](#6757) * **core:** Throw `NodeSSLError` only for nodes that allow ignoring SSL issues ([#6928](#6928)) ([a01c3fb](a01c3fb)) * **Date & Time Node:** Dont parse date if it's not set (null or undefined) ([#7050](#7050)) ([d72f79f](d72f79f)) * **editor:** Fix sending of Ask AI tracking events ([#7002](#7002)) ([fb05afa](fb05afa)) * **Microsoft Excel 365 Node:** Support for more extensions in workbook rlc ([#7020](#7020)) ([d6e1cf2](d6e1cf2)) * **MongoDB Node:** Stringify response ObjectIDs ([#6990](#6990)) ([9ca990b](9ca990b)) * **MongoDB Node:** Upgrade mongodb package to address CVE-2021-32050 ([#7054](#7054)) ([d3f6356](d3f6356)) * **Postgres Node:** Empty return data fix for Postgres and MySQL ([#7016](#7016)) ([176ccd6](176ccd6)) * **Webhook Node:** Fix URL params for webhooks ([#6986](#6986)) ([596b569](596b569)) ### Features * **core:** External Secrets storage for credentials ([#6477](#6477)) ([ed927d3](ed927d3)) * **core:** Add MFA ([#4767](#4767)) ([2b7ba6f](2b7ba6f)) * **core:** Add filtering, selection and pagination to users ([#6994](#6994)) ([b716241](b716241)) * **editor:** Debug executions in the editor ([#6834](#6834)) ([c833078](c833078)) * **RSS Read Node:** Add support for self signed certificates ([#7039](#7039)) ([3b9f0fe](3b9f0fe)) Co-authored-by: netroy <[email protected]>
In case it's helpful to anyone else who has problems with CapRover. Ticking "Websocket support" under "HTTP Settings" solves the "Connection lost" problem. |
This might help someone. I just ran into this problem with n8n deployed on a kubernetes cluster behind a
Found solution here. |
Describe the bug
A clear and concise description of what the bug is.
Says connection lost even though loading any other page works and I'm connected to the internet and it appears my instance is also connected. Possibly a docker issue? Running as a one-click-app via CapRover
To Reproduce
deploy n8nio/n8n:latest (1.1.0) on CapRover
Expected behavior
Is not complaining about connectivity issues. Connects successfully.
Environment (please complete the following information):
own
,main
andqueue
. Default ismain
]All of those example values match. I have not changed anything.
Additional context
Possible issue with how CapRover is running it rather than with n8n directly, but unsure.
The text was updated successfully, but these errors were encountered: