Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the error log file destination for Zookeeper distributed with Kafka?

I'm a bit confused on how to configure where the error log files are written for Zookeeper when running ZK and Kafka on the same node. I understand it uses log4j and there is a zookeeper.properties file. I assume it is using some sort of default out of the box. If I do:

sudo lsof -p 31311 | grep log | grep zoo

I get:

java    31311 root    1w      REG              259,1     24962  134739 /home/ec2-user/zookeeper-start-log
java    31311 root    2w      REG              259,1     24962  134739 /home/ec2-user/zookeeper-start-log
java    31311 root    3w      REG              259,1     22350 1050171 /opt/Kafka/kafka_2.11-1.1.0/logs/zookeeper-gc.log.0.current
java    31311 root   94w      REG              259,1  67108880  394260 /var/local/zookeeper/data/version-2/log.1

If I want to explicitly specify my error log locations for zookeeper, what exactly do I specify in the zookeeper.properties file?

like image 636
GregH Avatar asked Nov 17 '22 00:11

GregH


1 Answers

If you're using the provided zookeeper-server-start script, then Kafka and Zookeeper share the same log4j.properties file.

In there, you can reconfigure the DailyRollingFileAppender or ConsoleAppender based on the package names for Zookeeper clients and/or Kafka

If you want to reconfigure the data stored by Zookeeper other than the service logs, the Zookeeper documentation should cover those as well as the defaults

like image 105
OneCricketeer Avatar answered Jan 12 '23 00:01

OneCricketeer