Forum Discussion
iRule redirect causing Connection Reset
Hello.
We have a straightforward iRule that will produce a maintenance page if the iRule is added to the Virtual Server. This has worked fine for years - until we updated to 15.1.5.1 (from 15.1.5.0). Now, instead of the maintenance page, the browser produces a Connection Reset error. Here is the iRule:
when HTTP_REQUEST {
HTTP::respond 200 content \
"<html><head><title>Maintenance page</title></head><body></HEAD>\
<p><h2>This site is down for planned maintenance.<br><br>If you need further assistance, please contact the Service Desk.</h2></p></body></html>" "Content-Type" "text/html"
}
We believe the problem has something to do with the 'content' flag on the HTTP::respond. If we remove the content, we do not get a connection reset. But then we do not get the maintenance page either, so that's no good.
Does anyone have any idea why we'd suddenly be getting Connection Reset errors in the browser?
Thank you!
- djtmsNimbostratus
I use full this Template and it work great (with the rule allowing access from VPN)
when HTTP_REQUEST { if { not ( ([IP::addr [IP::client_addr] equals 192.168.1.10]) or ([IP::addr [IP::client_addr] equals 172.10.10.100])) } { HTTP::respond 500 content { <!DOCTYPE html> <html> <head> <title>Error Page</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <!-- Libs CSS --> <link type="text/css" media="all" href="//cdn.domain.com/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <!-- Template CSS --> <link type="text/css" media="all" href="//cdn.domain.com/assets/css/style.css" rel="stylesheet"> <!-- Responsive CSS --> <!-- Favicons --> <!-- Google Fonts --> <link href="https://fonts.googleapis.com/css?family=Open+Sans&subset=latin-ext,latin" rel="stylesheet" type="text/css"> </head> <body> <div class="container"> <div class="col-xs-12 col-sm-7 col-lg-7"> <!-- Info --> <div class="info"> <h2>INFO</h2> <p>INFO2 <br />THANKS<br /><br /> Company.<br /> </p> </div> <!-- end Info --> </div> <div class="col-xs-12 col-sm-5 col-lg-5 text-center"> <!-- Img_gif --> <div class="img_gif"> <img src="//url.com/assets/img/500.gif" alt="500"> </div> <!-- end Img gif --> </div> </div> <!-- end container --> </body> </html> } Cache-Control No-Cache Pragma No-Cache } }
- BrandenLNimbostratus
Thank you for the response.
Unfortunately, we're experiencing this error any time we use the HTTP::respond method.
- AlexandreAltocumulus
You should try add code to prevent previous exiting
if { [HTTP::has_responded] } { return };
- BrandenLNimbostratus
Alexandre,
Thank you for the response. Unfortunately, we had tried that earlier and it did not fix the problem.
the one from Alexandre could very well be it, else do you see something in the /var/log/ltm about it?
that is weird, next step would be more in depth trouble shooting and that is difficult via a site like this. if you have a support contract i would certainly reach out to F5 support, they can look with you at the system.
else you could have a go at enable reset cause and see if a hint pops up there.
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