Created 12-17-2015 03:23 AM
Hi,
We were able to run zookeeper on our cluster, but it crushed and can not start any more. The error msg now is like this:
zookeeper cannot open channel to X at election address
and Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain
I checked our zookeeper-3.4.6.jar is under kafka/libs and it is of the same version.
I also tried this but did not work:
http://stackoverflow.com/questions/30940981/zookee...
server.1=0.0.0.0:2888:3888 server.2=192.168.10.10:2888:3888 server.3=192.168.2.1:2888:3888
Do you have any idea how to fix this problem?
Thank you very much for your help,
Created 12-17-2015 03:42 AM
@xueqin pang Please paste last few entries from the log
Created 12-17-2015 03:59 AM
thank you very much for your reply
we setup the log folder like this:
dataLogDir=/home/ubuntu/logs/zookeeper
But there is nothing at all. I searched online, and did not find any other place we could find the log file. If there is any, could kindly point me to it?
When we start zookeeper we got these msges:
$ ./zkServer.sh start
JMX enabled by default
Using config: /home/ubuntu/software/zookeeper-3.4.6/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
But if I check status, I got:
$ ./zkServer.sh status
JMX enabled by default
Using config: /home/ubuntu/software/zookeeper-3.4.6/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
Thanks,
Created 12-17-2015 11:53 AM
I find my ZK logs end up under /var/log/zookeeper , at least with the HD installations. Make sure that the log directory has the permissions to be written to by the ZK account; if it doesn't you won't see logs
Created 12-17-2015 12:18 PM
@xueqin pang /etc/init.d/iptables stop
Created 12-18-2015 09:53 AM
It's much easier to install and run Zookeeper using Ambari. If you want to install Zookeeper manually please follow the instructions given here:
http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-...
You can skip Kerberos part if your cluster is not kerberized. Important checkpoints:
. myid files created on all 3 hosts, with numbers 1,2,3
. In zoo.cfg use FQDNs if possible, though IP addresses should work as well. Be sure that myid on server.i contains number i, i=1,2,3. For example, myid on server.1 must contain 1. Don't use 0.0.0.0, that will require specific zoo.cfg on each server, no need to do that (and not sure it would work at all).
. Create zookeper-env.sh as given in the manual, and check all entries to match settings in your environment. Zookeeper log is given as ZOO_LOG_DIR.
. Distribute zoo.cfg and zookeeper-env.sh on all 3 hosts into the conf dir, usually /etc/zookeeper/conf
. Make sure ports 2888, 3888, 2181 are open on all 3 hosts, or if possible disable iptables
. Check permissions (section 3.4)
. start Zookeeper as zookeeper user providing ZOOCFGDIR, ZOOCFG etc. on the command line on all 3 hosts. Check the manual (section 3.6) for details.
That should be enough. I installed several Zookeepers manually (for Kafka) and had no issues.
Created 01-16-2016 07:38 PM
Have you found any sollution for this issue? I'm also facing it, I've tried to install zookeeper in a total new server, but I'm getting the same problem.
Created 02-05-2016 07:34 PM
@xueqin pang are you still having issues? Please accept the best answer or provide your own solution.