Forum Discussion
DFeike_160744
Feb 24, 2015Nimbostratus
irule Troubleshooting:
Hi guys,
once i try to assign the following irule to a VS i receive this error message:
01070151:3: Rule [/Common/rule_errorpage_test] error: Unable to find pool (sorry_pool) referenced at line 21:...
nathe
Feb 25, 2015Cirrocumulus
try this:
when RULE_INIT {
set static::sorry_pool "/Common/pool_wwbtest_sorry"
set static::wartung_pool "/Common/pool_wwbtest_wartung"
}
when HTTP_REQUEST {
log local0. "Incoming URI = [HTTP::uri]"
if { [active_members [LB::server pool]] < 1 } {
if { [active_members $static::wartung_pool] > 0 } {
pool wartung_pool
set mypick [LB::select]
log local0. "The LB choice is: $mypick"
set newuri [string map {/wartung.html/ /} [HTTP::uri]]
log local0. "The new URI is = $newuri"
HTTP::uri $newuri
eval "GET [HTTP::uri $newuri] HTTP/1.1\r\nHost: $mypick\r\n\r\n"
log local0. "[HTTP::uri] [LB::server addr]"
} elseif { [active_members $static::sorry_pool] > 0 } {
pool sorry_pool
set mypick [LB::select]
log local0. "The LB choice is: $mypick"
set newuri [string map {/sorry.html/ /} [HTTP::uri]]
log local0. "The new URI is = $newuri"
HTTP::uri $newuri
eval "GET [HTTP::uri $newuri] HTTP/1.1\r\nHost: $mypick\r\n\r\n"
log local0. "[HTTP::uri] [LB::server addr]"
} else {
HTTP::respond 200 content "Lieber Kunde,\r\ndie Seite befindet sich aktuell in der Wartung.\r\n\r\nDear Customer,\r\nthis site is down for maintenance. We are sorry for the inconvience.\r\n" noserver connection close
}
}
}
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