You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/05/16 12:55:00 UTC
[tomcat] 03/03: Avoid unnecessary logging when host is down
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 8abf06d9b1af3fd34892966411acf12ae4b7eb00
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu May 16 13:54:25 2019 +0100
Avoid unnecessary logging when host is down
---
.../tribes/group/interceptors/TcpFailureDetector.java | 5 ++---
webapps/docs/changelog.xml | 11 +++++++++++
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java b/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
index 281ee4d..a0b9b1d 100644
--- a/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
+++ b/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
@@ -19,6 +19,7 @@ package org.apache.catalina.tribes.group.interceptors;
import java.net.ConnectException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
+import java.net.NoRouteToHostException;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.util.Arrays;
@@ -354,9 +355,7 @@ public class TcpFailureDetector extends ChannelInterceptorBase implements TcpFai
}
}//end if
return true;
- } catch (SocketTimeoutException sx) {
- //do nothing, we couldn't connect
- } catch (ConnectException cx) {
+ } catch (SocketTimeoutException | ConnectException | NoRouteToHostException noop) {
//do nothing, we couldn't connect
} catch (Exception x) {
log.error(sm.getString("tcpFailureDetector.failureDetection.failed", mbr),x);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c08fa7e..b756017 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -145,6 +145,17 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Tribes">
+ <changelog>
+ <fix>
+ Treat <code>NoRouteToHostException</code> the same way as
+ <code>SocketTimeoutException</code> when checking the health of group
+ members. This avoids a SEVERE log message every time the check is
+ performed when the host associated with a group member is not powered
+ on. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Other">
<changelog>
<update>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org