Latest update broke my websockets

I have spent the entire day trying to fix this and I can’t, and tbh I haven’t felt rage like this in a while.

This simple nginx conf that I used to handle all websocket traffic has just stopped working. I’ve tried tinkering with it in innumerable ways, I’ve tried wholly different configurations… NOTHING works.

location /ws {
        proxy_pass          http://localhost:8110;
        proxy_http_version  1.1;
        proxy_set_header    Upgrade $http_upgrade;
        proxy_set_header    Connection "Upgrade";
        proxy_set_header    Host $http_host;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header    X-Forwarded-Proto $scheme;
        proxy_set_header    X-Real-IP $remote_addr;

This was working until the update.

In Chrome it doesn’t even bother to tell me an error code when the websocket fails, but when I test it in Node, I get ‘Unexpected server response: 101’

However, if I monitor the websocket server it appears everything is running perfectly, but then the client will immediately disconnect after authenticating.


I can insecurely connect with ws://ip-address:port, so the websocket server is not at fault.

Please help.

RIGHT, which one of you bastards decided to add this line to the default nginx template?:

proxy_hide_header Upgrade;

I’ve spent all day looking for the issue, removing that line fixed it.

1 Like

I guess this hasn’t affected many users as it appears to be just me (I googled enough to safely assume that), but even so I’d consider reverting this.
My issue was an absolute nightmare to diagnose, I was using an additional include conf (domain.nginx.ssl.conf_extra) along with the default nginx template, and it results in the most non-descript error for the client and absolutely nothing is logged on the server.
Annoyingly I scoured through just about everything else before finally spotting the problem in the template.
I’ve now made a copy of the default template and removed the troublesome line.

Honestly, thats a word we dont need here in the forum - I understand that you can get angry in such situation, but please choose way to speak it out…

What’s your nginx version? Did you find out why exactly it made troubles?

You should consider yourself lucky, on the discord I was much less kind :slight_smile:

I ended up using apt upgrade so now I’m on the newest version of nginx (1.21 I think?)

I also established on the discord that the update had also done something screwy to my user packages and ssh access. Every user originally had assigned a custom package, but after the update, they had all reverted to default and I couldn’t login with SSH on any of them.
I set them back to their custom packages but I still couldn’t login, even though the package’s ssh access was set to ‘bash’ and on editing a user and revealing the advanced section, they were also set to ‘bash’.
I eventually managed to get it working with the command v-change-user-shell user bash for each user.

Also there’s an empty .vscode-server in all my user directories that appears to have been put there during the update, that along with all the other issues originally led me to believe my server had been hacked.

Sorry to go on, but chasing all these problems took up my entire day and I’m not at all happy about it.
Obviously I appreciate all the hard work everyone’s put into maintaining this project so apologies for using a rude word, it wasn’t meant to be taken seriously.

Nobody is lucky to receive kindness from you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.