Compiling elasticsearch for ARM

Hi,

I want to use ELK on an ARM platform running Ubuntu. I started by compiling elasticsearch as instructed here: https://github.com/elastic/elasticsearch

After a long time compilation (./gradlew assemble), I didn't get a build directory where I'd hope to see a binary.

Can you guys provide a bit more instruction on how to successfully compile elasticsearch for arm?

Hi,

the build directory is not at the project root but rather at the respective subproject's root. For example, if you are looking for the open source tarball, you need to go to distribution/archives/oss-tar/build/distributions. Similarly you will find the other artefacts in their respective subproject build directories.

Daniel

The artifacts that we provide on our download pages should run on ARM without issue, and even include the necessary native libraries for ARM. While we do not support running on ARM at this time, is there a problem with our pre-built artifacts that you had?

1 Like

Thanks a lot! I found the .deb package under distributions and it installed. However, I get this when starting the service:

Aug 23 12:59:29 francisadmin systemd[1]: Started Elasticsearch.
Aug 23 12:59:32 francisadmin elasticsearch[12643]: OpenJDK Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will 
Aug 23 12:59:32 francisadmin elasticsearch[12643]: Unrecognized VM option 'UseAVX=2'
Aug 23 12:59:32 francisadmin elasticsearch[12643]: Error: Could not create the Java Virtual Machine.
Aug 23 12:59:32 francisadmin elasticsearch[12643]: Error: A fatal exception has occurred. Program will exit.
Aug 23 12:59:32 francisadmin systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Aug 23 12:59:32 francisadmin systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Aug 24 05:32:03 francisadmin systemd[1]: Started Elasticsearch.
Aug 24 05:32:06 francisadmin elasticsearch[18517]: OpenJDK Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will 

I dunno what to do regarding the jvm. Any clues?

The key error message is this line. This is the result of a flag that we ship with by default in jvm.options that is needed to work around a bug in the JDK for JDK 9 and JDK 10 on x64. Since AVX instructions are x64 functionality, the ARM JVM rightfully balks at these flags being present in the startup options.

Find the line 10-:-XX:UseAVX=2 in /etc/elasticsearch/jvm.options and comment it out or remove it (if you remove it, you can remove the comment about it too).

Thanks a lot Jason! I will try that tomorrow. I am trying to run the whole ELK stack on ARM. Will the other parts (Logstash and Kibana) run on ARM as well?

Best,

Francis

Logstash will likely be fine on ARM because it runs on the JVM.

Kibana will not because we bundle Node.js with Kibana which requires a native executable. We are not currently bundling a version of Kibana with Node.js compiled for ARM.

That's sad - I was planning on running Kibana for log visualization on an ARM instance... :frowning:

Still getting errors:

Sep 03 17:08:42 francisadmin systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 17:08:42 francisadmin systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Sep 03 17:11:16 francisadmin systemd[1]: Started Elasticsearch.
Sep 03 17:11:18 francisadmin elasticsearch[18673]: OpenJDK Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Sep 03 17:12:45 francisadmin systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 17:12:45 francisadmin systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Sep 03 17:13:06 francisadmin systemd[1]: Started Elasticsearch.
Sep 03 17:13:08 francisadmin elasticsearch[18843]: OpenJDK Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

Sorry but these error messages do not give any indication of the problem. You will have to look in the Elasticsearch logs to see if there is something helpful there, or poke around until you find a more helpful error message.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.