You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2023/05/19 04:03:33 UTC

[kyuubi] branch branch-1.7 updated: [KYUUBI #4855] Change socket "connection refused" message match pattern

This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/branch-1.7 by this push:
     new b2b9d2888 [KYUUBI #4855] Change socket "connection refused" message match pattern
b2b9d2888 is described below

commit b2b9d28882519cfebd8801394ab2abd962dc299e
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Fri May 19 12:03:05 2023 +0800

    [KYUUBI #4855] Change socket "connection refused" message match pattern
    
    ### _Why are the changes needed?_
    
    The error message changed in JDK 17, we should change the match pattern accordingly.
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #4855 from pan3793/conn-refuse.
    
    Closes #4855
    
    78178b140 [Cheng Pan] Change socket "connection refused" message match pattern
    
    Authored-by: Cheng Pan <ch...@apache.org>
    Signed-off-by: Cheng Pan <ch...@apache.org>
    (cherry picked from commit cd47b131276d8a20fbd4a371bba9fcc42eca781d)
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
index 80df5c44d..9f54cbc12 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiSessionImpl.scala
@@ -161,7 +161,7 @@ class KyuubiSessionImpl(
           } catch {
             case e: org.apache.thrift.transport.TTransportException
                 if attempt < maxAttempts && e.getCause.isInstanceOf[java.net.ConnectException] &&
-                  e.getCause.getMessage.contains("Connection refused (Connection refused)") =>
+                  e.getCause.getMessage.contains("Connection refused") =>
               warn(
                 s"Failed to open [${engine.defaultEngineName} $host:$port] after" +
                   s" $attempt/$maxAttempts times, retrying",