Uploaded image for project: 'Qpid JMS'
  1. Qpid JMS
  2. QPIDJMS-587

io.netty:netty-transport-native-unix-common not managed but used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 2.2.0
    • None
    • None
    • linux OS running a Spring Boot app 2.7.11 and qpid-jms 2.2.0 together.

    Description

      When using qpid-jms 2.2.0 running on a linux OS then netty transitively pulls in io.netty:netty-transport-native-unix-common .
      The version for this depndency is not managed in qpid-jms.

      When running a SpringBoot 2.7.11 application, Spring Boot manages io.netty on version 4.1.91.Final . This version then gets used for io.netty:netty-transport-native-unix-common, while the other netty components run on 4.1.86.Final (managed by qpid-jms).

      This leads to a runtime exception when trying to connect.

      Reason is this:
      With netty 4.1.91.Final an incompatible change for qpid-jms has been made.
      Changelog https://netty.io/news/2023/04/03/4-1-91-Final.html
      incompatible change https://github.com/netty/netty/issues/13317
      code changed there https://github.com/netty/netty/pull/13318

      ["jakarta.jms.JMSException: Could not initialize class io.netty.channel.unix.Errors","
      	at org.apache.qpid.jms.provider.ProviderException.toJMSException(ProviderException.java:34)","
      	at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:80)","
      	at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:112)","
      	at org.apache.qpid.jms.JmsConnection.onAsyncException(JmsConnection.java:1564)","
      	at org.apache.qpid.jms.JmsConnection.onProviderException(JmsConnection.java:1548)","
      	at org.apache.qpid.jms.JmsConnection.onConnectionFailure(JmsConnection.java:1392)","
      	at org.apache.qpid.jms.provider.failover.FailoverProvider.lambda$reportReconnectFailure$3(FailoverProvider.java:808)","
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)","
      	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)","
      	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)","
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)","
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)","
      	at java.base/java.lang.Thread.run(Unknown Source)","Caused by: org.apache.qpid.jms.provider.exceptions.ProviderIOException: Could not initialize class io.netty.channel.unix.Errors","
      	at org.apache.qpid.jms.provider.exceptions.ProviderExceptionSupport.createOrPassthroughFatal(ProviderExceptionSupport.java:46)","
      	at org.apache.qpid.jms.provider.amqp.AmqpProvider.connect(AmqpProvider.java:309)","
      	at org.apache.qpid.jms.provider.failover.FailoverProvider$14.run(FailoverProvider.java:747)","
      	... 6 more","Caused by: java.io.IOException: Could not initialize class io.netty.channel.unix.Errors","
      	at org.apache.qpid.jms.util.IOExceptionSupport.create(IOExceptionSupport.java:45)","
      	at org.apache.qpid.jms.transports.netty.NettyTcpTransport$2.operationComplete(NettyTcpTransport.java:176)","
      	at org.apache.qpid.jms.transports.netty.NettyTcpTransport$2.operationComplete(NettyTcpTransport.java:171)","
      	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)","
      	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557)","
      	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)","
      	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)","
      	at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:629)","
      	at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:118)","
      	at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.connect(AbstractEpollChannel.java:637)","
      	at io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1342)","
      	at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:653)","
      	at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:632)","
      	at io.netty.handler.ssl.SslHandler.connect(SslHandler.java:714)","
      	at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:657)","
      	at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:632)","
      	at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:616)","
      	at io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:978)","
      	at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:265)","
      	at io.netty.bootstrap.Bootstrap$3.run(Bootstrap.java:250)","
      	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)","
      	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)","
      	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)","
      	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:406)","
      	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)","
      	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)","
      	... 1 more","Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.netty.channel.unix.Errors","
      	at io.netty.channel.unix.Socket.connect(Socket.java:351)","
      	at io.netty.channel.epoll.AbstractEpollChannel.doConnect0(AbstractEpollChannel.java:773)","
      	at io.netty.channel.epoll.EpollSocketChannel.doConnect0(EpollSocketChannel.java:144)","
      	at io.netty.channel.epoll.AbstractEpollChannel.doConnect(AbstractEpollChannel.java:758)","
      	at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.connect(AbstractEpollChannel.java:600)","
      	... 17 more"]}
      
      [2023-04-24T11:18:33.655Z] github.wdf.sap.corp/nextgenpayroll-montblanc/process-tracker-service/main: 2023-04-24T11:18:18.885Z [APP/PROC/WEB/1] OUT {"msg":"Connection attempt:[15] to: amqps://aba5da1c-7ba4-4a97-a7b8-bed634abc51d.messaging.eu10.mq.messagebroker.cloud.sap:7027 failed","level":"INFO","written_ts":"1682335098885062000","logger":"org.apache.qpid.jms.provider.failover.FailoverProvider","written_at":"2023-04-24T11:18:18.884Z","thread":"FailoverProvider: async work thread","type":"log"} [2023-04-24T11:18:33.655Z] github.wdf.sap.corp/nextgenpayroll-montblanc/process-tracker-service/main: 2023-04-24T11:18:18.898Z [APP/PROC/WEB/1] OUT {"msg":"Failed to connect after: 15 attempt(s)","level":"ERROR","written_ts":"1682335098898191000","logger":"org.apache.qpid.jms.provider.failover.FailoverProvider","written_at":"2023-04-24T11:18:18.897Z","thread":"FailoverProvider: async work thread","type":"log"} [2023-04-24T11:18:33.655Z] github.wdf.sap.corp/nextgenpayroll-montblanc/process-tracker-service/main: 2023-04-24T11:18:18.898Z [APP/PROC/WEB/1] OUT {"msg":"Connection ID:4c280ae9-787d-4ef2-bf11-1f3f9682e709:1 has failed due to: Could not initialize class io.netty.channel.unix.Errors","level":"WARN","written_ts":"1682335098898573000","logger":"org.apache.qpid.jms.JmsConnection","written_at":"2023-04-24T11:18:18.898Z","thread":"FailoverProvider: async work thread","type":"log"}

       

      Attachments

        1. image-2023-04-28-12-03-00-922.png
          107 kB
          Harald Aamot
        2. image-2023-04-28-12-03-40-683.png
          113 kB
          Harald Aamot

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aamotharald Harald Aamot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: