Mike_73765
Aug 20, 2010Nimbostratus
issue with cookie persist irule
Hey guys, I am having an issue with an irule that I got from code share that is shown below. This irule is used on 2 virtual servers (using the same nodes, but different ports) and should be persistent between virtual servers. The user logs into the website, which is vs 1, and clicks a link that sends them to vs 2 (the same node). This works only sometimes for the users. The HTTP::response event in this irule always works, but the HTTP::request event gets numerous errors.
Here’s the error:
Aug 19 16:18:57 local/tmm err tmm[13657]: 01220001:3: TCL error: cookie - no such pool Failed Tcl_pool_GetFromObj: pool (line 6) invoked from within "active_members -list [LB::server pool]"
IRule:
when HTTP_REQUEST {
if { [HTTP::cookie exists "cookie"] } {
set decrypted [HTTP::cookie decrypt "cookie" "passcode"]
if { ($decrypted ne "") }
{ set persist_node [HTTP::cookie "cookie"]
foreach member [active_members -list [LB::server pool]] { <--Line that fails
set node [lindex $member 0]
if { $node eq $persist_node }
{ node $persist_node [lindex $member 1] } } }
log local0. [LB::server] } } <-- Doesn't return anything
when LB_FAILED { LB::reselect }
when HTTP_RESPONSE {
HTTP::cookie insert name "cookie" value [IP::remote_addr] path /
HTTP::cookie encrypt "cookie" "passcode" }
Thanks for your help,
Mike