Forum Discussion
TCL error - no such pool
Thanks very much for your help Kevin.
Meanwhile, I think it´s a good idea the way you verify pool member status and how it is selected. It´s not needed to look for the pool member in a list, because it´s hardcoded into cookie value. So I have tried to use that portion of your code into iRule I was testing:
HTTP_REQUEST {
if { [HTTP::cookie exists "ACCM"] } {
set need_cookie 0
set decrypted [HTTP::cookie decrypt "ACCM" "skyisblue"]
if { ($decrypted ne "") } {
set persist_node [HTTP::cookie "ACCM"]
log local0. "Pool: [LB::server pool], server: $decrypted ,port: [LB::server port]"
if { [LB::status pool [LB::server pool] member $decrypted [LB::server port]] eq "up" } {
pool [LB::server pool] member $decrypted [LB::server port]
} else {
set need_cookie 1
}
}
} else {
set need_cookie 1
}
}
when LB_FAILED {
set need_cookie 1
LB::reselect
}
when HTTP_RESPONSE {
if { $need_cookie } {
HTTP::cookie insert name "ACCM" value [IP::remote_addr] path /
HTTP::cookie encrypt "ACCM" "skyisblue"
HTTP::cookie expires "ACCM" 86400
}
}As you can see, I have configured a log local0. in order to obtain pool name, selected server and server port. Taking a view to ltm log, I can see log messages in which port always is 0. I don´t know why [LB::server port] returns 0 value:
Oct 4 10:34:22 slot1/LTMPRE1 info tmm[10605]: Rule /Common/iRULE_PERSISTENCE_HTTP_HTTPS_ACCM : Pool: /CISCOPRE/ACCMOINSA_HTTP, server: 192.168.202.223%10 ,port: 0
Oct 4 10:34:22 slot1/LTMPRE1 info tmm[10605]: Rule /Common/iRULE_PERSISTENCE_HTTP_HTTPS_ACCM : Pool: /CISCOPRE/ACCMOINSA_HTTP, server: 192.168.202.223%10 ,port: 0Am I doing something wrong??
B.R.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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