Investigate HAProxy failure on CentOS 7 - code=killed, status=9/KILL following Reloaded SYSV

I'm running 2 instances of HAProxy 1.6.9 with PCS on CentOS 7.

HAProxy on my main node suddenly failed during the weekend. A systemctl status of haproxy gave us a failed status. Restarting haproxy worked just fine and the service came back again.

I'm now trying to understand what went wrong and to make sure that it didn't happen again.

That's the result of journalctl:

[root@main-lb ~]# journalctl --utc -u haproxy --since yesterday
-- Logs begin at Thu 2017-07-06 05:39:42 GMT, end at Sun 2017-08-20 17:36:05 GMT. --
Aug 20 07:20:01 main-lb systemd[1]: Reloaded SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments..
Aug 20 07:20:01 main-lb systemd[1]: haproxy.service: main process exited, code=killed, status=9/KILL
Aug 20 07:20:01 main-lb haproxy[14935]: Shutting down haproxy: [FAILED]
Aug 20 07:20:01 main-lb systemd[1]: Unit haproxy.service entered failed state.
Aug 20 07:20:01 main-lb systemd[1]: haproxy.service failed.

I can see a Reloaded SYSV and I'm wondering why it has been triggered and also I'm guessing it's the part of the issue here.

0
задан 20 August 2017 в 20:48
1 ответ

Мне удалось собрать больше журналов на момент возникновения проблемы, и я обнаружил следующее:

Aug 20 07:20:01 main-lb anacron[14184]: Job `cron.daily' started
Aug 20 07:20:01 main-lb run-parts(/etc/cron.daily)[14912]: starting logrotate

Итак, logrotate был запущен непосредственно перед отказом haproxy. И глядя на мой сценарий logrotate для haproxy.log ( /etc/logrotate.d/haproxy ), я обнаружил следующее:

/etc/init.d/haproxy reload > /dev/null

Итак, haproxy был перезагружен после logrotation. Однако похоже, что с этим связана известная проблема, как описано в следующей теме: https://discourse.haproxy.org/t/v1-6-10-soft-reload-not-working-under-centos-7-2/994

Я удалил команду перезагрузки. из logrotate и перезапустите rsyslog.

0
ответ дан 5 December 2019 в 07:29

Теги

Похожие вопросы