Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 58772 invoked from network); 30 Jun 2003 16:19:55 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 30 Jun 2003 16:19:55 -0000 Received: (qmail 8310 invoked by uid 97); 30 Jun 2003 16:22:21 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 8303 invoked from network); 30 Jun 2003 16:22:20 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 30 Jun 2003 16:22:20 -0000 Received: (qmail 57263 invoked by uid 500); 30 Jun 2003 16:19:37 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 57247 invoked from network); 30 Jun 2003 16:19:37 -0000 Received: from unknown (HELO mustang.mpi.com) (63.244.250.132) by daedalus.apache.org with SMTP; 30 Jun 2003 16:19:37 -0000 Received: from thunderbolt.mpi.com (thunderbolt.mpi.com [199.93.192.55]) by mustang.mpi.com (Switch-2.2.6/Switch-2.2.6) with ESMTP id h5UGJah25417 for ; Mon, 30 Jun 2003 12:19:36 -0400 (EDT) Received: from US-VS1.corp.mpi.com ([199.93.195.20]) by thunderbolt.mpi.com (Switch-3.0.4/Switch-3.0.0) with ESMTP id h5UGJPjv022348 for ; Mon, 30 Jun 2003 12:19:39 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: problem with clustering using Tomcat 4.1 Date: Mon, 30 Jun 2003 12:19:33 -0400 Message-ID: <9C5166762F311146951505C6790A9CF8A6E7EF@US-VS1.corp.mpi.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: problem with clustering using Tomcat 4.1 Thread-Index: AcM/Iy7wKQhynWe8QieIzpQNsokexAAACuSw From: "Shapira, Yoav" To: "Tomcat Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Howdy, No, YOU have fun Senor Hanik ;) Congratulations!!! Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Filip Hanik [mailto:mail@filip.net] >Sent: Monday, June 30, 2003 12:17 PM >To: Tomcat Users List >Cc: Sanjeev.Das@kanisa.com >Subject: RE: problem with clustering using Tomcat 4.1 > >send complete info, configurations and complete logs. >I'm going on my honey moon, be back in three weeks. > >have fun! >filip > >> -----Original Message----- >> From: Das, Sanjeev [mailto:Sanjeev.Das@kanisa.com] >> Sent: Friday, June 27, 2003 2:11 PM >> To: mail@filip.net >> Cc: tomcat-user@jakarta.apache.org >> Subject: problem with clustering using Tomcat 4.1 >> >> >> Hello Filip, >> >> I have been trying to use your session replication libs in tomcat >> 4.1 and have run into problems. I was wondering if you could help >> me out here. I am trying the replication with a simple jsp page >> on a one box setup with two instances of tomcat running. >> >> The jsp page simply prints out the session id and the cookies it >> has received. Here is the text of the JSP page: >> >> <%@ page import=3D"javax.servlet.http.*" %> >> >> >> Server: ONE >>

>> >> >> <% >> if (request.getSession().isNew()) >> { >> %> >> >> This is a new session. >> >> <% >> } >> else >> { >> %> >> This is an old session. >> <% >> } >> %> >> >>

>> >> The session id : <%=3Drequest.getSession().getId()%> >> >> >> Cookies:
>> >> <% >> Cookie[] cookies =3D request.getCookies(); >> if (cookies !=3D null) >> { >> for (int i=3D0; i < cookies.length; i++) >> { >> %> >> >> Domain:
>> <%=3Dcookies[i].getDomain()%>
>> >> Name:
>> <%=3Dcookies[i].getName()%>
>> >> Value:
>> <%=3Dcookies[i].getValue()%>
>> >> Path:
>> <%=3Dcookies[i].getPath()%>
>> >> MaxAge:
>> <%=3Dcookies[i].getMaxAge()%>
>> >> >> <% >> } >> } >> %> >> >> >> >> The pages in the two instances are exactly the same except that >> one says SERVER ONE and the other SERVER TWO so that I can >> distinguish between the two. I believe I have setup the Context >> properly for both the instances. >> >> I am using Apache to do the round robin scheduling using mod_jk. >> >> >> When I hit the page and look at the message in the two tomcat >> consoles I get the following: >> >> first console: >> >> [InMemoryReplicationManager] Replicated Session created at >> org.apache.catalina.c >> luster.mcast.McastMember[tcp://172.17.1.106:4001,172.17.1.106,4001 >> ] with ID=3D6B5C >> F3C232D4D8636D14586083E0B094 >> [InMemoryReplicationManager] writeObject() storing session >> 6B5CF3C232D4D8636D145 >> 86083E0B094 >> [InMemoryReplicationManager] Replication Statistics >> Messages sent=3D2 >> Message serialization time=3D31 >> Average serialization time=3D15.5ms >> Average session send size=3D805.0 >> Messages received=3D0 >> Message deserialization time=3D0 >> Average deserialization time=3DNaNms >> Average message delay time=3DNaNms >> >> second console: >> [InMemoryReplicationManager] >> InMemoryReplicationManager.messageDataReceived(): r >> eceived message >> [InMemoryReplicationManager] Received SessionMessage of >> type=3DSESSION-CREATED >> [InMemoryReplicationManager] Replicated session received >> ID=3D6B5CF3C232D4D8636D14 >> 586083E0B094 >> [InMemoryReplicationManager] readObject() loading session >> 6B5CF3C232D4D8636D1458 >> 6083E0B094 >> [InMemoryReplicationManager] Replicated session >> received=3DReplicatedSession id=3D6B >> 5CF3C232D4D8636D14586083E0B094 >> ref=3DStandardSession[6B5CF3C232D4D8636D14586083E0B >> 094] >> LastAccess=3D1056747084419 >> >> [InMemoryReplicationManager] Replication Statistics >> Messages sent=3D1 >> Message serialization time=3D16 >> Average serialization time=3D16.0ms >> Average session send size=3D491.0 >> Messages received=3D2 >> Message deserialization time=3D46 >> Average deserialization time=3D23.0ms >> Average message delay time=3D15.5ms >> >> It seems like the first box created the session and it was >> replicated properly in the second box. >> >> Now when I reload the page and the request goes to the second box >> I would expect the same session id to be printed out. Instead I >> get the following output from the jsp page: >> >> Server: TWO >> This is a new session. >> The session id : E086477BF76F98820020F3FA7048C5E8 Cookies: >> Domain: >> null >> Name: >> JSESSIONID >> Value: >> 6B5CF3C232D4D8636D14586083E0B094 >> Path: >> null >> MaxAge: >> -1 >> >> The second server did receive the right JSESSIONID >> (6B5CF3C232D4D8636D14586083E0B094) but decided to create a new >> session instead of the replicated one. >> >> Do you have any ideas as to why this occur? >> >> thanks >> >> Sanjeev >> >> >> >> -------------------------------------------------------------------= -- >> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org >> For additional commands, e-mail: tomcat-user-help@jakarta.apache.or= g >> >> > >---------------------------------------------------------------------= >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org This e-mail, including any attachments, is a confidential business com= munication, and may contain information that is confidential, propriet= ary and/or privileged. This e-mail is intended only for the individua= l(s) to whom it is addressed, and may not be saved, copied, printed, d= isclosed or used by anyone else. If you are not the(an) intended reci= pient, please immediately delete this e-mail from your computer system= and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org