This is an automated email from the ASF dual-hosted git repository.
nihaljain 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 5d4ce4e289f HBASE-29046 Log message is not correct when the Master
bind address configured wrongly (#6565)
5d4ce4e289f is described below
commit 5d4ce4e289f192efbc95d4b4b323cfd6da4e2ca2
Author: chandrasekhar-188k
<[email protected]>
AuthorDate: Mon Jan 6 20:47:29 2025 +0530
HBASE-29046 Log message is not correct when the Master bind address
configured wrongly (#6565)
Signed-off-by: Nihal Jain <[email protected]>
---
.../src/main/java/org/apache/hadoop/hbase/HBaseServerBase.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/hbase-server/src/main/java/org/apache/hadoop/hbase/HBaseServerBase.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/HBaseServerBase.java
index f64f2947ee9..bf9640196f6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/HBaseServerBase.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/HBaseServerBase.java
@@ -322,9 +322,11 @@ public abstract class HBaseServerBase<R extends
HBaseRpcServicesBase<?>> extends
this.conf.getInt(HConstants.REGIONSERVER_INFO_PORT,
HConstants.DEFAULT_REGIONSERVER_INFOPORT);
String addr = this.conf.get("hbase.regionserver.info.bindAddress",
"0.0.0.0");
+ boolean isMaster = false;
if (this instanceof HMaster) {
port = conf.getInt(HConstants.MASTER_INFO_PORT,
HConstants.DEFAULT_MASTER_INFOPORT);
addr = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
+ isMaster = true;
}
// -1 is for disabling info server
if (port < 0) {
@@ -334,7 +336,7 @@ public abstract class HBaseServerBase<R extends
HBaseRpcServicesBase<?>> extends
if (!Addressing.isLocalAddress(InetAddress.getByName(addr))) {
String msg = "Failed to start http info server. Address " + addr
+ " does not belong to this host. Correct configuration parameter: "
- + "hbase.regionserver.info.bindAddress";
+ + (isMaster ? "hbase.master.info.bindAddress" :
"hbase.regionserver.info.bindAddress");
LOG.error(msg);
throw new IOException(msg);
}