Forum Discussion
Russell_E_Glaue
Nimbostratus
Feb 16, 2009no such pool Failed Tcl_pool_GetFromObj
I am receiving this error message, and cannot determine why it is occurring. I cannot even use TCL 'catch' to catch the error.
Feb 16 13:22:48 tmm tmm[1568]: 01220001:3: TCL error: dist...
hoolio
Cirrostratus
Feb 16, 2009Hi RG,
When you use catch, the command is actually executed. If the execution returns an error then catch handles the error and returns 1. Else if there isn't an error, catch returns 0. You're executing the pool command after the catch statement regardless of whether there was an error caught or not. So I expect that pool command to generate a TCL error if the pool doesn't exist.
Also, the host header isn't case sensitive so it would be a good idea to set it to lowercase. And finally, selecting the pool based on the Host header (or any other client-supplied information) would potentially open a security hole which would allow a client to access any pool configured on the BIG-IP.
when HTTP_REQUEST {
discover the server pool
set http_host_pool [string tolower [HTTP::host]]_pool
if { $http_host_pool equals "_pool" } {
log local0.err "The HTTP Host, [HTTP::host], is not defined."
}
if { [findstr $http_host_pool "www." 0 "4"] eq "www." } {
set http_host_pool [substr $http_host_pool 4 end]
}
Try to use the pool. If it doesn't exist, log an error.
if { [catch [pool $http_host_pool] result] }{
log local0.err "pool $http_host_pool does not exist, Request: [HTTP::host][HTTP::uri], Result: $result"
} else {
log local0.err "pool $http_host_pool does exist, Request: [HTTP::host][HTTP::uri], Result: $result"
}
}
Aaron
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
