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:57:28 UTC
[hbase] branch branch-2.3 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 branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.3 by this push:
new f401957 HBASE-24197 TestHttpServer.testBindAddress failure with latest jetty (#1524)
f401957 is described below
commit f4019572dedb79f3114b16ea1776ad1ecd7985fb
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());