Il 16/09/20 18:08, Axel DUMAS ha scritto:
At the boot, HAProxy say "Starting frontend srv_java: cannot bind socket
[192.168.0.19:26000]".
> ...
In addition, when I just use the command "sudo service haproxy restart",
HAProxy works very well.
Hi, Axel!
I would try the following.
Create a file /etc/sysctl.d/99-test.conf containing the line
net.ipv4.ip_nonlocal_bind = 1
and reboot.
If haproxy starts, then it is possible that the IP is not yet available
when haproxy starts at boot.
Remove /etc/sysctl.d/99-test.conf unless you really need it.
Look here for some hints about how to let the service wait for the
network to be up
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
Maybe something like in the haproxy .service file could be enough
After=network-online.target
Wants=network-online.target
Hope this helps
.marcoc