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

Container exits with code 143 on SIGTERM #86

Closed
reedflinch opened this issue Jun 2, 2017 · 4 comments
Closed

Container exits with code 143 on SIGTERM #86

reedflinch opened this issue Jun 2, 2017 · 4 comments

Comments

@reedflinch
Copy link

All recent versions of the Fluentd Docker image exit with code 143 when receiving a SIGTERM (i.e. docker stop, docker-compose stop, or docker-compose down). Is this expected behavior, or should containers be exiting with code 0 on SIGTERM?

Only fluent/fluentd:ubuntu-base exits with code 0. Coincidentally we do use the ubuntu image, but because we wrap our fluentd -v -c .... command in a shell script and use that as the container's CMD, we get exit code 137 when sending SIGTERM to our container. In addition, we are looking to move off of the ubuntu image as it's no longer supported.

$ docker ps -a

IMAGE                        COMMAND                  CREATED              STATUS
fluent/fluentd:ubuntu-base   "/bin/sh -c 'exec ..."   About a minute ago   Exited (0) 18 seconds ago
fluent/fluentd:edge-debian   "/bin/entrypoint.s..."   3 minutes ago        Exited (143) 3 minutes 
fluent/fluentd:edge          "/bin/entrypoint.s..."   3 minutes ago        Exited (143) 3 minutes
fluent/fluentd:debian        "/bin/entrypoint.s..."   4 minutes ago        Exited (143) 3 minutes
fluent/fluentd:latest        "/bin/entrypoint.s..."   4 minutes ago        Exited (143) 4 minutes
@ValFadeev
Copy link
Contributor

It must have to do with the fact that since #78 fluentd process inside the container runs as a child under dumb-init which performs proper signal forwarding (see here for a detailed explanation). Not sure why ubuntu-base would be an exception

@repeatedly
Copy link
Member

ubuntu-base is older image and it doesn't include recent changes.

@reedflinch
Copy link
Author

reedflinch commented Jun 5, 2017

@repeatedly right, I understand that and we'd like to stop using it soon.

My question was more of whether the newer images should be exiting with code 143, and if that should cause any concern for the fluentd process stopping gracefully. Thanks!

@kenhys
Copy link
Contributor

kenhys commented Aug 27, 2024

It seems it was fixed via #92.

@kenhys kenhys closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants