HAProxy is an open-software used as a high-performance load balancer and reverse proxy for TCP.
To check whether the proxy config before reloading or restarting the HAProxy service can be done via this command:
haproxy -c -f /etc/haproxy/haproxy.cfg
It will show 'configuration file is valid' if everything is okay or the config file syntax is valid.
However, the command cannot check whether it can bind the port, or bind the socket.
Example, typing: systemctl reload haproxy to reload the new config file.
And to check whether the reload is successful or not status of the service can be checked.
Typing, systemctl status haproxy to check the status and if it shows Reload: failed then binding issues or other errors causes reloading to fail.
Or some alert is shown as Binding like /etc/haproxy/haproxy.cfg cannot bind socket or cannot assign requested address for 192.168.x.x. IP
Technically, the error is already giving some hints that the IP on the HAProxy config file cannot be used for binding.
Solution, if there is an existing config that has worked before, double check the IP make sure it's the same with the new entry or the line showing the errors and try reloading again.
The IP address uses for binding is the IP address that HAProxy will try to listen on, or it's the IP address that HAProxy will accept connections.
To further check whether the port that is used on HAProxy is listening.
Type: ss -tulpn 8070
If the port shows it's listening then the port is ready to accept connections.
That's it..till next time.
Life is a gift from God, No matter how hard it gets. Just keep going and never get tired of asking God's help..He will show you the way, Trust and Faith will go a long way.
Comments
Post a Comment