You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (Jira)" <ji...@apache.org> on 2020/12/07 20:16:00 UTC
[jira] [Closed] (FLINK-20404) ZooKeeper quorum fails to start due
to missing log4j library
[ https://issues.apache.org/jira/browse/FLINK-20404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chesnay Schepler closed FLINK-20404.
------------------------------------
Fix Version/s: 1.11.3
Release Note:
The Zookeeper scripts in the Flink distribution have been modified to disable the Log4j JMX integration due to an incompatibility between Zookeeper 3.4 and Log4j 2.
To re-enable this feature, remove the line in the "zookeeper.sh" file that sets "zookeeper.jmx.log4j.disable".
Resolution: Fixed
master: 09988136f994e48c16e75cc71bd7779e39fe50fe
1.12: a1b48aecee6b937005d53da5afec6475ea6586e4
1.11: 741b8e2b9536c0160b43b10b922d11e2af7f588c
> ZooKeeper quorum fails to start due to missing log4j library
> ------------------------------------------------------------
>
> Key: FLINK-20404
> URL: https://issues.apache.org/jira/browse/FLINK-20404
> Project: Flink
> Issue Type: Bug
> Components: Build System
> Affects Versions: 1.11.2
> Reporter: Pedro Miguel Rainho Chaves
> Assignee: Chesnay Schepler
> Priority: Critical
> Labels: pull-request-available
> Fix For: 1.11.3, 1.13.0, 1.12.1
>
>
> Upon starting a zookeeper quorum using flink's bootstrapped zookeeper, it throws the following exception.
>
> {code:java}
> 2020-11-27 13:13:38,371 ERROR org.apache.flink.runtime.zookeeper.FlinkZooKeeperQuorumPeer [] - Error running ZooKeeper quorum peer: org/apache/log4j/jmx/HierarchyDynamicMBean
> java.lang.NoClassDefFoundError: org/apache/log4j/jmx/HierarchyDynamicMBean
> at org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.jmx.ManagedUtil.registerLog4jMBeans(ManagedUtil.java:51) ~[flink-shaded-zookeeper-3.4.14.jar:3.4.14-11.0]
> at org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:125) ~[flink-shaded-zookeeper-3.4.14.jar:3.4.14-11.0]
> at org.apache.flink.runtime.zookeeper.FlinkZooKeeperQuorumPeer.runFlinkZkQuorumPeer(FlinkZooKeeperQuorumPeer.java:123) ~[flink-dist_2.11-1.11.2.jar:1.11.2]
> at org.apache.flink.runtime.zookeeper.FlinkZooKeeperQuorumPeer.main(FlinkZooKeeperQuorumPeer.java:79) [flink-dist_2.11-1.11.2.jar:1.11.2]
> Caused by: java.lang.ClassNotFoundException: org.apache.log4j.jmx.HierarchyDynamicMBean
> at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_262]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_262]
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) ~[?:1.8.0_262]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_262]
> ... 4 more
> {code}
> This happens because the new flink version is missing a log4j library. This can be solved by adding log4j-1.2.17.jar to the classpath, nonetheless the bootstrapped zookeepeer version should be compatible with the log4j2 libraries that come with flink's default installation.
>
> *Steps to reproduce:*
> # Fresh install of flink version 1.11.2
> # Change the zookeeper config to start as a quorum
> {code:java}
> server.1=<hostname>:2888:3888
> server.2=<hostname>:2888:3888{code}
> # Start zookeeper
> # <installation_path>/bin/zookeeper.sh start-foreground 1
--
This message was sent by Atlassian Jira
(v8.3.4#803005)