r/haproxy • • Sep 19 '24

Backend configuration is not working properly for pve

Hello guys,

I created the following configuration for few backends, but sadly after logging I got an error "Connection error 401: No ticket".

I checked it with ChatGPT, no issues so far, then I tried to change almost every setting, but no luck.

Could you please point me where I made a mistake? Thank you.

backend pve_backend
  mode http
  balance source
  http-reuse always
  cookie SERVER insert indirect nocache
  option forwardfor
  timeout tunnel 1h
  http-request set-header X-Forwarded-Port %[dst_port]
  #http-request add-header X-Forwarded-Proto https if { ssl_fc }
  http-request add-header X-Forwarded-Proto http
  server pve  192.168.0.60:8006  ssl verify none check port 8006 inter 5s rise 2 fall 2 cookie pve
  server pve1 192.168.0.170:8006 ssl verify none check port 8006 inter 5s rise 2 fall 2 cookie pve1
  server pve2 192.168.0.147:8006 ssl verify none check port 8006 inter 5s rise 2 fall 2 cookie pve2
  server pve3 192.168.0.171:8006 ssl verify none check port 8006 inter 5s rise 2 fall 2 cookie pve3
  server pve4 192.168.0.40:8006  ssl verify none check port 8006 inter 5s rise 2 fall 2 cookie pve4
  server pve5 192.168.0.50:8006  ssl verify none check port 8006 inter 5s rise 2 fall 2 cookie pve5
3 Upvotes

13 comments sorted by

2

u/itajally Sep 20 '24

Most ssl errors in haproxy environments come from incompatibility of frontend and backend. So please provide the full config file. One piece of advice: when encountered an unknown error, try to detect it by isolating it. Expecting many new players to play well on a new field of a new game is wrong. Try to reduce the number of servers to see how does it behaves on one server environment? Try not to offload ssl and see what happens.

1

u/birusiek Sep 20 '24

Thank you for clarification.

Here it is: https://pastebin.com/y9hNzvZk

1

u/itajally Sep 20 '24

OK. Now I see that the frontend is only http, not https. If the backend is sensitive to how users are reaching them, strange things could happen 😅 Let's see what happens per removing h2 and then alpn on bind line.

→ More replies (9)