我们有一个F5 LTM,它使用一个简单的iRule来建立一个维护页面。多年来,它一直运行良好--直到我们从15.1.5.1 (从15.1.5.0)更新到BigIP为止。现在,当我们实现iRule时,浏览器通常会产生一个ERR_CONNECTION_RESET错误。所谓“通常”,我的意思是,如果我们一遍又一遍地刷新,它偶尔会起作用。
iRule很简单:
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"
}我做了一些研究,并找到了一些建议来尝试,但它们没有帮助。我相信它是特定于HTTP::方法的东西。
这似乎是一个简单的iRule。我们是不是漏掉了什么?
提前谢谢你。
发布于 2022-09-27 14:26:32
我想你现在已经搞清楚了,但问题是字符串中间的引号。
它失败了,因为iRule只应用于新连接。现代浏览器试图重用连接,而命令行客户机(如curl )则为每个请求创建一个新的连接。下次尝试curl测试您的iRules,您将看到一个更一致的行为。
Ps。考虑到这一点,您可能需要尝试以下方法:
使用上面建议的示例维护iRule:
when HTTP_REQUEST {
HTTP::respond 503 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" "Retry-After" "3600" "Connection" "Close"
}https://stackoverflow.com/questions/72562205
复制相似问题