ROSETTA ERROR in starting Kafka Zookeeper on MAC M1

Confluent/Apache Kafka Not Starting On MAC with ROSETTA ERROR : java.aot: attachment of code signature supplement failed.

I am using Apple MAC MINI with M1 chip processor.

I have installed below softwares to work on Kafka

  1. Oracle JDK 11
  2. Apache Kafka
  3. Confluent Kafka

Initially it is working fine and recently I installed the MAC OS Update. Once I updated the MAC OS, Both Apache Kafka / Confluent Kafka are not starting I mean the zookeeper.

As the zookeeper is the mandatory server to start and work on Kafka, and it is unable to start with the below error, I am not able to work on it.

ROSETTA ERROR : java.aot: attachment of code signature supplement failed

There are no clues and solutions available on the internet and I go deep into the issue to find the root cause.

I read something about Apple M1 chip on macrumors.com/guide/m1 After reading this document and the MAC OS update documentation I realized this issue might be of the Java version and it’s architecture installed in my MAC Mini.

Issue: It is the issue with the JDK version and OS architecture. The M1 is the first Apple-designed System on a Chip (SoC) that’s been developed for use in Macs. Unlike Intel chips built on the x86 architecture, the Apple Silicon M1 uses an Arm-based architecture.

Solution: Removed the installed JDK and other java from MAC MINI. Installed a new JDK which is of “Arm 64 DMG Installer” from “oracle.com/java/technologies/downloads/#jdk..

After following these two simple steps the problem “ROSETTA ERROR : java.aot: attachment of code signature supplement failed” in starting the Kafka Zookeeper was resolved.