lujie created HBASE-22023: ----------------------------- Summary: similar to HBASE-21740: NPE happens while shutdown the RS Key: HBASE-22023 URL: https://issues.apache.org/jira/browse/HBASE-22023 Project: HBase Issue Type: Bug Reporter: lujie Assignee: lujie
shutdown command comes before startServices: {code:java} if (!isStopped() && !isAborted()) { initializeThreads(); }{code} so initializeThreads will skip and leases is null leases will be used in line 1996 without check, hence NPE happens Give the simple fix! {code:java} 2019-03-10 14:17:12,690 ERROR [regionserver/hadoop15:16020] regionserver.HRegionServer: Failed init java.lang.NullPointerException at org.apache.hadoop.hbase.regionserver.HRegionServer.startServices(HRegionServer.java:1996) at org.apache.hadoop.hbase.regionserver.HRegionServer.handleReportForDutyResponse(HRegionServer.java:1575) at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:976) at java.lang.Thread.run(Thread.java:745) 2019-03-10 14:17:12,719 ERROR [regionserver/hadoop15:16020] regionserver.HRegionServer: ***** ABORTING region server hadoop15,16020,1552198622594: Unhandled: Region server startup failed ***** java.io.IOException: Region server startup failed at org.apache.hadoop.hbase.regionserver.HRegionServer.convertThrowableToIOE(HRegionServer.java:3398) at org.apache.hadoop.hbase.regionserver.HRegionServer.handleReportForDutyResponse(HRegionServer.java:1594) at org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:976) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at org.apache.hadoop.hbase.regionserver.HRegionServer.startServices(HRegionServer.java:1996) at org.apache.hadoop.hbase.regionserver.HRegionServer.handleReportForDutyResponse(HRegionServer.java:1575) ... 2 more {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)