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 > > > > > >
