Skip to content
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

OpenSearch container fails to start #1275

Open
denizderman opened this issue Jan 6, 2025 · 7 comments
Open

OpenSearch container fails to start #1275

denizderman opened this issue Jan 6, 2025 · 7 comments

Comments

@denizderman
Copy link

denizderman commented Jan 6, 2025

Description
The OpenSearch container fails to run. This issue appears to be the same as the one discussed here, which has been marked as closed. However, it seems that the problem persists.

Screenshot 2025-01-06 at 15 28 46

Steps To Reproduce

  1. mkdir -p ~/Sites/magento
  2. cd $_
  3. curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash
  4. bin/download community 2.4.7-p3

Expected Result
OpenSeach container runs successfully.

Actual Result
OpenSeach container fails to start:

dependency failed to start: container mage-opensearch-1 exited (0)

Environment
OS: macOS Sequoia 15.2

@abouthalf
Copy link

OpenSearch container is failing with the following:

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

Running on Apple Silicon

@abouthalf
Copy link

Might be related to this issue: opensearch-project/OpenSearch#16761

Seems to be an issue on certain Apple platforms.

@abouthalf
Copy link

Following the manual install process, adding the following _JAVA_OPTION env variable for OpenSearch seems to help

  opensearch:
    image: markoshust/magento-opensearch:2.12-0
    ports:
      - "9200:9200"
      - "9300:9300"
    env_file: env/opensearch.env
    environment:
      - "discovery.type=single-node"
      - "_JAVA_OPTIONS=-XX:UseSVE=0"
      ## Avoid test failures due to small disks
      ## More info at https://github.com/markshust/docker-magento/issues/488
      - "cluster.routing.allocation.disk.threshold_enabled=false"
      - "index.blocks.read_only_allow_delete"
      ## Uncomment to set custom heap size to avoid memory errors
      #- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
      ## Uncomment to increase the virtual memory map count
      #- "max_map_count=262144"

@Abdul-Majid10
Copy link

Abdul-Majid10 commented Jan 10, 2025

Solution:

elastic/elasticsearch#118583 (comment)

@denizderman
Copy link
Author

denizderman commented Jan 13, 2025

Thanks @abouthalf and @Abdul-Majid10 for sharing the solution. It works 👍

@markshust
Copy link
Owner

markshust commented Jan 21, 2025

Reopening this -- should we add this line to our opensearch config?

      - "_JAVA_OPTIONS=-XX:UseSVE=0"

Any downsides?

@denizderman
Copy link
Author

I haven't seen any downside of it so far and I think it would be worth adding it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants