Skip to content

[BUG-python/deployment] docker-compose.yaml: Elasticsearch container fails to start on x86_64 Linux due to Unrecognized VM option 'UseSVE=0' #5846

@Chronuid

Description

@Chronuid

Describe the bug

Bug Description

When attempting a fresh local installation using the official docker-compose.yaml (with Postgres, Redis, and Elasticsearch) on an x86_64 Linux system (Manjaro), the stack fails to deploy correctly.

The argilla-1 container (the main server) enters a "backing off" loop, continuously logging ConnectionError: Your elasticsearch is not available or not responding.

Root Cause & Error Log

Investigating the container logs with docker compose logs elasticsearch-1 reveals the root cause. The elasticsearch-1 container (using image docker.elastic.co/elasticsearch/elasticsearch:8.17.0) fails immediately on launch.

The Java Virtual Machine (JVM) inside the container does not recognize the UseSVE=0 flag, which is provided in the default docker-compose.yaml:

elasticsearch-1  | Unrecognized VM option 'UseSVE=0'
elasticsearch-1  | Error: Could not create the Java Virtual Machine.
elasticsearch-1  | Error: A fatal exception has occurred. Program will exit.
elasticsearch-1 exited with code 1

This seems to be caused by the environment variables set for the elasticsearch service. While this flag might be necessary for certain ARM-based architectures (e.g., Apple M1/M2), it causes a fatal crash on standard x86_64 Linux distributions.

Environment

  • Operating System: Manjaro Linux (x86_64 Architecture)
  • Docker Setup: Docker Compose
  • File: docker-compose.yaml (from the official documentation, using elasticsearch:8.17.0)

Solution / Workaround

The issue was resolved by modifying the docker-compose.yaml to remove the incompatible JVM option.

Original Configuration (Failing):

services:
  ...
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
    environment:
      - ES_JAVA_OPTS=-Xms1g -Xmx1g -XX:UseSVE=0
      - CLI_JAVA_OPTS=-XX:UseSVE=0
      ...

Fixed Configuration (Working):

By removing the -XX:UseSVE=0 parts, the container starts correctly:

services:
  ...
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
    environment:
      - ES_JAVA_OPTS=-Xms1g -Xmx1g
      - CLI_JAVA_OPTS=
      ...

After applying this fix and running docker compose up, the Elasticsearch container launched successfully, allowing the Argilla server to connect and the instance to become available at http://localhost:6900.

It might be worth reviewing if this flag should be included in the default setup, or if architecture-specific instructions are needed in the documentation.

Stacktrace and code to create the bug

No response

Expected behavior

No response

Environment

  • Argilla Version [e.g. 1.0.0]:
  • ElasticSearch Version [e.g. 7.10.2]:
  • Docker Image (optional) [e.g. argilla:v1.0.0]:

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions