You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ps...@apache.org on 2020/04/16 09:52:18 UTC

[hbase] branch master updated: HBASE-24197 TestHttpServer.testBindAddress failure with latest jetty (#1524)

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

psomogyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 94b4101  HBASE-24197 TestHttpServer.testBindAddress failure with latest jetty (#1524)
94b4101 is described below

commit 94b410184115f8ffddb70bd0e0b040a0b9df0c2d
Author: Istvan Toth <st...@cloudera.com>
AuthorDate: Thu Apr 16 11:51:59 2020 +0200

    HBASE-24197 TestHttpServer.testBindAddress failure with latest jetty (#1524)
    
    use the findPort logic even if the BindException is wrapped in an IOException
    
    Signed-off-by: Viraj Jasani <vj...@apache.org>
    Signed-off-by: Jan Hentschel <ja...@ultratendency.com>
    Signed-off-by: Peter Somogyi <ps...@apache.org>
---
 .../src/main/java/org/apache/hadoop/hbase/http/HttpServer.java       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
index 23f5956..887380e 100644
--- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
+++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
@@ -1120,7 +1120,10 @@ public class HttpServer implements FilterContainer {
           listener.open();
           LOG.info("Jetty bound to port " + listener.getLocalPort());
           break;
-        } catch (BindException ex) {
+        } catch (IOException ex) {
+          if(!(ex instanceof BindException) && !(ex.getCause() instanceof BindException)) {
+            throw ex;
+          }
           if (port == 0 || !findPort) {
             BindException be = new BindException("Port in use: "
                 + listener.getHost() + ":" + listener.getPort());