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

[BUG] Opensearch Docker compose container my-app-1 exited (1) #12489

Closed
alexander-schranz opened this issue Feb 28, 2024 · 3 comments
Closed
Labels
bug Something isn't working Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement.

Comments

@alexander-schranz
Copy link

alexander-schranz commented Feb 28, 2024

Describe the bug

I used opensearch for my search abstraction project here. Since the release of 2.12.0 opensearch starts to crash without any changes on our side, the docker container just not longer is booting: https://github.com/schranz-search/schranz-search/actions/runs/8040340102/job/22065739391?pr=366

Related component

Build

To Reproduce

  1. create a docker-compose.yml

I use a very simple docker compose to run my tests:

services:
  opensearch:
    image: opensearchproject/opensearch:2
    environment:
      discovery.type: single-node
      plugins.security.disabled: 'true'
      cluster.routing.allocation.disk.threshold_enabled: 'false'
    ports:
      - "9200:9200"
    healthcheck:
      test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
      interval: 5s
      timeout: 5s
      retries: 20
    volumes:
      - opensearch-data:/usr/share/opensearch/data

volumes:
  opensearch-data:
  1. Make sure to have latest opensearch version:
docker pull opensearchproject/opensearch:2
  1. Try to start opensearch
docker compose up --wait

Expected behavior

Should work as before.

Additional Details

Plugins

No Plugins

Screenshots

Bildschirmfoto 2024-02-28 um 08 36 34

Host/Environment (please complete the following information):

  • OS: MacOS (arm) and Ubuntu (Github Action) via Docker
  • Version latest 2 (2.12.0)

Additional context

Sadly I was not yet able to get more output why it even crashes not sure if there are any debug flags I can activate to get here better output.

@alexander-schranz alexander-schranz added bug Something isn't working untriaged labels Feb 28, 2024
@github-actions github-actions bot added the Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. label Feb 28, 2024
@peternied
Copy link
Member

peternied commented Feb 28, 2024

[Triage - attendees 1 2 3]
@alexander-schranz thanks for filing.

@DarshitChanpura Looks like this is related to the admin password changes, can you look into this and provide next steps?

@DarshitChanpura
Copy link
Member

@alexander-schranz With 2.12, the security demo configuration setup had a breaking change around the admin credentials. There is no default password "admin" anymore. A custom strong password is required to be passed to successfully setup demo configuration. If none / weak password is provided, the cluster will fail to spin-up.

The issue that you are facing is one of using plugins.security.disabled vs DISABLE_SECURITY_PLUGIN. (discussed in depth on this issue: opensearch-project/security#4062)

TLDR; plugins.security.disabled: true passed via environment variable disables security post demo configuration setup vs using DISABLE_SECURITY_PLUGIN which disables security at the time of setup.

Here is a modified docker-compose.yml that would work in your use-case:

services:
  opensearch:
    image: opensearchproject/opensearch:2
    environment:
      discovery.type: single-node
      cluster.routing.allocation.disk.threshold_enabled: 'false'
      DISABLE_SECURITY_PLUGIN: true
    ports:
      - "9200:9200"
    healthcheck:
      test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
      interval: 5s
      timeout: 5s
      retries: 20
    volumes:
      - opensearch-data:/usr/share/opensearch/data

volumes:
  opensearch-data:

@alexander-schranz
Copy link
Author

Thx this currently fixes my CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement.
Projects
None yet
Development

No branches or pull requests

3 participants