You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by ilango dhandapani <il...@gmail.com> on 2018/11/30 18:42:42 UTC

Zookeeper StandAlone to ensemble

ZooKeeper version is zookeeper-3.4.6.2.2.4.5-1.jar. Apache solr 5.3 is the
distributed one working with zookeeper.
1. Using a stand alone zookeeper in QA and below is the zoo.cfg file

clientPort=2181
initLimit=10
autopurge.purgeInterval=12
syncLimit=5
tickTime=2000
dataDir=/var/zookeeper/data
autopurge.snapRetainCount=3
server.1=server1.homedepot.com:2888:3888
maxClientCnxns=512

2. $ ./zkServer.sh status
JMX enabled by default
Using config: /usr/hdp/current/zookeeper-server/bin/../conf/zoo.cfg
Mode: standalone

3. Want to add 2 more servers and make this an ensemble.

4. what I tried is,
a. Copied all data folder and zookeper installation folder from server1 and
moved to server2.
b. Edited zoo.cfg file in both server1 and server2, added
"server.2=server2.homedepot.com:2888:3888"
c. edited myid file as 2 in server2.
d. Tried starting zookeeeper in server2, it says started but actaully no
process was running. And zookeeper stops working at this 
   point and I need to back out the changes to zoo.cfg on server1 and
restart zookeeper.
e. Since zookeeper was installed under /usr/hdp in server1, i wanted to use
separate filesystems on server2. So created separate filesystems for
zeekeeper install, data etc.
   datadir was /var/zookeeper/data in server1 and /opt/zookeeper/data in
server2.

4. Also wondering how to change from stand alone to ensemble.
5. I understand that i need to refer the solr node to new zookeeper node
after zookeeper is up in server2.

bin/solr start -e cloud -z server1,server2:2181 -noprompt

Please help. 





--
Sent from: http://zookeeper-user.578899.n2.nabble.com/

Re: Zookeeper StandAlone to ensemble

Posted by ilango dhandapani <il...@gmail.com>.
Thanks Tamaas.
Am trying to add 2 servers. But since the second instance is not coming up,
I did not try the 3rd server yet.

First Server - Running zookeeper as root.
Second Server - Trying to run zookeeper as a non-root user. And the data,
install directories are different.
Does this create any issues? Permissions are 700 for the non root user. Yes
ports are open in the second server.

It did not create any logs in the second server, when I tried starting up.

Only after I point solr clients to new ZK nodes, it will take effect right ?

Also, when I run the below at final stage, Do I need to do anything on the
SOLR side ?

 bin/solr start -e cloud -z server1,server2:2181 -noprompt 

Thanks,
Ilango



--
Sent from: http://zookeeper-user.578899.n2.nabble.com/

Re: Zookeeper StandAlone to ensemble

Posted by Tamas Penzes <ta...@cloudera.com.INVALID>.
Hi Ilango,

Based on the version number you are using a Hortonworks distributed
ZooKeeper version where we don't know which patches it does include. But I
can tell you general things.

You have recognized that you need odd number of servers, can I ask you why
did you only add one more then?
Have you tried adding two new servers in the same time?

Have you checked the permissions of the copied files in the new datadir? Is
it set properly in zoo.cfg?
Are the ports open on the servers?

Can you share some (anonimized) logs of the second server, we might find
out what happens based on them.

Regards, Tamaas

On Fri, Nov 30, 2018, 19:42 ilango dhandapani <ilango.dhandapani@gmail.com
wrote:

> ZooKeeper version is zookeeper-3.4.6.2.2.4.5-1.jar. Apache solr 5.3 is the
> distributed one working with zookeeper.
> 1. Using a stand alone zookeeper in QA and below is the zoo.cfg file
>
> clientPort=2181
> initLimit=10
> autopurge.purgeInterval=12
> syncLimit=5
> tickTime=2000
> dataDir=/var/zookeeper/data
> autopurge.snapRetainCount=3
> server.1=server1.homedepot.com:2888:3888
> maxClientCnxns=512
>
> 2. $ ./zkServer.sh status
> JMX enabled by default
> Using config: /usr/hdp/current/zookeeper-server/bin/../conf/zoo.cfg
> Mode: standalone
>
> 3. Want to add 2 more servers and make this an ensemble.
>
> 4. what I tried is,
> a. Copied all data folder and zookeper installation folder from server1 and
> moved to server2.
> b. Edited zoo.cfg file in both server1 and server2, added
> "server.2=server2.homedepot.com:2888:3888"
> c. edited myid file as 2 in server2.
> d. Tried starting zookeeeper in server2, it says started but actaully no
> process was running. And zookeeper stops working at this
>    point and I need to back out the changes to zoo.cfg on server1 and
> restart zookeeper.
> e. Since zookeeper was installed under /usr/hdp in server1, i wanted to use
> separate filesystems on server2. So created separate filesystems for
> zeekeeper install, data etc.
>    datadir was /var/zookeeper/data in server1 and /opt/zookeeper/data in
> server2.
>
> 4. Also wondering how to change from stand alone to ensemble.
> 5. I understand that i need to refer the solr node to new zookeeper node
> after zookeeper is up in server2.
>
> bin/solr start -e cloud -z server1,server2:2181 -noprompt
>
> Please help.
>
>
>
>
>
> --
> Sent from: http://zookeeper-user.578899.n2.nabble.com/
>