_rubenfa

_rubenfa

Websocket 426 Error, with LiveView

Hi,

I have developed some things with LiveView. All is working on my machine (how many times I would have said that …), and also on the test server. The problem is that it is not working on the production server. If I open Firefox’s developer tools, I can see an error message:

Firefox can’t establish a connection to the server at wss://mydomain.com/live/websocket?vsn=2.0.0

And after that, an HTTP failed request with code 426 Upgrade Required.

Do you know what am I doing wrong?

Thanks in advance.

Most Liked

idi527

idi527

:waving_hand:

Is your production box behind a load balancer / reverse proxy of any kind? Maybe it doesn’t allow upgrade requests through, then cowboy would respond with 426 probably, since it expects one. But that’s just speculation.

_rubenfa

_rubenfa

Never mind. I find out that there is a Caddy reverse proxy configured. After configuring it with proper WebSockets configuration, all is working fine.

Thanks for your help.

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54092 488
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New