We updated kong in some of our environments from 1.3 to 1.4.3 (also tried 1.4.2 after it failed). After the update everything seemed fine in chrome but in firefox the websocket connections could not be established. We are using the most recent version of anycable-go as our websocket server.
The error in the browser:
Connection to wss://my.url.com was interrupted while the page was loading.
Could not find any errors in the kong log
1.4.2 and 1.4.2)EDIT:
I also tried with 2.0.0rc2 and I got the same result. For some reason this bug only appears in two of our four environments. Kong is configured the same in all of the environments.
The error messages in firefox:
The connection to wss://sth.example.com/cable?chatbot_name=Support was interrupted while the page was loading. js.js:29:9219
Firefox can鈥檛 establish a connection to the server at wss://sth.example.com/cable?chatbot_name=Support. js.js:29:9219
This is how requests from chrome appear in the log.
83.175.84.210 - - [21/Jan/2020:17:04:12 +0000] "GET /cable?chatbot_name=Support HTTP/1.1" 101 100 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36"
2020/01/21 17:04:13 [debug] 22#0: *17553 [lua] init.lua:823: balancer(): setting address (try 1): 10.42.64.96:3000
The one from firefox don't show up in the logs.
I found out this works when I enable the cloudflare proxy (orange cloud) option for the dns entry.
@rolandg, I will send a fix in 10 minutes.
@rolandg, can you please try:
https://github.com/Kong/kong/pull/5495
You can manually patch your Kong version with the changes. Changes are small.
This issue just hit us in prod on 1.4.2 with a few integrations. Testing fix on 1.4.2 and 1.4.3 with Chrome/FF/Edge browsers now with customers. Glad a fix has been put out!
Confirmed fix on my end in FF/Chrome/Safari/Edge. Thx.
Thanks for validating the fix @jeremyjpj0916!