Reference
show errors
On this page
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
outputtext
HTTP/1.1 400 Bad requestcontent-length: 90cache-control: no-cachecontent-type: text/htmlconnection: close<html><body><h1>400 Bad request</h1>Your browser sent an invalid request.
outputtext
HTTP/1.1 400 Bad requestcontent-length: 90cache-control: no-cachecontent-type: text/htmlconnection: 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
outputtext
Total events captured on [22/Feb/2021:18:43:07.052] : 1[22/Feb/2021:18:43:02.909] frontend fe_main (#2): invalid requestbackend <NONE> (#-1), server <NONE> (#-1), event #0, src 192.168.50.25:59200buffer starts at 0 (including 0 out), 16338 free,len 46, wraps at 16336, error at position 42H1 connection flags 0x00000000, H1 stream flags 0x00000012H1 msg state MSG_HDR_L2_LWS(24), H1 msg flags 0x00001410H1 chunk len 0 bytes, H1 body len 0 bytes :00000 GET / HTTP/1.1\r\n00016 Host: 192.168.50.25\r\n00037 Host:\r\n00044 \r\n
outputtext
Total events captured on [22/Feb/2021:18:43:07.052] : 1[22/Feb/2021:18:43:02.909] frontend fe_main (#2): invalid requestbackend <NONE> (#-1), server <NONE> (#-1), event #0, src 192.168.50.25:59200buffer starts at 0 (including 0 out), 16338 free,len 46, wraps at 16336, error at position 42H1 connection flags 0x00000000, H1 stream flags 0x00000012H1 msg state MSG_HDR_L2_LWS(24), H1 msg flags 0x00001410H1 chunk len 0 bytes, H1 body len 0 bytes :00000 GET / HTTP/1.1\r\n00016 Host: 192.168.50.25\r\n00037 Host:\r\n00044 \r\n
See also Jump to heading
Do you have any suggestions on how we can improve the content of this page?