Forum Discussion

JMVaughn_44893's avatar
JMVaughn_44893
Icon for Nimbostratus rankNimbostratus
Jul 13, 2011

RST from f5 when virtual server is down

Hopefully someone can assist. Running BIG-IP LTM v10.2, and I'm trying to create an iRule that will redirect to another site when the virtual server is down. I've tried several examples from the forums, but nothing seems to work. I set a packet capture, and what I see is:

 

 

SYN

 

SYN, ACK

 

ACK

 

RST, ACK

 

 

 

However, the counter on the iRule increments...The virtual server is down by virtue of the pool being down which is doing an HTTP check.

 

 

 

I've tried:

 

 

 

when HTTP_RESPONSE {

 

if { [HTTP::status] == "403" } {

 

HTTP::redirect "www.error.com"

 

}

 

elseif { [HTTP::status] == "404" } {

 

HTTP::redirect "www.error.com"

 

}

 

}

 

 

 

 

I've also tried returning a custom error page.

 

 

 

Also tried this:

 

 

 

when HTTP_REQUEST {

 

Check if the default pool has less than one active member

 

if { [active_members [LB::server pool]] < 1 } {

 

HTTP::redirect "www.error.com"

 

}

 

}

 

 

5 Replies

  • Hi JMVaughn,

     

    Did you try using

     

     

    HTTP::redirect "http://www.error.com/" instead of HTTP::redirect "www.error.com"

     

     

     

    Bhattman
  • You'd definitely want to include the protocol with the hostname in a redirect as Bhattman noted.

     

     

    If TMM is sending a RST immediately after the TCP connection is established it might be due to an iRule runtime error. You could check /var/log/ltm for errors when testing.

     

     

    Aaron
  • Bhattman,

     

     

    Yes, it is actually "http://www...." I just replaced the actual site int he example I used.

     

     

     

    jv

     

  • I've seen that reset behavior when a second redirect statment is encountered in the processing of a single request. If there's more to the irule than what you've posted or there are other irules applied to the VIP that will execute after this snippet of code, that's a very likely culprit. I second hoolio's suggestion about checking the logs.
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    If it were me I'd try using an HTTP::respond 200 Location "www.error.com" rather than the HTTP::redirect and see how that works.

     

     

    Colin