HAProxy Enterprise Documentation 1.6r2
show errors
Show errors related to protocol violations.
Description
The show errors
command displays errors that the load balancer generates when it detects protocol violations from the client or server.
Examples
You can use Netcat, nc
, to intentionally create a malformed HTTP message. In the example below, we create an HTTP request that has two Host headers:
$ printf "GET / HTTP/1.1\r\nHost: 192.168.50.25\r\nHost:\r\n\r\n" | nc 192.168.50.25 80
HTTP/1.1 400 Bad request
content-length: 90
cache-control: no-cache
content-type: text/html
connection: close
<html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
Call show errors
to see the event:
$ echo "show errors" | sudo socat stdio /var/run/hapee-1.6/hapee-lb.sock
Total events captured on [22/Feb/2021:18:43:07.052] : 1
[22/Feb/2021:18:43:02.909] frontend fe_main (#2): invalid request
backend <NONE> (#-1), server <NONE> (#-1), event #0, src 192.168.50.25:59200
buffer starts at 0 (including 0 out), 16338 free,
len 46, wraps at 16336, error at position 42
H1 connection flags 0x00000000, H1 stream flags 0x00000012
H1 msg state MSG_HDR_L2_LWS(24), H1 msg flags 0x00001410
H1 chunk len 0 bytes, H1 body len 0 bytes :
00000 GET / HTTP/1.1\r\n
00016 Host: 192.168.50.25\r\n
00037 Host:\r\n
00044 \r\n
Next up
show info