Forum Discussion
srikanth_87121
Nimbostratus
Oct 22, 2007Redirect Rule
Hi
I am new to F5 and am trying to implement a rule where in i have 2 members in a pool and where in if one of the pool members returns a 404 error i want to send the traffic to the other one and if the other one also returns a 404 return back the 404 Error.
Hear is the Rules i am using
when CLIENT_ACCEPTED {
set retries 0
}
when HTTP_REQUEST {
set request [HTTP::request]
}
when LB_SELECTED {
if { $retries >= 1 } {
LB::reselect
}
}
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "4" } {
incr retries
if { $retries < [active_members [LB::server pool]] } {
HTTP::retry $request
}
}
}
and this is the error i am seeing
01070151:3: Rule [Test_Test_Rule] error:
line 6: [undefined procedure: HTTP::request] [HTTP::request]
line 11: [command is not valid in current event context (LB_SELECTED)] [LB::reselect ]
line 19: [undefined procedure: HTTP::retry] [HTTP::retry $request]
I am not sure whats wrong with this .
Any Feed back is appriciated.
Thanks
Sri
- hoolio
Cirrostratus
Per the wiki page for HTTP::retry (Click here), the command was added in 9.2.0. Are you running 9.0.x or 9.1.x? If so, you could upgrade to the latest maintenance release, 9.3.0, and get the new functionality. If you are running an old version, it would be good to upgrade regardless of the functionality. There are a lot of bug fixes in 9.3.0. - srikanth_87121
Nimbostratus
Yes we are currently on 9.1.2 and that would explain the problem we are having. Let me upgrade our system to 9.3 and try this again.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects