Eu tenho uma instalação do CentOS 7.4 com haproxy que atualizei para 1.8. O haproxy falha ao iniciar, mesmo sudo systemctl start haproxy
não mostra nenhuma saída.
sudo systemctl status haproxy
exibe isso:
● haproxy.service - HAProxy Load Balancer
Loaded: loaded (/usr/lib/systemd/system/haproxy.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Wed 2018-01-31 15:17:37 CET; 2s ago
Process: 2807 ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 2807 (code=exited, status=0/SUCCESS)
Jan 31 15:17:36 foo systemd[1]: Started HAProxy Load Balancer.
Jan 31 15:17:36 foo systemd[1]: Starting HAProxy Load Balancer...
Jan 31 15:17:37 foo haproxy-systemd-wrapper[2807]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -d -Ds
Jan 31 15:17:37 foo haproxy-systemd-wrapper[2807]: haproxy-systemd-wrapper: exit, haproxy RC=0
Os registros não geram muita informação útil:
Jan 31 15:19:43 foo systemd[1]: Started HAProxy Load Balancer.
-- Subject: Unit haproxy.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit haproxy.service has finished starting up.
--
-- The start-up result is done.
Jan 31 15:19:43 awisot3 systemd[1]: Starting HAProxy Load Balancer...
-- Subject: Unit haproxy.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit haproxy.service has begun starting up.
Quando tento simular o que o systemd faz e executar um sudo -u haproxy usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -d -Ds
, recebo esta mensagem de erro:
[WARNING] 030/152521 (3031) : [/usr/sbin/haproxy.main()] Cannot raise FD limit to 8015, limit is 4096.
[ALERT] 030/152521 (3031) : [/usr/sbin/haproxy.main()] Cannot create pidfile /run/haproxy.pid
Como configuro corretamente o acesso a haproxy.pid
e /run
?
Pergunta bônus: por que o journalctl também não divulga esta informação?