Bug #12295
closedSmart proxy stops listening on HTTPS port after log rotate
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1273785
Description of problem:
The foreman-proxy stops listening on port 9090 after the logrotate was performed:
[crash] root@li-lc-1017:/etc/logrotate.d# grep '04:28' /var/log/cron
Oct 21 04:28:01 li-lc-1017 anacron31376: Job `cron.daily' started
Oct 21 04:28:01 li-lc-1017 run-parts(/etc/cron.daily)[1263]: starting logrotate
Oct 21 04:28:14 li-lc-1017 run-parts(/etc/cron.daily)[1382]: finished logrotate
Oct 21 04:28:14 li-lc-1017 run-parts(/etc/cron.daily)[1263]: starting makewhatis.cron
Oct 21 04:28:18 li-lc-1017 run-parts(/etc/cron.daily)[1555]: finished makewhatis.cron
Oct 21 04:28:18 li-lc-1017 run-parts(/etc/cron.daily)[1263]: starting mlocate.cron
[crash] root@li-lc-1017:/etc/logrotate.d# ls l /var/log/foreman-proxy/. 1 foreman-proxy foreman-proxy 0 Oct 19 12:22 access.log
total 4
-rw-r--r-rw-r--r-. 1 foreman-proxy foreman-proxy 0 Oct 21 04:28 proxy.logrw-r--r-. 1 foreman-proxy foreman-proxy 1366 Oct 21 04:28 proxy.log-20151021.gz
[crash] root@li-lc-1017:/var/log/foreman-proxy# ps aux | grep proxy
root 922 0.0 0.0 103308 832 pts/0 S+ 08:24 0:00 grep proxy
493 1378 0.2 0.1 162960 54032 ? SNl 04:28 0:30 ruby /usr/share/foreman-proxy/bin/smart-proxy
[crash] root@li-lc-1017:/etc/logrotate.d# lsof -P -n | grep 'foreman-proxy.*TCP'
ruby 1378 foreman-proxy 5u IPv4 10120344 0t0 TCP *:8000 (LISTEN)
Checking the logrotate script is does a 'service foreman-proxy condrestart'.
I think that the startup might be too quickly after the stopping so the port 9090 is not released yet for re-use.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Force logrotate logrotate -f /etc/logrotate.conf
2.
3.
Actual results:
Foreman-proxy is not listening the port 9090
Expected results:
Foreman-proxy is listening again on the port 9090
Additional info: