0

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.

1 Answer 1

0

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.

1
  • 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! Commented Mar 2, 2012 at 9:23

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.