cancel
Showing results for 
Search instead for 
Did you mean: 

F5 Maintenance Page iRule produces ERR_CONNECTION_RESET in browser

RomaineShultz
Nimbostratus
Nimbostratus

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.  Dinar Detectives Update

This seems like a straightforward iRule. Are We missing something here? Thank you in advance.

2 REPLIES 2

AlexBCT
MVP
MVP

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. 

P_Kueppers
Cirrus
Cirrus

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>
}