[ 
https://issues.apache.org/jira/browse/ARTEMIS-3676?focusedWorklogId=744365&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-744365
 ]

ASF GitHub Bot logged work on ARTEMIS-3676:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Mar/22 19:38
            Start Date: 18/Mar/22 19:38
    Worklog Time Spent: 10m 
      Work Description: jbertram opened a new pull request #3991:
URL: https://github.com/apache/activemq-artemis/pull/3991


   This kind of exception can be common in cloud environments and should be
   ignored for logging just like ConnectException.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 744365)
    Remaining Estimate: 0h
            Time Spent: 10m

> "No route to host" exceptions from Netty with NIO transport
> -----------------------------------------------------------
>
>                 Key: ARTEMIS-3676
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3676
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 2.19.1, 2.20.0
>            Reporter: Apache Dev
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The following exception is logged when client transport connector is 
> configured with broker hosts currently not available. For example, when 
> configured host is down, which is a situation possible in a container 
> environment:
> {code}
> [2/8/22 15:31:31:678 CET] 00000101 org.apache.activemq.artemis.core.client    
>                   E AMQ214016: Failed to create netty connection
> io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: No route to 
> host: activemq2/172.10.0.52:61617
> Caused by: java.net.NoRouteToHostException: No route to host
>       at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>       at 
> sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)
>       at 
> io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
>       at 
> io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710)
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
>       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
>       at 
> io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
>       at 
> io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
>       at 
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
> {code}
>  
> Artemis 2.16 did not log such exceptions (they were handled as transient 
> connection errors).
> Artemis intercepts Netty exception in 
> {{org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector#createConnection(java.util.function.Consumer<io.netty.channel.ChannelFuture>,
>  java.lang.String, int)}}
> and logs it as an error because it is not a ConnectException:
> {code}
>          if (t != null && !(t instanceof ConnectException)) {
>             
> ActiveMQClientLogger.LOGGER.errorCreatingNettyConnection(future.cause());
>          }
> {code}
> I think it should be handled like a transient connection error, similar to 
> what happens when host machine is up and running but broker is not active.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to