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

nihaljain pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new c31ed12cf94 HBASE-29046 Log message is not correct when the Master 
bind address configured wrongly (#6588) (#6565)
c31ed12cf94 is described below

commit c31ed12cf94900c7a5115f202140d18e52323668
Author: chandrasekhar-188k 
<[email protected]>
AuthorDate: Fri Jan 10 12:44:13 2025 +0530

    HBASE-29046 Log message is not correct when the Master bind address 
configured wrongly (#6588) (#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);
     }

Reply via email to