CorruptedFrameException when using WebSockets

357 views
Skip to first unread message

airetfair

unread,
Jun 14, 2016, 3:30:17 PM6/14/16
to vert.x
Dear group,

I'm currently evaluating the vert.x framework for my new project and I'm using websocket between two vert.x applications.

The problem i'm facing is that from time to time, I get the following message:

Jun 14, 2016 8:41:24 PM io.vertx.core.net.impl.ConnectionBase
SEVERE: io.netty.handler.codec.CorruptedFrameException: RSV != 0 and no extension negotiated, RSV:7 (sometimes its 3 or 1, the value seems random).

And of course, my app fails to do what it has to do because after this exception is received by vert.x, the websocket connection is closed.

Sometimes it works like a charm, but I cannot rely on a behavior that is unreliable to implement my application.

I monitored the exchanged frames with wireshark and none of them has a value != 0 and all frames exchanged seemed ok to me. I'm thus suspecting a Buffer problem somewhere.

Any idea? Maybe I'm doing something wrong but what!

Best regards,

Frédéric


Julien Viet

unread,
Jun 14, 2016, 3:58:43 PM6/14/16
to ve...@googlegroups.com
Hi,

it seems to be a Netty issue :


that was fixed a few weeks ago.

can you try with 3.3.0.CR2 that uses Netty 4.1.1.Final that contains this fix ?

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/0c89d4fa-52b8-4cdf-b39c-0f48b29bd5c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

airetfair

unread,
Jun 14, 2016, 5:43:51 PM6/14/16
to vert.x
Thanks for the suggestion.

Before trying the new CR version of vert.x, I just changed my code to use the eventBus to send binary messages through websocket (I discovered that each socket register an eventbus handler for binary and text). I don't know why, but it seems to solve my problem.

I'm perplex because all websocket code was before the change executed by the verticles that created the websockets (I did myself a handler to send messages through the WebSocket for external verticles), but it worked.

Regards,

Frédéric

Christoph Bittmann

unread,
Apr 10, 2017, 2:37:23 AM4/10/17
to vert.x
Hi,

I've using Vert.x 3.4.0 and it's running in the same error:

at java.lang.Thread.run(Thread.java:745)
07 Apr 2017 15:09:09,931 ERROR ConnectionBase:187 [vert.x-worker-thread-13] - io.netty.handler.codec.CorruptedFrameException: RSV != 0 and no extension negotiated, RSV:4
07 Apr 2017 15:09:09,931 ERROR LoggerVerticle:87 [vert.x-worker-thread-8] - WebsocketServerVerticle : an exception occur on the WebSocket
java.lang.Exception: RSV != 0 and no extension negotiated, RSV:4
at de.pcsoft.zedas.cargo.mobil.vertx.verticle.LoggerVerticle.logMessage(LoggerVerticle.java:86)
at de.pcsoft.zedas.cargo.mobil.vertx.verticle.LoggerVerticle.lambda$2(LoggerVerticle.java:57)
at de.pcsoft.zedas.cargo.mobil.vertx.verticle.AbstractBaseVerticle.lambda$0(AbstractBaseVerticle.java:95)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:263)
at io.vertx.core.impl.OrderedExecutorFactory$OrderedExecutor.lambda$new$0(OrderedExecutorFactory.java:94)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Any idears?

Julien Viet

unread,
Apr 10, 2017, 9:16:27 AM4/10/17
to ve...@googlegroups.com
can you provide a reproducer ?

Reply all
Reply to author
Forward
0 new messages