-
opensearch:
image: markoshust/magento-opensearch:2.12-0
ports:
- "9200:9200"
- "9300:9300"
env_file: env/opensearch.env
environment:
- "discovery.type=single-node"
## 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" $ bin/download community 2.4.8
[+] Stopping 7/7
✔ Container magento-mailcatcher-1 Stopped 0.2s
✔ Container magento-app-1 Stopped 0.0s
✔ Container magento-phpfpm-1 Stopped 0.0s
✔ Container magento-db-1 Stopped 0.5s
✔ Container magento-redis-1 Stopped 0.3s
✔ Container magento-opensearch-1 Stopped 0.0s
✔ Container magento-rabbitmq-1 Stopped 1.4s
WARNING: daemon is not using the default seccomp profile
bin/start: line 6: bc: command not found
[+] Running 6/6
✔ Container magento-mailcatcher-1 Started 1.5s
✔ Container magento-db-1 Healthy 6.8s
✔ Container magento-redis-1 Healthy 6.8s
✔ Container magento-rabbitmq-1 Healthy 11.3s
✔ Container magento-phpfpm-1 Created 0.0s
✘ Container magento-opensearch-1 Error 17.1s
dependency failed to start: container magento-opensearch-1 is unhealthy
Failed to start Docker services Do you have any idea what could be causing it in my environment? My Docker is set with 8GB of RAM. I made the same thing for elastic-search and that didn't work either. Because of that I can't make the setup of the store. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Your issue with Opensearch being unhealthy is a known problem in the docker-magento setup, and there are a few targeted solutions you can try:
If none of these steps resolve the issue, check the Opensearch container logs for specific errors—they can provide more clues about what’s going wrong. Let me know if you need help with any of these steps or if you have more details from the logs! To continue talking to Dosu, mention @dosu-bot. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
Your issue with Opensearch being unhealthy is a known problem in the docker-magento setup, and there are a few targeted solutions you can try:
Check for the
_JAVA_OPTIONS: -XX:UseSVE=0
line inenv/opensearch.env
This Java option is only needed for ARM64/Apple Silicon (M-series) chips. If you are on Intel or AMD, having this line can cause Opensearch to fail.
env/opensearch.env
file if it exists.[source]
[changelog].
Update your healthcheck configuration
The default healthcheck may not give Opensearch enough time to start, causing it to be marked as unhealthy.
compos…