You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "John George (JIRA)" <ji...@apache.org> on 2012/08/09 00:15:19 UTC

[jira] [Created] (HADOOP-8663) UnresolvedAddressException while connect causes NPE

John George created HADOOP-8663:
-----------------------------------

             Summary: UnresolvedAddressException while connect causes NPE
                 Key: HADOOP-8663
                 URL: https://issues.apache.org/jira/browse/HADOOP-8663
             Project: Hadoop Common
          Issue Type: Bug
    Affects Versions: 1.0.3, 3.0.0, 2.2.0-alpha
            Reporter: John George
            Assignee: John George


If connect() fails due to UnresolvedAddressException  in setupConnection() in Client.java, that causes 'out' to be NOT set and thus cause NPE when the next connection comes through. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-8663) UnresolvedAddressException while connect causes NPE

Posted by "John George (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431457#comment-13431457 ] 

John George commented on HADOOP-8663:
-------------------------------------

A connect fails due to some kinda n/w hiccup and throws an UnresolvedAddressException as follows:

12-07-30 16:31:07,223 WARN org.apache.hadoop.ipc.Client: Address change detected. Old: <hostname>/<ipaddress>:<port> New: <hostname>
2012-07-30 16:31:08,225 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: <hostname>:<port>. Already tried 0 time(s).
2012-07-30 16:31:08,226 INFO org.apache.hadoop.mapred.TaskTracker: Received KillTaskAction for task: attempt_201205090815_3706185_m_000000_1
2012-07-30 16:31:08,226 INFO org.apache.hadoop.mapred.TaskTracker: About to purge task: attempt_201205090815_3706185_m_000000_1
2012-07-30 16:31:08,226 WARN org.apache.hadoop.mapred.TaskTracker: Error initializing attempt_201205090815_3706185_m_000000_1:
java.nio.channels.UnresolvedAddressException
        at sun.nio.ch.Net.checkAddress(Net.java:30)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:487)
        at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:192)
        at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:656)
        at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:434)
        at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:560)
        at org.apache.hadoop.ipc.Client$Connection.access$2000(Client.java:184)
        at org.apache.hadoop.ipc.Client.getConnection(Client.java:1202)
        at org.apache.hadoop.ipc.Client.call(Client.java:1046)
        at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:225)
        at $Proxy8.getFileInfo(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:82)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:59)
        at $Proxy8.getFileInfo(Unknown Source)
        at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:757)
        at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:497)
        at org.apache.hadoop.mapred.TaskTracker.localizeJobTokenFile(TaskTracker.java:4229)
        at org.apache.hadoop.mapred.TaskTracker.initializeJob(TaskTracker.java:1150)
        at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:1091)
        at org.apache.hadoop.mapred.TaskTracker$5.run(TaskTracker.java:2360)
        at java.lang.Thread.run(Thread.java:619)


Clients using the same object will now get an NPE since 'out' is not initialized.

va.lang.NullPointerException
        at org.apache.hadoop.ipc.Client$Connection.sendParam(Client.java:766)
        at org.apache.hadoop.ipc.Client.call(Client.java:1047)
        at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:225)
        at $Proxy8.getFileInfo(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:82)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:59)
        at $Proxy8.getFileInfo(Unknown Source)
        at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:757)
        at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:497)
        at org.apache.hadoop.mapred.TaskTracker.localizeJobTokenFile(TaskTracker.java:4229)
        at org.apache.hadoop.mapred.TaskTracker.initializeJob(TaskTracker.java:1150)
        at org.apache.hadoop.mapred.TaskTracker.localizeJob(TaskTracker.java:1091)
        at org.apache.hadoop.mapred.TaskTracker$5.run(TaskTracker.java:2360)

This seems to be an issue in trunk as well, but I need to look closer to confirm. 
                
> UnresolvedAddressException while connect causes NPE
> ---------------------------------------------------
>
>                 Key: HADOOP-8663
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8663
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 1.0.3, 3.0.0, 2.2.0-alpha
>            Reporter: John George
>            Assignee: John George
>
> If connect() fails due to UnresolvedAddressException  in setupConnection() in Client.java, that causes 'out' to be NOT set and thus cause NPE when the next connection comes through. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HADOOP-8663) UnresolvedAddressException while connect causes NPE

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

John George updated HADOOP-8663:
--------------------------------

    Affects Version/s:     (was: 2.2.0-alpha)
                           (was: 3.0.0)
                           (was: 1.0.3)
                       0.20.205.0

This problems seems to be fixed in 1.0 and forward - hence removing it from the Affects Version.

The fix was to catch (throwable) in setupIOstreams() instead of just IOException.

I might close this JIRA in a little bit since its already fixed in later relevant releases.
                
> UnresolvedAddressException while connect causes NPE
> ---------------------------------------------------
>
>                 Key: HADOOP-8663
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8663
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.205.0
>            Reporter: John George
>            Assignee: John George
>
> If connect() fails due to UnresolvedAddressException  in setupConnection() in Client.java, that causes 'out' to be NOT set and thus cause NPE when the next connection comes through. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HADOOP-8663) UnresolvedAddressException while connect causes NPE

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

John George resolved HADOOP-8663.
---------------------------------

      Resolution: Not A Problem
    Release Note: Marking it as 'Not a Problem', since its already fixed in 1.0 and later
    
> UnresolvedAddressException while connect causes NPE
> ---------------------------------------------------
>
>                 Key: HADOOP-8663
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8663
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.205.0
>            Reporter: John George
>            Assignee: John George
>
> If connect() fails due to UnresolvedAddressException  in setupConnection() in Client.java, that causes 'out' to be NOT set and thus cause NPE when the next connection comes through. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira