HDP 3.1.5 to HDP 7.1.7 Intermediate bits Kafka upgrade

You must use this method to resolve if you face issues during the Kafka service check.

While upgrading from HDP 3.1.5 to HDP 7.1.7, if you have some hosts with Kafka broker installed but without zookeeper, the following error may occur during Kafka service check:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/zookeeper/client/ZKClientConfig
	at kafka.zookeeper.ZooKeeperClient.$anonfun$clientConfig$1(ZooKeeperClient.scala:106)
	at kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:106)
	at kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1863)
	at kafka.admin.TopicCommand$ZookeeperTopicService$.apply(TopicCommand.scala:341)
	at kafka.admin.TopicCommand$.main(TopicCommand.scala:55)
	at kafka.admin.TopicCommand.main(TopicCommand.scala)
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.client.ZKClientConfig
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 6 more

This issue occurs because Ambari does not set the correct version with the hdp-select option.

Workaround

You must select the correct version manually and resume the upgrade procedure:
  • hdp-select set zookeeper-client 7.1.7.0-551
  • hdp-select set zookeeper-server 7.1.7.0-551