You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Benoit Sigoure (JIRA)" <ji...@apache.org> on 2010/06/30 20:42:49 UTC

[jira] Created: (HBASE-2806) DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress

DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress
---------------------------------------------------------------

                 Key: HBASE-2806
                 URL: https://issues.apache.org/jira/browse/HBASE-2806
             Project: HBase
          Issue Type: Bug
            Reporter: Benoit Sigoure
            Assignee: Benoit Sigoure
            Priority: Minor


Yesterday at the Hadoop Summit, the "HADOOP" wireless network was using a pair of DNS servers that couldn't resolve {{localhost.}}.  This prevented me from starting HBase as the construction of the {{HMaster}} was failing with the following rather cryptic error:
{code}
2010-06-29 14:30:24,603 ERROR org.apache.hadoop.hbase.master.HMaster: Failed to start master
java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster$LocalHMasternull
        at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1217)
        at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:112)
        at org.apache.hadoop.hbase.master.HMaster.doMain(HMaster.java:1298)
        at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1355)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1215)
        ... 3 more
Caused by: java.lang.NullPointerException
        at org.apache.hadoop.hbase.HServerAddress.getBindAddress(HServerAddress.java:89)
        at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:204)
        at org.apache.hadoop.hbase.master.HMaster$LocalHMaster.<init>(HMaster.java:1230)
        ... 8 more
{code}
The {{NullPointerException}} in {{getBindAddress}} comes from the following line of code:
{code:java}
    return this.address.getAddress().getHostAddress();
{code}
where {{getAddress()}} was returning {{null}}.

I think the code should check for this case, log an appropriate error message (to point whoever is going to troubleshoot the problem in the right direction), and throw something else than an NPE.

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


[jira] Commented: (HBASE-2806) DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress

Posted by "HBase Review Board (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885284#action_12885284 ] 

HBase Review Board commented on HBASE-2806:
-------------------------------------------

Message from: stack@duboce.net

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.hbase.org/r/244/#review301
-----------------------------------------------------------

Ship it!


- stack





> DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress
> ---------------------------------------------------------------
>
>                 Key: HBASE-2806
>                 URL: https://issues.apache.org/jira/browse/HBASE-2806
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Benoit Sigoure
>            Assignee: Benoit Sigoure
>            Priority: Minor
>             Fix For: 0.21.0
>
>         Attachments: 0001-HBASE-2806-Log-a-proper-error-message-and-don-t-NPE-.patch
>
>
> Yesterday at the Hadoop Summit, the "HADOOP" wireless network was using a pair of DNS servers that couldn't resolve {{localhost.}}.  This prevented me from starting HBase as the construction of the {{HMaster}} was failing with the following rather cryptic error:
> {code}
> 2010-06-29 14:30:24,603 ERROR org.apache.hadoop.hbase.master.HMaster: Failed to start master
> java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster$LocalHMasternull
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1217)
>         at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:112)
>         at org.apache.hadoop.hbase.master.HMaster.doMain(HMaster.java:1298)
>         at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1355)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1215)
>         ... 3 more
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.HServerAddress.getBindAddress(HServerAddress.java:89)
>         at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:204)
>         at org.apache.hadoop.hbase.master.HMaster$LocalHMaster.<init>(HMaster.java:1230)
>         ... 8 more
> {code}
> The {{NullPointerException}} in {{getBindAddress}} comes from the following line of code:
> {code:java}
>     return this.address.getAddress().getHostAddress();
> {code}
> where {{getAddress()}} was returning {{null}}.
> I think the code should check for this case, log an appropriate error message (to point whoever is going to troubleshoot the problem in the right direction), and throw something else than an NPE.

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


[jira] Updated: (HBASE-2806) DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress

Posted by "Jonathan Gray (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Gray updated HBASE-2806:
---------------------------------

    Attachment: HBASE-2806-compilefix.patch

I think this is all that's needed.  If no one responds soon I will commit it.

> DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress
> ---------------------------------------------------------------
>
>                 Key: HBASE-2806
>                 URL: https://issues.apache.org/jira/browse/HBASE-2806
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Benoit Sigoure
>            Assignee: Benoit Sigoure
>            Priority: Minor
>             Fix For: 0.21.0
>
>         Attachments: 0001-HBASE-2806-Log-a-proper-error-message-and-don-t-NPE-.patch, HBASE-2806-compilefix.patch
>
>
> Yesterday at the Hadoop Summit, the "HADOOP" wireless network was using a pair of DNS servers that couldn't resolve {{localhost.}}.  This prevented me from starting HBase as the construction of the {{HMaster}} was failing with the following rather cryptic error:
> {code}
> 2010-06-29 14:30:24,603 ERROR org.apache.hadoop.hbase.master.HMaster: Failed to start master
> java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster$LocalHMasternull
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1217)
>         at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:112)
>         at org.apache.hadoop.hbase.master.HMaster.doMain(HMaster.java:1298)
>         at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1355)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1215)
>         ... 3 more
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.HServerAddress.getBindAddress(HServerAddress.java:89)
>         at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:204)
>         at org.apache.hadoop.hbase.master.HMaster$LocalHMaster.<init>(HMaster.java:1230)
>         ... 8 more
> {code}
> The {{NullPointerException}} in {{getBindAddress}} comes from the following line of code:
> {code:java}
>     return this.address.getAddress().getHostAddress();
> {code}
> where {{getAddress()}} was returning {{null}}.
> I think the code should check for this case, log an appropriate error message (to point whoever is going to troubleshoot the problem in the right direction), and throw something else than an NPE.

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


[jira] Resolved: (HBASE-2806) DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress

Posted by "Jonathan Gray (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Gray resolved HBASE-2806.
----------------------------------

    Resolution: Fixed

Committed compile fix to trunk.

> DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress
> ---------------------------------------------------------------
>
>                 Key: HBASE-2806
>                 URL: https://issues.apache.org/jira/browse/HBASE-2806
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Benoit Sigoure
>            Assignee: Benoit Sigoure
>            Priority: Minor
>             Fix For: 0.21.0
>
>         Attachments: 0001-HBASE-2806-Log-a-proper-error-message-and-don-t-NPE-.patch, HBASE-2806-compilefix.patch
>
>
> Yesterday at the Hadoop Summit, the "HADOOP" wireless network was using a pair of DNS servers that couldn't resolve {{localhost.}}.  This prevented me from starting HBase as the construction of the {{HMaster}} was failing with the following rather cryptic error:
> {code}
> 2010-06-29 14:30:24,603 ERROR org.apache.hadoop.hbase.master.HMaster: Failed to start master
> java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster$LocalHMasternull
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1217)
>         at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:112)
>         at org.apache.hadoop.hbase.master.HMaster.doMain(HMaster.java:1298)
>         at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1355)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1215)
>         ... 3 more
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.HServerAddress.getBindAddress(HServerAddress.java:89)
>         at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:204)
>         at org.apache.hadoop.hbase.master.HMaster$LocalHMaster.<init>(HMaster.java:1230)
>         ... 8 more
> {code}
> The {{NullPointerException}} in {{getBindAddress}} comes from the following line of code:
> {code:java}
>     return this.address.getAddress().getHostAddress();
> {code}
> where {{getAddress()}} was returning {{null}}.
> I think the code should check for this case, log an appropriate error message (to point whoever is going to troubleshoot the problem in the right direction), and throw something else than an NPE.

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


[jira] Commented: (HBASE-2806) DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress

Posted by "Benoit Sigoure (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885601#action_12885601 ] 

Benoit Sigoure commented on HBASE-2806:
---------------------------------------

Sorry for the compilation breakage, this 1-line fix remained uncommitted in my local Git repo, I ran {{git commit --amend}} and forgot the {{-a}} to get this change in the patch.  Thanks for the fix Jonathan!

> DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress
> ---------------------------------------------------------------
>
>                 Key: HBASE-2806
>                 URL: https://issues.apache.org/jira/browse/HBASE-2806
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Benoit Sigoure
>            Assignee: Benoit Sigoure
>            Priority: Minor
>             Fix For: 0.21.0
>
>         Attachments: 0001-HBASE-2806-Log-a-proper-error-message-and-don-t-NPE-.patch, HBASE-2806-compilefix.patch
>
>
> Yesterday at the Hadoop Summit, the "HADOOP" wireless network was using a pair of DNS servers that couldn't resolve {{localhost.}}.  This prevented me from starting HBase as the construction of the {{HMaster}} was failing with the following rather cryptic error:
> {code}
> 2010-06-29 14:30:24,603 ERROR org.apache.hadoop.hbase.master.HMaster: Failed to start master
> java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster$LocalHMasternull
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1217)
>         at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:112)
>         at org.apache.hadoop.hbase.master.HMaster.doMain(HMaster.java:1298)
>         at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1355)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1215)
>         ... 3 more
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.HServerAddress.getBindAddress(HServerAddress.java:89)
>         at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:204)
>         at org.apache.hadoop.hbase.master.HMaster$LocalHMaster.<init>(HMaster.java:1230)
>         ... 8 more
> {code}
> The {{NullPointerException}} in {{getBindAddress}} comes from the following line of code:
> {code:java}
>     return this.address.getAddress().getHostAddress();
> {code}
> where {{getAddress()}} was returning {{null}}.
> I think the code should check for this case, log an appropriate error message (to point whoever is going to troubleshoot the problem in the right direction), and throw something else than an NPE.

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


[jira] Reopened: (HBASE-2806) DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress

Posted by "Jonathan Gray (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Gray reopened HBASE-2806:
----------------------------------


Trunk doesn't compile after this got committed

> DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress
> ---------------------------------------------------------------
>
>                 Key: HBASE-2806
>                 URL: https://issues.apache.org/jira/browse/HBASE-2806
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Benoit Sigoure
>            Assignee: Benoit Sigoure
>            Priority: Minor
>             Fix For: 0.21.0
>
>         Attachments: 0001-HBASE-2806-Log-a-proper-error-message-and-don-t-NPE-.patch
>
>
> Yesterday at the Hadoop Summit, the "HADOOP" wireless network was using a pair of DNS servers that couldn't resolve {{localhost.}}.  This prevented me from starting HBase as the construction of the {{HMaster}} was failing with the following rather cryptic error:
> {code}
> 2010-06-29 14:30:24,603 ERROR org.apache.hadoop.hbase.master.HMaster: Failed to start master
> java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster$LocalHMasternull
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1217)
>         at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:112)
>         at org.apache.hadoop.hbase.master.HMaster.doMain(HMaster.java:1298)
>         at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1355)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1215)
>         ... 3 more
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.HServerAddress.getBindAddress(HServerAddress.java:89)
>         at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:204)
>         at org.apache.hadoop.hbase.master.HMaster$LocalHMaster.<init>(HMaster.java:1230)
>         ... 8 more
> {code}
> The {{NullPointerException}} in {{getBindAddress}} comes from the following line of code:
> {code:java}
>     return this.address.getAddress().getHostAddress();
> {code}
> where {{getAddress()}} was returning {{null}}.
> I think the code should check for this case, log an appropriate error message (to point whoever is going to troubleshoot the problem in the right direction), and throw something else than an NPE.

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


[jira] Updated: (HBASE-2806) DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-2806:
-------------------------

    Attachment: 0001-HBASE-2806-Log-a-proper-error-message-and-don-t-NPE-.patch

Attaching patch that was +1'd over on review.hbase.org.

> DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress
> ---------------------------------------------------------------
>
>                 Key: HBASE-2806
>                 URL: https://issues.apache.org/jira/browse/HBASE-2806
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Benoit Sigoure
>            Assignee: Benoit Sigoure
>            Priority: Minor
>         Attachments: 0001-HBASE-2806-Log-a-proper-error-message-and-don-t-NPE-.patch
>
>
> Yesterday at the Hadoop Summit, the "HADOOP" wireless network was using a pair of DNS servers that couldn't resolve {{localhost.}}.  This prevented me from starting HBase as the construction of the {{HMaster}} was failing with the following rather cryptic error:
> {code}
> 2010-06-29 14:30:24,603 ERROR org.apache.hadoop.hbase.master.HMaster: Failed to start master
> java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster$LocalHMasternull
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1217)
>         at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:112)
>         at org.apache.hadoop.hbase.master.HMaster.doMain(HMaster.java:1298)
>         at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1355)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1215)
>         ... 3 more
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.HServerAddress.getBindAddress(HServerAddress.java:89)
>         at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:204)
>         at org.apache.hadoop.hbase.master.HMaster$LocalHMaster.<init>(HMaster.java:1230)
>         ... 8 more
> {code}
> The {{NullPointerException}} in {{getBindAddress}} comes from the following line of code:
> {code:java}
>     return this.address.getAddress().getHostAddress();
> {code}
> where {{getAddress()}} was returning {{null}}.
> I think the code should check for this case, log an appropriate error message (to point whoever is going to troubleshoot the problem in the right direction), and throw something else than an NPE.

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


[jira] Resolved: (HBASE-2806) DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack resolved HBASE-2806.
--------------------------

     Hadoop Flags: [Reviewed]
    Fix Version/s: 0.21.0
       Resolution: Fixed

Thanks for the patch BenoƮt

> DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress
> ---------------------------------------------------------------
>
>                 Key: HBASE-2806
>                 URL: https://issues.apache.org/jira/browse/HBASE-2806
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Benoit Sigoure
>            Assignee: Benoit Sigoure
>            Priority: Minor
>             Fix For: 0.21.0
>
>         Attachments: 0001-HBASE-2806-Log-a-proper-error-message-and-don-t-NPE-.patch
>
>
> Yesterday at the Hadoop Summit, the "HADOOP" wireless network was using a pair of DNS servers that couldn't resolve {{localhost.}}.  This prevented me from starting HBase as the construction of the {{HMaster}} was failing with the following rather cryptic error:
> {code}
> 2010-06-29 14:30:24,603 ERROR org.apache.hadoop.hbase.master.HMaster: Failed to start master
> java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster$LocalHMasternull
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1217)
>         at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:112)
>         at org.apache.hadoop.hbase.master.HMaster.doMain(HMaster.java:1298)
>         at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1355)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1215)
>         ... 3 more
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.HServerAddress.getBindAddress(HServerAddress.java:89)
>         at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:204)
>         at org.apache.hadoop.hbase.master.HMaster$LocalHMaster.<init>(HMaster.java:1230)
>         ... 8 more
> {code}
> The {{NullPointerException}} in {{getBindAddress}} comes from the following line of code:
> {code:java}
>     return this.address.getAddress().getHostAddress();
> {code}
> where {{getAddress()}} was returning {{null}}.
> I think the code should check for this case, log an appropriate error message (to point whoever is going to troubleshoot the problem in the right direction), and throw something else than an NPE.

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


[jira] Commented: (HBASE-2806) DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress

Posted by "HBase Review Board (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884500#action_12884500 ] 

HBase Review Board commented on HBASE-2806:
-------------------------------------------

Message from: "Benoit Sigoure" <ts...@gmail.com>

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.hbase.org/r/244/
-----------------------------------------------------------

Review request for hbase.


Summary
-------

The code returns null when this happens.  Also, whenever an instance
of HServerAddress is created, the code will verify that the IP can
be retrieved and throw an IllegalArgumentException if it cannot.

This change also fixes some other random little things like:
  - Remove unnecessary parentheses.
  - Remove unnecessary uses of `this' outside of constructors.
  - Missing spaces after `if'.
  - Remove wildcard imports.
  - Remove unnecessary creation of objects.


This addresses bug HBASE-2806.
    http://issues.apache.org/jira/browse/HBASE-2806


Diffs
-----

  trunk/src/main/java/org/apache/hadoop/hbase/HServerAddress.java 959479 

Diff: http://review.hbase.org/r/244/diff


Testing
-------

Code compiles.


Thanks,

Benoit




> DNS hiccups cause uncaught NPE in HServerAddress#getBindAddress
> ---------------------------------------------------------------
>
>                 Key: HBASE-2806
>                 URL: https://issues.apache.org/jira/browse/HBASE-2806
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Benoit Sigoure
>            Assignee: Benoit Sigoure
>            Priority: Minor
>
> Yesterday at the Hadoop Summit, the "HADOOP" wireless network was using a pair of DNS servers that couldn't resolve {{localhost.}}.  This prevented me from starting HBase as the construction of the {{HMaster}} was failing with the following rather cryptic error:
> {code}
> 2010-06-29 14:30:24,603 ERROR org.apache.hadoop.hbase.master.HMaster: Failed to start master
> java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster$LocalHMasternull
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1217)
>         at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:112)
>         at org.apache.hadoop.hbase.master.HMaster.doMain(HMaster.java:1298)
>         at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1355)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:1215)
>         ... 3 more
> Caused by: java.lang.NullPointerException
>         at org.apache.hadoop.hbase.HServerAddress.getBindAddress(HServerAddress.java:89)
>         at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:204)
>         at org.apache.hadoop.hbase.master.HMaster$LocalHMaster.<init>(HMaster.java:1230)
>         ... 8 more
> {code}
> The {{NullPointerException}} in {{getBindAddress}} comes from the following line of code:
> {code:java}
>     return this.address.getAddress().getHostAddress();
> {code}
> where {{getAddress()}} was returning {{null}}.
> I think the code should check for this case, log an appropriate error message (to point whoever is going to troubleshoot the problem in the right direction), and throw something else than an NPE.

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