Forum Discussion
engtmk
Nimbostratus
18 years agoProblem
moved here to continue the problem
I have persistance over the VS so I think that might be the problem cause even after I used detach and rr it still select the same node .
I have searched the forum for a way to disable the persistance but it all show how to create persistance .
so how can I overcome the persistance problem
4 Replies
- The_Bhattman
Nimbostratus
Where did you apply the persistance? - hoolio
Cirrostratus
The original post was in the config forum (Click here). You should be able to use 'persist none' to disable persistence. If the application requires persistence, you'd want to re-enable it in a subsequent event using the persist command (Click here) again.
Aaron - hoolio
Cirrostratus
That looks okay. Can you try that as you have it?
If it still doesn't work and the same node is still specified, could you try setting a variable in HTTP_RESPONSE_DATA to 0 initially and to 1 if you're using HTTP::retry? Then check to see if that variable is set in HTTP_REQUEST. If it's set to 1, use the persist command to specify the persistence profile type and options.
Aaron - engtmk
Nimbostratus
when RULE_INIT {
set retries 0
}
when CLIENT_ACCEPTED {
set retries 0
set userip [IP::client_addr]
log local0. "the user ip is $userip"
if { [IP::addr [IP::remote_addr] equals "10.10.10.224"] } {
log local0. "==================================================="
log local0. "step no 1"
}
}
when HTTP_REQUEST {
set request [HTTP::request]
set url [HTTP::uri]
set hmethod [HTTP::method]
set retries 0
log local0. "HTTP request: $request"
if { [IP::addr [IP::remote_addr] equals "10.10.10.224"] } {
log local0. "===================Request Start ================================"
log local0. "$request"
log local0. "step no 2 new"
log local0. "HTTP request: $request"
}
}
when LB_SELECTED {
persist none
if { [IP::addr [IP::client_addr] equals "10.10.10.224"] } {
log local0. "step no 3 new"
log local0.alert "start server ip is $[LB::server] and the clientis $userip"
}
if { $retries >= 1 } {
log local0. "befor is [LB::server addr]"
LB::reselect pool pol_http_test
log local0. "after is [LB::server addr]"
if { [IP::addr [IP::remote_addr] equals "10.10.10.224"] } {
log local0.alert "end server ip is [LB::server] and the clientis $userip"
}
}
persist cookie
}
when LB_FAILED {
HTTP::redirect "someurl"
}
when HTTP_RESPONSE {
if { [IP::addr [IP::client_addr] equals "10.10.10.224"] } {
log local0. "step no 4 new"
log local0. "staus code is [HTTP::status]"
log local0. "**********Request Response************************"
}
if {([HTTP::status] starts_with "5") or([HTTP::status] starts_with "4")}{
log local0. "$url"
incr retries
log local0. "no of retries now is $retries"
log "4xx error caught: retry $retries out of [active_members [LB::server pool]]"
log "the uri is $request"
check to see if the no of you have tried all the servers in the pool
if { $retries < [active_members [LB::server pool]]} {
log local0. $hmethod
if { [IP::addr [IP::client_addr] equals "10.10.10.224"] } {
log local0. "step no 5 optional"
log local0. "staus code is [HTTP::status]"
log local0. "$request"
log local0. "*UUUUUUUUUUUUUUU Retrying Request UUUUUUUUUUUUUUUUUUUUUUUUUU"
}
HTTP::retry $request
all server are down then go and serve the page of error
} elseif {not ($url starts_with "/chat")} {
HTTP::redirect "someurls"
log local0. "$url"
log local0. "$url"
log local0. "the page couldnt be found on any of the servers $request"
}
}
}
not working as it still selecting the same node over and over agian
and once it reached to the max no of retires = no of nodes in pool it stop and direct the user to the error page
why i have used the persist none so it should work
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
