Forum Discussion
Chris_G_Davis_1
Nimbostratus
Dec 18, 2008JSESSIONID Persistence
I'm trying to persist off a JSESSIONID cookie generated by the WebLogic Application Server however the follow iRule isn't working.
-------------
when HTTP_REQUEST { ...
Chris_G_Davis_1
Nimbostratus
Jan 30, 2009Hopefully it not to late to revisit this,
Here is the rule that in place now.
------------------
when HTTP_REQUEST {
Log details for the request
log local0. "[IP::client_addr]:[TCP::client_port]: Request to [HTTP::uri] with cookie: [HTTP::cookie value JSESSIONID]"
Check if there is a jsessionid cookie
if { [HTTP::cookie exists "JSESSIONID"] } {
Persist off of the cookie value
persist uie [HTTP::cookie "JSESSIONID"]
Log that we're using the cookie value for persistence and the persistence key if it exists.
log local0. "[IP::client_addr]:[TCP::client_port]: Used persistence record from cookie: [persist lookup uie [HTTP::cookie JSESSIONID"]]"
} else {
Parse the jsessionid from the path (URI minus the query string)
set jsess [findstr [HTTP::path] "JSESSIONID" 11]
Use the jsessionid from the path for persisting
if { $jsess != "" } {
persist uie $jsess
Log that we're using the path jessionid for persistence and the persistence key if it exists.
log local0. "[IP::client_addr]:[TCP::client_port]: Used persistence record from path: [persist lookup uie $jsess]"
}
}
}
when HTTP_RESPONSE {
Check if there is a jsessionid cookie in the response
if { [HTTP::cookie exists "JSESSIONID"] } {
Persist off of the cookie value
persist add uie [HTTP::cookie "JSESSIONID"]
log local0. "[IP::client_addr]:[TCP::client_port]: Added persistence record from cookie: [persist lookup uie [HTTP::cookie "JSESSIONID"]]"
}
}
But I'm receiving errors, Any thoughs
------------------
Jan 30 16:52:02 tmm tmm[1616]: Rule cce-jsession-persist : 57.250.242.249:49297: Request to /cce-presentation-kiosk-tg/entryUpdate.do with cookie: fn2XJC1TL2sgBsz3XWnbrDMp49Dwd0nyhdQnSgn16hHqyDPJ0Lyk!779042597
Jan 30 16:52:02 tmm tmm[1616]: 01220001:3: TCL error: cce-jsession-persist - Prerequisite operation not in progress (line 1) invoked from within "persist lookup uie [HTTP::cookie "JSESSIONID"] "
Jan 30 16:53:49 tmm tmm[1616]: Rule cce-jsession-persist : 57.250.242.249:53325: Request to /cce-presentation-kiosk-tg/entryUpdate.do with cookie: fn2XJC1TL2sgBsz3XWnbrDMp49Dwd0nyhdQnSgn16hHqyDPJ0Lyk!779042597
Jan 30 16:53:49 tmm tmm[1616]: 01220001:3: TCL error: cce-jsession-persist - Prerequisite operation not in progress (line 8) invoked from within "persist lookup uie [HTTP::cookie "JSESSIONID"] "
------------
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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