[ 
https://issues.apache.org/jira/browse/HBASE-22023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16789121#comment-16789121
 ] 

lujie edited comment on HBASE-22023 at 3/11/19 3:26 AM:
--------------------------------------------------------

the  latest master, branch-1 and branch -2 are all affected, I will give the 
patch for them


was (Author: xiaoheipangzi):
I test it  based on the latest master code.

> 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
>            Priority: Major
>         Attachments: HBASE-22023_1.patch, HBASE-22023_branch_2.2_1.patch
>
>
> 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)

Reply via email to