Forum Discussion
Pankaj_70057
Nimbostratus
Jan 14, 2013LTM 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.
}
}
12 Replies
- nitass
Employee
HTTP::respond 403 content have you tried 200 instead of 403? - Pankaj_70057
Nimbostratus
yes same result getting blank page.
I also trien below irule very simple to set the massage and same result.
iRule:
when HTTP_REQUEST {
HTTP::respond 200 content {This website is currently under scheduled maintenance until 8AM CST on 1/19/2013!}
}
I am new to iRules so any help on this is really appreciated.
Thanks
Pankaj - nitass
Employee
sorry it is duplicated.
- nitass
Employee
the 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
have you run tcpdump to see what is going on?
tcpdump -nni 0.0:nnn -s0 -w /var/tmp/output.pcap host x.x.x.x and host y.y.y.y
x.x.x.x is client ip address
y.y.y.y is virtual server ip address - Pankaj_70057
Nimbostratus
I 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.
i am not sure why this iRule create issue to maintenance massage iRule.
when HTTP_REQUEST {
HTTP::redirect "https://[getfield [HTTP::host] : 1][HTTP::uri]"
} - nitass
Employee
i 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_70057
Nimbostratus
what is the solution for the "Multiple redirect/respond invocations not allowed" error message? - Pankaj_70057
Nimbostratus
i 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_70057
Nimbostratus
i am geeting below error
Jan 15 11:02:22 tmm1 tmm1[1901]: 01220001:3: TCL error: test_HTTP_to_HTTPS - Operation not supported. Multiple redirect/respond invocations not allowed (line 1) invoked from within "HTTP::redirect "https://[getfield [HTTP::host] : 1][HTTP::uri]"" - nitass
Employee
can you post both your irules?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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