This is an automated email from the ASF dual-hosted git repository.
guluo2016 pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-3 by this push:
new c522d03ad0e HBASE-30286 HTTP ERROR 500 when opening master ui if
active master is not yet available during startup (#8471)
c522d03ad0e is described below
commit c522d03ad0e5decfd4af32eb5db3416a3a728e1b
Author: Peng Lu <[email protected]>
AuthorDate: Thu Jul 16 22:25:02 2026 +0800
HBASE-30286 HTTP ERROR 500 when opening master ui if active master is not
yet available during startup (#8471)
Signed-off-by: Peter Somogyi <[email protected]>
Signed-off-by: Xiao Liu <[email protected]>
---
.../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>