首页 新闻 会员 周边

io.netty.handler.codec.TooLongFrameException

0
悬赏园豆:15 [待解决问题]

014-12-17 15:33:48 netty.TelnetServerHandler exceptionCaught
警告: Unexpected exception from downstream.
io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 372500070: 3725000708 - discarded
at io.netty.handler.codec.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:501)
at io.netty.handler.codec.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:477)
at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:403)
at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:343)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:247)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:147)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:619)

淡若幽兰的主页 淡若幽兰 | 初学一级 | 园豆:187
提问于:2014-12-17 15:37

socketChannel.pipeline().addLast(new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 8, 0, 8));

tc310 4年前
< >
分享
所有回答(2)
0

这个问题你解决了吗?

流月222 | 园豆:202 (菜鸟二级) | 2017-06-15 14:00
0

我是c#,我用 DotNetty 时也遇到过这个问题,最后发现是 客户端 和 服务端 的配置不一样所致

热敷哥 | 园豆:178 (初学一级) | 2020-01-18 01:10
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册