Container ignores SIGTERM signal and killed via SIGKILL signal.
To Reproduce
Steps to reproduce the behavior:
Use command # podman stop nominatim
See error WARN[0010] StopSignal SIGTERM failed to stop container nominatim in 10 seconds, resorting to SIGKILL
Expected behavior
Expected clear shutdown on SIGTERM signal in 10 seconds.
Screenshots & Logs
Container start after shutdown via SIGKILL: database system was not properly shut down; automatic recovery in progress:
+ trap stopServices SIGTERM TERM INT
+ /app/config.sh
+ id nominatim
+ useradd -m -p qaIACxO6wMR3 nominatim
+ IMPORT_FINISHED=/var/lib/postgresql/14/main/import-finished
+ '[' '!' -f /var/lib/postgresql/14/main/import-finished ']'
+ chown -R nominatim:nominatim /nominatim
+ service postgresql start
* Starting PostgreSQL 14 database server
...done.
+ cd /nominatim
+ sudo -E -u nominatim nominatim refresh --website --functions
sudo: unable to send audit message: Operation not permitted
2022-09-15 06:58:41: Using project directory: /nominatim
2022-09-15 06:58:41: Create functions
2022-09-15 06:58:43: Setting up website directory at /nominatim/website
+ service apache2 start
* Starting Apache httpd web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.88.0.5. Set the 'ServerName' directive globally to suppress this message
*
+ wait
+ tail -f /var/log/postgresql/postgresql-14-main.log
2022-09-15 06:58:39.403 UTC [36] LOG: starting PostgreSQL 14.5 (Ubuntu 14.5-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, 64-bit
2022-09-15 06:58:39.403 UTC [36] LOG: listening on IPv4 address "0.0.0.0", port 5432
2022-09-15 06:58:39.403 UTC [36] LOG: listening on IPv6 address "::", port 5432
2022-09-15 06:58:39.403 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-09-15 06:58:39.405 UTC [37] LOG: database system was interrupted; last known up at 2022-09-15 06:56:56 UTC
2022-09-15 06:58:39.406 UTC [37] LOG: database system was not properly shut down; automatic recovery in progress
2022-09-15 06:58:39.407 UTC [37] LOG: redo starts at 4/EB9F6FA8
2022-09-15 06:58:39.408 UTC [37] LOG: invalid record length at 4/EBA252F0: wanted 24, got 0
2022-09-15 06:58:39.408 UTC [37] LOG: redo done at 4/EBA252B8 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2022-09-15 06:58:39.419 UTC [36] LOG: database system is ready to accept connections
Desktop / Server (please complete the following information):
Describe the bug
Container ignores SIGTERM signal and killed via SIGKILL signal.
To Reproduce Steps to reproduce the behavior:
# podman stop nominatim
WARN[0010] StopSignal SIGTERM failed to stop container nominatim in 10 seconds, resorting to SIGKILL
Expected behavior
Expected clear shutdown on SIGTERM signal in 10 seconds.
Screenshots & Logs
Container start after shutdown via SIGKILL:
database system was not properly shut down; automatic recovery in progress
:Desktop / Server (please complete the following information):
Additional context