-
Notifications
You must be signed in to change notification settings - Fork 55
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 does not respond to sigterm #61
Comments
What is the scenario you want the SIGTERM works for? In most of cases, we have an assumption that "container running == collector running". So you should pause/stop/remove the container if you want to stop the collector. |
It causes shutdown to take much longer and it hampers error detection. Docker best practice is to respond to SIGTERM sent to the root process. The SIGKILL that's sent after timeout is a workaround for processes that don't shutdown gracefully. |
Did some investigation on it. Looks like the collector handles the SIGTERM but somehow when running
The last line indicates there is a TERM signal handled properly but it's not there if using
|
Yes, this is usually because the start script has forked the process or run
it in a subshell instead of using exec.
…On Wed, Jan 24, 2018 at 1:45 PM, Bin Yi ***@***.***> wrote:
Did some investigation on it. Looks like the collector handles the SIGTERM
but somehow when running docker stop the signal is not passed into
collector process. The evidence is the signal can be received when using kill
<pid> in another attached console inside the container:
$ docker exec -it 04a47d8088259b0f2fe98ccb525615298513d1f075991dc7361d5c96742415de /bin/bash
***@***.***:/# tail -f /opt/SumoCollector/logs/collector.out.log
INFO | jvm 1 | 2018/01/24 00:18:45 | `+.|=|`+. | | | | | | | | | | | | | |
INFO | jvm 1 | 2018/01/24 00:18:45 | . | | | | | | | | | | | | | | | |
INFO | jvm 1 | 2018/01/24 00:18:45 | |`+. | | | | | | | | | | | | | | | |
INFO | jvm 1 | 2018/01/24 00:18:45 | `+.|=|.+' `+.|=|.+' `+.| |.| |+' `+.|=|.+'
INFO | jvm 1 | 2018/01/24 00:18:45 | Sumo Logic Collector Version 19.209-25
INFO | jvm 1 | 2018/01/24 00:18:45 | Sumo Logic Build Hash a76f595
INFO | jvm 1 | 2018/01/24 00:18:45 | current folder:/opt/SumoCollector
INFO | jvm 1 | 2018/01/24 00:18:45 | * See /opt/SumoCollector/./logs for more details.
INFO | jvm 1 | 2018/01/24 00:18:45 | * Connecting to https://nite-events.sumologic.net.
INFO | jvm 1 | 2018/01/24 00:18:48 | * Retrieved configuration from service.
STATUS | wrapper | 2018/01/24 00:23:00 | TERM trapped. Shutting down.
The last line indicates there is a TERM signal handled properly but it's
not there if using docker stop
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGIKX2K0n2Ho2TzYT_CfSk3SGEqwoUPNks5tNn0igaJpZM4RiY8y>
.
|
Here is a snapshot of the processes running within the container as well as me attempting to run a
For the above container, if I do a
|
On a SIGTERM 15, the docker container does not seem to exit. Instead docker times out and sends a SIGKILL.
Might be due to
-t
option?sumologic-collector-docker/run.sh
Line 119 in d4ea550
The text was updated successfully, but these errors were encountered: