Forum Discussion

Spence_Fasching's avatar
Spence_Fasching
Icon for Nimbostratus rankNimbostratus
Nov 25, 2009

JBOSS application persistence

I working on getting JBOSS app persistence working. I am pretty close to getting it working - but for some reason, my persist command is not actually setting a persistence record. Here is the code:

 

 

when CLIENT_ACCEPTED {

 

TCP::collect

 

}

 

 

when CLIENT_DATA {

 

set jsessionidc [findstr [TCP::payload] "JSESSIONID=" 11 29]

 

if {$jsessionidc != ""} {

 

persist uie $jsessionidc 180

 

}

 

TCP::release

 

TCP::collect

 

}

 

 

As far as I know I am doing this all correctly - any idea on what I am doing wrong?

 

(I stripped my logging lines from this for ease of viewing - but I have confirmed that the JESSIONID is being found and the variable is being set.

6 Replies

  • Did you make sure you applied the Universal Persistence profile?

     

     

    Bhattman
  • I don't think you actually need to add a UIE profile in order to use UIE persistence in an iRule. But it wouldn't hurt anything to do so.

    Can you add logging back to the rule and post anonymized copies of the log output and the 'b persist all show all' output? You can also log the selected pool member in LB_SELECTED/LB_FAILED:

     
     when CLIENT_ACCEPTED { 
      
        log local0. "[IP::client_addr]:[TCP::client_port]: New TCP connection to [IP::local_addr]:[TCP::local_port]" 
        TCP::collect 
     } 
      
     when CLIENT_DATA { 
        set jsessionidc [findstr [TCP::payload] "JSESSIONID=" 11 29] 
        log local0. "[IP::client_addr]:[TCP::client_port]: Parsed \$jsessionidc: $jsessionidc. Lookup: [persist lookup uie $jsessionidc]" 
        if {$jsessionidc != ""} { 
           persist uie $jsessionidc 180 
        } 
        log local0. "[IP::client_addr]:[TCP::client_port]: releasing and collecting" 
        TCP::release 
        TCP::collect 
     } 
     when LB_SELECTED { 
        log local0. "[IP::client_addr]:[TCP::client_port]: pool info: [LB::server]" 
     } 
     when LB_FAILED { 
        log local0. "[IP::client_addr]:[TCP::client_port]: pool info: [LB::server]" 
     } 
     

    Aaron
  • I don't currently have access to the environment - the customer had to do some load testing and went back to mod_jk while they did that (even with the limitations they know exist in that environment).

     

     

    To summarize though - no persistence records were added to the persistence table - I checked this multiple ways - with the iRule and logging a lookup for the record and watching the persistence table itself via bigpipe. I was logging pool member selection, etc - and did confirm that it was "hopping" pool members and not sticking to a single pool member.

     

     

    I am wondering if I should perhaps open a case at this point . . .
  • So you saw a jsessionid being parsed on each CLIENT_DATA event, but never saw a persistence record added? Did you see any TCL errors in /var/log/ltm?

     

     

    I think a case would be a good idea, but F5 will want to see a tech.out from the unit and logs from /var/log.

     

     

    Aaron
  • Saw jessionid being parsed (and logged when I had logging turned on)

     

    Never saw a persistence record being created

     

    No TCL errors