Skip to content
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

v2.11.1 breaks websockets for asp.net core #10589

Closed
2 tasks done
clarity99 opened this issue Apr 10, 2024 · 14 comments
Closed
2 tasks done

v2.11.1 breaks websockets for asp.net core #10589

clarity99 opened this issue Apr 10, 2024 · 14 comments

Comments

@clarity99
Copy link

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?

After I upgraded to the latest on 2.11 (.1) websockets keep closing automatically. I have an asp.net core mvc app with Blazor components which use websocket connections. In console I saw: Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1006 (no reason given).'. After reconnect, it immediately closed again.

What did you see instead?

Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1006 (no reason given).'.

What version of Traefik are you using?

v2.11.1

What is your environment & configuration?

command:
      - "--log.level=INFO"
      - "--api.dashboard=true"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
      - "--certificatesresolvers.letsencrypt.acme.email=xxx"
      - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"

Add more configuration information here.

If applicable, please paste the log output in DEBUG level

No response

@clarity99
Copy link
Author

downgrading to v2.11.0 solved the issue.

@ldez
Copy link
Member

ldez commented Apr 10, 2024

I think it's related to #10569.

The related documentation: https://doc.traefik.io/traefik/migration/v2/#v2111

can you try to set lingeringTimeout to 0?

@Majestic7979
Copy link

I want to add that I found this after suspecting issues with some applications I host that use websockets. Vaultwarden was having issues - the desktop app would not stop refreshing and syncing, and the notifications that require websockets were not working. Home Assistant would also constantly refresh, it was driving me mad. Adding this "lingeringTimeout" section and settings to 0 on my web and web-secure entryPoints fixed the issue:

entryPoints:
  web:
    address: ":80"
    transport:
      respondingTimeouts:
        tcp:
          lingeringTimeout: 0

  web-secure:
    address: ":443"
    transport:
      respondingTimeouts:
        tcp:
          lingeringTimeout: 0

@RowanTaubitz
Copy link

Same here with homeassistant, constant refreshing of the dashboard and phone/tablet applications throughout the house!
respondingTimeouts.TCP.lingeringTimeout=0 worked to fix the issue

@milindpatel63
Copy link

i'm also having this issue.

@comassky
Copy link

comassky commented Apr 11, 2024

Same issue, websockets are broke

image

Works with v2.10, broken since 2.11

Works in 2.11 & V3.0-rc4 with lingeringTimeout: 0

@dabeck
Copy link

dabeck commented Apr 11, 2024

Why would one introduce such a breaking change in a patch version 😩

@echoblag
Copy link

echoblag commented Apr 11, 2024

Adding to the list of reported issues, updating to 2.11.1 broke HTTP connections on one of my WordPress sites. Constant connection interrupts, couldn't find any traces or debug triggers, finally downgraded back to Traefik 2.11.0 and that fixed it.

Looks like this is more than just websockets.

I will be spending some time later looking at the lingering timeout config.

@mbleichner
Copy link

This also broke our instance of Mattermost - seeing a lot of connection errors in chrome devtools. Reverting to 2.11.0 fixed it.

@thespad
Copy link

thespad commented Apr 11, 2024

It's one thing to add this in the v3 RCs, it's quite another to do it as part of a patch release to the stable branch.

The note of

The new default value is purposely narrowed and can close the connection too early.

Is even worse, because it means you knew it was likely to be a breaking change in a lot of cases.

@Twiederh
Copy link

I added LingeringTimeout to my traefik.yml:

` entryPoints:
http:
address: ":80"
transport:
respondingTimeouts:
tcp:
lingeringTimeout: 0
http:
redirections: # HTTPS redirection (80 to 443)
entryPoint:
to: "https" # The target element
scheme: "https" # The redirection target scheme

https:
address: ":443"
transport:
respondingTimeouts:
tcp:
lingeringTimeout: 0`

My NodeRed dashboard is working again, however my Homeassistant instance still has the same issue that the page is reloading every 5 seconds or so.
I went back to v2.11.0 for the time being until this is completely resolved.

@ghhv
Copy link

ghhv commented Apr 11, 2024

Same for ASP.NET 8 Blazor Server (& Dozzle by the way) - switching back to 2.11.0 resolved. A day wasted to get to this point 😢😫🤬🫨

@emilevauge
Copy link
Member

On behalf of the maintainer team, sorry for the inconvenience.
We opened a global issue to cover this bug: #10598
I'm closing this one, as we will update the global issue while we make progress on this.

@davidnewhall
Copy link

Hi, I'm just a nobody that's never used this software. Friendly advice: If your goal is to get Fortune 500 companies to run your software, avoid referring to their lost revenue as an inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests