Forum Discussion
Sarnoth_81568
Nimbostratus
Aug 01, 2008LB::reselect problem
Let me give you some background before I get in to the problem.
We have a web application that uses session replication. A node can fail in such a way that it always return 5xx error pages. We ...
pjcampbell_7243
Cirrus
Apr 21, 2009Thanks for the reply, and for those problems. I verified that no 500/503 errors are being put up with livehttpdheaders (I was also checking the apache log).
I changed it a bit, and now am checking LTM logs:
Apr 21 16:16:30 tmm tmm[1564]: 01220001:3: TCL error: redirect_on_bad_status - can't read "failure": no such variable while executing "if { $failure == 1 } { LB::detach LB::mode rr LB::reselect pool [LB::server pool] set failure 0 }"
Is this not a "global" variable?
I thought it would make sense to just nest the when LB_SELECTED { inside of the when HTTP_RESPONSE { , but that did not seem to work - it wouldn't let me save the iRule that way - command is not valid in the current scope.
Here is what I changed it to:
when HTTP_RESPONSE {
if { [HTTP::status] == 503 }{
set ::failure 1
}
}
when LB_SELECTED {
if { $::failure == 1 } {
LB::detach
LB::mode rr
LB::reselect pool [LB::server pool]
set ::failure 0
}
}
I am testing out Tomcat session replication, and I want to make it so that when we have a Tomcat server that is restarting (503 error) the customer doesn't see any errors and just gets tossed onto another server with no loss of data.
BTW I have seen variables set as ::variable (assuming that is global), tried that as well and it didn't work...
Apr 21 16:23:47 tmm tmm[1564]: 01220001:3: TCL error: redirect_on_bad_status - can't read "::failure": no such variable while executing "if { $::failure == 1 } { LB::detach LB::mode rr LB::reselect pool [LB::server pool] set ::failure 0 }"
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
