Forum Discussion
Pankaj_70057
Jan 14, 2013Nimbostratus
LTM Maintenance Page - error
Here is the irule, require to just setup any http request get the maintenance massage:
when HTTP_REQUEST {
HTTP::respond 403 content {
This website is currently under scheduled maintenance until 8AM CST on 1/19/2013.
}
}
- nitassEmployeeHTTP::respond 403 content have you tried 200 instead of 403?
- Pankaj_70057Nimbostratusyes same result getting blank page.
- nitassEmployee
sorry it is duplicated.
- nitassEmployeethe irule looks okay to me.
[root@ve10:Active] config b virtual bar80 list virtual bar80 { destination 172.28.19.252:80 ip protocol 6 rules myrule profiles { http {} tcp {} } } [root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { HTTP::respond 200 content {This website is currently under scheduled maintenance until 8AM CST on 1/19/2013!} } } [root@ve10:Active] config curl -i http://172.28.19.252 HTTP/1.0 200 OK Server: BigIP Connection: Keep-Alive Content-Length: 81 This website is currently under scheduled maintenance until 8AM CST on 1/19/2013! [root@ve10:Active] config
- Pankaj_70057NimbostratusI notice one more this iRule is working if i remove the http to https redirect iRule. we have below HTTP to HTTPS redirect iRule on all vertual servers.
- nitassEmployeei am not sure why this iRule create issue to maintenance massage iRule. have you checked /var/log/ltm? i understand you would get "Multiple redirect/respond invocations not allowed" error message.
[root@ve10:Active] config b virtual bar80 list virtual bar80 { destination 172.28.19.252:80 ip protocol 6 rules { myrule myredirect } profiles { http {} tcp {} } } [root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST priority 100 { log local0. "-" HTTP::respond 200 content {This website is currently under scheduled maintenance until 8AM CST on 1/19/2013!} } } [root@ve10:Active] config b rule myredirect list rule myredirect { when HTTP_REQUEST priority 200 { log local0. "-" HTTP::redirect "https://[getfield [HTTP::host] : 1][HTTP::uri]" } } [root@ve10:Active] config tail -f /var/log/ltm Jan 15 15:04:11 local/tmm info tmm[4884]: Rule myrule : - Jan 15 15:04:11 local/tmm info tmm[4884]: Rule myredirect : - Jan 15 15:04:11 local/tmm err tmm[4884]: 01220001:3: TCL error: myredirect - Operation not supported. Multiple redirect/respond invocations not allowed (line 1) invoked from within "HTTP::redirect "https://[getfield [HTTP::host] : 1][HTTP::uri]"" after adding event disable command to irule, there is no error anymore. event Wiki https://devcentral.f5.com/wiki/iRules.event.ashx [root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST priority 100 { log local0. "-" HTTP::respond 200 content {This website is currently under scheduled maintenance until 8AM CST on 1/19/2013!} event HTTP_REQUEST disable } } [root@ve10:Active] config tail -f /var/log/ltm Jan 15 15:05:35 local/tmm info tmm[4884]: Rule myrule : -
- Pankaj_70057Nimbostratuswhat is the solution for the "Multiple redirect/respond invocations not allowed" error message?
- Pankaj_70057Nimbostratusi have add the event HTTP_REQUEST disable but still getting same error , do you think i have to add this command in http to https iRule also.
- Pankaj_70057Nimbostratusi am geeting below error
- nitassEmployeecan you post both your irules?
Recent Discussions
Related Content
Â
DevCentral Quicklinks
* 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
Discover DevCentral Connects