-
Notifications
You must be signed in to change notification settings - Fork 280
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
Startup errors disappear in docker compose up, make it difficult to debug #3121
Comments
I've run into this many times. I think showing the error in RED is probably helpful, but maybe there are better mechanisms to abort a |
@dblock yup looks like the errors the author is interested in are being wiped by docker but usually we do have all the logs in |
This might be related to the docker-compose log level settings at first glance. |
When I tried with a t2micro (Amazon Linux 2023 AMI), there was no error shown up, but container was exited right away.
but I can see the mem error by docker logs command .. maybe we can use this command to check ?...
|
@jordarlu the docker distribution requires at least 4 GB for osd on the server as well as setting vm max map to vm.max_map_count=262144 |
Thanks, @peterzhuamazon ..this issue was forwarded to our team back on Jan, so, I tried to reproduce the issue by haviing inefficient mem as the case described, also, attempted to get the idea from the folks here how we want to proceed the next.. :) .. |
Hi, @pszabop , the docker-compose provides an argument --abort-on-container-exit which gives the user more userful info when starting up the container... for example the following ( I use an EC2 with insufficient MEM purposely to be fail in starting up the OpenSearch container as you mentioned in your case description ) :
Although it did not specifically mention insufficient MEM or space issue, but it did provide the exit code 137 which we can look it up and link to possible OOM issue (https://stackoverflow.com/questions/59296801/docker-compose-exit-code-is-137-when-there-is-no-oom-exception) Could you give it a try and maybe this provide an easier way for troubleshooting than digging into 'docker logs' ? |
Is this error the root cause?
|
I believe so, @peterzhuamazon .. and by viewing the entire line of it |
@pszabop Hope you were able to fix the issue, if not please check out the solutions and methods mentioned in the thread above. |
Describe the bug
If a startup error such as insufficient memory occurs, the error is never shown, making it difficult to debug
for example, this error occurs using docker run but doesn't show up in docker-compose up
To Reproduce
Steps to reproduce the behavior:
docker-compose up opensearch-node1
to start only one of the nodesdocker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" opensearchproject/opensearch:latest
Expected behavior
The same errors should result, so that issues with
docker-compose.yml
can be debugged.Plugins
none
Screenshots
see error messages noted above
Host/Environment (please complete the following information):
AWS t2.micro using recent wizard
Linux 5.10.157-139.675.amzn2.x86_64 opensearch-project/OpenSearch#1 SMP Thu Dec 8 01:29:11 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Docker version 20.10.17, build 100c701
Docker Compose version v2.15.1
Additional context
docker-compose install isn't done by yum on AWS linux, used instructions from here
The text was updated successfully, but these errors were encountered: