Forum Discussion
Tcl error thrown from multi vip used irule
How can i tell if an irule is used on multiple vips throws a tcl error which vip it errored from?
Thanks
- Yozzer
Nimbostratus
Im assuming this isnt possible?
- Snl
Cirrostratus
what TCL error you are getting
- Yozzer
Nimbostratus
Its “Operation not supported (line 1) invoked from within "HTTP::header insert” which we know how to resolve. But we just want to isolate the vips its having issues on.
- CoolPolishGuy
Nimbostratus
Hello,
The way i do it is, since you know where the error is coming from, you can put and try and catch to take the error out. And then you can print the name of the VS inside the catch which will automatically give the name of the vs that has the problem
I hope it helps you narrow your problemlog local0. "Current virtual server name: [virtual name]"
- Snl
Cirrostratus
try this as well
local0. "client ip address is [IP::client_addr];URL request is [HTTP::host] [HTTP::uri];HTTP method is [HTTP::method];HTTP Accetp-coding header is [HTTP::header Accept-Encoding]"
- Yozzer
Nimbostratus
Thanks, Is there a way to add text to the TCL error when it needs to be called? If i add a log entry to the irule i would get hundreds or logs that the irule was run but no link between the tcl error and vip. The error is caused by too many redirect commands in other irules:
TCL error: /Common/CXframe-injection - Operation not supported (line 3) invoked from within "HTTP::header insert "X-FRAME-OPTIONS" "SAMEORIGIN""
So i want to identify which irule on a vip is erroring as the same irule is used on multiple vips.
- Yozzer
Nimbostratus
I have sorted this so thanks all for your help.
- Stanislas_Piro2
Cumulonimbus
Hi,
In the HTTP_REQUEST event, put your code inside this :
when HTTP_REQUEST { if {[ catch { Your code here }]} { Log local0. "This code raised an error on virtual server [virtual name]" } }
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