Forum Discussion

Bryce_Halkerst1's avatar
Bryce_Halkerst1
Icon for Nimbostratus rankNimbostratus
Mar 25, 2013

Jsession cookie insert TCL error

All,

 

Notice that I am getting a ton of TCL error messages on the F5's. I seen in the past that this can cause resource issues. I see that the irule works, but just not sure of this TCL error.

 

Thanks,

 

Bryce

 

 

Error Message

 

TCL error: /Common/Cookie_JSESSIONID - Prerequisite operation not in progress (line 4) (line 4) invoked from within "persist add uie [string tolower [HTTP::cookie "JSESSIONID"]] 3600"

 

 

irule

 

when HTTP_REQUEST {

 

Check if there is a JSESSIONID cookie

 

if { [HTTP::cookie "JSESSIONID"] ne "" } {

 

Persist off of the cookie value with a timeout of 1 hour (3600 seconds)

 

persist uie [string tolower [HTTP::cookie "JSESSIONID"]] 3600

 

} else {

 

Parse the jsessionid from the path: ex: /path/to/file.ext;jsessionid=1234?param=value

 

set jsess [findstr [string tolower [HTTP::path]] "jsessionid=" 11]

 

Use the jsessionid from the path for persisting with a timeout of 1 hour (3600 seconds)

 

if { $jsess != "" } {

 

persist uie $jsess 3600

 

}

 

}

 

}

 

2 Replies

  • Hey Bryce. It's interesting that the line of code mentioned in the error "persist add uie [string tolower [HTTP::cookie "JSESSIONID"]] 3600" doesn't actually exist in your rule (the error includes the 'add' subcommand). Is this just a copy and paste error?

     

     

    Also, is there a reason you are lowering the JSESSIONID value?
  • I am experiencing the same error but I believe what Bryce missed is the HTTP_RESPONSE portion of the iRule. Here is mine:

      when HTTP_RESPONSE {
    
     Check if the JSESSIONID cookie is present in the response and has a non-null value
    if { [string map {\" ""} [HTTP::cookie "JSESSIONID"]] ne "" }{
    
       Persist on the JSESSIONID cookie value for X seconds
      persist add uie [HTTP::cookie "JSESSIONID"] 3600
      }
    }
    

    I have searched other posts and I do have a default pool assigned to the virtual server. Help is always appreciated.