HAProxy community

Http request cannot pass thru when using load test tool

Hello,

I am experience problem when using some load test tools such as Jmeter or Paessler Stress Tool.

The request could not able to pass thru the the haproxy. But it was success while manually access using typical browser. Please advise is it something need special in haproxy or load test tools?

haproxy code

global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
user haproxy
group haproxy
daemon
maxconn 120
# turn on stats unix socket
stats socket /var/lib/haproxy/stats
defaults
mode http
log global
option dontlognull
option http-server-close
option redispatch
retries 3
timeout http-request 10s
timeout queue 30s
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 110
errorfile 503 /etc/haproxy/errors/503.http
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
frontend main
bind *:80
bind *:443
maxconn 105
mode http
option tcplog
default_backend app
backend app
fullconn 100
balance roundrobin
mode http
option ssl-hello-chk
option httpclose
server web1 10.0.0.6:443 check
listen stats
bind *:1936
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth xxxx:yyyy
stats refresh 10s

And the log from haproxy is

Jul 9 17:02:10 localhost haproxy[6949]: 220.241.111.222:64279 [09/Jul/2019:17:02:09.958] main app/web1 1/0/69 7 – 0/0/0/0/0 0/0
Jul 9 17:02:10 localhost haproxy[3857]: 220.241.111.222:15595 [09/Jul/2019:17:02:10.073] main app/web1 1/0/61 7 – 0/0/0/0/0 0/0
Jul 9 17:02:10 localhost haproxy[3910]: 220.241.111.222:1335 [09/Jul/2019:17:02:10.364] main app/web1 1/0/68 7 – 0/0/0/0/0 0/0
Jul 9 17:02:10 localhost haproxy[7163]: 220.241.111.222:3574 [09/Jul/2019:17:02:10.707] main main/ -1/-1/0 319 PR 1/0/0/0/0 0/0
Jul 9 17:02:10 localhost haproxy[3910]: 220.241.111.222:52196 [09/Jul/2019:17:02:10.686] main app/web1 1/1/58 7 – 0/0/0/0/0 0/0
Jul 9 17:02:10 localhost haproxy[2025]: 220.241.111.222:50675 [09/Jul/2019:17:02:10.755] main app/web1 1/1/51 7 – 0/0/0/0/0 0/0

Thanks!

I’m having the exact same issue using T-Rex traffic generator and posted a similar thread (HAProxy With Load Balancer) - am very interested if you figure this out.

Your server seems to be configured as an SSL server. It listen on the port 443 and you enable ssl checks (option ssl-hello-check). But the ssl is not enable on the server line.

SSL wasn’t terminated in the frontend either though; so there is a choice to make:

Either terminate SSL on both frontend and backend port 443, or in neither (in the latter case, the port 80 bind statement also has to go).