Search code examples
apache-kafkalog4jlog4j2apache-zookeeper

Apache Kafka v. 2.1.1 and log4j latest v 2.17


We encountered a problem in Zookeeper when upgrading log4j from 1.2.17 to 2.17 in order to avoid a vulnerability caused by Log4j. The zookeeper is not starting with the upgraded version and removing the old jar file of the old log4j, so we need to know what version of Apache Kafka is recommended that I upgrade to.

zookeeper error

We simply removed the old jar file and replaced it with the newly installed latest jar files for log4j and SLF4j in the libs directory, but this did not resolve the problem.


Solution

  • Latest Kafka and Zookeeper already have addressed log4j issues by migrating to reload4j. Upgrade those instead, following their own upgrade and release notes

    You cannot simply replace logging jar files and expect anything continue to work, as neither project is compiled with log4j2 libraries