@LucasRey wrote:
Hello community,
I’m trying to make a simple HAProxy Server Active-StandBy. I have 2 ports to handle, with two servers. What I have to do, is redirect requests from port 8123 and 1883 to respective ports on active server.defaults log global option dontlognull option redispatch retries 3 frontend ft_app bind *:8123 bind *:1883 default_backend bk_app backend bk_app server node1-gui 192.168.2.50:8123 check server node1-sonoff 192.168.2.51:1883 check server node2-gui 192.168.2.51:8123 check backup server node2-sonoff 192.168.2.51:1883 check backup
Unfortunately the above configuration doesn’t work (it doesn’t rederect to the server. If I configure the server in the following way, it works:
server node1-sonoff 192.168.2.50 check server node2-gui 192.168.2.50 check backup
THe problem is that if the primary node goes down, HAProzy never route requests to the other node and the logs says:
[ALERT] 294/152920 (43307) : parsing [/usr/local/etc/haproxy.conf:11] : server s1 has neither service port nor check port nor tcp_check rule ‘connect’ with port information. Check has been disabled.
[ALERT] 294/152920 (43307) : parsing [/usr/local/etc/haproxy.conf:12] : server s2 has neither service port nor check port nor tcp_check rule ‘connect’ with port information. Check has been disabled.
Starting haproxy.
[ALERT] 294/152920 (43308) : parsing [/usr/local/etc/haproxy.conf:11] : server s1 has neither service port nor check port nor tcp_check rule ‘connect’ with port information. Check has been disabled.
[ALERT] 294/152920 (43308) : parsing [/usr/local/etc/haproxy.conf:12] : server s2 has neither service port nor check port nor tcp_check rule ‘connect’ with port information. Check has been disabled.Could someone help me?
Thank you
Lucas
Posts: 1
Participants: 1