diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java index 268c433f2f0..49ab9d6bd80 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java @@ -63,7 +63,11 @@ public class MasterStatusServlet extends HttpServlet { List servers = null; Set deadServers = null; - if(master.isActiveMaster()){ + if(master.isActiveMaster()) { + if (master.getServerManager() == null) { + response.sendError(503, "Master not ready"); + return; + } metaLocation = getMetaLocationOrNull(master); //ServerName metaLocation = master.getCatalogTracker().getMetaLocation(); servers = master.getServerManager().getOnlineServersList();