Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are running a WebLogic 10.3.4 cluster with three managed servers (nodes). We do not use session stickyness, but session replication across the cluster and everything is working fine. When trying to test our web application however, we regularly try to figure out on which node the user currently is (in order to find the correct log files).

The JSESSIONID cookie has the format:

sessionid!primary_server_id!secondary_server_id

as specified in the official WLS Cluster Documentation.

Is there any way to determine the current cluster node given the server IDs from the session cookie?

I know there are alternatives like * log aggregation * rendering a hash inside our page templates which allows identification and possibly others. But I would like to find a minimally invasive solution if possible since any change in software setup and application code may prove difficult.

share|improve this question
up vote 0 down vote accepted

Not directly in Weblogic, AFAIK.

If you have an Apache web server (or a similar proxy) fronting the Weblogic cluster, it does log the individual server HASH and map it to the Managed server, and is able to send it to the same weblogic managed server as the previous request.

As described by an old BEA page, you can enable debug logging:

Debug ALL
DebugConfigInfo ON
WLLogFile /tmp/wlproxy.log

Sample log content:

Mon May 10 13:14:40 2004 getpreferredServersFromCookie: -2032354160!-457294087
Mon May 10 13:14:40 2004 GET Primary JVMID1: -2032354160
Mon May 10 13:14:40 2004 GET Secondary JVMID2: -457294087
Mon May 10 13:14:40 2004 [Found Primary]: 172.18.137.50:38625:65535
Mon May 10 13:14:40 2004 list[0].jvmid: -2032354160
Mon May 10 13:14:40 2004 secondary str: -457294087
Mon May 10 13:14:40 2004 list[1].jvmid: -457294087
Mon May 10 13:14:40 2004 secondary str: -457294087
Mon May 10 13:14:40 2004 [Found Secondary]: 172.18.137.54:38625:65535
Mon May 10 13:14:40 2004 Found 2 servers

This info is also available on MOS; search for document 780007.1.

share|improve this answer
    
While I did not have the oppotunity to test this, it is exactly what I have been looking for. We are using Apache with the WLS module as fronting proxy. Thanks! – Axel Knauf Mar 2 '12 at 9:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.