Frame type 28 is unknown

Hi,

I’m getting Frame type 28 is unknown exception when connecting to RSocket server. See exception below. The version is a bit old 0.12.2-RC4.

Error occurs when I’m trying to connect from local to deployed server in the cloud (kubernetes). Locally everything works.

Any hint would be appreciated. I’m not sure where to start debugging. Is this a fragmentation exception?

2019-10-03 14:37:15.911 [reactor-http-nio-4] ERROR i.r.fragmentation.FrameReassembler - error reassemble frame
java.lang.IllegalArgumentException: Frame type 28 is unknown
at io.rsocket.frame.FrameType.fromEncodedType(FrameType.java:241)
at io.rsocket.frame.FrameHeaderFlyweight.frameType(FrameHeaderFlyweight.java:100)
at io.rsocket.fragmentation.FrameReassembler.reassembleFrame(FrameReassembler.java:230)
at io.rsocket.fragmentation.FragmentationDuplexConnection.lambda$receive$2(FragmentationDuplexConnection.java:156)
at reactor.core.publisher.FluxHandleFuseable$HandleFuseableConditionalSubscriber.onNext(FluxHandleFuseable.java:468)
at sapho.config.spring.ReactorCcContextConfiguration$CcContextLifter.onNext(ReactorCcContextConfiguration.java:98)
at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:127)
at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onNext(FluxContextStart.java:103)
at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:213)
at sapho.config.spring.ReactorCcContextConfiguration$CcContextLifter.onNext(ReactorCcContextConfiguration.java:98)
at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onNext(FluxContextStart.java:103)
at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:213)
at reactor.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:206)
at reactor.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:322)
at reactor.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:335)
at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:571)
at reactor.netty.http.client.WebsocketClientOperations.onInboundNext(WebsocketClientOperations.java:145)
at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:91)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:302)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1475)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1224)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1271)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:505)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:444)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:283)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1421)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.lang.Thread.run(Thread.java:748)

Hello @MavoCz - we need runnable reproducer to debug this issue further

Will try, but it will take a while. I tried to update to latest and greatest rsocket core RC5, but it seems that rsocket-rpc-java was not yet updated to this version. Any plan to update to it?

We dont have ETA yet, but latest rsocket-java (1.0.0-RC5) is known to work with current rsocket-rpc, can be explicitly referenced as dependency

Ok, we found the problem. We had FramingMTU set to 64K -1 so it would fit in 64K websocket frame. The problem was that the SSL proxy was handling only 4K frames and trimming the rest. When we avoided the SSL gateway then everything worked fine. Through SSL gateway small messages worked correctly, large messages threw random error as the one I mentioned above.

We have lowered the framing to 4K and everything works fine. Thanks for answers.