Hi.
I am using haproxy 2.2.6 on pfsense. It is working OK, except I am getting a 504 gateway timeout on the long polling connection. I have done the packet sniff and I see the connection to the correct port (8072). Is there a setting I am missing to make the long polling connection work?
Below is my config.
thanks,
Geoff
global
maxconn 1000
log /var/run/log local0 debug
stats socket /tmp/haproxy.socket level admin expose-fd listeners
uid 80
gid 80
nbproc 1
nbthread 1
hard-stop-after 15m
chroot /tmp/haproxy_chroot
daemon
tune.ssl.default-dh-param 2041
server-state-file /tmp/haproxy_server_state
frontend HTTP_80
bind 192.168.150.10:80 name 192.168.150.10:80
mode http
log global
option http-keep-alive
option forwardfor
acl https ssl_fc
http-request set-header X-Forwarded-Proto http if !https
http-request set-header X-Forwarded-Proto https if https
timeout client 30000
http-request redirect scheme https
frontend HTTPS_443
bind 192.168.150.10:443 name 192.168.150.10:443 ssl crt-list /var/etc/haproxy/HTTPS_443.crt_list
mode http
log global
option log-separate-errors
option httplog
option http-keep-alive
option forwardfor
acl https ssl_fc
http-request set-header X-Forwarded-Proto http if !https
http-request set-header X-Forwarded-Proto https if https
timeout client 30000
http-request set-header X-Real-IP %[src]
http-request set-header X-Forwarded-Host %[req.hdr(Host)]
acl odoo var(txn.txnhost) -m beg -i odoo.domain.com
acl test var(txn.txnhost) -m beg -i test.domain.com
acl longpolling var(txn.txnpath) -m beg -i /longpolling
acl aclcrt_HTTPS_443 var(txn.txnhost) -m reg -i ^([^\.]*)\.domain\.com(:([0-9]){1,5})?$
http-request set-var(txn.txnhost) hdr(host)
http-request set-var(txn.txnpath) path
use_backend Production-LongPolling_ipvANY if odoo longpolling aclcrt_HTTPS_443
use_backend Testing-LongPolling_ipvANY if terp longpolling aclcrt_HTTPS_443
use_backend Testing_ipvANY if terp aclcrt_HTTPS_443
use_backend Production_ipvANY if odoo aclcrt_HTTPS_443
backend Production-LongPolling_ipvANY
mode http
id 104
log global
timeout connect 30000
timeout server 30000
retries 3
server erp 192.168.150.21:8072 id 101
backend Testing-LongPolling_ipvANY
mode http
id 105
log global
timeout connect 30000
timeout server 30000
retries 3
server erp-test 192.168.150.22:8072 id 103
backend Testing_ipvANY
mode http
id 102
log global
timeout connect 30000
timeout server 30000
retries 3
server erp-test 192.168.150.22:8069 id 103
backend Production_ipvANY
mode http
id 100
log global
timeout connect 30000
timeout server 30000
retries 3
server erp 192.168.150.21:8069 id 101