This discussion is archived
6 Replies Latest reply: Dec 13, 2012 9:46 PM by 919404 RSS

Http session replication with multiple war files in EAR with Apache Proxy

919404 Newbie
Currently Being Moderated
Hi,

Issue: HTTP Session sharing is not working in weblogic or sticky session problem(Not sure about the issue) but Not able to login to application when both weblogic nodes are up and some times application logs in with incomplete data and upon click on any link redirects to login page.

Version:
Weblogic 10.3.5
Apache 2.2.22

Am trying to set up Apache proxy front end to a weblogic cluster(2 managed servers) with single EAR file deployed on cluster(contains 7 WAR files).

I have done the apache plug in set up to weblogic as mentioned in the weblogic doc for Apache plug in. Below are my apache httpd entries.

<Location />
SetHandler weblogic-handler
</Location>

<IfModule mod_weblogic.c>
WebLogicCluster 192.168.1.220:7003,192.168.1.220:7004
DebugConfigInfo ON
Debug ALL
</IfModule>

ProxyRequests Off
ProxyPreserveHost on
LogLevel debug
<Proxy Balancer://AppCluster>
BalancerMember http://192.168.1.220:7003
BalancerMember http://192.168.1.220:7004
</Proxy>

<Location />
ProxyPass Balancer://AppCluster/ stickysession=JESSIONID|jsessionid
ProxyPassReverse http://192.168.1.220:7003
ProxyPassReverse http://192.168.1.220:7004
</Location>

From weblogic perspective, i have added the below entry into weblogic.xml file of all WAR files to enable HTTP session replication.

<session-descriptor>
<persistent-store-type>replicated_if_clustered</persistent-store-type>
</session-descriptor>

From Apache logs am able to see the request being load balanced between the nodes after enabling the DEBUG level log.

Apache Logs below

[Tue Dec 04 14:26:05 2012] [notice] Child 3784: Starting thread to listen on port 8080.
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value (null) for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7003" : busy 0 : lbstatus 0
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7003) rewritten to http://192.168.1.220:7003/
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7003/
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7003/ to 192.168.1.220:7003
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2193): proxy: connected / to 192.168.1.220:7003
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2444): proxy: HTTP: fam 2 socket created to connect to 192.168.1.220
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2576): proxy: HTTP: connection complete to 192.168.1.220:7003 (192.168.1.220)
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_http.c(1743): proxy: start body send
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_http.c(1847): proxy: end body send
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (192.168.1.220)
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(622): proxy_balancer_post_request for (balancer://appcluster)
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/App/login.jsp
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value (null) for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7004" : busy 0 : lbstatus 1
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7004) rewritten to http://192.168.1.220:7004/App/login.jsp?partnerApp=http://192.168.2.161:8080/login.do?method=login
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7004/App/login.jsp?partnerApp=http://192.168.2.161:8080/login.do?method=login
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7004/App/login.jsp?partnerApp=http://192.168.2.161:8080/login.do?method=login to 192.168.1.220:7004
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2193): proxy: connected /App/login.jsp?partnerApp=http://192.168.2.161:8080/login.do?method=login to 192.168.1.220:7004
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2444): proxy: HTTP: fam 2 socket created to connect to 192.168.1.220
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2576): proxy: HTTP: connection complete to 192.168.1.220:7004 (192.168.1.220)
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_http.c(1743): proxy: start body send
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_http.c(1847): proxy: end body send
[Tue Dec 04 14:26:22 2012] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (192.168.1.220)
[Tue Dec 04 14:26:22 2012] [debug] mod_proxy_balancer.c(622): proxy_balancer_post_request for (balancer://appcluster)
[Tue Dec 04 14:26:23 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/App/AppEnv
[Tue Dec 04 14:26:23 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value h1BtQ96WPBGfFZ7ZTrpgn1yz2YGgQmJYnTJlWT5NfhJ9nhyFltyv!-1629690076!-1062731300!7004!-1 for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:23 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:23 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7003" : busy 0 : lbstatus 0
[Tue Dec 04 14:26:23 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7003) rewritten to http://192.168.1.220:7003/App/AppEnv
[Tue Dec 04 14:26:23 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:23 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7003/App/AppEnv
[Tue Dec 04 14:26:23 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:23 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7003/App/AppEnv to 192.168.1.220:7003
[Tue Dec 04 14:26:23 2012] [debug] proxy_util.c(2193): proxy: connected /App/AppEnv to 192.168.1.220:7003
[Tue Dec 04 14:26:23 2012] [debug] proxy_util.c(2444): proxy: HTTP: fam 2 socket created to connect to 192.168.1.220
[Tue Dec 04 14:26:23 2012] [debug] proxy_util.c(2576): proxy: HTTP: connection complete to 192.168.1.220:7003 (192.168.1.220)
[Tue Dec 04 14:26:23 2012] [debug] mod_proxy_http.c(1743): proxy: start body send
[Tue Dec 04 14:26:23 2012] [debug] mod_proxy_http.c(1847): proxy: end body send
[Tue Dec 04 14:26:23 2012] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (192.168.1.220)
[Tue Dec 04 14:26:23 2012] [debug] mod_proxy_balancer.c(622): proxy_balancer_post_request for (balancer://appcluster)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/App/login
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value h1BtQ96WPBGfFZ7ZTrpgn1yz2YGgQmJYnTJlWT5NfhJ9nhyFltyv!-1629690076!-1062731300!7004!-1 for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7004" : busy 0 : lbstatus 1
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7004) rewritten to http://192.168.1.220:7004/App/login
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7004/App/login
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7004/App/login to 192.168.1.220:7004
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2193): proxy: connected /App/login to 192.168.1.220:7004
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_http.c(1743): proxy: start body send
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_http.c(1847): proxy: end body send
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (192.168.1.220)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(622): proxy_balancer_post_request for (balancer://appcluster)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/login.do
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value h1BtQ96WPBGfFZ7ZTrpgn1yz2YGgQmJYnTJlWT5NfhJ9nhyFltyv!-1629690076!-1062731300!7004!-1 for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7003" : busy 0 : lbstatus 0
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7003) rewritten to http://192.168.1.220:7003/login.do?method=login
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7003/login.do?method=login
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7003/login.do?method=login to 192.168.1.220:7003
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2193): proxy: connected /login.do?method=login to 192.168.1.220:7003
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/App/validateSession
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value TS7zQ96b5nft9G9SdqG3GtF0WpMJSPy6tsTjRTvhTzWFQhgD11ld!304557546!-1062731300!7003!-1!1354611387241 for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7004" : busy 0 : lbstatus 1
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7004) rewritten to http://192.168.1.220:7004/App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7004/App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7004/App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x to 192.168.1.220:7004
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2193): proxy: connected /App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x to 192.168.1.220:7004
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2444): proxy: HTTP: fam 2 socket created to connect to 192.168.1.220
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2576): proxy: HTTP: connection complete to 192.168.1.220:7004 (192.168.1.220)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_http.c(1743): proxy: start body send
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_http.c(1847): proxy: end body send
[Tue Dec 04 14:26:27 2012] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (192.168.1.220)
[Tue Dec 04 14:26:27 2012] [debug] mod_proxy_balancer.c(622): proxy_balancer_post_request for (balancer://appcluster)
[Tue Dec 04 14:26:30 2012] [debug] mod_proxy_http.c(1743): proxy: start body send
[Tue Dec 04 14:26:30 2012] [debug] mod_proxy_http.c(1847): proxy: end body send
[Tue Dec 04 14:26:30 2012] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (192.168.1.220)
[Tue Dec 04 14:26:30 2012] [debug] mod_proxy_balancer.c(622): proxy_balancer_post_request for (balancer://appcluster)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/login.do
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value TS7zQ96b5nft9G9SdqG3GtF0WpMJSPy6tsTjRTvhTzWFQhgD11ld!304557546!-1062731300!7003!-1 for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7003" : busy 0 : lbstatus 0
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7003) rewritten to http://192.168.1.220:7003/login.do?method=showCorporateLogo
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7003/login.do?method=showCorporateLogo
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7003/login.do?method=showCorporateLogo to 192.168.1.220:7003
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2193): proxy: connected /login.do?method=showCorporateLogo to 192.168.1.220:7003
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/App/validateSession
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value TS7zQ96b5nft9G9SdqG3GtF0WpMJSPy6tsTjRTvhTzWFQhgD11ld!304557546!-1062731300!7003!-1!1354611387241 for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7004" : busy 0 : lbstatus 1
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7004) rewritten to http://192.168.1.220:7004/App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7004/App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7004/App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x to 192.168.1.220:7004
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2193): proxy: connected /App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x to 192.168.1.220:7004
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1743): proxy: start body send
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1847): proxy: end body send
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (192.168.1.220)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(622): proxy_balancer_post_request for (balancer://appcluster)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1743): proxy: start body send
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1847): proxy: end body send
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (192.168.1.220)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(622): proxy_balancer_post_request for (balancer://appcluster)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/AppCommonUtilServlet
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value TS7zQ96b5nft9G9SdqG3GtF0WpMJSPy6tsTjRTvhTzWFQhgD11ld!304557546!-1062731300!7003!-1 for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7003" : busy 0 : lbstatus 0
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7003) rewritten to http://192.168.1.220:7003/AppCommonUtilServlet?method=getUserLocaleDate
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7003/AppCommonUtilServlet?method=getUserLocaleDate
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7003/AppCommonUtilServlet?method=getUserLocaleDate to 192.168.1.220:7003
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2193): proxy: connected /AppCommonUtilServlet?method=getUserLocaleDate to 192.168.1.220:7003
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1743): proxy: start body send
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1847): proxy: end body send
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (192.168.1.220)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(622): proxy_balancer_post_request for (balancer://appcluster)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/login.do
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value TS7zQ96b5nft9G9SdqG3GtF0WpMJSPy6tsTjRTvhTzWFQhgD11ld!304557546!-1062731300!7003!-1 for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7004" : busy 0 : lbstatus 1
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7004) rewritten to http://192.168.1.220:7004/login.do?method=getMenuData
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7004/login.do?method=getMenuData
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7004/login.do?method=getMenuData to 192.168.1.220:7004
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2193): proxy: connected /login.do?method=getMenuData to 192.168.1.220:7004
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL //AppCluster/App/validateSession
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(280): proxy: BALANCER: Found value KFsQQ96fkfbP3zHdSkpm724PPW1z3mx4WjqbzkyNsTnhXHp9GvVZ!-1629690076!-1062731300!7004!-1!1354611391163 for stickysession JSESSIONID|jsessionid
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(1012): proxy: Entering byrequests for BALANCER (balancer://appcluster)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(1055): proxy: byrequests selected worker "http://192.168.1.220:7003" : busy 0 : lbstatus 0
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_balancer.c(581): proxy: BALANCER (balancer://appcluster) worker (http://192.168.1.220:7003) rewritten to http://192.168.1.220:7003/App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy.c(1020): Running scheme balancer handler (attempt 0)
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://192.168.1.220:7003/App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (192.168.1.220)
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2067): proxy: connecting http://192.168.1.220:7003/App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x to 192.168.1.220:7003
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2193): proxy: connected /App/validateSession?ssoSessionID=App-728a8af1-YjBebdiZW661d4x to 192.168.1.220:7003
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1743): proxy: start body send
[Tue Dec 04 14:26:31 2012] [debug] mod_proxy_http.c(1847): proxy: end body send
[Tue Dec 04 14:26:31 2012] [debug] proxy_util.c(2029): proxy: HTTP: has released connection for (192.168.1.220)

No static contents are put on apache. All data is getting served from weblogic only.

Any help/suggestion would be helpful.


Regards,
Sandeep

Edited by: 916401 on Dec 3, 2012 11:01 PM

Edited by: 916401 on Dec 4, 2012 12:59 AM
  • 1. Re: Http session replication with multiple war files in EAR with Apache Proxy
    919404 Newbie
    Currently Being Moderated
    Hi,

    I have deployed a sample web App in similar set up as mentioned in the above post.

    1. Apache Proxy configured to point to weblogic.
    2. 2 Managed nodes are configured as cluster and Sample application is deployed on the Cluster.
    3. Application details: EAR is deployed with 2 WAR files in it (App and App2)

    For simplicity i have deployed the application mentioned in the thread HTTP Session sharing across multiple EARs /Applications on this set up with Apache setup as below

    <IfModule mod_weblogic.c>
    WebLogicCluster 192.168.1.220:7003,192.168.1.220:7004
    DebugConfigInfo ON
    Debug ALL
    </IfModule>

    ProxyRequests Off
    ProxyPreserveHost on
    LogLevel debug
    <Proxy Balancer://AppCluster>
    BalancerMember http://192.168.1.220:7003
    BalancerMember http://192.168.1.220:7004
    </Proxy>

    <Location /App>
    ProxyPass Balancer://AppCluster/ stickysession=JSESSIONID|jsessionid
    ProxyPassReverse http://192.168.1.220:7003/App
    ProxyPassReverse http://192.168.1.220:7004/App
    </Location>

    <Location /App2>
    ProxyPass Balancer://AppCluster/ stickysession=JSESSIONID|jsessionid
    ProxyPassReverse http://192.168.1.220:7003/App2
    ProxyPassReverse http://192.168.1.220:7004/App2
    </Location>

    weblogic-application.xml looks like below

    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-application xmlns="http://www.bea.com/ns/weblogic/90">
    <session-descriptor>
    <persistent-store-type>replicated</persistent-store-type>
    <sharing-enabled>true</sharing-enabled>
    </session-descriptor>
    </weblogic-application>

    With the above mentioned setup, session parameters set in the one is accessible across WAR files and also from Apache logs load balancing is happening between the weblogic servers and am able to see the expected result.

    But if remove the entry <sharing-enabled>true</sharing-enabled> from weblogic-application.xml everything fails. But as per the xml since persistent store type is still mentioned, HTTP session should be replicated between the servers.

    Sharing enabled will only share session across WAR files in EAR. And this has nothing to do with HTTP session replication.

    Please let me know if my understanding is wrong.

    Regards,
    Sandeep
  • 2. Re: Http session replication with multiple war files in EAR with Apache Proxy
    919404 Newbie
    Currently Being Moderated
    Hi,

    Since nobody has replied, i continued my lookout for solution and found that the Apache and Weblogic setting are correct(as i tested) and only thing is remove the ProxyPass directive from the httpd conf file. Then sticky session will start working.

    From Weblogic, the above mentioned setup is correct to enable HTTP session replication and sharing within a cluster and works fine. I got serialization issue during replication anyway thats application issue. But setting are fine.

    But i do not understand y the proxypass directive is causing the issue w.r.t to sticky session. Any one help me to find the reason for this.

    (By the way from the above shared logs you can make out that single request being shared across balancer nodes and hence sticky session is not working as expected before removing the ProxyPass directive.)

    For reference try this https://community.jboss.org/message/764363?_sscc=t

    Will post the answer if found.

    Regards,
    Sandeep
  • 3. Re: Http session replication with multiple war files in EAR with Apache Proxy
    968728 Newbie
    Currently Being Moderated
    Sandeep,

    Before you proceed with deploying your application, just try with 2 sample JSP. Put a value in session in one JSP. Read the value from the sesion in the other JSP.

    IF this works perfectly, then your setup is perfect.

    Then we can look in to your code.

    Regards,

    Cancer.
  • 4. Re: Http session replication with multiple war files in EAR with Apache Proxy
    919404 Newbie
    Currently Being Moderated
    Hi,

    Thanks for the reply. In this thread, 2nd post where i shared has the simple jsp test result.

    Environment details for this test

    Apache is configured to point to 2 weblogic nodes which are configured as cluster.

    Deployment details:

    EAR
    |____WAR1---JSP1(sets data into session)
    |____WAR2---JSP2(reads data from session)
    |____META_INF---weblogic-application.xml (contents shown below)

    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-application xmlns="http://www.bea.com/ns/weblogic/90">
    <session-descriptor>
    <persistent-store-type>replicated</persistent-store-type>
    <sharing-enabled>true</sharing-enabled>
    </session-descriptor>
    </weblogic-application>

    This is my App to test the setup.
    With above mentioned setup am able to read session data set in JSP1 in JSP2. Looks like Setup is fine. But Apache is forwarding all request to same weblogic node.

    [06/Dec/2012:13:08:57 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App HTTP/1.1" 302 255
    [06/Dec/2012:13:08:57 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App/ HTTP/1.1" 200 754
    [06/Dec/2012:13:09:00 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App2/index.jsp HTTP/1.1" 200 383
    [06/Dec/2012:13:10:45 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App/index.jsp HTTP/1.1" 200 754
    [06/Dec/2012:13:10:47 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App2/index.jsp HTTP/1.1" 200 383
    [06/Dec/2012:13:10:48 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App/index.jsp HTTP/1.1" 200 754
    [06/Dec/2012:13:10:49 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App2/index.jsp HTTP/1.1" 200 383
    [06/Dec/2012:13:12:00 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App/index.jsp HTTP/1.1" 200 754
    [06/Dec/2012:13:12:01 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App2/index.jsp HTTP/1.1" 200 383
    [06/Dec/2012:13:12:14 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App2/index.jsp HTTP/1.1" 200 383
    [06/Dec/2012:13:12:15 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App2/index.jsp HTTP/1.1" 200 383
    [06/Dec/2012:13:12:15 +0530] - Test=Test; JSESSIONID=x4t3QQLLH2wgw62T1CHLvyMG2cvmQnHDLtqCgDN010Qvg2VhTXnb!-1886884895!-1062731300!7003!-1!937724726!-1062731300!7004!-1; "GET /App2/index.jsp HTTP/1.1" 200 383

    Regards,
    Sandeep
  • 5. Re: Http session replication with multiple war files in EAR with Apache Proxy
    919404 Newbie
    Currently Being Moderated
    Hi,

    My requirement is to replicate session in a cluster between the managed servers to enable failover so client session data is not lost. I have EAR with multiple WAR files which is deployed on the cluster.

    As with my previous updates for this thread, session sharing between the WAR files within EAR working fine for me.

    Regards,
    Sandeep
  • 6. Re: Http session replication with multiple war files in EAR with Apache Pro
    919404 Newbie
    Currently Being Moderated
    HI,

    I had caching issue at application level(cache was not distributed). After fixing the caching issue i was able to perform failover/HTTP session replication.

    But am not using apache proxy module. I needed simple load balancer to even distribute the load onto weblogic cluster. Weblogic plug in for apache is doing the job for me.

    Thanks for the help guys.


    Regards,
    Sandeep

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points