This article describes a scenario where Kafka and Zookeeper services fail to start following an automated operating system update that replaces or removes the existing Java Development Kit (JDK) version.
Symptoms:
systemctl status netops-kafka shows a "failed" state with "exit-code".journalctl -xe) contain errors indicating that the Java binary cannot be found: kafka-server-start.sh: line 353: /usr/lib/jvm/java-17-openjdk-####/bin/java: No such file or directory An automated JDK upgrade (e.g., from version 17.0.17 to 17.0.19) removed the older Java directory from the disk. The netops-kafka service files and answer.properties still reference the old path, causing a startup failure.
To resolve this issue, update the Java path in the configuration files on all affected nodes:
ls -la /usr/lib/jvm/vi /etc/systemd/system/netops-kafka.service Update the Environment="JAVA_HOME=..." line to point to the new path.vi /etc/systemd/system/netops-kafka-zookeeper.service Update the Environment="JAVA_HOME=..." line to point to the new path.vi /opt/CA/netops-kafka/config/answer.properties Update the javaHome= variable.systemctl daemon-reloadsystemctl restart netops-kafka