This is an automated email from the ASF dual-hosted git repository.
nihaljain pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new a3d8d6b925a HBASE-29046 Log message is not correct when the Master
bind address configured wrongly (#6590) (#6565)
a3d8d6b925a is described below
commit a3d8d6b925a45bcfa87c745c9b0a318ddaf3263e
Author: chandrasekhar-188k
<[email protected]>
AuthorDate: Fri Jan 10 12:45:02 2025 +0530
HBASE-29046 Log message is not correct when the Master bind address
configured wrongly (#6590) (#6565)
(cherry picked from commit 5d4ce4e289f192efbc95d4b4b323cfd6da4e2ca2)
Signed-off-by: Nihal Jain <[email protected]>
Signed-off-by: Pankaj Kumar<[email protected]>
---
.../main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index 27bcef2f069..351b4fef191 100644
---
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -2442,9 +2442,11 @@ public class HRegionServer extends Thread
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) {
@@ -2454,7 +2456,7 @@ public class HRegionServer extends Thread
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);
}