Forum Discussion
redirect IIS 500 error to another host in pool
Hi expert,
I need help to configure my F5 LTM to redirect the connection to another host in the pool when one of the host/node in the pool have internal server error 500. How can i redirect the request to another host in F5 LTM when hit this internal error?
Thanks
- Lee_Sutcliffe
Nacreous
Hi, if you set up an HTTP monitor to check for an HTTP status code of 200, any pool member serving a 500 will not be selected for load balancing
- Shamsul_Alam_34
Nimbostratus
here is the output:
[root@f5:Active:Standalone] config curl -s -v 172.16.5.76 1> /dev/null * About to connect() to 172.16.5.76 port 80 (0) * Trying 172.16.5.76... connected * Connected to 172.16.5.76 (172.16.5.76) port 80 (0) > GET / HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 OpenSSL/1.0.1l zlib/1.2.3 libidn/1.18 > Host: 172.16.5.76 > Accept: */* > < HTTP/1.1 200 OK < Content-Type: text/html < Last-Modified: Thu, 13 Apr 2017 19:11:24 GMT < Accept-Ranges: bytes < ETag: "31cc9dbe89b4d21:0" < Server: Microsoft-IIS/10.0 < X-Powered-By: ASP.NET < Date: Wed, 15 Nov 2017 20:15:47 GMT < Content-Length: 703 < { [data not shown] * Connection 0 to host 172.16.5.76 left intact
- Lee_Sutcliffe
Nacreous
That looks fine. Try just putting
in the receive string. Any issues please output the tmsh/cli monitor config:200 OK
- Shamsul_Alam_34
Nimbostratus
Still failed. No clue what going wrong here.
My monitor setting as below:
Node setting
Pool setting
- Lee_Sutcliffe
Nacreous
Could you change your node monitor to gateway_icmp and remove https_443 from the pool so you're only using the Check_header_200-OK monitor
- Gurus
Altostratus
If you want allow additional status codes 301 and 302, you could do it as below in the receive string.
(200 OK|301|302)
- JG
Cumulonimbus
You need specify the HTTP version in your send string if your backend does not support HTTP/0.9:
GET / HTTP/1.0\r\n\r\n
.
- JG
Cumulonimbus
You can enable debugging for the monitor. See https://networkology.net/2014/11/11/debug-f5-monitor-response-from-the-server/.
Create a http monitor with alias port 80
send string:GET / HTTP/1.1\r\nHost:\r\nConnection: Close\r\n\r\n
Receive string:
HTTP/1.[01] [23]0[0-6]
And enable it on your pool (please remove the other monitors)
Cheers,
Kees
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com