markshust / docker-magento

Mark Shust's Docker Configuration for Magento
https://m.academy/courses/set-up-magento-2-development-environment-docker/
MIT License
2.59k stars 1.01k forks source link

dependency failed to start: container magento-elasticsearch-1 is unhealthy #1165

Closed Franz-Budon-Bapt closed 6 months ago

Franz-Budon-Bapt commented 6 months ago

Description Can't run the elasticsearch container Context : windows 10 wsl2 debian 12, existing project, had to do a bin/removeall to go for elasticsearch instead of opensearch

Steps To Reproduce

  1. Follow the whole process (existing project procedure) and launch the command bin/start --no-dev I changed the configuration in both files compose.yaml and compose.healthcheck.yaml to use elasticsearch instead of opensearch (2 places in this one)

SOLUTIONS TESTED BUT NOT WORKING I trashed the debian and redo the whole process just to be sure the bin/removeall was not causing the issue. Still an error.

I tried to change environnement options in the configuration file, nothing works. environment:

Elasticsearch log file doesn't report of any memory issue. image

I also tried with a different image version : markoshust/magento-elasticsearch:8.11.

Noted that some instructions in the documentation about switching between elasticsearch and opensearch are incorrect/outdated.

Expected Result magento-elasticsearch-1 healthy

Actual Result after 160s of booting up the magento-elasticsearch-1 container, it failed and we get the error message dependency failed to start: container magento-elasticsearch-1 is unhealthy

image

YevhenZvieriev commented 6 months ago

Hi, @Franz-Budon-Bapt

Adding this under environment of the elasticsearch image resolve your issue:

- "xpack.security.enabled=false"
Franz-Budon-Bapt commented 6 months ago

Hi, @Franz-Budon-Bapt

Adding this under environment of the elasticsearch image resolve your issue:

- "xpack.security.enabled=false"

image

It worked! Thanks a lot! How did you figure that one without me giving you any more details or logs ?

YevhenZvieriev commented 6 months ago

Glad to hear that.

A similar issue was resolved a few weeks ago, so people often face it.

I'll add a fix in the next PR as soon as possible.