Kibana docker image does not respond to SIGTERM #113374
Labels
bug
Fixes for quality problems that affect the customer experience
Team:Operations
Team label for Operations Team
Kibana version:
Tested with latest 7.15.0 and 8.0.0-alpha2
Original install method (e.g. download page, yum, from source, etc.):
Using the official docker.elastic.co/kibana/kibana image
Describe the bug:
The container does not respond to SIGTERM, making it impossible to gracefully shutdown Kibana.
Steps to reproduce:
docker run --rm docker.elastic.co/kibana/kibana:7.15.0
CTRL+C
Expected behavior:
The container should respond to the TERM signal and gracefully shutdown
Identified cause:
There are three running processes in the conainer:
The main "node" process (PID 7) does not respond to SIGTERM (I am not a node specialist, I can't really explain why), only the child node process (952) does. When a SIGTERM is sent to the container, PID1 (tini) forwards it to the main node process (PID 7) only, and nothing happens.
This is different from when Kibana is run with systemd, because by default systemd will send a SIGTERM signal to ALL the processes of the cgroup, causing Kibana to stop gracefully.
As a workaround, I am currently using
dumb-init
in place oftini
, because it behaves like systemd in this regards (sends signals to all spawn processes).Example Dockerfile:
The text was updated successfully, but these errors were encountered: