Fix: Rosetta Error while installing elasticsearch and kibana locally or when running apm server

Sameer UtradhiSameer Utradhi
2 min read

If you ever stumbled upon this ghost of an error:

rosetta error: /var/db/oah/f10e9009eda5342cb96b2c6d434423e9baad3c04b55fb2d865c61c1f9f989e5b/8768c48b62c4698442db253eeb8623c4d3d5338b554d36a7c5b2b29479fc2459/node.aot: attachment of code signature supplement failed: 1 kibana

during installation of either, elasticsearch or kibana or maybe while running an apm server locally, you can follow these steps to fix it.

Link to follow for installation: install elasticserach and kibana

Possible solutions:

Solution 1: Restart

Well yes, a simple solution. Just restart your machine and check if that works, ideally it should be resolved after a restart.

Solution 2: Fix JDK version

The second solution is to check the jdk version, if you’re working with let’s say jdk 20, check if the version is compatible with what you’re trying to do. I had this issue when running the apm server and I fixed by downgrading to jdk 17.

You can install multiple jdk versions simultaneously, here are some steps to do it for mac m1 with zsh:

  • download the ARM64 DMG Installer from oracle JAVA downloads page, and follow the steps along with it.

  • check both versions are now present:

/usr/libexec/java_home -V
  • type the below commands to override existing JAVA_HOME path value:
echo export "JAVA_HOME=\\$(/usr/libexec/java_home -v 17)" >> ~/.zshrc

source ~/.zshrc
  • That’s it, now you can check which jdk version you’re pointing to:
 echo $JAVA_HOME

Try running the command that got you the rosetta error again.

For me this steps resolved the apm server error for rosetta. But still I’d to do something for elasticsearch and kibana to run locally.

Solution 3: Verify if rosetta is installed

If rosetta is installed locally or not, run the below command to update it:

softwareupdate --install-rosetta

hopefully this should do. Incase you still have that problem, you can follow the suggested links below:

0
Subscribe to my newsletter

Read articles from Sameer Utradhi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Sameer Utradhi
Sameer Utradhi

Hey there, out of all the smarties in the world you'd to stumble upon my blog. I feel you 🥹