Forum Discussion
Irule for jsession ID weblogic support
hi all, i am very new to this irules, hence i need you help on the below query.
We have deployed application in two manager servers respectively (Server A and Server B running weblogic)
irule used for Jsession persistance is
when HTTP_REQUEST { set log_prefix "[IP::client_addr]:[TCP::client_port]" log local0. "$log_prefix: Request to [HTTP::uri] with cookie: [HTTP::cookie value JSESSIONID]"
if { [HTTP::cookie "JSESSIONID"] ne "" }{ persist uie [string tolower [HTTP::cookie "JSESSIONID"]] 360
log local0. "$log_prefix: Used persistence record from cookie. Existing key? [persist lookup uie [string tolower [HTTP::cookie "JSESSIONID"]]]"
} else { set jsess [findstr [string tolower [HTTP::path]] "jsessionid=" 11]
if { $jsess != "" } {
persist uie $jsess 360
log local0. "$log_prefix: Used persistence record from path: [persist lookup uie $jsess]"
}
} } when HTTP_RESPONSE { if { [HTTP::cookie "JSESSIONID"] ne "" }{ persist add uie [string tolower [HTTP::cookie "JSESSIONID"]] 360
log local0. "$log_prefix: Added persistence record from cookie: [persist lookup uie [string tolower [HTTP::cookie "JSESSIONID"]]]"
} }
- If Server A is Up and Server B is down then we are processing 2000 transactions in 5 minutes.
- If Server B is Up and Server A is down then we are processing 2000 transactions in 5 minutes.
- If both Server A and Server B servers are Up then we are processing only 100 transactions in 5 minutes and more than 65 transactions getting time out.
We need to understand why this successful transactions is low when both servers are up and troubleshooting commands to analysis this.
20 Replies
- Kevin_Stewart
Employee
An early assumption might be that persistence is failing. A single live server wouldn't have persistence issues (all traffic goes to it by default), but multiple live servers suggests that the transactions might be flipping between the servers causing an application error.
If these are browser sessions, the easier and more reliable approach may be to switch to standard cookie persistence.
If these are not browser sessions, then you'll need to revisit how the iRule interacts with the client and server. For example:
-
The HTTP_RESPONSE event resets the uie persistence value every time it sees a JSESSIONID Set-Cookie header from the server. Validate that the server isn't sending multiple JSESSIONID cookies with different values.
-
The HTTP_REQUEST event has a log entry that displays the results of a uie lookup. For any given client does this value change?
-
- Ecesureshkumar
Nimbostratus
hi Kevin,
Thanks for prompted reply. Its not a browser session, i need your help on some basic documentation and fine tuning of irule tips is much appreciated.
How to analyze this tcp flow?
- Torti
Cirrus
Did you activate any "Match Across" option? Which firmware version you are running?
- Ecesureshkumar
Nimbostratus
firmware version is 11.2.0 build 2451.0 and match across option is not enabled. You want to enable it....
- Torti
Cirrus
no, there is a bug inside, if you activate any "Match Across" option, descripted at solution 14061
- Torti
Cirrus
http://support.f5.com/kb/en-us/solutions/public/14000/000/sol14061.html
- Torti_93733
Nimbostratus
no, there is a bug inside, if you activate any "Match Across" option, descripted at solution 14061
- Torti_93733
Nimbostratus
http://support.f5.com/kb/en-us/solutions/public/14000/000/sol14061.html
- Kevin_Stewart
Employee
Thanks for prompted reply. Its not a browser session, i need your help on some basic documentation and fine tuning of irule tips is much appreciated. How to analyze this tcp flow?
There's at least two things you should do to start troubleshooting this application:
-
The HTTP_REQUEST event contains a log statement that displays the contents of the uie session table entry for that session. Watch the logs and see if that value changes through the life of the session for a given user.
-
You'll also want to do a client side capture and watch the HTTP traffic from the client's perspective. What you're looking for are any Set-Cookie JSESSIONID headers coming from the server with different values.
The persistence in this configuration appears to be solely driven by this JSESSIONID cookie. If the server is sending a new, different one randomly (rare but I have seen this before) then that will throw off your persistence. We need to first validate why and how persistence is failing before working on how to fix it.
-
- Ecesureshkumar
Nimbostratus
hi there, I have analyzed the logs and found when client request, server will respond with response containing payment id. And the same payment id is existing still end of that session.
So can any one help in creating a irule for TCP Payload contains = Payment ID
- Kevin_Stewart
Employee
When does the server respond with the PaymentID? Is it in the FIRST response? For universal persistence to mean anything, the server must send a token value in the first response (after a load balancing decision has been made). The client must then relay that value on every request.
- Ecesureshkumar
Nimbostratus
yes on the First Response it will generate payment ID. any luck ...?
- Ecesureshkumar
Nimbostratus
payment ID will be unique for this session further.
Recent Discussions
Related Content
* 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