Hello Everyone
I am trying to use HPRoxy to forward my requests to two VMWARE Connection servers. Here is the cfg I am using:
# HaProxy configuration
# Global definitions
global
chroot /var/lib/haproxy
stats socket /var/lib/haproxy/stats # Corrected 'haprxoy' to 'haproxy'
daemon
defaults
timeout connect 5s
timeout client 30s
timeout server 30s
# Statistics & Admin configuration
userlist stats-auth
group admin users admin
user admin insecure-password LetMeIn
group ro users stats
user stats insecure-password ReadOnly
frontend stats-http8404
mode http
bind 192.168.1.250:8404
default_backend statistics
backend statistics
mode http
stats enable
stats show-legends
stats show-node
stats refresh 30s
acl AUTH http_auth(stats-auth)
acl AUTH_ADMIN http_auth_group(stats-auth) admin
stats http-request auth unless AUTH
stats admin if AUTH_ADMIN
stats uri /stats
# HORIZON Connection Servers
frontend horizon-http
mode http
bind 192.168.1.40:80
# Redirect http to https
redirect scheme https if !{ ssl_fc }
frontend horizon-https
mode tcp
bind 192.168.1.40:443
default_backend horizon
backend horizon
mode tcp
option ssl-hello-chk
balance source
server HRZSRV0102 192.168.1.62 ssl verify none weight 1 check inter 30s fastinter 2s downinter 5s rise 3 fall 3
server HRZSRV0202 192.168.1.82 ssl verify none weight 1 check inter 30s fastinter 2s downinter 5s rise 3 fall 3
And its giving me these errors:
And i am not really sure why, since I did use the "bind" parameter...do you may know what the issue could be?
Thank you for your help.
Kind regards,
Gabe
I was able to solve it with a NGINX installation, but thank you for your help.
I was about to redirect you to my blog indeed, but then I looked at your config and it really seems almost identical and I also don't see any errors in the config.
The only thing I can think of is that it maybe contains unexpected hidden characters that are causing the errors? As the first error was seen at line 44 and there's nothing on that line. Maybe copy the config to a text-only editor and paste it back to your config to be sure no hidden characters are included.
I'll try to test your config on a test setup when I have some time this week. I'll keep you updated.
I just ran a quick test of your config file and it gives me other errors
[NOTICE] (3401) : haproxy version is 2.4.22-0ubuntu0.22.04.2
[NOTICE] (3401) : path to executable is /usr/sbin/haproxy
[ALERT] (3401) : config: backend 'horizon': server 'HRZSRV0102' has neither service port nor check port nor tcp_check rule 'connect' with port information.
[ALERT] (3401) : config: backend 'horizon': server 'HRZSRV0202' has neither service port nor check port nor tcp_check rule 'connect' with port information.
[ALERT] (3401) : Fatal errors found in configuration.
After adding ":443" after your backend servers the config file is considered "valid"
backend horizon
mode tcp
option ssl-hello-chk
balance source
server HRZSRV0102 192.168.1.62:443 ssl verify none weight 1 check inter 30s fastinter 2s downinter 5s rise 3 fall 3
server HRZSRV0202 192.168.1.82:443 ssl verify none weight 1 check inter 30s fastinter 2s downinter 5s rise 3 fall 3
So my previous thought about the config having some hidden invalid characters might be true...
I was able to solve it with a NGINX installation, but thank you for your help.
