sleighzy/ansible-zookeeper

Error Task

Closed this issue · 4 comments

Got an error see screenshot, Java version 11, in journalctl -xe it shows:
Jul 27 16:02:09 centos71 systemd[1]: Failed to start Apache Zookeeper.
Jul 27 16:02:09 centos71 systemd[1]: Unit zookeeper.service entered failed state.
Jul 27 16:02:09 centos71 systemd[1]: zookeeper.service failed.
Jul 27 16:02:09 centos71 systemd[1]: zookeeper.service holdoff time over, scheduling restart.
Jul 27 16:02:09 centos71 systemd[1]: Stopped Apache Zookeeper.
Jul 27 16:02:09 centos71 systemd[1]: start request repeated too quickly for zookeeper.service
Jul 27 16:02:09 centos71 systemd[1]: Failed to start Apache Zookeeper.
Jul 27 16:02:09 centos71 systemd[1]: Unit zookeeper.service entered failed state.
Jul 27 16:02:09 centos71 systemd[1]: zookeeper.service failed.
Screenshot_1

[root@centos71 bin]# ./zkServer.sh start
/usr/bin/java
ZooKeeper JMX enabled by default
Using config: /usr/share/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... FAILED TO START

Hi @DenisK32 . The first part of your error re: start request repeated too quickly for zookeeper.service I believe I've seen before. Will need to dig up some information but SystemD will try to restart the process if it fails, this restart attempt is performed in just a few milliseconds.

The above can be a red-herring and is due to another issue which is causing the ZooKeeper process to fail. Is there any information in the ZooKeeper logs themselves? Does this occur for all servers?

After 5 retries (if I recall correctly) it won't try again, as finally terminates due to too many attempts in a short period of time. This cause it to enter the failure state which means systemd may not allow you to start it again using the systemctl start zookeeper command. To use systemd to start the service again you may need to run the below command to reset the failure state so that it will attempt to start.

systemctl reset-failed zookeeper

Your zkServer.sh start command will bypass systemd so hopefully there's something more useful in the logs, e.g. indicating a config problem. Does running ps aux show any other instances of the process running?

I figured it out myself, it was in java, as soon as I fixed the error - everything worked, it was my fault

No worries, glad you solved it. :)