zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shraer <shra...@gmail.com>
Subject Re: Dynamic reconfiguration: New participant server opens wrong ports
Date Thu, 19 Jun 2014 13:22:53 GMT
when you say "change its static configuration", what exactly do you mean ?
this part of the configuration should be located in the membership file
(dynamic part of the config). do you use the reconfiguration API to change
it (this is the right way) ? do you manually change it at all/some of the
servers (this would have no effect because servers read these files only
when they boot) ?

In the scenario you describe I expect server 3 to come up. Its possible if
you changed the config files manually that during sync with the leader the
leader pushes the old config to server 3 that it has in memory (since the
files you updated are not read) that's why it effectively has the old

Please use the dynamic reconfig API when you make changes to existing
servers or add/remove servers.

the "config" command in CLI can show you what config is latest at the
server you're connected too (if I remember correctly there's also a 4
letter command). You can also check the config file(s) of server 3 after it
syncs with the leader. I suspect that it will contain the old config.


On Thu, Jun 19, 2014 at 2:03 PM, Niko Vuokko <niko.vuokko@gmail.com> wrote:

> Starting from a stable 3-member quorum:
> server.1=localhost:2801:3801;2181
> server.2=localhost:2802:3802;2182
> server.3=localhost:2803:3803;2183
> I then kill server 3, clear its data directory, keep its myid=3 and change
> its static configuration to
> server.1=localhost:2801:3801;2181
> server.2=localhost:2802:3802;2182
> server.3=localhost:2804:3804;2184
> Now what I would expect is that this "new" server 3 will not join the
> quorum since the ports don't match what the servers 1 and 2 expect.
> However, it can join. The problem is that the "new" server 3 does not
> respect its configuration. Its logs will contain the new port number 2184,
> but it will actually pick up the dynamic configuration offered by the
> quorum and open up the old ports 2183 etc. After joining again, the dynamic
> configuration file for server 3 contains
> server.3=localhost:2803:3803:participant;
> Also, echo conf | localhost 2184 never replies but echo conf | localhost
> 2183 returns
> server.3=localhost:2803:3803:participant;
> Is this actually intentional or a bug?
> Best,
> Niko Vuokko

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message