Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-2014

AMQ7: io.netty.handler.codec.DecoderException: java.lang.NullPointerException in broker log

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • AMQ 7.2.2.GA
    • AMQ 7.2.0.GA
    • broker-core
    • None
    • Release Notes
    • When a client connected by using an unrecognized protocol, a `NullPointerException` with full stack-trace was logged. Now the AMQ Broker detects and handles unrecognized protocols more gracefully and a proper ERROR message is logged.
    • Documented as Resolved Issue
    • AMQ Broker 1839

    Description

      At times, the following exception is seen in the broker log:

      2018-09-25 05:00:09,952 WARN  [io.netty.channel.DefaultChannelPipeline] An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.: io.netty.handler.codec.DecoderException: java.lang.NullPointerException
      	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:459) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:392) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:359) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:342) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1354) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:917) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:822) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:309) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.6.1.amq-720008.jar:2.6.1.amq-720008]
      Caused by: java.lang.NullPointerException
      	at org.apache.activemq.artemis.core.protocol.ProtocolHandler$ProtocolDecoder.decode(ProtocolHandler.java:201) [artemis-server-2.6.1.amq-720008.jar:2.6.1.amq-720008]
      	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) [netty-all-4.1.19.Final-redhat-1.jar:4.1.19.Final-redhat-1]
      	... 16 more
      

      It was first seen in 7.2 HF3.

      Attachments

        Activity

          People

            rhn-support-jbertram Justin Bertram
            rhn-support-kboone Kevin Boone
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: