Forum Discussion
operation not supported irule error
Hello Community,
I have this issue when having a 301 redirect, I get this error below:
TCL error: /Common/portal_url_erp_masking_v4_TRX_PROD - Operation not supported. Multiple redirect/respond invocations not allowed (line 292) invoked from within "HTTP::respond 301 Location "http://$host/erp/""
One, should I be worried about this error and two, how do I get rid of it?
Current IRules that causes this error:
.......
elseif { ([string tolower $uri] starts_with "/portal/system") or ([string tolower $uri] starts_with "/portal/console") or
([string tolower $uri] equals "/") } {
redirect to erp homepage user is trying to get to the admin console
HTTP::respond 301 Location "http://$host/erp/"
return
}
...
Thanks in advance.
TRX
- What_Lies_Bene1Cirrostratus
Looks like you have a very long iRule in place (and possibly other rules assigned to the VS?). I'd suggest you check for any earlier (or later) redirect or respond commands that might match a particular connection more than once. Rather than use 'return' check the logic and flow of the rule to ensure there will only be one match (with no return commands used).
Happy to help if you are prepared to post the entire rule (suitably redacted).
- nitassEmployeeit seems okay to me. by the way, you may consider replacing some switch and if with class command and data group.
- Kevin_StewartEmployeeIt's an anomalous behavior, but you cannot have multiple redirect/respond invocations in a single event. There may be multiple conditions that are proving true. I would suggest two solutions:
Thanks I will give it a try and see if the errors go away. I''ll keep you guys posted.
Just checking in on this. Any thoughts community?
Thanks!
- Kevin_StewartEmployee
The idea for option 2 was to set a variable and then act on it once. So for example:
when HTTP_REQUEST { if { some condition } { set redir "/foo" } elseif { some other condition } { set redir "/bar" } ... if { [info exists redir] } { HTTP::respond 301 $redir } }
Thanks. I'm have to revisit this later and let you know my results.
Question.. if I have multiple Irules and use the "return" at the end of each http request event will that cause problems? Should I even be using the "return" key?
Thnaks.
- nitassEmployee
if I have multiple Irules and use the "return" at the end of each http request event will that cause problems?
return will exit from current executing event. other event is still triggered.
return
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