You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Andor Molnar (JIRA)" <ji...@apache.org> on 2018/09/28 10:13:00 UTC

[jira] [Comment Edited] (ZOOKEEPER-2847) Cannot bind to client port when reconfig based on old static config

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

Andor Molnar edited comment on ZOOKEEPER-2847 at 9/28/18 10:12 AM:
-------------------------------------------------------------------

[~yisong-yue] Are u able to submit a fix for this anytime soon? Trunk builds have been red for a week now.

[~hanm] I wonder how that patch could have broken the unit test, because you merged it with a green build.


was (Author: andorm):
[~yisong-yue] Are u able to submit for this anytime soon? Trunk builds have been red for a week now.

[~hanm] I wonder how that patch could have broken the unit test, because you merged it with a green build.

> Cannot bind to client port when reconfig based on old static config
> -------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2847
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2847
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.5.3, 3.6.0
>            Reporter: Fangmin Lv
>            Assignee: Yisong Yue
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.6.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> When started the ensemble with old static config that the server string doesn't have client port, dynamically remove and add the same server from the ensemble will cause that server cannot bind to client port, and the ZooKeeper server cannot serve client requests anymore.
> From the code, we'll set the clientAddr to null when start up with old static config, and dynamic config forces to have <client port> part, which will trigger the following rebind code in QuorumPeer#processReconfig, and cause the address already in used issue.
>     public boolean processReconfig(QuorumVerifier qv, Long suggestedLeaderId, Long zxid, boolean restartLE) {
>         ...
>         if (myNewQS != null && myNewQS.clientAddr != null
>                 && !myNewQS.clientAddr.equals(oldClientAddr)) {
>             cnxnFactory.reconfigure(myNewQS.clientAddr);
>             updateThreadName();
>         }
>         ...
>     }



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)