Forum Discussion
F5 Maintenance Page iRule produces ERR_CONNECTION_RESET in browser
We have an F5 LTM that uses a simple iRule that puts up a maintenance page. It has worked fine for years - until we updated from to BigIP 15.1.5.1 (from 15.1.5.0). Now when we implement the iRule, the browser usually produces an ERR_CONNECTION_RESET error. By "usually" I mean if we refresh over and over, it will occasionally work. The iRule is simple:
when HTTP_REQUEST { HTTP::respond 200 content \ "<HTML><head><title>Maintenance Page</title></head><body> <p>This site is down for planned maintenance. <br>If you need further assistance, please contact the Service Desk."</p> </body> </html>" "Content-Type" "text/html" }
I did some research and found a couple of suggestions to try, but they have not helped. I believe it's something specific to the HTTP::respond content method.
This seems like a straightforward iRule. Are We missing something here? Thank you in advance.
Edited by Leslie_Hubertus to remove SEO spam. Banning the user but leaving the post up because of the helpful answers below.
- AlexBCTCumulonimbus
Hi Romaine,
It seems that there is an uneven number of " in the iRule? (or is that due to copy/paste?) There is an extra " behind ...Service Desk." which may be causing issues?
If you are using quotes within the HTML response page, you may want to switch to using { and } for the start and finish of the HTTP::respond, this should avoid the confusion between the " entries.
Hope this helps.
Same question was here from another user which got deleted. So here my answer again:
You got a syntax error: Instead of using " "after the HTTP::respond Command for html code you should use { } This is also explained in the iRule documentation if you mouseover at "http::respond" in the irule editor.
HTTP::respond 503 content { <html> PUT UR CODE HERE </html> }
- enthuguyNimbostratus
Hi,
How can we automate this F5 Maintenance Page configuration during a planned outage pls?
thanks
- AlexBCTCumulonimbus
Do you mean how the maintenance page can be automatically triggered during an outage, or how to deploy the configuration for the maintenance page automatically?
In the first case, you could for example do it using the Fallback Host option in an HTTP profile, which then redirects to a virtual server with something like the above iRule attached to it. In the second case, you are able to do it using iControl.
If you tell me which one you are looking for, happy to give you some further information.
- enthuguyNimbostratus
Thanks Alex!
If you could guide me in both the scenarios, that would be a great help
Please note, I'm new to F5 but since I'm part of automation team would like to assist my team to automate these manual steps we follow right now.
Current process that we follow:
- Just before outage
- From F5 Console, Identify the current iRule configured, make a note
- We update the iRule with outage page related rule.
- Once implementation is over
- Update iRule back with Step2 rules.
Intended automation
- Automation script should get the LB name as an argument
- Perform above current process steps 2 and 3
- Once implementation is over
- Will rollback the change
Thanks in advance
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