Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-7823

AMQP remote client failed to connect

XMLWordPrintable

    • Hide

      1. Configure Wildfly as in attachment, run in standalone mode.
      2. Run AMQP client (Proton c++ or AmqpNetLite based).
      It hangs on connecting to server.

      When using standalone Artemis broker, issue is not reproduced.

      Show
      1. Configure Wildfly as in attachment, run in standalone mode. 2. Run AMQP client (Proton c++ or AmqpNetLite based). It hangs on connecting to server. When using standalone Artemis broker, issue is not reproduced.

      AMQP remote client cannot connect to Artemis broker while it is embedded into WildFly.
      When client connects, it doesn't receive anything from the server. I turned on frame logging in AmqpNetLite and it show like following:

      [03:58:25.015] SEND AMQP 3 1 0 0
      [03:58:25.062] SEND sasl-init(mechanism:PLAIN,initial-response:006775657374006775657374,hostname:127.0.0.1)
      

      Server just does nothing, any traces, any response to client.

      I made changes as suggested by Justin in corresponding thread (https://developer.jboss.org/thread/269424)

      The Artemis AMQP protocol implementation module (at <WFLY_HOME>/modules/system/layers/base/org/apache/activemq/artemis/protocol/amqp/main) needs a dependency on Netty in its module.xml (e.g. <module name="io.netty"/>).
      Artemis requires Proton-J 0.10 and Wildfly ships with 0.8 so you can copy proton-j-0.10.jar and proton-jms-0.10.jar from Artemis' /lib directory to <WFLY_HOME>/modules/system/layers/base/org/apache/qpid/proton/main and update the module.xml accordingly.
      

      Then I turned debug traces and see following exception:

      13:01:00,713 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955)) java.nio.ReadOnlyBufferException
      13:01:00,716 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at java.nio.ByteBuffer.array(ByteBuffer.java:996)
      13:01:00,720 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.buffer.UnsafeByteBufUtil.setBytes(UnsafeByteBufUtil.java:368)
      13:01:00,730 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:205)
      13:01:00,734 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:877)
      13:01:00,745 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.proton.plug.handler.impl.ProtonHandlerImpl.outputBuffer(ProtonHandlerImpl.java:226)
      13:01:00,749 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.proton.plug.context.AbstractConnectionContext.flushBytes(AbstractConnectionContext.java:145)
      13:01:00,760 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.proton.plug.context.AbstractConnectionContext$LocalListener.onTransport(AbstractConnectionContext.java:160)
      13:01:00,766 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.proton.plug.handler.impl.ProtonHandlerImpl.dispatch(ProtonHandlerImpl.java:349)
      13:01:00,770 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.proton.plug.handler.impl.ProtonHandlerImpl.flush(ProtonHandlerImpl.java:257)
      13:01:00,783 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.proton.plug.handler.impl.ProtonHandlerImpl.inputBuffer(ProtonHandlerImpl.java:158)
      13:01:00,789 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.proton.plug.context.AbstractConnectionContext.inputBuffer(AbstractConnectionContext.java:81)
      13:01:00,800 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.apache.activemq.artemis.core.protocol.proton.ActiveMQProtonRemotingConnection.bufferReceived(ActiveMQProtonRemotingConnection.java:127)
      13:01:00,807 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:619)
      13:01:00,814 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:68)
      13:01:00,820 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
      13:01:00,832 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
      13:01:00,839 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:216)
      13:01:00,849 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:527)
      13:01:00,855 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved(DefaultChannelPipeline.java:521)
      13:01:00,866 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.DefaultChannelPipeline.remove0(DefaultChannelPipeline.java:351)
      13:01:00,871 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.DefaultChannelPipeline.remove(DefaultChannelPipeline.java:322)
      13:01:00,882 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.DefaultChannelPipeline.remove(DefaultChannelPipeline.java:299)
      13:01:00,887 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.apache.activemq.artemis.core.protocol.ProtocolHandler$ProtocolDecoder.decode(ProtocolHandler.java:175)
      13:01:00,902 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:360)
      13:01:00,913 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)
      13:01:00,920 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at org.apache.activemq.artemis.core.protocol.ProtocolHandler$ProtocolDecoder.channelRead(ProtocolHandler.java:118)
      13:01:00,931 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
      13:01:00,937 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
      13:01:00,949 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
      13:01:00,954 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
      13:01:00,965 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
      13:01:00,969 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
      13:01:00,981 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
      13:01:00,986 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
      13:01:00,998 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
      13:01:01,003 ERROR [stderr] (Thread-1 (activemq-netty-threads-1534405955))      at java.lang.Thread.run(Thread.java:745)
      

      Configuration and server logs are attached.

        1. AMQPQueueExample.java
          2 kB
          Huang Wenhui
        2. server_debug.log
          231 kB
          Oleg Kozakevych
        3. server.log
          18 kB
          Oleg Kozakevych
        4. standalone.xml
          23 kB
          Oleg Kozakevych
        5. standalone-full.xml
          34 kB
          Huang Wenhui
        6. wilfly.diff
          2 kB
          Huang Wenhui

              jmesnil1@redhat.com Jeff Mesnil
              olegich Oleg Kozakevych (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: