Forum Discussion
Al_Carandang_11
Nimbostratus
I am trying the follwowing rule
rule sorry_test {
when LB_FAILED {
log local0.err "ERR: Load Balancing failed for [virtual name] Pool: [LB::server] Client: [IP::remote_addr]
HTTP::redirect "http://sorry.domain.com/sorry.html"
}
}
Now when I make a request to the virtual immediately after shutting down the webserver I get an empty reply from the server and I get the following entry in /var/log/ltm:
Mar 5 16:47:02 tmm tmm[1028]: Rule sorry_test : ERR: Load Balancing failed for testvip Pool: test_pool Client: 10.1.1.1
Mar 5 16:47:02 tmm tmm[1028]: 011f0007:3: http_process_state_header_xfer - Invalid action EV_SINK_HEADER during ST_HTTP_XFER_HEADERS
So it appears to have triggered the LB_FAILED event but the HTTP:redirect did not get executed.
Then a few seconds later when the monitor marks the pool member down, I get the correct redirect the response to my HTTP request and I get the following in /var/log/ltm
Mar 5 16:47:03 testbip mcpd[1119]: 01070638:3: Pool member 10.2.2.2:80 monitor status down.
Mar 5 16:47:04 tmm tmm[1028]: Rule sorry_test : ERR: Load Balancing failed for testvip Pool: test_pool Client: 10.1.1.1
Mar 5 16:47:04 tmm tmm[1028]: 011f0007:3: http_process_state_header_xfer - Invalid action EV_SINK_HEADER during ST_HTTP_XFER_HEADERS
In this case, the LB_FAILED event was triggered and the HTTP::redirect was executed.
So my questions are:
1. Why does the HTTP::redirect not get executed in the first instance?
2. What does the EV_SINK_HEADER error message mean?
-Al
Walter_Kacynski
Dec 08, 2014Cirrostratus
I think you want to use LB::down and then perform the redirect. I haven't tested this.