Forum Discussion
pjcampbell_7243
Cirrus
Aug 26, 2009404 error using image pool iRule
We are intermittently getting an "404" error instead of a blank box or box with an X on it on our pages when using the following iRule
when HTTP_REQUEST {
if { [HTTP::path] ends_with ".jpg" }{
pool images.xyz.com
}
That is to say we will be surfing on some .jsp page, and a missing image will cause the user to be stopped dead on a 404 error, rather than the image simply not showing up within the .jsp page.
Any thoughts as to why this would happen?
- hoolio
Cirrostratus
I'd guess the issue is that a request that should go to the default pool on the VIP is going to the image pool. You could explicitly add a default case to the iRule or add a OneConnect profile to the virtual server to prevent this.when CLIENT_ACCEPTED { Save default pool name set default_pool [LB::server pool] } when HTTP_REQUEST { if { [HTTP::path] ends_with ".jpg" }{ pool images.xyz.com } else { pool $default_pool } }
- The_Bhattman
Nimbostratus
Well the usual case is that that the request is going to a server in the pool that doesn't contain the image. - Thanks for the suggestions. I tried adding the default pool to the iRule, and we are still getting stray non .jpg files getting passed over to the image pool. We have OneConnect on the http virtual server, but not on the https virtual server. I can't really confirm if the stray requests are coming from the http or https virtual (SSL offloaded to the BIG-IP). Should I try enabling oneconnect on the https virtual server?
- hoolio
Cirrostratus
Can you add some debug to the iRule and try to reproduce the issue?when CLIENT_ACCEPTED { Save default pool name set default_pool [LB::server pool] } when HTTP_REQUEST { log local0. "[IP::client_addr]:[TCP::client_port]: New HTTP request to [HTTP::host][HTTP::uri]" if { [HTTP::path] ends_with ".jpg" }{ log local0. "[IP::client_addr]:[TCP::client_port]: Matched jpg check, using images.xyz.com pool" pool images.xyz.com } else { log local0. "[IP::client_addr]:[TCP::client_port]: Using default pool" pool $default_pool } } when LB_SELECTED { log local0. "[IP::client_addr]:[TCP::client_port]: Pool info: [LB::server]" } when SERVER_CONNECTED { log local0. "[IP::client_addr]:[TCP::client_port]: Connection info: [IP::server_addr]:[TCP::server_port]" }
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