You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "diwangtseb (via GitHub)" <gi...@apache.org> on 2023/05/22 04:13:39 UTC

[GitHub] [rocketmq] diwangtseb opened a new issue, #6784: [Bug] io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds

diwangtseb opened a new issue, #6784:
URL: https://github.com/apache/rocketmq/issues/6784

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions)  of this repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   apple m1
   
   ### RocketMQ version
   
   4.9.4
   
   ### JDK Version
   
   JDK v11.0.12
   
   ### Describe the Bug
   
   2023-05-22 11:51:49 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelInactive, the channel[127.0.0.1:61549]
   2023-05-22 11:51:49 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelUnregistered, the channel[127.0.0.1:61549]
   2023-05-22 11:51:49 INFO NettyServerNIOSelector_3_2 - closeChannel: close the connection to remote address[127.0.0.1:61549] result: true
   2023-05-22 11:51:50 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelRegistered 127.0.0.1:61550
   2023-05-22 11:51:50 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelActive, the channel[127.0.0.1:61550]
   2023-05-22 11:51:50 INFO NettyServerCodecThread_3 - Handlers prepended to channel pipeline to establish SSL connection
   2023-05-22 11:51:50 ERROR NettyServerCodecThread_3 - decode exception, 127.0.0.1:61550
   io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 16777216: 1347569956 - discarded
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:503)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:489)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.exceededFrameLength(LengthFieldBasedFrameDecoder.java:376)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:419)
   	at org.apache.rocketmq.remoting.netty.NettyDecoder.decode(NettyDecoder.java:42)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:332)
   	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
   	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1368)
   	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1234)
   	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1280)
   	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
   	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
   	at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
   	at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
   	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
   	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   
   ### Steps to Reproduce
   
   https://github.com/apache/rocketmq-clients/blob/rocketmq-client-golang-5.0.0/golang
   
   use golangsdk call producer will report an error
   panic: create grpc conn failed, err=context deadline exceeded for client,
   then I checked the server log and an error occurred
   
   2023-05-22 11:51:49 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelInactive, the channel[127.0.0.1:61549]
   2023-05-22 11:51:49 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelUnregistered, the channel[127.0.0.1:61549]
   2023-05-22 11:51:49 INFO NettyServerNIOSelector_3_2 - closeChannel: close the connection to remote address[127.0.0.1:61549] result: true
   2023-05-22 11:51:50 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelRegistered 127.0.0.1:61550
   2023-05-22 11:51:50 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelActive, the channel[127.0.0.1:61550]
   2023-05-22 11:51:50 INFO NettyServerCodecThread_3 - Handlers prepended to channel pipeline to establish SSL connection
   2023-05-22 11:51:50 ERROR NettyServerCodecThread_3 - decode exception, 127.0.0.1:61550
   io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 16777216: 1347569956 - discarded
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:503)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:489)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.exceededFrameLength(LengthFieldBasedFrameDecoder.java:376)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:419)
   	at org.apache.rocketmq.remoting.netty.NettyDecoder.decode(NettyDecoder.java:42)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:332)
   	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
   	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1368)
   	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1234)
   	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1280)
   	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
   	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
   	at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
   	at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
   	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
   	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   
   ### What Did You Expect to See?
   
   The producer successfully produced the message
   
   ### What Did You See Instead?
   
   panic: create grpc conn failed, err=context deadline exceeded for client,
   then I checked the server log and an error occurred
   
   2023-05-22 11:51:49 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelInactive, the channel[127.0.0.1:61549]
   2023-05-22 11:51:49 INFO NettyServerCodecThread_2 - NETTY SERVER PIPELINE: channelUnregistered, the channel[127.0.0.1:61549]
   2023-05-22 11:51:49 INFO NettyServerNIOSelector_3_2 - closeChannel: close the connection to remote address[127.0.0.1:61549] result: true
   2023-05-22 11:51:50 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelRegistered 127.0.0.1:61550
   2023-05-22 11:51:50 INFO NettyServerCodecThread_3 - NETTY SERVER PIPELINE: channelActive, the channel[127.0.0.1:61550]
   2023-05-22 11:51:50 INFO NettyServerCodecThread_3 - Handlers prepended to channel pipeline to establish SSL connection
   2023-05-22 11:51:50 ERROR NettyServerCodecThread_3 - decode exception, 127.0.0.1:61550
   io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 16777216: 1347569956 - discarded
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:503)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:489)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.exceededFrameLength(LengthFieldBasedFrameDecoder.java:376)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:419)
   	at org.apache.rocketmq.remoting.netty.NettyDecoder.decode(NettyDecoder.java:42)
   	at io.netty.handler.codec.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:332)
   	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
   	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1368)
   	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1234)
   	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1280)
   	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
   	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
   	at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
   	at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
   	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
   	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   
   ### Additional Context
   
   package main
   
   import (
   	"context"
   
   	"github.com/apache/rocketmq-clients/golang"
   	"github.com/apache/rocketmq-clients/golang/credentials"
   )
   
   func main() {
   	producer, err := golang.NewProducer(&golang.Config{
   		Endpoint: "localhost:9876",
   		Credentials: &credentials.SessionCredentials{
   			AccessKey:    "",
   			AccessSecret: "",
   		},
   	})
   	err = producer.Start()
   	defer func() {
   		err = producer.GracefulStop()
   		panic(err)
   	}()
   	if err != nil {
   		panic(err)
   	}
   	_, err = producer.Send(context.TODO(), &golang.Message{
   		Topic: "hi",
   		Body:  []byte{0x01},
   		Tag:   new(string),
   	})
   	panic(err)
   }
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] diwangtseb closed issue #6784: [Bug] io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds

Posted by "diwangtseb (via GitHub)" <gi...@apache.org>.
diwangtseb closed issue #6784: [Bug] io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds
URL: https://github.com/apache/rocketmq/issues/6784


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org