AMQ214013:无法解码数据包:java.lang.IllegalArgumentException:AMQ119032:无效类型:1 [英] AMQ214013: Failed to decode packet: java.lang.IllegalArgumentException: AMQ119032: Invalid type: 1

查看:83
本文介绍了AMQ214013:无法解码数据包:java.lang.IllegalArgumentException:AMQ119032:无效类型:1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 widlfly 上的 activeMQ 工作正常,而且从星期一开始我这周开始出现这个异常并且非常频繁.

My activeMQ on widlfly was working fine and some how this week since Monday i started having this exception and quite frequently.

起初我进入堆栈跟踪并通过代码 grep 查看代码,该代码抛出此异常,在我看来,问题可能与消息的大小有关.我停止了在队列中输入消息的过程.并打开了我的野蝇.队列中没有数据,但我仍然收到此异常.

At first I went to the stack trace and looked into the code through code grep that throw this exception and it seemed to me that the issue might be with the largen 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.

我从数据目录中删除了 activeMQ 数据目录和 tx-object-store.我开始了wildlfy,它有同样的问题.我仍然收到此异常.有一个站点 ( https://www.mail-archive.com/users@activemq.apache.org/msg36343.html )说可能是端口定义错误.但是我已经使用这个配置几个月了,我似乎没有改变任何东西,也没有将 Wildfly 10 升级到另一个版本.所以库还是一样的.

I removed the activeMQ data directory and the tx-object-store from the data directory. I started wildlfy and it had the same issue. and I am still getting this exception. there was one site ( https://www.mail-archive.com/users@activemq.apache.org/msg36343.html ) saying that may be the ports are wrongly defined. But i have been using this config for like 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.

如果没有数据流过activeMQ,谁能告诉我为什么会出现这个错误.我删除了数据目录,因此没有加载任何内容供其解码,也没有接收任何内容放入要解码的队列中.

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.

我在 Artemis 中调高了日志级别,异常看起来像这样,它在此日志中得到了什么.我没有向它发送任何要处理的消息,但它仍在处理某些内容.

I turned up the log level in 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.

问题似乎来自 NETTY,但似乎无法指出我的配置在哪里出错,尤其是当我认为它们没有在任何地方更改时.

the issue seems to be from NETTY but can't seem to point where my config would be wrong esp when I dont think they were changed anywhere.

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)

我的 Standalone.xml:

My Standalone.xml:

<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">
            <server name="default">
                <security enabled="false"/>
                <management jmx-enabled="true"/>
                <journal file-size="1024000"/>
                <statistics enabled="true"/>
                <shared-store-master/>
                <security-setting name="#">
                    <role name="guest" delete-non-durable-queue="true" create-non-durable-queue="true" consume="true" send="true"/>
                </security-setting>
                <address-setting name="#" message-counter-history-day-limit="10" page-size-bytes="4194304" max-size-bytes="20971520" expiry-address="jms.queue.ExpiryQueue" dead-letter-address="jms.queue.DLQ"/>
                <http-connector name="http-connector" endpoint="http-acceptor" socket-binding="http"/>
                <http-connector name="http-connector-throughput" endpoint="http-acceptor-throughput" socket-binding="http">
                    <param name="batch-delay" value="50"/>
                </http-connector>
                <remote-connector name="netty" socket-binding="messaging"/>
                <remote-connector name="netty-throughput" socket-binding="messaging-throughput">
                    <param name="batch-delay" value="50"/>
                </remote-connector>
                <in-vm-connector name="in-vm" server-id="0"/>
                <http-acceptor name="http-acceptor" http-listener="default"/>
                <http-acceptor name="http-acceptor-throughput" http-listener="default">
                    <param name="batch-delay" value="50"/>
                    <param name="direct-deliver" value="false"/>
                </http-acceptor>
                <remote-acceptor name="netty" socket-binding="messaging"/>
                <remote-acceptor name="netty-throughput" socket-binding="messaging-throughput">
                    <param name="batch-delay" value="50"/>
                    <param name="direct-deliver" value="false"/>
                </remote-acceptor>
                <in-vm-acceptor name="in-vm" server-id="0"/>
                <divert name="divert-to-multidm" forwarding-address="jms.queue.dbservice.multi_dm" address="jms.queue.dbservice.cap_tp_2"/>
                <divert name="divert-to-multifo" forwarding-address="jma.queue.dbservice.multi_fo" address="jms.queue.dbservice.cl1test_odc_capfotp2"/>
                <!--divert name="divert-to-cl1fo" forwarding-address="jma.queue.dbservice.cl1_fo" address="jms.queue.dbservice.cl1test_odc_capfotp2"/>
                <divert name="divert-to-tmafocl1devfo" forwarding-address="jma.queue.dbservice.tmafocl1dev_fo" address="jms.queue.dbservice.cl1_test_odc_capfotp"/>
                <divert name="divert-to-tmafocl1devdm" forwarding-address="jma.queue.dbservice.tmafocl1dev_dm" address="jms.queue.dbservice.cl1_test_odc_cap_tp"/-->
                <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
                <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
               <jms-queue name="dbservice.cap_tp_2" entries="/queue/cap_tp_2"/>
                <jms-queue name="dbservice.tp2_dm" entries="/queue/tp2_dm"/>
                <jms-queue name="dbservice.tp2_fo" entries="/queue/tp2_fo"/>
                <!--jms-queue name="dbservice.tmafocl1dev_fo" entries="/queue/tmafocl1dev_fo"/>
                <jms-queue name="dbservice.tmafocl1dev_dm" entries="/queue/tmafocl1dev_dm"/-->
                <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
                <jms-queue name="dbservice.tmafocl1dev_dm" entries="/queue/tmafocl1dev_dm"/-->
                <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
                <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" />
                <pooled-connection-factory name="hornetq-ra" transaction="xa" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" min-large-message-size="10240"/>
            </server>
        </subsystem>


    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
        <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
        <socket-binding name="http" port="${jboss.http.port:8080}"/>
        <socket-binding name="https" port="${jboss.https.port:9443}"/>
        <socket-binding name="iiop" interface="unsecure" port="3528"/>
        <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>
        <socket-binding name="messaging" port="5445"/>
        <socket-binding name="messaging-backup" port="5545"/>
        <socket-binding name="messaging-throughput" port="5455"/>
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <socket-binding name="node2-jms-broker" port="${node2.broker.port:5445}"/>
        <socket-binding name="node2throughput-jms-broker" port="${node2throughput.broker.port:5455}"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>

推荐答案

问题是我的 ActiveNMQ 队列只是只写队列,也就是说我的应用程序只把数据放在队列上,我们没想到会有任何数据放在他们身上.我们的活动 MQ 服务器是单向的,只是将消息放在队列中供其他应用程序使用.

The problem was that My ActiveNMQ queues were only write only queues, that is my application only put data on the queues and we never expected that there would be any data put onto them. our active MQ server was uni directional, just putting messages on queues for other apps to consume.

发生的事情是,在尝试某些事情时,消费端的开发人员创建了一个 ActiveMQ 服务器,而不是创建一个客户端来读取其 glassfish 中的队列,我认为他们正在推送一些消息.我应该查看队列中的消息,但在此之前解决了问题.所以我有一个队列,两端都有一个服务器(不知何故),我认为另一端的activeMQ正在放置一些消息.我们从 glassfish 中删除了 activeMQ 的配置,这很好.

What happened was that in trying something, a developer on the consuming end created an ActiveMQ server instead of creating a client to read from the queues in their glassfish and I think they were pushing some message. I should have viewed the message in the queue but resolved the issue before that. so I had one queue that had a server on both ends ( somehow) the activeMQ on the other end was putting some messages on it i think. we removed the configuration from glassfish for the activeMQ and it was fine.

抱歉这么晚才回复.应该为其他人发布此消息,他们将设置服务器尝试将消息放入消费队列,生产者将抛出此错误.

Apologies for answering so late. should have posted this for others who would setup a server trying to put messages on a consuming queue, the producer will throw this error.

这篇关于AMQ214013:无法解码数据包:java.lang.IllegalArgumentException:AMQ119032:无效类型:1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆