Skip to content

fix: opensearch container on ARM64 based architecture #2069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

arslanashraf7
Copy link
Contributor

What are the relevant tickets?

None, Noticed it while running the project containers on Apple Silicon(M4) machine.

Description (What does it do?)

I couldn't run the Opensearch container while setting up this project on Macbook Pro m4. While running the opensearch container using the current configuration breaks with the JDK version. This seems to be an incompatible JDK version error.

This seems to be a known issue in JDK with ARM architecture reported

I've applied the suggested solution based on the above reported issues.

The error log:

2025-02-24 16:00:45 Disabling OpenSearch Security Plugin
2025-02-24 16:00:45 Enabling execution of OPENSEARCH_HOME/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli for OpenSearch Performance Analyzer Plugin
2025-02-24 16:00:45 #
2025-02-24 16:00:45 # A fatal error has been detected by the Java Runtime Environment:
2025-02-24 16:00:45 #
2025-02-24 16:00:45 #  SIGILL (0x4) at pc=0x0000ffff8fd3fc5c, pid=33, tid=34
2025-02-24 16:00:45 #
2025-02-24 16:00:45 # JRE version:  (21.0.6+7) (build )
2025-02-24 16:00:45 # Java VM: OpenJDK 64-Bit Server VM (21.0.6+7-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
2025-02-24 16:00:45 # Problematic frame:
2025-02-24 16:00:45 # j  java.lang.System.registerNatives()V+0 [email protected]
2025-02-24 16:00:45 #
2025-02-24 16:00:45 # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
2025-02-24 16:00:45 #
2025-02-24 16:00:45 # An error report file with more information is saved as:
2025-02-24 16:00:45 # /usr/share/opensearch/hs_err_pid33.log
2025-02-24 16:00:45 [0.024s][warning][os] Loading hsdis library failed
2025-02-24 16:00:45 #
2025-02-24 16:00:45 # The crash happened outside the Java Virtual Machine in native code.
2025-02-24 16:00:45 # See problematic frame for where to report the bug.
2025-02-24 16:00:45 #
2025-02-24 16:00:45 /usr/share/opensearch/bin/opensearch-env: line 99:    33 Aborted                 "$JAVA" "$XSHARE" -cp "$OPENSEARCH_CLASSPATH" org.opensearch.tools.java_version_checker.JavaVersionChecker

How can this be tested?

It would be great if you could reproduce this issue on an arm64 based machine

This is how I tested it:

  • Run the containers on this branch
  • Made sure that the opensearch container runs successfully
  • Ran the recreate_index management command
  • Monitored the celery tasks for any error
  • Made sure that the re-index finishes successfully and no errors are reported in celery

Additional Context

@arslanashraf7 arslanashraf7 changed the title fix: opensearch conatainer on ARM64 based architecture fix: opensearch container on ARM64 based architecture Feb 24, 2025
@arslanashraf7 arslanashraf7 added the Needs Review An open Pull Request that is ready for review label Feb 24, 2025
@shanbady shanbady self-requested a review February 24, 2025 14:22
Copy link
Contributor

@shanbady shanbady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unable to repro the initial issue locally but changes here appear to work fine and be applied

@shanbady shanbady added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Feb 24, 2025
@arslanashraf7 arslanashraf7 force-pushed the arslan/fix-opensearch-container branch from efc397a to 168d111 Compare February 25, 2025 10:43
@arslanashraf7 arslanashraf7 merged commit af38efa into main Feb 25, 2025
11 checks passed
@arslanashraf7 arslanashraf7 deleted the arslan/fix-opensearch-container branch February 25, 2025 10:57
This was referenced Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants