Forum Discussion
Maintenance page irule was not working properly
Hi Gersbah ,
We have updated all the Maintenance related files in single folder after that Maintenance page displaying.
But when we first time accessing https://axisconnect-uat2.axiscapital.com/agencyportal/DisplayHomePage it is displaying maintenance page same when we are refreshing that page in browser it is displaying the 404 error page .
Can you please help me on this
- gersbahNov 08, 2019Cirrostratus
I don't have a test setup where I can easily reproduce this right now, but my guess would be that it may have to do with the event you are using (LB_FAILED). After your LB::reselect this may not trigger anymore, because now you are landing on a working pool again.
You already have a check for active pool members < 1, so you can use the HTTP_REQUEST event instead. It's a bit less efficient, because it triggers all the time, not just in case of an ongoing maintenance. But I've never noticed any performance impact.
I always do some variation of the following:
when HTTP_REQUEST { # Check if pool is unavailable if { [ active_members prod_pool ] < 1 } { # Don't do rewriting for resources of the maintenance page if { not ( [HTTP::uri] starts_with "/maintenance/" ) }{ # Rewrite everything else to maintenance page HTTP::uri "/maintenance/" } # Rewrite Host Header, set different Pool HTTP::header replace Host "maintenance.server" pool maintenance_pool } }
But as I said, I don't know if the event is actually what's causing your issue or if it's related to something else in your iRule or your maintenance page or your network environment.
Try adding some logging (log local0. "your text here") to your iRule in different places, to see what happens when you refresh the page. Does the event still trigger? Do your conditions still match? What's the value of [HTTP::uri] during the various steps of the process? This may be a bit of data to parse, but you should be able to figure out what happens.
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