Forum Discussion
Alex_Pozzan_325
Nimbostratus
Feb 27, 200901220001:3: TCL error: wrong # args: should bewhile executing
Hi,
I have the following iRule attached:
It's the same iRule used to jsessionid. We only change the id to LBSICAPRENDE. The application is running but sometimes LTM reports the following error:
Feb 27 14:06:53 tmm tmm[1721]: 01220001:3: TCL error: ir-persist-sicrediaprende - wrong args: should be "persist add uie | { [any [virtual|service|pool] | pool ]}" while executing "persist add uie [HTTP::cookie "LBSICAPRENDE"]"
Does anybody have any idea that is supposing to be the problem?
- hoolio
Cirrostratus
I would guess the app is setting the LBSICAPRENDE cookie with no value. You could add logging to see what the value of the cookie is before using it. Or you could use catch to handle the error and log debug information if there is an error:if {[catch {persist add uie [HTTP::cookie "LBSICAPRENDE"]} result]}{ Error adding persistence record log local0. "[IP::client_addr]:[TCP::client_port]:\ Error on response from [IP::server_addr] with cookie [HTTP::cookie LBSICAPRENDE]. \$result: $result." }
- Alex_Pozzan_325
Nimbostratus
when HTTP_RESPONSE { - Alex_Pozzan_325
Nimbostratus
Hi Aaron, - hoolio
Cirrostratus
The catch command runs the command inside it. So you don't need to run it again. Can you try this?when HTTP_RESPONSE { if { [HTTP::cookie exists "LBSICAPRENDE"] } { if {[catch {persist add uie [HTTP::cookie "LBSICAPRENDE"]} result]}{ log local0. "[IP::client_addr]:[TCP::client_port]:\ Error on response from [IP::server_addr] with cookie [HTTP::cookie LBSICAPRENDE]. \$result: $result." } } }
- Alex_Pozzan_325
Nimbostratus
You're right. The problem happens because the cookie is empty. I had the following result: - hoolio
Cirrostratus
If two clients connect to the virtual server through the same proxy server (like two clients on the same corporate network or the same ISP), they could make HTTP requests over the same TCP connection. So it's not a good idea to assume that there is a one to one relationship between TCP connections and HTTP sessions.when HTTP_REQUEST { if { [string length [HTTP::cookie "LBSICAPRENDE"]] > 0 } { persist uie [HTTP::cookie "LBSICAPRENDE"] } else { set lbsicap [findstr [HTTP::uri] "LBSICAPRENDE" 11 ";"] if { $lbsicap != "" } { persist uie $lbsicap } } } when HTTP_RESPONSE { if { [string length [HTTP::cookie "LBSICAPRENDE"]] > 0} { persist add uie [HTTP::cookie "LBSICAPRENDE"] } }
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