Forum Discussion
Spence_Fasching
Nimbostratus
Nov 25, 2009JBOSS 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.
- The_Bhattman
Nimbostratus
Did you make sure you applied the Universal Persistence profile? - Spence_Fasching
Nimbostratus
Yup - that is applied . . . and the iRule is applied to the profile. - hoolio
Cirrostratus
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.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]" }
- Spence_Fasching
Nimbostratus
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). - hoolio
Cirrostratus
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? - Spence_Fasching
Nimbostratus
Saw jessionid being parsed (and logged when I had logging turned on)
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