_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

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130579 1222
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36689 110
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49134 226
New

We're in Beta

About us Mission Statement