Subodh, please read the user manual to get command syntax right. Thanks, Alex
On Fri, May 1, 2015 at 10:39 AM, Subodh Garg-SSI < [email protected]> wrote: > Hi Alex, > > The server remove is not working if I remove it after adding it. > > [zk: localhost:2181(CONNECTED) 0] reconfig -add server.3=10.3.1.132:2780 > :2782;2181 > Committed new configuration: > server.1=10.3.1.130:2780:2782:participant;0.0.0.0:2181 > server.2=10.3.1.131:2780:2782:participant;0.0.0.0:2181 > server.3=10.3.1.132:2780:2782:participant;0.0.0.0:2181 > version=800000007 > > I verified the config on server 1 and server 2 and it showed updated > config. > After that I tried to remove server 3 from server 3 zkCLI but I am getting > the following error. > > [zk: localhost:2181(CONNECTED) 1] reconfig -remove > server.3=10.3.1.132:2780:2782;2181 > KeeperErrorCode = MarshallingError for > [zk: localhost:2181(CONNECTED) 2] > > Thanks > Subodh > > > -----Original Message----- > From: Subodh Garg-SSI [mailto:[email protected]] > Sent: Thursday, April 30, 2015 2:02 PM > To: [email protected] > Subject: RE: reconfig command in Zookeeper 3.5.0 Alpha > > Thanks a lot! That’s exactly what was missing. It worked after specifying > client port to the command. > > [zk: localhost:2181(CONNECTED) 0] reconfig -add server.2=10.3.1.131:2780 > :2783;2181 > Committed new configuration: > server.1=10.3.1.130:2780:2782:participant > server.2=10.3.1.131:2780:2783:participant;0.0.0.0:2181 > version=300000008 > [zk: localhost:2181(CONNECTED) 1] config server.1=10.3.1.130:2780 > :2782:participant > server.2=10.3.1.131:2780:2783:participant;0.0.0.0:2181 > version=300000008 > [zk: localhost:2181(CONNECTED) 2] > > -----Original Message----- > From: Alexander Shraer [mailto:[email protected]] > Sent: Thursday, April 30, 2015 1:53 PM > To: [email protected] > Subject: Re: reconfig command in Zookeeper 3.5.0 Alpha > > I think you have to add a client port at the end, like this: > > reconfig -add server.5=125.23.63.23:1234:1235;1236 > > > On Thu, Apr 30, 2015 at 1:49 PM, Subodh Garg-SSI < > [email protected]> wrote: > > > I tried the following on server 2, but it fails with a different error. > > > > [zk: localhost:2181(CONNECTED) 0] config > > server.1=10.3.1.130:2780:2782:participant > > version=300000000 > > [zk: localhost:2181(CONNECTED) 1] reconfig -add > > server.2=10.3.1.131:2780 > > :2783 > > KeeperErrorCode = BadArguments for > > > > Thanks, > > Subodh > > > > > > -----Original Message----- > > From: Alexander Shraer [mailto:[email protected]] > > Sent: Thursday, April 30, 2015 1:40 PM > > To: [email protected] > > Subject: Re: reconfig command in Zookeeper 3.5.0 Alpha > > > > you should write " reconfig -add server.2=10.3.1.131:2780:2783" > > not serverid=... > > > > On Thu, Apr 30, 2015 at 1:21 PM, Subodh Garg-SSI < > > [email protected]> wrote: > > > > > Hi Alex, > > > > > > I am still getting the same error. This time I started server 1 with > > > following contents in dynamicConfigFile > > > > > > server.1=10.3.1.130:2780:2783 > > > > > > Then I started server 2 with the following contents in > > > dynamicConfigFile as you suggested. > > > > > > server.1=10.3.1.130:2780:2783 > > > server.2=10.3.1.131:2780:2783 > > > > > > After starting server 2, I see dynamic config file contents of > > > server > > > 2 change to that of server 1. > > > > > > The on server 1, I tried the following command using zkCli.sh > > > > > > reconfig -add serverId=10.3.1.131:2780:2783 > > > > > > But I still get the following error message. > > > > > > KeeperErrorCode = MarshallingError for > > > > > > Here is the output of zkCli.sh on server 1 > > > > > > [zk: localhost:2181(CONNECTED) 3] config > > > server.1=10.3.1.130:2780:2783:participant > > > version=200000000 > > > [zk: localhost:2181(CONNECTED) 4] reconfig -add > > > serverId=10.3.1.131:2780 > > > :2783 > > > KeeperErrorCode = MarshallingError for > > > [zk: localhost:2181(CONNECTED) 5] . > > > > > > I tried the same command on server 2, but still I get the same result. > > > Here is the output of zkCli.sh on server 2. > > > > > > [zk: localhost:2181(CONNECTED) 0] config > > > server.1=10.3.1.130:2780:2783:participant > > > version=200000000 > > > [zk: localhost:2181(CONNECTED) 1] reconfig -add > > > serverId=10.3.1.131:2780 > > > :2783 > > > KeeperErrorCode = MarshallingError for > > > [zk: localhost:2181(CONNECTED) 2] > > > > > > Thanks, > > > Subodh > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > From: Alexander Shraer [mailto:[email protected]] > > > Sent: Wednesday, April 29, 2015 7:17 PM > > > To: [email protected] > > > Subject: Re: reconfig command in Zookeeper 3.5.0 Alpha > > > > > > Hi, > > > > > > Your initial config files are defining two ZooKeeper clusters of size > 1. > > > They are independent and will not try to connect. > > > Instead, when defining the config of server 2 you should add both a > > > line for server 1 and a line for server 2 (this is an invalid > > > config, used just to initialize server 2). This way server 2 will > > > try to connect > > to server 1. > > > Once connected to server 1, it will update its config file to the > > > one at server 1 (since this is the valid current configuration). > > > Then you can add server 2 using reconfig and both servers should > > > have both of them in the config. > > > > > > On Wed, Apr 29, 2015 at 6:48 PM, Subodh Garg-SSI < > > > [email protected]> wrote: > > > > > > > Alex, > > > > > > > > I am running zkServer.sh on two servers with IP address as > > > > 10.3.1.130 and 10.3.1.131. I declared standaloneEnabled=false in > > > > the zoo.cfg file for each of the server. I also created a > > "dynamicConfigFile=" > > > > parameter in each server's static config file. In dynamic config > > > > file for server 1, I added its own server's IP address entry as > > > > server.1=10.3.1.130:2780:2783 for server1. In dynamic config file > > > > for server 2, I added its own server's IP address entry as > > > server.2=10.3.1.131:2780:2783. > > > > > > > > After starting Zookeeper server on two machines, I checked they > > > > both got elected as LEADER. After that I ran zkCli.sh on server 1 > > > > and tried to add server 2 in the following way, but I get > > > > "Marshalling > > Error for". > > > > > > > > Is there any problem the way I am adding the server? > > > > > > > > Here is what it shows in zkCli.sh on each of the server. > > > > > > > > Server 1: > > > > [zk: localhost:2181(CONNECTED) 8] config > > > > server.1=10.3.1.130:2780:2783:participant > > > > version=100000000 > > > > [zk: localhost:2181(CONNECTED) 9] reconfig -add > > > > serverId=10.3.1.131:2780 > > > > :2783 > > > > KeeperErrorCode = MarshallingError for > > > > [zk: localhost:2181(CONNECTED) 10] > > > > > > > > Server 2: > > > > [zk: localhost:2181(CONNECTED) 2] config > > > > server.2=10.3.1.131:2780:2783:participant > > > > version=100000000 > > > > [zk: localhost:2181(CONNECTED) 3] > > > > > > > > Thanks > > > > Subodh > > > > > > > > -----Original Message----- > > > > From: Alexander Shraer [mailto:[email protected]] > > > > Sent: Tuesday, April 28, 2015 11:23 AM > > > > To: [email protected] > > > > Subject: Re: reconfig command in Zookeeper 3.5.0 Alpha > > > > > > > > That's the one., 3.5.0 alpha There is no stable 3.5.0 release, > > > > just alpha releases for now. > > > > > > > > Alex > > > > > > > > On Tue, Apr 28, 2015 at 11:19 AM, Subodh Garg-SSI < > > > > [email protected]> wrote: > > > > > > > > > Hi Alex, > > > > > > > > > > Thanks for pointing me to the documentation for 3.5.0. Could you > > > > > point me to the 3.5.0 code as well? > > > > > > > > > > I do not see the 3.5.0 release listed on the following page for > > > > > downloading Zookeeper. > > > > > > > > > > http://zookeeper.apache.org/releases.html#download > > > > > > > > > > I could find only 3.5.0 Alpha release but not 3.5.0. > > > > > > > > > > > > > > > Thanks > > > > > Subodh > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Alexander Shraer [mailto:[email protected]] > > > > > Sent: Saturday, April 25, 2015 10:28 PM > > > > > To: [email protected] > > > > > Subject: Re: reconfig command in Zookeeper 3.5.0 Alpha > > > > > > > > > > Hi, > > > > > > > > > > The reconfig command is available in 3.5.0 - both in the CLI and > > > > > as Java and C API. The documentation is available here: > > > > > http://zookeeper.apache.org/doc/trunk/zookeeperReconfig.html > > > > > > > > > > Cheers, > > > > > Alex > > > > > > > > > > On Thu, Apr 23, 2015 at 1:47 PM, Subodh Garg-SSI < > > > > > [email protected]> wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > I downloaded 3.5.0 Alpha release of Zookeeper. I was wondering > > > > > > how Zookeeper is reconfigured if new server is added and old > > > > > > is > > deleted. > > > > > > The Zookeeper document (book) talks about it and how to use it > > > > > > in release > > > > > > 3.5.0 of Zookeeper. Could someone please tell me when that > > > > > > feature is going to be available as I could not find "reconfig" > > > > > > command in downloaded software package. > > > > > > > > > > > > Thanks, > > > > > > Subodh > > > > > > > > > > > > > > > > > > > > >
