Hi,
Last time I decided to upgrade Confluent Platform version in my Docker cluster. Unfortunatelly I got following logs output in “latest” (7.2.1) CP Kafka container:
22 [main] INFO org.apache.zookeeper.common.X509Util - Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation
Exception in thread "main" java.lang.NoClassDefFoundError: io/netty/channel/ChannelHandler
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at org.apache.zookeeper.ZooKeeper.getClientCnxnSocket(ZooKeeper.java:3404)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:1027)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:937)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:1108)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:818)
at io.confluent.admin.utils.ClusterStatus.isZookeeperReady(ClusterStatus.java:83)
at io.confluent.admin.utils.cli.ZookeeperReadyCommand.main(ZookeeperReadyCommand.java:73)
Caused by: java.lang.ClassNotFoundException: io.netty.channel.ChannelHandler
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 9 more
After some additional investigation I found out, that the last working version for me is 6.1.3.
In 6.1.4 there was a Netty libs upgrade: Confluent Platform Component Changelogs | Confluent Documentation
I’m getting mentioned error because of following config in my docker-compose.yml:
Kafka environment variable:
KAFKA_OPTS: -Dzookeeper.clientCnxnSocket=org.apache.zookeeper.ClientCnxnSocketNetty
Zookeeper environment variable:
ZOOKEEPER_SERVER_CNXN_FACTORY: org.apache.zookeeper.server.NettyServerCnxnFactory
I was trying to find any required configuration change in documentation, but I still can see it as valid I guess: ZooKeeper Security | Confluent Documentation
As it was working before, I don’t expect any typo in my config. I’m using same images version for Kafka and Zookeeper.
Anyone had similar problem already? Any ideas how to solve that?
Best regards,
Grzegorz