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.
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:
Sample log content:
This info is also available on MOS; search for document 780007.1.