Simon_Knox_1115
Jul 08, 2005Nimbostratus
HELP! hanging iRule
Hi,
I've recently converted from 4.5 to 9.05 and converted my iRules, using OTCU then tweaking so they are correct (at least what I though was correct).
When connecting to a web site, the rule basically connects you to a different pool depending on the port that the client web browser uses.
My old rule (below) worked:
if (server_port == 80) {
use pool wwwDEFAULT
}
else if (server_port == 8001) {
use pool node-10.128.32.1
}
else if (server_port == 8099) {
use pool node-10.128.32.2
}
else if (server_port == 8003) {
use pool node-10.128.32.3
}
else if (server_port == 8004) {
use pool node-10.128.32.4
}
else if (server_port == 8005) {
use pool node-10.128.32.5
}
else if (server_port == 8006) {
use pool node-10.128.32.6
}
else if (server_port == 8007) {
use pool node-10.128.32.7
}
else if (server_port == 8008) {
use pool node-10.128.32.8
}
else if (not (server_port == 80 or not (server_port == 8001 or
not (server_port == 8099 or not (server_port == 8003 or
not (server_port == 8004 or not (server_port == 8005 or
not (server_port == 8006 or not (server_port == 8007 or
not (server_port == 8008)))))))))) {
redirect to "http://www.vetsite.net"
}
else {
discard
}
The converted one doesn't seem to
when HTTP_REQUEST {
if { [TCP::client_port] == "80" } {
persist source_addr 1800
HTTP::fallback http://support.blackwellpublishing.com
pool wwwDEFAULT
}
elseif { [TCP::client_port] == "8001" } {
pool node-10.128.32.1
}
elseif { [TCP::client_port] == "8099" } {
pool node-10.128.32.2
}
elseif { [TCP::client_port] == "8003" } {
pool node-10.128.32.3
}
elseif { [TCP::client_port] == "8004" } {
pool node-10.128.32.4
}
elseif { [TCP::client_port] == "8005" } {
pool node-10.128.32.5
}
elseif { [TCP::client_port] == "8006" } {
pool node-10.128.32.6
}
elseif { [TCP::client_port] == "8007" } {
pool node-10.128.32.7
}
elseif { [TCP::client_port] == "8008" } {
pool node-10.128.32.8
}
elseif { not [TCP::client_port] == "80" or not [TCP::client_port] == "8001" or
not [TCP::client_port] == "8099" or not [TCP::client_port] == "8003" or
not [TCP::client_port] == "8004" or not [TCP::client_port] == "8005" or
not [TCP::client_port] == "8006" or not [TCP::client_port] == "8007" or
not [TCP::client_port] == "8008" } {
HTTP::redirect "http://www.vetsite.net"
}
else {
discard
}
}
When the web browser trys to connect to the web site that it is trying to view (on HTTP port 80) it says 'website found waiting for reply' and seems to spend an eternity waiting before timing out.
If I dump the rule and make the virtual server use pool wwwDEFAULT directly all is fine.
I can't see any problems that would cause this, am I going mad?
Cheers