Reference

show errors

Show errors related to protocol violations.

Description Jump to heading

The show errors command displays errors that the load balancer generates when it detects protocol violations from the client or server.

Examples Jump to heading

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:

nix
printf "GET / HTTP/1.1\r\nHost: 192.168.50.25\r\nHost:\r\n\r\n" | \
nc 192.168.50.25 80
nix
printf "GET / HTTP/1.1\r\nHost: 192.168.50.25\r\nHost:\r\n\r\n" | \
nc 192.168.50.25 80
output
text
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.
output
text
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:

nix
echo "show errors" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show errors" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
output
text
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
output
text
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

See also Jump to heading

Do you have any suggestions on how we can improve the content of this page?