title: AMQ214013: Failed to decode packet: java.lang.IllegalArgumentException: AMQ119032: Invalid type: 1
body: <p>My ActiveMQ Artemis on WidlFly was working fine and some how this week since Monday I started having this exception quite frequently.</p>
  <p>At first I went to the stack trace and looked into the code through code grep that throws this exception, and it seemed to me that the issue might be with the large size of the message. I stopped the process that inputs the message in the queues. and turned on my WildFly. The queue did not have data but I still got this exception.</p>
  <p>I removed the ActiveMQ data directory and the tx-object-store from the <code>data</code> directory. I started WildFly and it had the same issue, and I am still getting this exception. There was <a href="https://www.mail-archive.com/users@activemq.apache.org/msg36343.html" rel="nofollow noreferrer">one site</a> saying that may be the ports are wrongly defined, but I have been using this config for months and I don't seem to have changed anything in there nor have I upgraded WildFly 10 to another version so the libs are the same still.</p>
  <p>Can any one tell me why is this error coming if there is no data flowing through ActiveMQ. I removed the data directory so there was nothing that is loaded for it to decode nor it is receiving anything to put on the queue to be decoded.</p>
  <p>I turned up the log level in ActiveMQ Artemis and the exception looks like this, what is it getting in this log. I am not sending it any messages to process yet it is still processing something.</p>
  <p>The issue seems to be from Netty, but I can't seem to point where my config would be wrong esp when I dont think they were changed anywhere.</p>
  <pre><code>2016-12-15 15:58:24,707 TRACE [org.apache.activemq.artemis.core.client] (Thread-18 (**activemq-netty-threads**-969652671)) handling packet PACKET(SessionCommitMessage)[type=43, channelID=12, packetObject=SessionCommitMessage]
  2016-12-15 15:58:24,707 DEBUG [org.apache.activemq.artemis.core.client] (Thread-18 (activemq-netty-threads-969652671)) Invocation of interceptor org.apache.activemq.artemis.core.protocol.hornetq.HQPropertiesConversionInterceptor on PACKET(SessionCommitMessage)[type=43, channelID=12, packetObject=SessionCommitMessage] returned true
  2016-12-15 15:58:24,707 TRACE [org.apache.activemq.artemis.core.server] (Thread-18 (activemq-netty-threads-969652671)) ServerSessionPacketHandler::handlePacket,PACKET(SessionCommitMessage)[type=43, channelID=12, packetObject=SessionCommitMessage]
  2016-12-15 15:58:24,707 TRACE [org.apache.activemq.artemis.core.server] (Thread-18 (activemq-netty-threads-969652671)) Calling commit
  2016-12-15 15:58:24,707 TRACE [org.apache.activemq.artemis.core.server] (Thread-18 (activemq-netty-threads-969652671)) TransactionImpl::commit::TransactionImpl [xid=null, id=31125, xid=null, state=ACTIVE, createTime=1481781503706(Thu Dec 15 15:58:23 AEST 2016), timeoutSeconds=300, nr operations = 0]@3cd1f6f3
  2016-12-15 15:58:24,708 TRACE [org.apache.activemq.artemis.core.server] (Thread-18 (activemq-netty-threads-969652671)) ServerSessionPacketHandler::scheduling response::PACKET(NullResponseMessage)[type=21, channelID=0, packetObject=NullResponseMessage]
  2016-12-15 15:58:24,708 DEBUG [org.apache.activemq.artemis.core.client] (Thread-18 (activemq-netty-threads-969652671)) Invocation of interceptor org.apache.activemq.artemis.core.protocol.hornetq.HQPropertiesConversionInterceptor on PACKET(NullResponseMessage)[type=21, channelID=0, packetObject=NullResponseMessage] returned true
  2016-12-15 15:58:24,708 TRACE [org.apache.activemq.artemis.core.client] (Thread-18 (activemq-netty-threads-969652671)) Sending packet nonblocking PACKET(NullResponseMessage)[type=21, channelID=12, packetObject=NullResponseMessage] on channeID=12
  2016-12-15 15:58:24,708 TRACE [org.apache.activemq.artemis.core.client] (Thread-18 (activemq-netty-threads-969652671)) Writing buffer for channelID=12
  2016-12-15 15:58:24,864 TRACE [org.apache.activemq.artemis.core.server] (Thread-72 (activemq-netty-threads-969652671)) Connection created org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection@13a92998[local= /192.168.78.30:7045, remote=/10.10.16.11:47709]
  2016-12-15 15:58:24,865 ERROR [org.apache.activemq.artemis.core.client] (Thread-72 (activemq-netty-threads-969652671)) AMQ214013: Failed to decode packet: java.lang.IllegalArgumentException: AMQ119032: Invalid type: 1
      at org.apache.activemq.artemis.core.protocol.core.impl.PacketDecoder.decode(PacketDecoder.java:413)
      at org.apache.activemq.artemis.core.protocol.ClientPacketDecoder.decode(ClientPacketDecoder.java:60)
      at org.apache.activemq.artemis.core.protocol.ServerPacketDecoder.decode(ServerPacketDecoder.java:202)
      at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:324)
      at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:605)
      at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:68)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
      at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
      at io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:216)
      at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:527)
      at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved(DefaultChannelPipeline.java:521)
      at io.netty.channel.DefaultChannelPipeline.remove0(DefaultChannelPipeline.java:351)
      at io.netty.channel.DefaultChannelPipeline.remove(DefaultChannelPipeline.java:322)
      at io.netty.channel.DefaultChannelPipeline.remove(DefaultChannelPipeline.java:299)
      at org.apache.activemq.artemis.core.protocol.ProtocolHandler$ProtocolDecoder.decode(ProtocolHandler.java:174)
      at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:349)
      at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)
      at org.apache.activemq.artemis.core.protocol.ProtocolHandler$ProtocolDecoder.channelRead(ProtocolHandler.java:117)
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
      at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
      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)
  </code></pre>
  <p>My <code>standalone.xml</code>:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;subsystem xmlns=&quot;urn:jboss:domain:messaging-activemq:1.0&quot;&gt;
      &lt;server name=&quot;default&quot;&gt;
          &lt;security enabled=&quot;false&quot;/&gt;
          &lt;management jmx-enabled=&quot;true&quot;/&gt;
          &lt;journal file-size=&quot;1024000&quot;/&gt;
          &lt;statistics enabled=&quot;true&quot;/&gt;
          &lt;shared-store-master/&gt;
          &lt;security-setting name=&quot;#&quot;&gt;
              &lt;role name=&quot;guest&quot; delete-non-durable-queue=&quot;true&quot; create-non-durable-queue=&quot;true&quot; consume=&quot;true&quot; send=&quot;true&quot;/&gt;
          &lt;/security-setting&gt;
          &lt;address-setting name=&quot;#&quot; message-counter-history-day-limit=&quot;10&quot; page-size-bytes=&quot;4194304&quot; max-size-bytes=&quot;20971520&quot; expiry-address=&quot;jms.queue.ExpiryQueue&quot; dead-letter-address=&quot;jms.queue.DLQ&quot;/&gt;
          &lt;http-connector name=&quot;http-connector&quot; endpoint=&quot;http-acceptor&quot; socket-binding=&quot;http&quot;/&gt;
          &lt;http-connector name=&quot;http-connector-throughput&quot; endpoint=&quot;http-acceptor-throughput&quot; socket-binding=&quot;http&quot;&gt;
              &lt;param name=&quot;batch-delay&quot; value=&quot;50&quot;/&gt;
          &lt;/http-connector&gt;
          &lt;remote-connector name=&quot;netty&quot; socket-binding=&quot;messaging&quot;/&gt;
          &lt;remote-connector name=&quot;netty-throughput&quot; socket-binding=&quot;messaging-throughput&quot;&gt;
              &lt;param name=&quot;batch-delay&quot; value=&quot;50&quot;/&gt;
          &lt;/remote-connector&gt;
          &lt;in-vm-connector name=&quot;in-vm&quot; server-id=&quot;0&quot;/&gt;
          &lt;http-acceptor name=&quot;http-acceptor&quot; http-listener=&quot;default&quot;/&gt;
          &lt;http-acceptor name=&quot;http-acceptor-throughput&quot; http-listener=&quot;default&quot;&gt;
              &lt;param name=&quot;batch-delay&quot; value=&quot;50&quot;/&gt;
              &lt;param name=&quot;direct-deliver&quot; value=&quot;false&quot;/&gt;
          &lt;/http-acceptor&gt;
          &lt;remote-acceptor name=&quot;netty&quot; socket-binding=&quot;messaging&quot;/&gt;
          &lt;remote-acceptor name=&quot;netty-throughput&quot; socket-binding=&quot;messaging-throughput&quot;&gt;
              &lt;param name=&quot;batch-delay&quot; value=&quot;50&quot;/&gt;
              &lt;param name=&quot;direct-deliver&quot; value=&quot;false&quot;/&gt;
          &lt;/remote-acceptor&gt;
          &lt;in-vm-acceptor name=&quot;in-vm&quot; server-id=&quot;0&quot;/&gt;
          &lt;divert name=&quot;divert-to-multidm&quot; forwarding-address=&quot;jms.queue.dbservice.multi_dm&quot; address=&quot;jms.queue.dbservice.cap_tp_2&quot;/&gt;
          &lt;divert name=&quot;divert-to-multifo&quot; forwarding-address=&quot;jma.queue.dbservice.multi_fo&quot; address=&quot;jms.queue.dbservice.cl1test_odc_capfotp2&quot;/&gt;
          &lt;!--divert name=&quot;divert-to-cl1fo&quot; forwarding-address=&quot;jma.queue.dbservice.cl1_fo&quot; address=&quot;jms.queue.dbservice.cl1test_odc_capfotp2&quot;/&gt;
          &lt;divert name=&quot;divert-to-tmafocl1devfo&quot; forwarding-address=&quot;jma.queue.dbservice.tmafocl1dev_fo&quot; address=&quot;jms.queue.dbservice.cl1_test_odc_capfotp&quot;/&gt;
          &lt;divert name=&quot;divert-to-tmafocl1devdm&quot; forwarding-address=&quot;jma.queue.dbservice.tmafocl1dev_dm&quot; address=&quot;jms.queue.dbservice.cl1_test_odc_cap_tp&quot;/--&gt;
          &lt;jms-queue name=&quot;ExpiryQueue&quot; entries=&quot;java:/jms/queue/ExpiryQueue&quot;/&gt;
          &lt;jms-queue name=&quot;DLQ&quot; entries=&quot;java:/jms/queue/DLQ&quot;/&gt;
         &lt;jms-queue name=&quot;dbservice.cap_tp_2&quot; entries=&quot;/queue/cap_tp_2&quot;/&gt;
          &lt;jms-queue name=&quot;dbservice.tp2_dm&quot; entries=&quot;/queue/tp2_dm&quot;/&gt;
          &lt;jms-queue name=&quot;dbservice.tp2_fo&quot; entries=&quot;/queue/tp2_fo&quot;/&gt;
          &lt;!--jms-queue name=&quot;dbservice.tmafocl1dev_fo&quot; entries=&quot;/queue/tmafocl1dev_fo&quot;/&gt;
          &lt;jms-queue name=&quot;dbservice.tmafocl1dev_dm&quot; entries=&quot;/queue/tmafocl1dev_dm&quot;/--&gt;
          &lt;connection-factory name=&quot;InVmConnectionFactory&quot; entries=&quot;java:/ConnectionFactory&quot; connectors=&quot;in-vm&quot;/&gt;
          &lt;jms-queue name=&quot;dbservice.tmafocl1dev_dm&quot; entries=&quot;/queue/tmafocl1dev_dm&quot;/--&gt;
          &lt;connection-factory name=&quot;InVmConnectionFactory&quot; entries=&quot;java:/ConnectionFactory&quot; connectors=&quot;in-vm&quot;/&gt;
          &lt;connection-factory name=&quot;RemoteConnectionFactory&quot; entries=&quot;java:jboss/exported/jms/RemoteConnectionFactory&quot; connectors=&quot;http-connector&quot; /&gt;
          &lt;pooled-connection-factory name=&quot;hornetq-ra&quot; transaction=&quot;xa&quot; entries=&quot;java:/JmsXA java:jboss/DefaultJMSConnectionFactory&quot; connectors=&quot;in-vm&quot; min-large-message-size=&quot;10240&quot;/&gt;
      &lt;/server&gt;
  &lt;/subsystem&gt;
  ...     
  &lt;socket-binding-group name=&quot;standard-sockets&quot; default-interface=&quot;public&quot; port-offset=&quot;${jboss.socket.binding.port-offset:0}&quot;&gt;
      &lt;socket-binding name=&quot;management-http&quot; interface=&quot;management&quot; port=&quot;${jboss.management.http.port:9990}&quot;/&gt;
      &lt;socket-binding name=&quot;management-https&quot; interface=&quot;management&quot; port=&quot;${jboss.management.https.port:9993}&quot;/&gt;
      &lt;socket-binding name=&quot;ajp&quot; port=&quot;${jboss.ajp.port:8009}&quot;/&gt;
      &lt;socket-binding name=&quot;http&quot; port=&quot;${jboss.http.port:8080}&quot;/&gt;
      &lt;socket-binding name=&quot;https&quot; port=&quot;${jboss.https.port:9443}&quot;/&gt;
      &lt;socket-binding name=&quot;iiop&quot; interface=&quot;unsecure&quot; port=&quot;3528&quot;/&gt;
      &lt;socket-binding name=&quot;iiop-ssl&quot; interface=&quot;unsecure&quot; port=&quot;3529&quot;/&gt;
      &lt;socket-binding name=&quot;messaging&quot; port=&quot;5445&quot;/&gt;
      &lt;socket-binding name=&quot;messaging-backup&quot; port=&quot;5545&quot;/&gt;
      &lt;socket-binding name=&quot;messaging-throughput&quot; port=&quot;5455&quot;/&gt;
      &lt;socket-binding name=&quot;txn-recovery-environment&quot; port=&quot;4712&quot;/&gt;
      &lt;socket-binding name=&quot;txn-status-manager&quot; port=&quot;4713&quot;/&gt;
      &lt;socket-binding name=&quot;node2-jms-broker&quot; port=&quot;${node2.broker.port:5445}&quot;/&gt;
      &lt;socket-binding name=&quot;node2throughput-jms-broker&quot; port=&quot;${node2throughput.broker.port:5455}&quot;/&gt;
      &lt;outbound-socket-binding name=&quot;mail-smtp&quot;&gt;
          &lt;remote-destination host=&quot;localhost&quot; port=&quot;25&quot;/&gt;
      &lt;/outbound-socket-binding&gt;
  &lt;/socket-binding-group&gt;
  </code></pre>