[ 
https://issues.apache.org/jira/browse/HADOOP-4476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641388#action_12641388
 ] 

Steve Loughran commented on HADOOP-4476:
----------------------------------------

stack trace

{code}
[sf-startdaemon-debug]         java.lang.NullPointerException
[sf-startdaemon-debug]  at 
org.apache.hadoop.hdfs.server.datanode.DataNode.handshake(DataNode.java:443)
[sf-startdaemon-debug]  at 
org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:302)

{code}

The line at fault is 
{code}
if( ! nsInfo.getBuildVersion().equals( Storage.getBuildVersion() )) 
{code} 
At a guess, the getBuildVersion() value is null, which implies the handshaking 
failed; the datanode was still handshaking when shouldRun was set to false, it 
stopped spinning trying to talk to the namenode, and instead of checking for 
shouldRun==true and bailing out, it assumed the handshake information had been 
correctly received.

> NPE in datanode.handshake()
> ---------------------------
>
>                 Key: HADOOP-4476
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4476
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.20.0
>            Reporter: Steve Loughran
>            Priority: Minor
>
> It appears possible to raise an NPE in DataNode.handshake() if the startup 
> protocol gets interrupted or fails in some manner

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to