Coder Social home page Coder Social logo

Comments (5)

jeremyg484 avatar jeremyg484 commented on June 19, 2024 1

The same issue occurs in Mironaut version 4.3.6 so it looks like it is not purely related to 4.4.0 version ⚠️

Are we doing something wrong or do we miss some configuration for WSS?

@iNviNho I don't think (yet) that you're doing anything wrong. I have been investigating and was able to reproduce it in multiple Micronaut 4.x versions as well. It seems to be specific to the SSL implementation. I will update as I learn more.

from micronaut-core.

jeremyg484 avatar jeremyg484 commented on June 19, 2024 1

@iNviNho I have tracked it down to an issue with our ALPN implementation. We do not currently support WebSockets over an HTTP 2 connection (as far as I know, Netty does not yet have an official implementation of RFC8441), but we are advertising support for HTTP 2 in the TLS handshake when making the initial connection to the endpoint. I believe that is what is causing the server to drop the connection.

You can work around it for now by setting micronaut.http.client.alpn-modes=http/1.1.

I will need to implement a fix to force the WebSocket client to only advertise HTTP 1.1 in the TLS handshake.

from micronaut-core.

iNviNho avatar iNviNho commented on June 19, 2024 1

Thank you @jeremyg484 .

Setting

micronaut:
  http:
    client:
      alpn-modes: http/1.1

didn't work but setting alpnMode on the @client already makes a difference

@Client(value = "talos-ws", alpnModes = "http/1.1")

after that we got the error

invalid WebSocket Extension handshake for "permessage-deflate; server_no_context_takeover; client_no_context_takeover"

which we fixed by enabling compression

compression:
      enabled: false

and now everything works as expected 🍾

Thank you so far for your assistance!

from micronaut-core.

jeremyg484 avatar jeremyg484 commented on June 19, 2024 1

Note that alpn-modes is an array, so I believe in YAML it would need to be:

micronaut:
  http:
    client:
      alpn-modes: [http/1.1]

from micronaut-core.

iNviNho avatar iNviNho commented on June 19, 2024

The same issue occurs in Mironaut version 4.3.6 so it looks like it is not purely related to 4.4.0 version ⚠️

Are we doing something wrong or do we miss some configuration for WSS?

from micronaut-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.