带有外部 ActiveMQ 的 JBoss FUSE 7.4 给出 AMQ219013:等待接收集群拓扑超时。组:空

问题描述 投票:0回答:2

我正在尝试连接到 JBoss FUSE 7.4 上的 ActiveMQ Classic 消息代理 (fuse-karaf-7.4.0.fuse-740028-redhat-00001)。我找到了以下示例

我已按照项目中的说明下载并安装了相关功能。我还下载并安装了 ActiveMQ Classic 5.15.11 并创建了

incomingOrders
队列。

我已使用本地用户名和密码将

org.ops4j.connectionfactory-amq7.cfg
配置文件添加到
FUSE_HOME/etc
文件夹中,如下所示:

url      = tcp://LAPTOP-E0A1RCAN:61616?maximumConnections=1000&wireFormat.maxFrameSize=10485760
name     = activemq
type     = artemis
user     = admin
password = admin

之后,当我安装应用程序时,出现以下错误。

java.lang.IllegalArgumentException: AMQ219032: Invalid type: 1
    at org.apache.activemq.artemis.core.protocol.core.impl.PacketDecoder.decode(PacketDecoder.java:475) ~[248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at org.apache.activemq.artemis.core.protocol.ClientPacketDecoder.decode(ClientPacketDecoder.java:67) ~[248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at org.apache.activemq.artemis.core.protocol.ClientPacketDecoder.decode(ClientPacketDecoder.java:42) ~[248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:376) [248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1191) [248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73) [248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323) [239:io.netty.codec:4.1.34.Final-redhat-00001]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297) [239:io.netty.codec:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905) [241:io.netty.common:4.1.34.Final-redhat-00001]
    at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
2020-02-16 17:41:34,755 | ERROR | lient-netty-threads) | o.a.a.a.c.client                 | 248 - org.apache.activemq.artemis-jms-client-osgi - 2.7.0.redhat-00056 | AMQ214031: Failed to decode buffer, disconnect immediately.
java.lang.IllegalStateException: java.lang.IllegalArgumentException: AMQ219032: Invalid type: 1
    at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:389) ~[248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1191) [248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73) [248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:323) [239:io.netty.codec:4.1.34.Final-redhat-00001]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:297) [239:io.netty.codec:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491) [244:io.netty.transport:4.1.34.Final-redhat-00001]
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905) [241:io.netty.common:4.1.34.Final-redhat-00001]
    at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
Caused by: java.lang.IllegalArgumentException: AMQ219032: Invalid type: 1
    at org.apache.activemq.artemis.core.protocol.core.impl.PacketDecoder.decode(PacketDecoder.java:475) ~[248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at org.apache.activemq.artemis.core.protocol.ClientPacketDecoder.decode(ClientPacketDecoder.java:67) ~[248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at org.apache.activemq.artemis.core.protocol.ClientPacketDecoder.decode(ClientPacketDecoder.java:42) ~[248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:376) ~[248:org.apache.activemq.artemis-jms-client-osgi:2.7.0.redhat-00056]
    ... 21 more

在 ActiveMQ 日志中,我可以看到以下警告。

2020-02-16 17:44:29,802 | WARN  | Transport Connection to: tcp://127.0.0.1:51000 failed: java.io.IOException: Frame size of 1 GB larger than max allowed 100 MB | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///127.0.0.1:51000@61616

是否有人在使用 FUSE 7.4 或 7.1+ 连接 ActiveMQ 时遇到类似问题?

java activemq activemq-artemis jbossfuse
2个回答
2
投票

正如该示例中提到的说明,它与 JBossFUSE 7.4 不兼容。 在您的情况下,您必须安装以下功能

    <feature>camel-jms</feature>
    <feature>camel-activemq</feature>
    <feature>pax-jms-activemq</feature>

然后您必须在项目 blueprint.xml 中定义 ActiveMQ 端点。确保此处的详细信息正确。

  <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">

   <property name="brokerURL" value="tcp://localhost:61616"/>

  </bean>

然后您可以读取或直接进入队列。以下行显示如何读取队列“inbound.queue”

<from uri="activemq:queue:inbound.queue"/>

您可以参考以下博客,了解如何在 Fuse 7.4 中配置 ActiveMQ 的更详细说明。

https://nirmalbalasooriya.blogspot.com/2020/02/external-active-mq-hibernate-with-jboss.html


2
投票

链接示例中的“摘要”说:

本快速入门演示了如何使用camel-jms组件连接到

AMQ 7代理并在两个Camel路由之间使用JMS消息传递。 [已添加强调]

AMQ 7 基于

ActiveMQ Artemis,而不是 ActiveMQ Classic(您正在使用)。 ActiveMQ Classic 不支持 Artemis JMS 客户端实现所采用的“核心”协议。

因此,您应该更改 Camel 配置以使用 ActiveMQ Classic OpenWire JMS 客户端实现,或将 ActiveMQ 5.15.11 实例替换为 ActiveMQ Artemis。

© www.soinside.com 2019 - 2024. All rights reserved.