You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2012/11/04 22:24:12 UTC

[jira] [Commented] (ZOOKEEPER-1480) ClientCnxn(1161) can't get the current zk server add, so that - Session 0x for server null, unexpected error

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

Hadoop QA commented on ZOOKEEPER-1480:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12552006/getCurrentZooKeeperAddr_for_3.4.3.patch
  against trunk revision 1404288.

    -1 @author.  The patch appears to contain 1 @author tags which the Zookeeper community has agreed to not allow in code contributions.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    -1 patch.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1247//console

This message is automatically generated.
                
> ClientCnxn(1161) can't get the current zk server add, so that - Session 0x for server null, unexpected error
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1480
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1480
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.4.3
>            Reporter: Leader Ni
>            Assignee: Leader Ni
>              Labels: client, getCurrentZooKeeperAddr
>             Fix For: 3.5.0
>
>         Attachments: getCurrentZooKeeperAddr_for_3.4.3.patch, getCurrentZooKeeperAddr_for_branch3.4.patch
>
>
>   When zookeeper occur an unexpected error( Not SessionExpiredException, SessionTimeoutException and EndOfStreamException), ClientCnxn(1161) will log such as the formart "Session 0x for server null, unexpected error, closing socket connection and attempting reconnect ". The log at line 1161 in zookeeper-3.3.3
>   We found that, zookeeper use "((SocketChannel)sockKey.channel()).socket().getRemoteSocketAddress()" to get zookeeper addr. But,Sometimes, it logs "Session 0x for server null", you know, if log null, developer can't determine the current zookeeper addr that client is connected or connecting.
>   I add a method in Class SendThread:InetSocketAddress org.apache.zookeeper.ClientCnxn.SendThread.getCurrentZooKeeperAddr().
>   Here:
> /**
> * Returns the address to which the socket is connected.
> * 
> * @return ip address of the remote side of the connection or null if not
> *         connected
> */
> @Override
> SocketAddress getRemoteSocketAddress() {
>    // a lot could go wrong here, so rather than put in a bunch of code
>    // to check for nulls all down the chain let's do it the simple
>    // yet bulletproof way 
> .....

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira