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

Max frame length of 65536 has been exceeded - Quarkus 3 #43381

Closed
dometec opened this issue Sep 19, 2024 · 5 comments · Fixed by #43435
Closed

Max frame length of 65536 has been exceeded - Quarkus 3 #43381

dometec opened this issue Sep 19, 2024 · 5 comments · Fixed by #43435
Labels
area/websockets kind/bug Something isn't working
Milestone

Comments

@dometec
Copy link

dometec commented Sep 19, 2024

Describe the bug

WebSocket Server ignores Max Frame Size after upgrade from Quarkus 1.x to 3.14.4.
In application.properties I set:

quarkus.websocket.max-frame-size=2097152

and get the exception:


2024-09-18 18:45:18,450 INFO  [com.vim.ngv.wss.TunnelWSS] (executor-thread-3) WebSocket tunnel error, session: lUIS0BLIvL7sX4SNrHaQrjlQCd3ld1B5W_yJT2FQ, error: Max frame length of 65536 has been exceeded..: io.netty.handler.codec.http.websocketx.CorruptedWebSocketFrameException: Max frame length of 65536 has been exceeded.
        at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.protocolViolation(WebSocket08FrameDecoder.java:427)
        at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.decode(WebSocket08FrameDecoder.java:288)
        at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
...

Expected behavior

No exception, or a message with my max frame size setting in "Max frame length of 65536 has been exceeded".

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

Linux localhost.localdomain 6.4.4-100.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 19 17:06:05 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "21.0.1" 2023-10-17 LTS

Quarkus version or git rev

3.14.4

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6

Additional information

I think this method miss to take the quarkus.websocket.* configuration...

private static HttpServerOptions createHttpServerOptions(
HttpBuildTimeConfig buildTimeConfig, HttpConfiguration httpConfiguration,
LaunchMode launchMode, List<String> websocketSubProtocols) {
if (!httpConfiguration.hostEnabled) {
return null;
}
// TODO other config properties
HttpServerOptions options = new HttpServerOptions();
int port = httpConfiguration.determinePort(launchMode);
options.setPort(port == 0 ? RANDOM_PORT_MAIN_HTTP : port);
HttpServerOptionsUtils.applyCommonOptions(options, buildTimeConfig, httpConfiguration, websocketSubProtocols);
return options;
}

@dometec dometec added the kind/bug Something isn't working label Sep 19, 2024
@geoand
Copy link
Contributor

geoand commented Sep 19, 2024

Thanks for reporting.

Going forward, all our efforts around WebSockets are focused on WebSockets Next. If you could try and see if the problem exists with that stack, it would be great.

cc @mkouba

@mkouba
Copy link
Contributor

mkouba commented Sep 19, 2024

Hm, the quarkus.websocket.max-frame-size is a WebSocket client config property so I'm not really sure it ever worked on the server.

The corresponding configuration properties in WS Next are quarkus.websockets-next.server.max-message-size and quarkus.websockets-next.client.max-message-size.

@geoand geoand added the triage/needs-feedback We are waiting for feedback. label Sep 19, 2024
@dometec
Copy link
Author

dometec commented Sep 19, 2024

@geoand ok I'll try.
@mkouba not in Quarkus 1.x see https://github.com/quarkusio/quarkus/pull/7861/files#top

@mkouba
Copy link
Contributor

mkouba commented Sep 19, 2024

@geoand ok I'll try. @mkouba not in Quarkus 1.x see https://github.com/quarkusio/quarkus/pull/7861/files#top

Interesting, it was removed (maybe unintentionally) in the "split" PR #7861.

In any case, the development of the original WS extension is discontinued. We're looking forward to your feedback about WS next! ;-)

@dometec
Copy link
Author

dometec commented Sep 23, 2024

@geoand , I can't try websocket-next right now due to #43434.
@mkouba submit a PR, I understand that the extension is discontinued, but until the new is in the experimental phase, I would like to fix the problem found.

Thanks!

@geoand geoand removed the triage/needs-feedback We are waiting for feedback. label Sep 23, 2024
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/websockets kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants