You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2026/07/17 15:31:47 UTC
(hbase) branch branch-2.5 updated: HBASE-30286 HTTP ERROR 500 when opening master ui if active master is not yet available during startup (#8471) (#8478)
This is an automated email from the ASF dual-hosted git repository.
Apache9 pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.5 by this push:
new 6259535da39 HBASE-30286 HTTP ERROR 500 when opening master ui if active master is not yet available during startup (#8471) (#8478)
6259535da39 is described below
commit 6259535da39271ad23fc42b4c448e76445411581
Author: Peng Lu <lu...@apache.org>
AuthorDate: Fri Jul 17 23:20:09 2026 +0800
HBASE-30286 HTTP ERROR 500 when opening master ui if active master is not yet available during startup (#8471) (#8478)
Signed-off-by: Peter Somogyi <ps...@apache.org>
Signed-off-by: Xiao Liu <li...@apache.org>
(cherry picked from commit 0440548dfcd5dddb0601fcd1d402efda245e79b3)
---
.../resources/hbase-webapps/master/backupMasterStatus.jsp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/hbase-server/src/main/resources/hbase-webapps/master/backupMasterStatus.jsp b/hbase-server/src/main/resources/hbase-webapps/master/backupMasterStatus.jsp
index cada34472c9..28f56837d60 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/backupMasterStatus.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/backupMasterStatus.jsp
@@ -20,14 +20,12 @@
<%@ page contentType="text/html;charset=UTF-8"
import="java.util.*"
import="org.apache.hadoop.hbase.ServerName"
- import="org.apache.hadoop.hbase.master.HMaster"
- import="org.apache.hbase.thirdparty.com.google.common.base.Preconditions" %>
+ import="org.apache.hadoop.hbase.master.HMaster" %>
<%
HMaster master = (HMaster) getServletContext().getAttribute(HMaster.MASTER);
if (!master.isActiveMaster()) {
ServerName active_master = master.getActiveMaster().orElse(null);
- Preconditions.checkState(active_master != null, "Failed to retrieve active master's ServerName!");
int activeInfoPort = master.getActiveMasterInfoPort();
%>
<div class="row inner_header">
@@ -35,8 +33,16 @@
<h1>Backup Master <small><%= master.getServerName().getHostname() %></small></h1>
</div>
</div>
+ <% if (active_master != null) { %>
<h4>Current Active Master: <a href="//<%= active_master.getHostname() %>:<%= activeInfoPort %>/master.jsp"
target="_blank"><%= active_master.getHostname() %></a></h4>
+ <% } else { %>
+ <div id="initializing-info">
+ <h4>Cluster is starting, active master not yet elected</h4>
+ <p>No active master has been found. This is normal during cluster startup or master failover.
+ Please refresh manually in a few seconds.</p>
+ </div>
+ <% } %>
<% } else { %>
<h2>Backup Masters</h2>