RE: Why is tomcat (java) so memory intensive?
you will need to dig deeper into jprobe or whatever profiler you are using. after that you will see where the memory goes. also, try the latest version of tomcat 5.0 Filip -Original Message- From: Philippe Deslauriers [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 8:53 AM To: [EMAIL PROTECTED] Subject: Why is tomcat (java) so memory intensive? I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03. I have a serious memory problem with Tomcat, it just EAT memory without explanation, until OOM error occurs. The Java.exe process in the windows task manager reports using between 95Mb and 105Mb after the startup of the webapp. I do not use Xms Xmx options in dev mode. It just grows until it runs out of memory. There is not much memory available (around 150Mb), yet it should be enough for a few classes, JSP and almost not data in the database. Like a big boy, I decided to use Jprofiler demo to figure out where the memory leak was, to see that there is only 20 Mb allocated by the VM!!! So where does the rest of the memory goes? I do not use any non-java library (dll), I don't think I'm doing anything special. The app use a the Versant JDO implementation (instead of direct JDBC) using MS SQL server. But hey, the app is still in dev mode, with only the developpers using it, the DB is (almost) empty, so the amount data is not in cause. Anyways using 20Mb of heap is very reasonable (there will be at least 1gb available in production), but why is the java.exe process eating memory like a pig an the profiler is not showing where the mem goes? (by the way, I did deleted ALL the filters from Jprofiler). If the app would take 2Gb in memory I would not care, as long as I know what is using the memory. I did profile an app running on 5.0.18, and the same magic happens, the memory used by the java.exe is far from close to what the total heap size of the VM reports to be. Am I going crazy? Any ideas? Thanks Filip:) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat not starting...Tomcat4.1.30
look at all the logs files, there is always something in there, if you are running on windows, go to the bin directory in a dos prompt and type catalina.bat run and see why its failing, and also, get yourself a version control system, that way you won't lose data :) Filip -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Sunday, November 07, 2004 12:07 PM To: Tomcat Users List Subject: Tomcat not starting...Tomcat4.1.30 Hi My Tomcat instance is so badly messed up , i am not able to start it...at all...while i was redeploying my app , it gave me some email related classes not found error...so i copied all the relevant jar into Tomcat/common/lib directory...Then it gave me some other other, so to eliminate the problem, i removed those jars from common/lib and thats it..from then on Tomcat is not starting...nothing in logs...and says exception starting up...i tried so many things but the console is not coming up...I just dowmloaded new Tomcat version in other diretory, did not uninstall the old one , even the new Tomcat is coming up.. do i have to uninstall the old one before the new install?...i am afraid that i loose all my old stuff. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: newbie question
you have conflict in ports, both tomcats can not run on the same port at the same time. instead of calling start.bat, call catalina.bat run to have the windows stay the same and not shutdown on you FIlip -Original Message- From: Luke FERNANDEZ [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 1:27 PM To: [EMAIL PROTECTED] Subject: RE: newbie question Can you run multiple instances of Tomcat? I tried this but I ran into problems. I'm running Sakai (the open source Learning Management System) which installs its own Tomcat engine. When I try to start up my own non-Sakai Tomcat instance from the command line (which resides in a completely separate jakarta-tomcat-5.0.28 folder) a new DOS window pops up and it seems like it goes through the entire deployment in the conventional manner. But instead of staying open, that second DOS window eventually closes. And then when I try to request pages against the second Tomcat instance I don't get anything back in the browser. The Sakai instance still serves pages correctly. However, if the Sakai Tomcat server is turned off I can turn on my other instance and serve pages from it. Is there a way to make both Tomcat engines run simultaneously without conflict? Cheers, Luke Fernandez [EMAIL PROTECTED] 10/28/2004 11:11:05 AM Or you could run multiple instances of Tomcat On Thu, 2004-10-28 at 12:23, Shapira, Yoav wrote: Hi, Yes: define separate Engines or Services for the two apps in your server.xml, and put each connector only in the Service where you want it. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Luke FERNANDEZ [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 12:16 PM To: [EMAIL PROTECTED] Subject: newbie question Is there an easy way to specify that one of the apps in the webapps folder be served off one port (e.g. 80) whereas another app should be served off another port (8080)? Thanks for your help, Luke Fernandez Weber State University - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: newbie question
did you look at the other connectors? catalina.bat run - will tell you the message, try that Filip -Original Message- From: Luke FERNANDEZ [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 1:52 PM To: [EMAIL PROTECTED] Subject: RE: newbie question There would be port conflict even though the Sakai Tomcat app serves from port 8080 while my Tomcat instance serves from port 80? Luke [EMAIL PROTECTED] 10/28/2004 12:28:46 PM you have conflict in ports, both tomcats can not run on the same port at the same time. instead of calling start.bat, call catalina.bat run to have the windows stay the same and not shutdown on you FIlip -Original Message- From: Luke FERNANDEZ [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 1:27 PM To: [EMAIL PROTECTED] Subject: RE: newbie question Can you run multiple instances of Tomcat? I tried this but I ran into problems. I'm running Sakai (the open source Learning Management System) which installs its own Tomcat engine. When I try to start up my own non-Sakai Tomcat instance from the command line (which resides in a completely separate jakarta-tomcat-5.0.28 folder) a new DOS window pops up and it seems like it goes through the entire deployment in the conventional manner. But instead of staying open, that second DOS window eventually closes. And then when I try to request pages against the second Tomcat instance I don't get anything back in the browser. The Sakai instance still serves pages correctly. However, if the Sakai Tomcat server is turned off I can turn on my other instance and serve pages from it. Is there a way to make both Tomcat engines run simultaneously without conflict? Cheers, Luke Fernandez [EMAIL PROTECTED] 10/28/2004 11:11:05 AM Or you could run multiple instances of Tomcat On Thu, 2004-10-28 at 12:23, Shapira, Yoav wrote: Hi, Yes: define separate Engines or Services for the two apps in your server.xml, and put each connector only in the Service where you want it. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Luke FERNANDEZ [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 12:16 PM To: [EMAIL PROTECTED] Subject: newbie question Is there an easy way to specify that one of the apps in the webapps folder be served off one port (e.g. 80) whereas another app should be served off another port (8080)? Thanks for your help, Luke Fernandez Weber State University - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: newbie question
yes, and if you actually read the message StandardServer.await: create[8005]: java.net.BindException: Address already in u se: JVM_Bind java.net.BindException: Address already in use: JVM_Bind look for 8005 in your server.xml and you will find out that this is the shutdown port. Filip -Original Message- From: Luke FERNANDEZ [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 2:10 PM To: [EMAIL PROTECTED] Subject: RE: newbie question Ok. When I use catalina.bat run instead of startup the window stays open but the second instance (on port 80) still isnt serving pages. I've included the screen output that happens after running catalina.bat run. Looks like its saying something about address already in use: C:\tomcat\jakarta-tomcat-5.0.28\bincatalina.bat run Using CATALINA_BASE: C:\tomcat\jakarta-tomcat-5.0.28 Using CATALINA_HOME: C:\tomcat\jakarta-tomcat-5.0.28 Using CATALINA_TMPDIR: C:\tomcat\jakarta-tomcat-5.0.28\temp Using JAVA_HOME: C:\j2sdk1.4.2_05 Oct 28, 2004 12:58:57 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-80 Oct 28, 2004 12:58:57 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1953 ms Oct 28, 2004 12:58:57 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 28, 2004 12:58:57 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.28 Oct 28, 2004 12:58:57 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Oct 28, 2004 12:58:57 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Oct 28, 2004 12:58:57 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\tomcat\jakarta-tomcat-5. 0.28\conf\Catalina\localhost\admin.xml Oct 28, 2004 12:58:59 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru e Oct 28, 2004 12:58:59 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul l=true Oct 28, 2004 12:58:59 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retur nNull=true Oct 28, 2004 12:59:02 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\tomcat\jakarta-tomcat-5. 0.28\conf\Catalina\localhost\balancer.xml Oct 28, 2004 12:59:02 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\tomcat\jakarta-tomcat-5. 0.28\conf\Catalina\localhost\manager.xml Oct 28, 2004 12:59:02 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /jsp-examples from URL file:C:\ tomcat\jakarta-tomcat-5.0.28\webapps\jsp-examples Oct 28, 2004 12:59:03 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /Login from URL file:C:\tomcat\ jakarta-tomcat-5.0.28\webapps\Login Oct 28, 2004 12:59:04 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru e Oct 28, 2004 12:59:04 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul l=true Oct 28, 2004 12:59:04 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='ApplicationResources', returnNull=true Oct 28, 2004 12:59:04 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path from URL file:C:\tomcat\jakart a-tomcat-5.0.28\webapps\ROOT Oct 28, 2004 12:59:04 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /servlets-examples from URL fil e:C:\tomcat\jakarta-tomcat-5.0.28\webapps\servlets-examples Oct 28, 2004 12:59:05 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /tomcat-docs from URL file:C:\t omcat\jakarta-tomcat-5.0.28\webapps\tomcat-docs Oct 28, 2004 12:59:05 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /TomProj from URL file:C:\tomca t\jakarta-tomcat-5.0.28\webapps\TomProj Oct 28, 2004 12:59:06 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /webdav from URL file:C:\tomcat \jakarta-tomcat-5.0.28\webapps\webdav Oct 28, 2004 12:59:07 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-80 Oct 28, 2004 12:59:07 PM org.apache.jk.common.ChannelSocket init INFO: Port busy 8009 java.net.BindException: Address already in use: JVM_Bind Oct 28, 2004 12:59:07 PM org.apache.jk.common.ChannelSocket init
RE: which Linux Platform is best for Tomcat?
redhat 9 is pretty crummy with java, you might need to add in the LD_ASSUME_KERNEL parameter for stability Filip -Original Message- From: Evgeny Gesin [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 9:11 AM To: Tomcat Users List Subject: Re: which Linux Platform is best for Tomcat? Tomcat 4.x works very well on production servers with RedHat 9 and Fedora 2. The new Java 1.5 adds better memory management. Evgeny Gesin http://www.javadesk.com http://www.alltelescopes.com __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why mail/session always being set to localhost even Context.xml says otherwise?
mailto: could come from someone's email client Filip -Original Message- From: Steve Kirk [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 3:41 PM To: 'Tomcat Users List' Subject: RE: Why mail/session always being set to localhost even Context.xml says otherwise? Not sure that this is your actual problem, but is it correct to use mailto:; within the to/from addresses? -Original Message- From: David Lee [mailto:[EMAIL PROTECTED] Sent: October 25, 2004 3:51 PM To: [EMAIL PROTECTED] Subject: Why mail/session always being set to localhost even Context.xml says otherwise? Tomcat: 5.0.29 OS: XP JAVA: 1.5.0 Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuecompany email server/value /parameter /ResourceParams Java program: Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session session = (Session) envCtx.lookup(mail/Session); Message message = new MimeMessage(session); message.setFrom(new InternetAddress(from email mailto:[EMAIL PROTECTED] )); InternetAddress to[] = new InternetAddress[1]; to[0] = new InternetAddress(to email mailto:[EMAIL PROTECTED] ); message.setRecipients(Message.RecipientType.TO, to); message.setSubject(test mail session from tomcat); message.setContent(test mail session from tomcat, text/plain); Transport.send(message); Catalina ERROR: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Could not connect to SMTP host: localhost , port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at javax.mail.Transport.send0(Transport.java:204) at javax.mail.Transport.send(Transport.java:73) at javaxml2.UpdateItemServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:157) !DSPAM:417d591a211741752920360! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session problems with cluster
What's concerning? To set the record straight, I have not worked with context reloads, so I don't know what changed from 5.0.25 to 5.0.28. But I do know this, don't expect clustering to work with nodes popping in and out all the time. Yes session replication is a nifty thing, but if you abuse it its going to not go over well, just like anything else. Let me know when you have a good test case, as all my tests are coming through just fine I will not be able to work on the context reload problem anytime soon, so don't hold your breath. Brantley, if you read this, make sure you populate your bug report with all info, OS JDK version, etc Filip -Original Message- From: Matthew Stone [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:15 AM To: Tomcat Users List Subject: Re: Session problems with cluster Hmm, that's a bit concerning. Brantley Hobbs wrote: Matt, We've seen a similar problem with our cluster. First off, let me say that I'm the person that filed bug #31495, so we've been struggling with clustering for a while now. In our case, we've actually stored a string as a session attribute on a page, and then keep reloading the page, appending to the string with each reload (e.g., myString += -1 should produce -1-1-1-1-1-1... with the string growing longer with each reload). What we've found is that the session actually randomly loses data sometimes (i.e., the string doesn't get appended). We're not at the point yet to be able to identify the problem well enough to file a bug, but that may be coming soon. The problem does not happen at all when there is only one machine in the cluster. This might not seem on the surface to be the same problem, but it seems suspicious that you're also noticing data consistency issues. Filip, as soon as we can we will get some test code together that reproduces the problem and get it to you. Is it appropriate to send it directly to you? Thanks, Brantley Hobbs -Original Message- From: Matthew Stone [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 6:23 PM To: Tomcat Users List Subject: Re: Session problems with cluster Filip, I discovered this when I had one node in the cluster. With no other nodes to receive a session from, I expected the session to be empty. Is the session intended to survive reloads in this case? I would guess not, just because of the complexities involved with the class definitions. This code should be enough to cause the problem after a stop and start of the context. :test.jsp html % Object obj = request.getSession ().getAttribute (my_object); if (obj == null) { out.println(MyObject was null. Adding instance to session, please start and stop context.br); request.getSession ().setAttribute (my_object, new testpkg.MyObject ()); } else { out.println (liMyObject was in session); out.println (liDo class names match: + (obj.getClass ().getName ().equals (testpkg.MyObject.class.getName (; out.println (liAre objects assignable: + (obj instanceof testpkg.MyObject) + br); try { testpkg.MyObject o = (testpkg.MyObject) request.getSession ().getAttribute (my_object); } catch (ClassCastException e) { out.println (li + e); } } % /html :MyObject.java package testpkg; public class MyObject implements java.io.Serializable { public int i = 0; } web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameTest/display-name distributable/ /web-app - Used all the packaged cluster settings. Thanks, Matthew Filip Hanik - Dev wrote: I'm expecting a null from the following line No, you would not expect null. The session replication mechanism is supposed to survive context reloads. But you should not be getting a ClassCastException, if you are I would love for you to submit a test case. When a context is reloaded, it will startup again, at which point the manager will request the state from another server. This data comes over serialized and is reloaded by the new classloader, hence you shouldn't get ClassCastExceptions, the only way you would get class cast exceptions is if you actually recompiled the class on one of your servers. Due to busy work schedule, I haven't had a chance to fix the context reload, I only recently found out (same way you did) that context reload was broken. Filip - Original Message - From: Matthew Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 18, 2004 2:09 PM Subject: Session problems with cluster When I restart the context of a clustered node the session doesnt seem to be cleared. After I restart the context, I'm expecting a null
RE: Session problems with cluster
Hmm, that's a bit concerning. I found your lack of faith disturbing, you must believe in the force luke, especially when you wish to pay $0 for the software :) Here is what is happening in on context reload, there is a setting in the server.xml called expireSessionsOnShutdown, if this is set to false, the sessions in that node wont get expired and survive the context reload, hence the ClassCastException getting thrown since your class is reloaded but the session remains in memory. Turning expireSessionsOnShutdown to true will expire the sessions and propagate the message to the other nodes. I realize that this behavior is a little bit odd, perhaps even screwed up, and I will modify it to function this way: 1. expireSessionsOnShutdown=true - will expire the sessions in the node and propage the expire message to the other nodes 2. expireSessionsOnShutdown=false - will expire the sessions in the local node, but not in the other cluster nodes. The bug described in this thread really comes into play when you reload context, which I never do, hence I forgot to account for that scenario. I will put in a fix for this into Tomcat 5.5 right away, and 5.0.x when time frees up. Filip -Original Message- From: Matthew Stone [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 3:39 PM To: Tomcat Users List Subject: Re: Session problems with cluster Filip Hanik (lists) wrote: What's concerning? the session actually randomly loses data sometimes To set the record straight, I have not worked with context reloads, so I don't know what changed from 5.0.25 to 5.0.28. But I do know this, don't expect clustering to work with nodes popping in and out all the time. Yes session replication is a nifty thing, but if you abuse it its going to not go over well, just like anything else. don't expect clustering to work? Let me know when you have a good test case, as all my tests are coming through just fine Interesting. There's not really anything in the test to change. Just putting an object in the session and getting out after a context restart. Well, I appreciate the time. Thanks, Matthew I will not be able to work on the context reload problem anytime soon, so don't hold your breath. Brantley, if you read this, make sure you populate your bug report with all info, OS JDK version, etc Filip -Original Message- From: Matthew Stone [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:15 AM To: Tomcat Users List Subject: Re: Session problems with cluster Hmm, that's a bit concerning. Brantley Hobbs wrote: Matt, We've seen a similar problem with our cluster. First off, let me say that I'm the person that filed bug #31495, so we've been struggling with clustering for a while now. In our case, we've actually stored a string as a session attribute on a page, and then keep reloading the page, appending to the string with each reload (e.g., myString += -1 should produce -1-1-1-1-1-1... with the string growing longer with each reload). What we've found is that the session actually randomly loses data sometimes (i.e., the string doesn't get appended). We're not at the point yet to be able to identify the problem well enough to file a bug, but that may be coming soon. The problem does not happen at all when there is only one machine in the cluster. This might not seem on the surface to be the same problem, but it seems suspicious that you're also noticing data consistency issues. Filip, as soon as we can we will get some test code together that reproduces the problem and get it to you. Is it appropriate to send it directly to you? Thanks, Brantley Hobbs -Original Message- From: Matthew Stone [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 6:23 PM To: Tomcat Users List Subject: Re: Session problems with cluster Filip, I discovered this when I had one node in the cluster. With no other nodes to receive a session from, I expected the session to be empty. Is the session intended to survive reloads in this case? I would guess not, just because of the complexities involved with the class definitions. This code should be enough to cause the problem after a stop and start of the context. :test.jsp html % Object obj = request.getSession ().getAttribute (my_object); if (obj == null) { out.println(MyObject was null. Adding instance to session, please start and stop context.br); request.getSession ().setAttribute (my_object, new testpkg.MyObject ()); } else { out.println (liMyObject was in session); out.println (liDo class names match: + (obj.getClass ().getName ().equals (testpkg.MyObject.class.getName (; out.println (liAre objects assignable: + (obj instanceof testpkg.MyObject) + br); try { testpkg.MyObject o = (testpkg.MyObject) request.getSession
RE: IIS slow and fast
rough guess, but never hurts to check: could it be that IE6 on Win2000 does some funky DNS check that it gets stuck on? I would do a print statement on the server when it receives the request, maybe it receives the request after 14.5 seconds and the actual request only takes 0.5, then it would be DNS or some other routing issue that is going on. Filip -Original Message- From: Robert Walther [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 5:11 PM To: [EMAIL PROTECTED] Subject: IIS slow and fast File Download from ONE is slow, ALL other configs are FAST Windows 2003 Server:Windows 2000 Professional |---| |---| | Tomcat 5.0.28 | SLOW| | | IIS6|- | IE6 | | JK2 | FROM CART | | |---| |---| Windows 2003 Server:Windows 2000 Professional |---| |---| | Tomcat 5.0.28 | FAST| ANY OTHER | | IIS6|- | BROWSER | | JK2 | FROM CART| | |---| |---| Windows 2003 Server:Windows XP and Mac OSX |---| |---| | Tomcat 5.0.28 | FAST| IE 6 | | IIS6|- | or Safari | | JK2 | FROM CART| | |---| |---| Linux RedHat ES 3.0:ALL Client OS's |---| |---| | Tomcat 5.0.28 | FAST|ANY Browser| | | Apache |- | | | JK | FROM CART| | |---| |---| Downloading a file from our website's cart to a Windows 2000 Pro desktop running latest IE 6 is slow and takes 15 seconds Downloading the same file to a Windows XP box running IE 6, a Windows Pro box running Mozilla, and a Mac OSX running safari takes approx 1 second. Linux / Apache is fast to all clients. Spoke with Microsoft, we put a 1M file in a virtual directory on IIS. It downloaded in approx 1 second to Windows Pro / IE6. So they say not our problem talk to the Tomcat / mod_jk users. But, When I take IIS/mod_jk out of the picture, and go directly to Tomcat on 8080 the download is fast on the Windows Pro / IE6. I still think it's a MS issue anyone know why the download is slow between IIS 6 and Windows 2000 Pro / IE6 and fast to all other clients. Confounded. Any suggestions Thanks!! Rob Walther Senior System Architect - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session problems with cluster
hi Ivan, it took me a while to figure out what was going on. its a coding/configuration problem on your part. Your code would have worked if you had configured SimpleTcpReplicationManager with useDirtyFlag=false instead of DeltaManager. to fix your code, you would need to do this replace: ((List)session.getAttribute(list)).add(new String(foo)); with: ((List)session.getAttribute(list)).add(new String(foo)); session.setAttribute(list,session.getAttribute(list)); and try again, the delta manager only replicates session delta's, and the only way to keep track of deltas are when the code calls setAttribute or removeAttribute Filip -Original Message- From: Ivan Vasquez [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 5:13 PM To: Tomcat Users List Subject: RE: Session problems with cluster Filip, here is a concrete case that you may find interesting. It's a very simple JSP that stores a List in the session, adds an item to it on every submission and then checks to see if there have been lost items since the previous request. To reproduce the error, just deploy in a cluster it and visit the page (index.jsp) Our tests are consistent in that, the moment any other clustered application is visited, this page will notify that it has lost items. Our main intention is to help identify the problem, because we believe! Tomcat 5.0.25 (5.0.28 has the reload problem, so we downgraded) JDK 1.4.2 Cluster config: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=false Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=10.0.0.1 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster index.jsp --- %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % %@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; % %@ page import=java.util.* % %@ page import=java.net.* % html script function submit_frm() { if (document.testform.listSize.value != document.testform.listPrevSize.value) alert('List out of sync: Reported size = ' + document.testform.listSize.value + ', expected = ' + document.testform.listPrevSize.value); else document.testform.submit(); } self.setTimeout('submit_frm()', 200); /script body h3% out.println(java.net.InetAddress.getLocalHost().getHostName()); %/h3 h4SessionID ${pageContext.session.id}/h4 form name=testform action=index.jsp % // Initialize list on first load or when no parameters are passed if (session.getAttribute(list) == null || request.getParameter(listSize) == null) { out.println(bList is null, creating/bbr); session.setAttribute(list, new ArrayList()); } out.println(bCollection Size/bbr); ((List)session.getAttribute(list)).add(new String(foo)); % br table trtdList size in session/td tdinput type=text name=listSize value=${fn:length(sessionScope.list)}//td/tr trtdPrevious list size + 1:/td tdinput type=text name=listPrevSize value=${param.listSize + 1}//td/tr /table br a href=index.jspRestart/a /form /body /html --- end index.jsp Thank you Ivan -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 5:39 PM To: Tomcat Users List Subject: RE: Session problems with cluster Hmm, that's a bit concerning. I found your lack of faith disturbing, you must believe in the force luke, especially when you wish to pay $0 for the software :) Here is what is happening in on context reload, there is a setting in the server.xml called expireSessionsOnShutdown, if this is set to false, the sessions in that node wont get expired and survive the context reload, hence the ClassCastException getting thrown since your class is reloaded but the session remains in memory. Turning expireSessionsOnShutdown to true will expire the sessions and propagate the message to the other nodes. I realize that this behavior is a little bit odd, perhaps
RE: Session problems with cluster
oh, I forgot to mention, useDirtyFlag is only used with SimpleTcpReplicationManager, cause there is no AOP code that could detect that objects inside the session have changed Filip -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 6:16 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: RE: Session problems with cluster hi Ivan, it took me a while to figure out what was going on. its a coding/configuration problem on your part. Your code would have worked if you had configured SimpleTcpReplicationManager with useDirtyFlag=false instead of DeltaManager. to fix your code, you would need to do this replace: ((List)session.getAttribute(list)).add(new String(foo)); with: ((List)session.getAttribute(list)).add(new String(foo)); session.setAttribute(list,session.getAttribute(list)); and try again, the delta manager only replicates session delta's, and the only way to keep track of deltas are when the code calls setAttribute or removeAttribute Filip -Original Message- From: Ivan Vasquez [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 5:13 PM To: Tomcat Users List Subject: RE: Session problems with cluster Filip, here is a concrete case that you may find interesting. It's a very simple JSP that stores a List in the session, adds an item to it on every submission and then checks to see if there have been lost items since the previous request. To reproduce the error, just deploy in a cluster it and visit the page (index.jsp) Our tests are consistent in that, the moment any other clustered application is visited, this page will notify that it has lost items. Our main intention is to help identify the problem, because we believe! Tomcat 5.0.25 (5.0.28 has the reload problem, so we downgraded) JDK 1.4.2 Cluster config: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=false Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=10.0.0.1 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster index.jsp --- %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % %@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions; % %@ page import=java.util.* % %@ page import=java.net.* % html script function submit_frm() { if (document.testform.listSize.value != document.testform.listPrevSize.value) alert('List out of sync: Reported size = ' + document.testform.listSize.value + ', expected = ' + document.testform.listPrevSize.value); else document.testform.submit(); } self.setTimeout('submit_frm()', 200); /script body h3% out.println(java.net.InetAddress.getLocalHost().getHostName()); %/h3 h4SessionID ${pageContext.session.id}/h4 form name=testform action=index.jsp % // Initialize list on first load or when no parameters are passed if (session.getAttribute(list) == null || request.getParameter(listSize) == null) { out.println(bList is null, creating/bbr); session.setAttribute(list, new ArrayList()); } out.println(bCollection Size/bbr); ((List)session.getAttribute(list)).add(new String(foo)); % br table trtdList size in session/td tdinput type=text name=listSize value=${fn:length(sessionScope.list)}//td/tr trtdPrevious list size + 1:/td tdinput type=text name=listPrevSize value=${param.listSize + 1}//td/tr /table br a href=index.jspRestart/a /form /body /html --- end index.jsp Thank you Ivan -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 5:39 PM To: Tomcat Users List Subject: RE: Session problems with cluster Hmm, that's a bit concerning. I found your lack of faith disturbing, you must believe in the force luke, especially when you wish to pay $0 for the software :) Here is what is happening in on context reload, there is a setting in the server.xml called
RE: Performance issue
sounds like an App problem, cause your hardware is sure powerful, assuming you configured your connector threads to handle enough concurrency Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 6:20 AM To: Tomcat Users List Subject: Re: Performance issue How big is your average session? On Wed, 6 Oct 2004, Faisal Abdullah wrote: Date: Wed, 6 Oct 2004 17:20:05 +0800 From: Faisal Abdullah [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED], Faisal Abdullah [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Performance issue Hi, I have 4 *really* sluggish Tomcats. All 4 are load balanced: Tomcat Version:4.1.30 Java: Sun 1.4.2_02 SMP: 4 CPU Xeon 2GHz Memory: 4GB OS: Redhat AS 3.0 Users can reach 500 at peak time (about 150 per server). It takes about 2-4 minutes to load. And we're also having session time-outs. Previously, JVM died quite often, so now we're using a wrapper to restart it after it crashes. I have 128M initial memory, and 2GB max memory for JVM. Is this normal? Is this a Tomcat issue, a tuning issue, or a very badly written app? Appreciate the help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: response.sendRedirect()
works for me -Original Message- From: Pablo Carretero Sánchez [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 9:39 AM To: [EMAIL PROTECTED] Subject: response.sendRedirect() Hi, I have a urgent problem response.sendRedirect() in Tomcat 5.0.27. It doesn't work in my appl. Can anyone help me. Thanks a lot -- __ Pablo Carretero Sánchez Cygnux Arquitecto de Software Pintor Velazquez nº 3 Esc Izq 7º B 28932 #8211; Móstoles (Madrid) Movil: +34 699929150 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Synchronization in cluster
That doesn't solve the problem -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 4:26 AM To: Tomcat Users List Subject: RE: Synchronization in cluster With this usage scenario i would recommend sticky sessions. -Original Message- From: Igor [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 8:59 PM To: [EMAIL PROTECTED] Subject: Re: Synchronization in cluster Users of my application can upload comma separeted files, that are imported in database. This process can take 10-30 minutes, if file is large, so new Thread is started with import process and user is redirected to refreshing page, that displays status of import. Information about import process is stored in static variable (import thread and status jsp can access this information). If it happens in one JVM, everething is ok. But what will be in the case of load balancing? Thank you, Igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installing the MySql jdbc driver on XP?
The driver manager is built into the JDK java.sql.DriverManager, there is nothing you have to do in particular to use it. All you do is classLoader.loadClass(your.jdbc.driver.name); DriverManager.getConnection(your.jdbc.url,username,password); Filip -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 5:08 PM To: 'Tomcat Users List' Subject: RE: Installing the MySql jdbc driver on XP? Thanks Mark -Original Message- From: Mark Benussi [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 2:45 PM To: [EMAIL PROTECTED] Subject: RE: Installing the MySql jdbc driver on XP? If your using eclipse just place the mysql connector jar in your projects jar list... there are many examples of using DriverManager... search the web. Sorry I cant be of more help but my code uses connection pooling and you need to find and understand the use of DriverManager in its most basic form. Original Message Follows From: John Najarian [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: Installing the MySql jdbc driver on XP? Date: Thu, 23 Sep 2004 14:12:10 -0700 Thanks Filip, I wanted to configure it to use a Driver Manager also. What I've been having a ton of trouble with is configuring Eclipse. I've downloaded some plugins but the 2nd one I ried to install should have been the 3rd. After knocking that around for a while I found a site which had the missing 2nd plugin and how to... But downloading plugin is taking forever. -Original Message- From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 1:45 PM To: Tomcat Users List Subject: Re: Installing the MySql jdbc driver on XP? there is nothing to do when installing a JDBC driver, especially if it is a type 4. Just copy the JAR file to WEB-INF/lib if you want to use the driver within your webapps, or just add the JAR to your CLASSPATH if you want to run it standalone look for JDBC tutorials Filip - Original Message - From: John Najarian [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, September 23, 2004 10:11 AM Subject: Installing the MySql jdbc driver on XP? I am trying to install the JDBC driver on an XP box to use it with a driver manager in Tomcat and to use it as stand alone for simple tests. I find the MySql installation documentation fragmented and difficult to follow. Any ideas would be appreciated. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.766 / Virus Database: 513 - Release Date: 9/17/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.766 / Virus Database: 513 - Release Date: 9/17/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Single Point of Failure Solutions for clustering Tomcat 5?
http://www.loadbalancer.org/download.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, September 20, 2004 2:37 PM To: Tomcat Users List Subject: Re: Single Point of Failure Solutions for clustering Tomcat 5? Hi Filip, Couldn't see much software over on loadbalancer.org!! cheers, David |-+ | | Filip Hanik - | | | Dev | | | [EMAIL PROTECTED]| | | om | | || | | 09/20/2004 02:05 | | | PM | | | Please respond to| | | Tomcat Users| | | List| | || |-+ --- -| | | | To: Tomcat Users List [EMAIL PROTECTED] | | cc: | | Subject: Re: Single Point of Failure Solutions for clustering Tomcat 5? | --- -| if you are really into loadbalancers, get www.loadbalancer.org (its open source, not sure what the licensing is) obviously, buying your own hardware can be cheaper. Filip - Original Message - From: Dale, Matt [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, September 20, 2004 12:53 PM Subject: RE: Single Point of Failure Solutions for clustering Tomcat 5? DNS round robin over 2 or more load balancers over the cluster would be 1 way although there are many others. There are numerous open source load balancers, I use and like Pen. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 September 2004 18:00 To: [EMAIL PROTECTED] Subject: Single Point of Failure Solutions for clustering Tomcat 5? Hi, Can anyone advise on solutions to having s Single Point of Failure when clustering Tomcat 5? Are there any opensource solutions out there? Any real life experiences would be greatly appreciated! cheers, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.766 / Virus Database: 513 - Release Date: 9/17/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.766 / Virus Database: 513 - Release Date: 9/17/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Frequent session expire in Tomcat 4.1.27
you do that in your own web.xml file see a tutorial on web.xml /servlets -Original Message- From: Arun Prasad R [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 10:59 PM To: Tomcat Users List Subject: Frequent session expire in Tomcat 4.1.27 hi i experience frequent session expire in Tomcat 4.1.27. is there any way to extend the expiry time in server configuration. Thanks in Advance, Arun - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.752 / Virus Database: 503 - Release Date: 9/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.752 / Virus Database: 503 - Release Date: 9/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 In-Memory Session Replication
I forgot to tell you the debug flag is not in place anymore. if you want to see debug messages, you have to enable it through the logger. I setup log4j and set the output to DEBUG to see all the replication messages, there are plenty of them :) Filip -Original Message- From: Tomcat Newbie [mailto:[EMAIL PROTECTED] Sent: Sunday, September 05, 2004 4:07 PM To: Tomcat Users List Subject: RE: Tomcat 5.5 In-Memory Session Replication did you try replication with 5.0.27? if that works for you, then for sure something broke. It does. Quietly, like 5.0.28, but it seems to work. I just tested 5.5 again, and I still cannot get it to replicate. 5.5 is still in dev mode, so you can't bank on everything working quit yet Yes, I understand. I was only testing replication for the first time anyway, since 5.5 will be production version before I know it. :-) You guys are both fast and good. Usually, I find that even alpha versions are pretty good. I will have to stick to 5.0.28 for now. :-) Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 In-Memory Session Replication
and to do this, very easy, just read /tomcat-docs/config/printer/logger.html Filip -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Sunday, September 05, 2004 4:05 PM To: Tomcat Users List Subject: RE: Tomcat 5.5 In-Memory Session Replication I forgot to tell you the debug flag is not in place anymore. if you want to see debug messages, you have to enable it through the logger. I setup log4j and set the output to DEBUG to see all the replication messages, there are plenty of them :) Filip -Original Message- From: Tomcat Newbie [mailto:[EMAIL PROTECTED] Sent: Sunday, September 05, 2004 4:07 PM To: Tomcat Users List Subject: RE: Tomcat 5.5 In-Memory Session Replication did you try replication with 5.0.27? if that works for you, then for sure something broke. It does. Quietly, like 5.0.28, but it seems to work. I just tested 5.5 again, and I still cannot get it to replicate. 5.5 is still in dev mode, so you can't bank on everything working quit yet Yes, I understand. I was only testing replication for the first time anyway, since 5.5 will be production version before I know it. :-) You guys are both fast and good. Usually, I find that even alpha versions are pretty good. I will have to stick to 5.0.28 for now. :-) Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 In-Memory Session Replication
Oki doki artichokie, I just had 5 min to spare :), so I found the bug and fixed it in the 5.5 branch. So replication should work like on 5.0.x in 5.5 now, farming is still broken in 5.5 Filip -Original Message- From: Tomcat Newbie [mailto:[EMAIL PROTECTED] Sent: Sunday, September 05, 2004 4:07 PM To: Tomcat Users List Subject: RE: Tomcat 5.5 In-Memory Session Replication did you try replication with 5.0.27? if that works for you, then for sure something broke. It does. Quietly, like 5.0.28, but it seems to work. I just tested 5.5 again, and I still cannot get it to replicate. 5.5 is still in dev mode, so you can't bank on everything working quit yet Yes, I understand. I was only testing replication for the first time anyway, since 5.5 will be production version before I know it. :-) You guys are both fast and good. Usually, I find that even alpha versions are pretty good. I will have to stick to 5.0.28 for now. :-) Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 In-Memory Session Replication
did you try replication with 5.0.27? if that works for you, then for sure something broke. 5.5 is still in dev mode, so you can't bank on everything working quit yet :) Filip -Original Message- From: Tomcat Newbie [mailto:[EMAIL PROTECTED] Sent: Saturday, September 04, 2004 4:51 AM To: Tomcat Users List Subject: RE: Tomcat 5.5 In-Memory Session Replication Thanks again, Filip. I am sending this response to document my experience for others. set up machines to only access mcast and tcp traffic from certain IPs and certain ports. Well, my primary concern was that I don't want _other_ hosts to join my cluster not the other way around, so I am guessing I have to limit my mcast invitations and tcp traffic to relevant parties only? :-) ok, I haven't tested replication on 5.5 yet myself, I've been to busy with corporate world. but from what I am reading, is that the replication valve is not issuing the transfer or session deltas. Maybe something broke...we'll have to check Sounds about right. Logs show original and replicate session creation. Most of the time, SessionListener will log correct original session attribute name, but null value. However, even when it does log both name and value, still there is no replication done. you do have the replication valve set up in server.xml right? I believe so. Default setup and I saw no instructions for additional setup anywhere for replication valve, other than the filter options. I figured I ventured into something too bleeding edge for me (I did so mainly because Jakarta site said that 5.5 was branched off from 5.0.27). So I went back to 5.0.28. Then, after spending a few hours pointlessly watching the logs for any activity other than mcast membership registrations, to my surprise, I discovered that the session attributes were replicating beautifully on 5.0.28, but without any logging. Yup, with all debug= cranked up all the way to 9 or 10. Go figure! Glad it works, though. I also found a link for JDBC persistence manager (http://www.ingrid.org/ jajakarta/tomcat/tomcat-4.0b5/src/catalina/docs/JDBCStore-howto.html), so I might go in that direction, since such setup would certainly address my security concerns. Similar, but less complete documentation is available for 5.x (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ config/manager.html). I have played with built-in MySQL replication and so far I have no complaints about its performance for low-load servers. I just need to make sure that it stores sessions in MySQL all the time, not just swapped. MySQL will take care of the rest. Regards, Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 In-Memory Session Replication
Well, my primary concern was that I don't want _other_ hosts to join my cluster not the other way around, so I am guessing I have to limit my mcast invitations and tcp traffic to relevant parties only? that is exactly the point I was trying to make. Setup your security in the OS that way you get more performance out of tomcat. If you allow mcast traffic from other hosts into your machine, you are already taking up resources. Filip -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Saturday, September 04, 2004 2:22 PM To: Tomcat Users List Subject: RE: Tomcat 5.5 In-Memory Session Replication did you try replication with 5.0.27? if that works for you, then for sure something broke. 5.5 is still in dev mode, so you can't bank on everything working quit yet :) Filip -Original Message- From: Tomcat Newbie [mailto:[EMAIL PROTECTED] Sent: Saturday, September 04, 2004 4:51 AM To: Tomcat Users List Subject: RE: Tomcat 5.5 In-Memory Session Replication Thanks again, Filip. I am sending this response to document my experience for others. set up machines to only access mcast and tcp traffic from certain IPs and certain ports. Well, my primary concern was that I don't want _other_ hosts to join my cluster not the other way around, so I am guessing I have to limit my mcast invitations and tcp traffic to relevant parties only? :-) ok, I haven't tested replication on 5.5 yet myself, I've been to busy with corporate world. but from what I am reading, is that the replication valve is not issuing the transfer or session deltas. Maybe something broke...we'll have to check Sounds about right. Logs show original and replicate session creation. Most of the time, SessionListener will log correct original session attribute name, but null value. However, even when it does log both name and value, still there is no replication done. you do have the replication valve set up in server.xml right? I believe so. Default setup and I saw no instructions for additional setup anywhere for replication valve, other than the filter options. I figured I ventured into something too bleeding edge for me (I did so mainly because Jakarta site said that 5.5 was branched off from 5.0.27). So I went back to 5.0.28. Then, after spending a few hours pointlessly watching the logs for any activity other than mcast membership registrations, to my surprise, I discovered that the session attributes were replicating beautifully on 5.0.28, but without any logging. Yup, with all debug= cranked up all the way to 9 or 10. Go figure! Glad it works, though. I also found a link for JDBC persistence manager (http://www.ingrid.org/ jajakarta/tomcat/tomcat-4.0b5/src/catalina/docs/JDBCStore-howto.html), so I might go in that direction, since such setup would certainly address my security concerns. Similar, but less complete documentation is available for 5.x (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ config/manager.html). I have played with built-in MySQL replication and so far I have no complaints about its performance for low-load servers. I just need to make sure that it stores sessions in MySQL all the time, not just swapped. MySQL will take care of the rest. Regards, Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat5.0.25 TCP Session Replication
conf looks good, (Bdo you have multicast enabling between your boxes? (B (BFilip (B (B-Original Message- (BFrom: $B4d:j(B $B?7(B [mailto:[EMAIL PROTECTED] (BSent: Friday, September 03, 2004 12:13 AM (BTo: [EMAIL PROTECTED] (BSubject: Tomcat5.0.25 TCP Session Replication (B (B (BOn Tomcat5.0.25 it doesn't replicate, even though I try to do session (Breplication. (B (BBelow is a setting. (B (Bserver.xml of SERVER 1 (BCluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" (B (BmanagerClassName="org.apache.catalina.cluster.session.DeltaManager" (BexpireSessionsOnShutdown="false" (BprintToScreen="true" (Bdebug="9" (BuseDirtyFlag="false" (B (BMembership (BclassName="org.apache.catalina.cluster.mcast.McastService" (BmcastAddr="228.0.0.4" (BmcastPort="45564" (BmcastFrequency="500" (BmcastDropTime="3000"/ (B (BReceiver (BclassName="org.apache.catalina.cluster.tcp.ReplicationListener" (BtcpListenAddress="10.108.128.91" (BtcpListenPort="4001" (BtcpSelectorTimeout="100" (BtcpThreadCount="6"/ (B (BSender (B (BclassName="org.apache.catalina.cluster.tcp.ReplicationTransmitter" (BreplicationMode="synchronous"/ (B (BValve className="org.apache.catalina.cluster.tcp.ReplicationValve" (Bfilter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;*\.html;.*\.txt;"/ (B/Cluster (B (Bserver.xml of SERVER 2 (BCluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" (B (BmanagerClassName="org.apache.catalina.cluster.session.DeltaManager" (BexpireSessionsOnShutdown="false" (BprintToScreen="true" (Bdebug="9" (BuseDirtyFlag="false" (B (BMembership (BclassName="org.apache.catalina.cluster.mcast.McastService" (BmcastAddr="228.0.0.4" (BmcastPort="45564" (BmcastFrequency="500" (BmcastDropTime="3000"/ (B (BReceiver (BclassName="org.apache.catalina.cluster.tcp.ReplicationListener" (BtcpListenAddress="10.108.128.93" (BtcpListenPort="4001" (BtcpSelectorTimeout="100" (BtcpThreadCount="6"/ (B (BSender (B (BclassName="org.apache.catalina.cluster.tcp.ReplicationTransmitter" (BreplicationMode="synchronous"/ (B (BValve className="org.apache.catalina.cluster.tcp.ReplicationValve" (Bfilter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;*\.html;.*\.txt;"/ (B/Cluster (B (B (BThe following is added on web.xml of application. (B (Bdistributable/ (B (BSERVER1:10.108.128.91 (B (BSERVER2:10.108.128.93 (B (BOS:both RedHat LinuxA3.0 (B (B (B (BThere're some packet to confirm each other on "tcpdump". (BSeesion Replication can be confirmed on Session Examplle . (B (BAbove all,are there any to notice insufficient settings or the settings? (B (B_ $B3Z$7$$3(J8;z$G%3%3%mEA$o$k%a%C%;%s%8%c!<(B http://messenger.msn.co.jp/ (B (B (B- (BTo unsubscribe, e-mail: [EMAIL PROTECTED] (BFor additional commands, e-mail: [EMAIL PROTECTED] (B--- (BIncoming mail is certified Virus Free. (BChecked by AVG anti-virus system (http://www.grisoft.com). (BVersion: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 (B (B--- (BOutgoing mail is certified Virus Free. (BChecked by AVG anti-virus system (http://www.grisoft.com). (BVersion: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 (B (B (B- (BTo unsubscribe, e-mail: [EMAIL PROTECTED] (BFor additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 In-Memory Session Replication
Make sure you have multicast enabled. This can be a little tricky if you run on a multihomed host, but you can google it. The only thing I see logged is the message: If it says skipping state transfer, no other members in the cluster, means that the members haven't discovered each other, this goes back to making sure your multicasting is working. In the log you will see that members are joining the cluster when it is working What prevents a hostile tomcat instance from joining the cluster when the cluster are you kidding me, there are no hostile tomcats, only friendly ones. (slap yourself on the head if you configure tomcats on the same multicast address but you don't want them to be in the same cluster, after a few times, you'll have it figured out :) Filip -Original Message- From: Tomcat Newbie [mailto:[EMAIL PROTECTED] Sent: Friday, September 03, 2004 6:27 PM To: Tomcat Users List Subject: Tomcat 5.5 In-Memory Session Replication I know the replication subject has been addressed somewhat for 5.x. I am trying my first replication setup with two 5.5 servers on the same host. Each Tomcat instance works just fine by itself. I followed the configuration notes for Tomcat in the documentation for in-memory replication, however I do not see any activity in the logs as far as replication is concerned. The only thing I see logged is the message: Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager start INFO: Starting clustering manager...:/servlets-examples Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager start INFO: Manager[/servlets-examples], skipping state transfer. No members active in cluster group. The two instances are setup with unique tcpListenPort properties. The application has distributable / in web.xml on both instances. I tried the setup with both dirtyFlag enabled and disabled. I even tried to put it behind Apache server proxy to get rid of localhost:port, but it has not changed anything. I still see no session replication activity. Each instance creates its own sessions and they are not propagated. Can someone offer some ideas as to how to proceed? Also, a couple of questions regarding the replication. What prevents a hostile tomcat instance from joining the cluster when the cluster is configured on multiple hosts? Is there any documentation on replication using JDBC--I saw it mentioned, but no examples or configuration options. Thanks, Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why is Tomcat/Connector Installation So Incredibly Painful??
it can also be as easy as ProxyPass /mywebapp http://localhost:8080/mywebapp ProxyPassReverse /mywebapp http://localhost:8080/mywebapp in httpd.conf if you are using mod_proxy, took me 5 minutes to get tomcat and apache to play nice together Filip -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Friday, September 03, 2004 7:06 PM To: Tomcat Users List Subject: Re: Why is Tomcat/Connector Installation So Incredibly Painful?? From: Peter Alvin [EMAIL PROTECTED] Don't get me wrong; I love Java; I love Tomcat. But why is it so incredibly painful to install Apache/Tomcat/Connector? It always takes me about two days. I look forward to it as much as doing my federal tax returns. It took two days the first time, now we have really good notes and a procedure to follow. I agree, it's complex. My usual advice is Getting Apache and Tomcat to play nicely together is a bit of an art form, but the good news is that once it's done, it just works and you can largely ignore it. It's different on every platform, and then you have things like HP deciding to relocate the config files every time they release a new version! So we have to hunt them down and put them back where we want them so that I can upgrade to a newer version of Tomcat straight from Jakarta. OTOH, I don't *like* for things to be done for me, I want to do it myself. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 In-Memory Session Replication
also forgot to mention, setting TTL on the multicast will keep the multicast messages from going all over the place Filip -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, September 03, 2004 7:53 PM To: Tomcat Users List Subject: RE: Tomcat 5.5 In-Memory Session Replication Make sure you have multicast enabled. This can be a little tricky if you run on a multihomed host, but you can google it. The only thing I see logged is the message: If it says skipping state transfer, no other members in the cluster, means that the members haven't discovered each other, this goes back to making sure your multicasting is working. In the log you will see that members are joining the cluster when it is working What prevents a hostile tomcat instance from joining the cluster when the cluster are you kidding me, there are no hostile tomcats, only friendly ones. (slap yourself on the head if you configure tomcats on the same multicast address but you don't want them to be in the same cluster, after a few times, you'll have it figured out :) Filip -Original Message- From: Tomcat Newbie [mailto:[EMAIL PROTECTED] Sent: Friday, September 03, 2004 6:27 PM To: Tomcat Users List Subject: Tomcat 5.5 In-Memory Session Replication I know the replication subject has been addressed somewhat for 5.x. I am trying my first replication setup with two 5.5 servers on the same host. Each Tomcat instance works just fine by itself. I followed the configuration notes for Tomcat in the documentation for in-memory replication, however I do not see any activity in the logs as far as replication is concerned. The only thing I see logged is the message: Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager start INFO: Starting clustering manager...:/servlets-examples Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager start INFO: Manager[/servlets-examples], skipping state transfer. No members active in cluster group. The two instances are setup with unique tcpListenPort properties. The application has distributable / in web.xml on both instances. I tried the setup with both dirtyFlag enabled and disabled. I even tried to put it behind Apache server proxy to get rid of localhost:port, but it has not changed anything. I still see no session replication activity. Each instance creates its own sessions and they are not propagated. Can someone offer some ideas as to how to proceed? Also, a couple of questions regarding the replication. What prevents a hostile tomcat instance from joining the cluster when the cluster is configured on multiple hosts? Is there any documentation on replication using JDBC--I saw it mentioned, but no examples or configuration options. Thanks, Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 In-Memory Session Replication
I am sure, my question was not very clear regarding security. that is true, I'm sure you could limit this traffic with configuration on your OS between your two servers. set up machines to only access mcast and tcp traffic from certain IPs and certain ports. cause the feature you talk about, doesn't exist in Tomcat today ok, I haven't tested replication on 5.5 yet myself, I've been to busy with corporate world. but from what I am reading, is that the replication valve is not issuing the transfer or session deltas. Maybe something broke...we'll have to check you do have the replication valve set up in server.xml right? Filip -Original Message- From: Tomcat Newbie [mailto:[EMAIL PROTECTED] Sent: Friday, September 03, 2004 11:36 PM To: Tomcat Users List Subject: RE: Tomcat 5.5 In-Memory Session Replication Filip, Thank you for your assistance. You are very helpful as usual. Make sure you have multicast enabled. This can be a little tricky if you run on a multihomed host, but you can google it. OK, that may not be that difficult on a single host, or so I hope. I tried on Fedora Linux (ifconfig showed multicast enabled, but a route was missing in my setup): route add -net 224.0.0.0 netmask 224.0.0.0 dev lo which now allows me to see servers joining. This roue basically means that I am not using network, or so they say. :-) (One probably should stop tomcat instances before changing network settings, since CPU use shot almost to 100%, as noted in the docs.) are you kidding me, there are no hostile tomcats, only friendly ones. (slap yourself on the head if you configure tomcats on the same multicast address but you don't want them to be in the same cluster, after a few times, you'll have it figured out :) I am sure, my question was not very clear regarding security. Example, I use two servers for webhosting. If I understand anything about multicasting, that would imply that every multicast-able server on the LAN will be receiving the brodacast? So if there was another Tomcat instance on the LAN, which happened to have mcastAddress same as my cluster, would it not receive an invitation to join the cluster? Apparently, setting TTL would limit the multicast at a router, however I am not sure if it applies to this situation, when I am dealing basically with a LAN. I made some progress in a sense that I can see servers joining. I see session created on one server and also on another server. Session attributes do not replicate however (with a default replication filter and useDirtyFlag=true). Often SessionListener reports the attribute value of null, but a few times when it actually reported a real value, it still did not replicate. So I can access app instances on each server with the same cookie and session information is different. Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and .htaccess
you can easily secure directories with entries in the web.xml file, Filip -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Saturday, August 28, 2004 6:12 PM To: Tomcat Users List Subject: Re: Tomcat and .htaccess On Sat, Aug 28, 2004 at 04:27:25PM -0600, Morris Hooten wrote: : Is there an easy way to use .htaccess files with tomcat 5 : without having to install apache? No, unless you count hacking the Tomcat source as easy. This question comes up on the list frequently; you'd do well to search the archives for the full answer (and before posting other questions). Long story short: Stop thinking in terms of Apache (because Tomcat's not Apache) and webserver concepts. Approach your design from the perspective of a spec-compliant webapp and use the spec as your guide for what's possible. Here's a hint: filters are part of the spec. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sessions not (quite) working?
are you seeing the same thing going directly to Tomcat? -Original Message- From: Kevin Matthews [mailto:[EMAIL PROTECTED] Sent: Saturday, August 28, 2004 7:34 PM To: [EMAIL PROTECTED] Subject: Sessions not (quite) working? Hi all, I was hoping somebody on this list might be able to point me in the right direction on a problem I'm having. I've searched all over the net, and haven't found anyone yet with a similar problem and a solution to it. For some reason session scope for JavaBeans in my JSP's does not seem to work. Application (as well as the others) scope works fine. I do have the @ page session=true tag in my JSP's. When the JSP loads, a session cookie gets set, but if you reload the page, another one is created, and the Bean is re-instantiated. I'm running Tomcat 5, JK2, and Apache 2. Thank you for any information anyone can offer. I've hit a wall here... Kevin -- -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.2.4 (Darwin) mQGhBD8LMkwRBACta8pz/dwoGJH40D7Xr2oD9T00xZGu+d/Boe3poROVrudndCUE t//odhk1o0aOZ0+12Vw7TEFKnv248dE/D3KHSTl7cUeHZqRzNFlgqINAZHaTmhpm tuBIydP3Ae/yKpqoHCbOcTKyNGrNk3SlPn+kFTmxPuqVc3CgZDdk8mHbwwCg4YKS ZR2G2avWAeqfzfRItiJ7ssUD+MP6kJ0yRyqWNCYYnP1PPgvP1qD5FO2UhydRP1kj 0lsfHRPlMzqS2O9nErEPFuIWmaa9VFYlnAK8bgLC+ygPT+29egzU+P38WvxMU6NV WoGrOausDe5pEBzS68z1Uj6exIoJ88v/i1ncfoACIukkTIt5p+r9kWYS2wNGu6JS upsD/2DfgcgNfuf8J5ZqtpLvuJ/YZrfQpAWzacRDyfIXsPoNawPT1IZCN8tsvqzY VpTCbrznq6TzPM6Gpr99tZgV2abFII3OCbOA8+XSi1BWT0Hn3YG3XN6/whII/Ipx 4gIJkAZbkSASp2gbJlOWnNfgPgzCGAxo/l9EKj86+W6JleL6tCZLZXZpbiBNYXR0 aGV3cyA8c29sb2hhQGRpc2JlbGlldmUubmV0PohhBBMRAgAhBQI/CzJMBQkB4TOA BgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEIf3kZLKNkLgACgAn1EDR10qBKuB7QKP bqaxqA3liYh3AJ9YfLWZGgqWs4r8eRzeY35h63hiV7kCDQQ/CzLNEAgAwOS64vVW v7/qFBYNteZzYnY4hrymNnaIFCYIY+155/gmb0rQV/2fXgqG30CnGUDkBsdppu40 tncPsiM71nxb2+B7ntldUg2l9Ta/vnR+/n9kTqSRaPVKObzKxJCZ8AD0LyMTadM8 pndj3tptu4/z+kGbLN/Hrmddoz61ZoaIVjs07xdsGXpo6lwiXswdrw8zEOmujqB7 qUKeJSgxNJt7Onu0qcSaEr56+8mfQ8DOtleSKKSIYC95pxEWlkhhLdcuv7dt21sE H6+Sigr5FE84TzGLHt/Jp0v0n5ylFloSEkExP0Ec2bZTc2WLr3P1pLwtbO5wxLgu dBBFjRqPXYeiZwADBQf6A4U8W+u+l8DSYNOAc0AjrwiYPfRPffthoa3Z/jb2rT2J C5spjp+QMKGlO0Bd7VTC75+aF61BOTm7MRhAjkGIhANsI5ePHhJADwBLsu5qMxJ2 aIog7CofL91fPFWrugaBXkpkkJKGnGbjuM2HTp/pz1lDieu0HTpie+0Y3tQB/igM 2r8y2M5Uk06zgc1O/xgcw2RnGknJSdw8Utl1NZ7rK4poMcpI+s3nkl5WGekMVSSw h6oCxY+mjJlKPWCdihZMI0k2B3+rtq/AaWuN5K4tz+T3snailFiA40/OM1HgZL6I igo7T2P2hePJqu8ziakn6m4Bf8mwySVqT3/sc27ZRIhMBBgRAgAMBQI/CzLNBQkB 4TOAAAoJEIf3kZLKNkLgubUAoIKi0r89MlHvNi8/TEZzT4NgvP7zAJ99zHLpS0rU sXaEgvgYkggUNl5Bww== =ohCp -END PGP PUBLIC KEY BLOCK- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Access JBoss from Tomcat
there are a gazillion tutorials on how to access EJB on google. this is very simple 1. Place your jboss-client libraries (including the class files for your ejb home and interface) in WEB-INF/lib (as jar files) 2. Get the JNDI context for the JBoss server Properties props = new Properties(); props.setProperty(...); //set the URL to the jboss server InitialContext ctx = new InitialContext(props); MyEJBHome ejbHome = (MyEJBHome)ctx.lookup(your.jndi.name.for.ejb); MyEJB ejb = ejbHome.create(); //invoke the ejb ejb.pleaseGoogleForInfo(); and that is it Filip -Original Message- From: Darryl L. Pierce [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 6:06 PM To: Tomcat Users List Subject: Re: Access JBoss from Tomcat On Thursday 26 August 2004 06:36 pm, Robert F. Hall wrote: With web services comm is done over http. With EJBs comm is done using RMI Both have overhead costs. And both can be suprisingly efficient when you consider everything that is involved in a round-trip. Okay, whatever. The point is, I don't want to use web services. I want to access them as EJBs. That's what I'm looking for advice on, not on doing it some other way. Thanks for you input, though. :) -- Darryl L. Pierce [EMAIL PROTECTED] Visit the Infobahn Offramp - http://mypage.org/mcpierce Lobby, lobby, lobby, lobby, lobby, lobby, lobby, lobby... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Access JBoss from Tomcat
just access the EJBs the same way its been done since the spec started. Lookup the EJB through JNDI, then invoke its method. Filip -Original Message- From: Robert F. Hall [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 5:50 PM To: Tomcat Users List Subject: Re: Access JBoss from Tomcat Howdy, You could access your JBoss hosted EJBs as web services. It's been awhile since I did it, but as I recall it was pretty straight forward to present an EJB as a web service using JBoss/Axis. You won't need to secure your web services since the host is on your internal network and can be prottected from external access. You'll need WSDL definitions and then can use org.apache.axis.wsdl.WSDL2Java to generate Java client code. JBoss provides some assistance for presenting an EJB as a web service, see org.jboss.net.axis.server.EJBProvider. Direct access to the EJBs would also be possible, with the client code residing in your perimeter Tomcat server. HTH, Robert Darryl L. Pierce wrote: I have a Tomcat server running on the perimeter of my network. I am trying to add some EJBs to the architecture to handle some authentication tasks for users. I need this work to be done within the network, so don't want to put JBoss on the perimeter. I want to access my JBoss server from my Tomcat server. How do I configure Tomcat to talk to JBoss? All links I find online talk about JBoss with Tomcat within it, and I've not found any information on configuring a standalone Tomcat to talk to JBoss. My Tomcat server is 4.1.30 and my JBoss server is 3.2.5. Any help is appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do I configure Tomcat to translate UTF-8 encoded parameters
doesn't URIEncoding suggest that the URI is encoded, in a POST, the parameters are passed in the body, not in the URI? -Original Message- From: Rick Wong [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 8:08 PM To: Tomcat Users List Subject: How do I configure Tomcat to translate UTF-8 encoded parameters Hi, I am using Tomcat 5.0.26. I configured the HTTP connector to decode URI with setting URIEncoding=UTF-8 Connector port=8080 address=${jboss.bind.address} maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 URIEncoding=UTF-8 connectionTimeout=2 disableUploadTimeout=true/ This works for my pages that accept HTTP GET request. Unicode input parameter values that are UTF-8 encoded are properly decoded when calling request.getParameter(). However, if the request is HTTP POST, the input parameter values are mangled. Am I missing some configuration settings? I have the following simple JSP page to illustrate the problem. %@ page contentType=text/html;charset=UTF-8 % html head titleTesting UTF-8/title meta http-equiv=Content-Type content=text/html; charset=UTF-8 /head body Type in UNICODE characters in input field and click the Submit button. h1Testing UTF-8 using GET/h1 form action=%=request.getRequestURI()% method=GET input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form h1Testing UTF-8 using POST/h1 form action=%=request.getRequestURI()% method=POST input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form /body /html -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I make cluster nodes communicate info other than session
2 hours and you already crying ;) In the clustering code there is something called a org.apache.catalina.cluster.MessageListener. this is an interface that you implement, then you register your object with the cluster. When the cluster receives a message, it will call accept() on the listener, if acept returns true, it will invoke messageReceived. All your messages that you send/receive through the cluster, must implement ClusterMessage Filip -Original Message- From: Srinivas Rao Ch [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 6:41 AM To: Tomcat Users List Subject: RE: How can I make cluster nodes communicate info other than session Can someone please answer my queriees Regards, Srinivas -Original Message- From: Srinivas Rao Ch [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 2:28 PM To: Tomcat Users List Subject: How can I make cluster nodes communicate info other than session 1. I have to design an application in which the cluster nodes and LB will be communicating application specific information other than session info. How can I do this? Do I need to subclass/implement ReplicationTransmitter and ReplicationListener like classes? Or is there any other way? 2. I am using the balancer application of TC for load balancing, once after the request is dispatched to the cluster node the subsequent requests are going to the same cluster node directly(Obviusly). Now I want to make each and every request of the conversation go the the same cluster node through LB. Can I do this without changing anything in my application. Regards, Srinivas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.735 / Virus Database: 489 - Release Date: 8/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.735 / Virus Database: 489 - Release Date: 8/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: adding distributable/ garbles sesion id string
JBoss doesn't use Tomcat clustering code, they have their own, hence you will see a different session id Filip -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 2:45 PM To: Tomcat Users List Subject: RE: adding distributable/ garbles sesion id string Hi What you think is one matter, and servlet specification compliance is another ;) Is there something in the Servlet Spec that's being violated, or is the clustering behavior not working for you? In other words, are you seeing a bug or just unhappy that the session ID is not human-readable? When you set distributable, it's a big deal. The clustering code kicks in and among other things it can modify session IDs to prepare for replication and state synchronization among cluster nodes. So if you change between distributable and not on the fly, you can expect this session management behavior change. Yoav Shapira Millennium Research Informatics -Original Message- From: Nikita [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 3:35 PM To: Tomcat Users List Subject: Re: adding distributable/ garbles sesion id string i don't think this behavior is correct. for example, i deploy an app without dist. and get a session id. then, on the fly, i add this tag to web.xml (i originally deployed an exploded war), and if the web page is then refreshed, i get this new, garbled string. but, if i use stand-alone tomcat, i *never* get a session stings with alternating case and '*'. seems to me like there's something wrong with character encoding... -nikita Shapira, Yoav wrote: Hi, As long as the session ID is a valid string, it's not a bug. There's no requirement that the session ID be human-readable right? ;) Yoav Shapira Millennium Research Informatics -Original Message- From: Nikita [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 3:25 PM To: [EMAIL PROTECTED] Subject: adding distributable/ garbles sesion id string Hello, I have a very simple war app. it consists of only test.jsp, a page that prints out session id string. The problem is that if i add distributable to web.xml, this string becomes garbled (both in the browser and in console output): without distributable/: session id: 5129D795478E6529E233E1909EF85CB7.node1 with distributable/: session id: gDMzbOR3bJ8SNSmC3dDMWQ**.node1 I deployed the same war as in stand-alone tomcat 5.0.27 under both xp and linux and saw no problems. So seems like this is a jboss issue. however, jboss 4.0rc1 uses tomcat 5.0.27-dev, and i'm wondering if upgrading to 5.0.27 would help at all. Could this be related to the fact that i'm using mod_jk 1.2.6? If so, should i post this in clustering forum? I'd really appreciate any insight my setup: jboss 4.0 rc1, clustered with mod_jk 1.2.6, tomcat 5.0.27-dev integrated os: jds 1 linux (based on suse enterprise desktop 1.0), also tried win xp kernel: 2.4.21-189-default java version 1.4.2_04 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode) thanks, -nikita --test.jsp %@ page contentType=text/html; charset=iso-8859-1 language=java import=java.sql.* errorPage= % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 titleUntitled Document/title /head body session id: %=session.getId()% P last accessed: %=new java.util.Date()% /body /html ---end test.jsp-- -web.xml--- ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameTest Application/display-name description Sample session jsp /description /web-app ---end web.xml--- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail,
RE: Tomcat Clusterin Multicast Multiinstances
no, the address already in use is tcpListenPort, that has to change if you run two instances on the same machine Filip -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 2:51 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: AW: Tomcat Clusterin Multicast Multiinstances Hi again, you are right with the 2Gb, sorry. It's leaving a netto of 1.6 GB ish for Tomcat here. My problem was referring to the clustersection of server.xml rather than the standard IP: mcastAddr = the multicast address, has to be the same for all the nodes mcastPort = the multicast port, has to be the same for all the nodes So even when everything else can be configured per Instance, these addr needs to be the same. So when I start up the second instance of Tomcat on the server, it says that the mcastAddr (=228.0.0.4 port 45564) is already in use and it can't bind to it ... -- INFO: Sleeping for 2000 secs to establish cluster membership 18.08.2004 09:47:19 org.apache.catalina.cluster.tcp.ReplicationListener run SCHWERWIEGEND: Unable to start cluster listener. java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationListen er.java:104) at org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListener. java:85) at java.lang.Thread.run(Unknown Source) - -- Björn Andersen www.premiere.de -Ursprüngliche Nachricht- Von: Dale, Matt [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 17. August 2004 18:19 An: Tomcat Users List Betreff: RE: Tomcat Clusterin Multicast Multiinstances Memory limit should be 2 Gig for JVM's running in a 32 bit operating system. More for the 64 bit JVM's. I think you would have to have virtual IP addresses on that machine and run tomcats on specific IP addresses for you to use the multicasting. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 17 August 2004 13:42 To: [EMAIL PROTECTED] Subject: Tomcat Clusterin Multicast Multiinstances Hi, can anyone tell me how Tomcats can be configured as a cluster with session replication when there is more than one TC-Instance on one machine? We need multi-instance because of the 1 Gig mem-limit to the jvm's. Or has that changed meanwhile too? -- Björn Andersen Webservices www.premiere.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.735 / Virus Database: 489 - Release Date: 8/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.735 / Virus Database: 489 - Release Date: 8/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat clustering
mcastAddr is a multicast IP address, range from 224.0.0.0 - google it Filip -Original Message- From: Srinivas Rao Ch [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 7:01 AM To: Tomcat Users List Subject: RE: Tomcat clustering Can you please tell me what is mCastAddr theoritically, Do I need to run any service there(Or something like Multicast server) to be a valid multicast address? Can you please eloberate on this, or point me to some useful link on this. Regards, Srinivas -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 5:19 PM To: Tomcat Users List Subject: RE: Tomcat clustering Your first problem is the mCastAddr, firstly it should be an IP address as no dns lookups are done, secondly it shouldnt be a machine name, it should be a valid multicast address, the default is 228.0.0.4. I would suggest setting your tcpListenAddreess back to auto as per the default as 127.0.0.1 will not hear the multicast ping. Ta Matt -Original Message- From: Srinivas Rao Ch [mailto:[EMAIL PROTECTED] Sent: 17 August 2004 12:25 To: Tomcat Users List Subject: RE: Tomcat clustering Hi Matt, Here's my cluster part of server.xml. And, srao is my machine name. Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=srao mcastPort=45564 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=127.0.0.1 tcpListenPort=4000 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster Thanks for the interest. Regards, Srinivas -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 4:56 PM To: Tomcat Users List Subject: RE: Tomcat clustering I didnt mean mcastAddr, I meant tcpListenAddress, you have this set to 127.0.0.1 (Loopback) which is not available for external access so the mulitcast will never get to it. I'm not sure what's causing your exception though, you'd need to post the cluster part of your server.xml for a better guess at the problem. Ta Matt -Original Message- From: Srinivas Rao Ch [mailto:[EMAIL PROTECTED] Sent: 17 August 2004 12:05 To: Tomcat Users List Subject: RE: Tomcat clustering Matt, Thanks for the reply. Do you mean mcastAddr the loopback address? If yes, I am not using the root machine(Load Balancer, or the machine which takes request from clients) for clustering. And before that, seems that the cluster-nodes are not starting the cluster service. I am getting the following exception at the console. SEVERE: Unable to start cluster. java.lang.NullPointerException at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:804) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:756) at org.apache.catalina.cluster.MembershipFactory.getMembershipService(Membershi pFactory.java:93) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpCluster.java :491) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1115) at org.apache.catalina.core.StandardHost.start(StandardHost.java:816) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:234 Can you please tell me where I was wrong. Regards, Srinivas -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 4:17 PM To: Tomcat Users List Subject: RE: Tomcat clustering I think you may have 2 problems here, firstly the port has to be the same accross all the tomcats and secondly (I could be wrong about this one) but I think by specifying the loopback address as the listen address means that it wont listen on the external interface, therefore the multicast will never be heard. Ta Matt -Original Message- From: Srinivas Rao Ch [mailto:[EMAIL PROTECTED] Sent: 17 August 2004 11:26 To: Tomcat Users List Subject: Tomcat clustering I am getting problems in configuring my tomcat for clustering. Nodes are not recognizing each
RE: Tomcat clustering without Apache
session replication is supported in tomcat without apache in tomcat 5, just uncomment the cluster section in server.xml, also, there are online docs http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html Filip -Original Message- From: Mitchell Teixeira [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 11:23 AM To: [EMAIL PROTECTED] Subject: RE: Tomcat clustering without Apache Thanks for the responses so far on this topic. Seems like I need to elaborate a little We are looking towards Tomcat clustering to solve a problem caused by so-called Megaproxy ISPs such as AOL, etc. These ISPs make it look as if the same client is coming from multiple IP addresses. This breaks our app, quite simply. We're hoping that clustering, with its replicated session data will resolve the problem where a customer hitting one physical server and adding items to the cart (and therefore session data) then goes to checkout and at that moment they appear to be coming from a different IP address and end up on the other physical server and an empty cart! Load balancing with stickiness helps some, but not completely. Add SSL requirements to the mix and you can imagine the headache. There are lots of load balancing and hardware accellerator vendors professing to have a solution, but none of these are really addressing the root problem. So, with all this said, is it possible to make two or more physical servers talk as a Tomcat cluster without Apache or IIS, etc.? All references seem to rely on Apache to make clustering happen. (just like some texts on JSP rely too much on using Struts to teach JSP! end rant). Thanks for any help/ideas. MitchellT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.735 / Virus Database: 489 - Release Date: 8/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.735 / Virus Database: 489 - Release Date: 8/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cluster didn't replicat sessions
also the debug flag is obsolete, instead enable debug level using log4j or the other logger Filip -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Friday, July 16, 2004 3:26 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: cluster didn't replicat sessions Hi, Have you set the distributable tag in your context's web.xml? If so, please post the catalina.out of both so that I can see that the tomcats have joined the cluster. If not put distributable/ inside your webapp tags in the web.xml Ta Matt -Original Message- From: Roland Mieslinger [mailto:[EMAIL PROTECTED] Sent: 16 July 2004 20:30 To: [EMAIL PROTECTED] Subject: cluster didn't replicat sessions Hi, we are running tomcat 5.0.27 on two servers ( Solaris 8, JDK 1.4.2_02 ), with apache and AJP connector in a cluster configuration. Loadbalancing is done by an external HW device. My problem is, that sessions are not replicated between the nodes. This is my cluster config ( most taken from sample ) Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster name=XYZ managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true debug=9 Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=239.255.255.1 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=x.y.z.170 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6 debug=9/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled debug=9/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster (tcpListenAddress is x.y.z.171 on the other node) Both nodes are sending multicast packets to 239.255.255.1 ( verfied with snoop ). This packets contains the correct values for replication socket of the sending host (e. g. tcp://x.y.z.171:4001). Telnet connections to port 4001 are accepted on both nodes. There is not connection between both nodes on port 4001 ( Should I expect one? ). I've set debug=9 ( what is the highest possible value? ) but didn't see errors in neither catalina.out nor server.log. The application works well if all requests are directed to the same node. Any ideas how to troubleshoot this problem are welcome. Is it correct that setting useDirtyFlag=false forces replication in any case after the request has been processed? Thanx for your help. Roland Mieslinger Systemadministrator UNIX - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.721 / Virus Database: 477 - Release Date: 7/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.721 / Virus Database: 477 - Release Date: 7/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session Replication with Tomcat 5.0.19
1) Yes, you assumptions are correct imagine this code Map map = (Map)session.getAttribute(map); map.put(test,test); in this scenario, the simple tcp replication manager comes in handy. 2) Session activate/passivate is not invoked. I didn't really think of it as activation/passivation when it gets replicated. I can for sure add it in, if there is a need for it. Enabling debug mode using log4j will show you exactly what sessions get replicated and when, for more info on how to do that, http://www.mail-archive.com/[EMAIL PROTECTED]/msg126799.html -Original Message- From: Weseloh, Nicole [mailto:[EMAIL PROTECTED] Sent: Friday, June 04, 2004 5:26 AM To: Tomcat Users List (E-Mail) Subject: Session Replication with Tomcat 5.0.19 Hello, I've got two questions concerning in memory session replication: 1.) What exactly is the difference between SimpleTcpReplicationManager and DeltaManager? I guess that SimpleTcpReplicationManager replicates the whole session, while DeltaManager replicates only the attributes which changed. Is that correct? As far as I see, DeltaManager's performance would be much better, so what reasons could there be to use a SimpleTcpReplicationManager after all? 2.) I'd like to have a logmessage each time a session gets replicated (just for learning purpose, I like to see what's going on... ;-) ), so one of my objects I store in each session implements HttpSessionBindingListener and HttpSessionActivationListener. The object is definitely stored in the session (valueBound() shows me in the log..), and the session gets replicated, I guess - at least, I've got the valueBound() - log on both cluster nodes. However, willPassivate() and didActivate() are never called. (no log output there. ) Yes, I've set useDirtyFlag = false (otherwise, no special configurations in server.xml - just the default) and the cluster members know each other... I googled a whole day, read the java doc and everything else I could find.. but still couldn't find out how SessionActivation exactly works... I assume a session willPassivate, gets replicated and then didActivate - or am I completely wrong? Thanks, Nicole Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.692 / Virus Database: 453 - Release Date: 5/28/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.692 / Virus Database: 453 - Release Date: 5/28/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cluster problem ??
next major release will have this feature -Original Message- From: Eric Chow [mailto:[EMAIL PROTECTED] Sent: Monday, May 31, 2004 3:12 AM To: Tomcat Users List Subject: Cluster problem ?? Hello, I setup two Tomcat5 in cluster mode. If it is possible to synchronize all the application from one to another one ?? For example, I deploy a WAR in Tomcat1, it will be automatic deploy to Tomcat2. Or I deploy another web app in Tomcat2, Tomcat1 will be get the same app. Eric == If you know what you are doing, it is not called RESEARCH! == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.692 / Virus Database: 453 - Release Date: 5/28/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.692 / Virus Database: 453 - Release Date: 5/28/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Log4j Problem w/Tomcat 5.0.24 and JSVC
After hours of messing around trying to get the log4j to initialize looking in the archives would have saved you hours of work! http://www.mail-archive.com/[EMAIL PROTECTED]/msg126799.html Filip -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: Friday, May 28, 2004 2:53 PM To: Tomcat Users List Subject: Re: Log4j Problem w/Tomcat 5.0.24 and JSVC After hours of messing around trying to get the log4j to initialize with tomcat here's what you need to do: Put the log4j jar file into $CATALINA_HOME/common/lib, and your log4j.properties or log4j.xml into $CATALINA_HOME/common/classes. Then modify your tomcat jsvc classpath variable to look something like: CLASSPATH=$CLASSPATH:\ $JAVA_HOME/lib/tools.jar:\ $DAEMON_HOME/dist/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar:\ $CATALINA_HOME/common/lib/log4j-1.2.8.jar:\ $CATALINA_HOME/common/classes And wallah everything will work =) -David - Original Message - From: David Erickson [EMAIL PROTECTED] To: Tomcat-User List [EMAIL PROTECTED] Sent: Friday, May 28, 2004 11:48 AM Subject: Log4j Problem w/Tomcat 5.0.24 and JSVC Hey All I am running Tomcat 5.0.24 on a RH9 Machine, at startup using JSVC. My root problem is I am unable to get tomcat's SSL port to run on 443.. (works peachy on 8443, but when I hit 443 I get nothing it just hangs and timesout). Well anyway I was trying to get Log4j logging to work so I could see if tomcat was outputting anything funny, I stuck the log4j jar into common/lib, built a log4j.properties file and put it in common/classes, but for some reason log4j is not being initializized from that props file, its as if common/classes isn't being read. Here's the file I am using: ## # Appender Definitions log4j.appender.ConsoleFile=org.apache.log4j.DailyRollingFileAppender log4j.appender.ConsoleFile.file=${catalina.home}/logs/console.log log4j.appender.ConsoleFile.datePattern='.'-MM-dd log4j.appender.ConsoleFile.layout=org.apache.log4j.PatternLayout log4j.appender.ConsoleFile.layout.ConversionPattern=%-d [%-5p] %c - %m%n # # Logger Definitions log4j.debug=TRUE log4j.rootLogger=ERROR, ConsoleFile log4j.logger.org.apache=DEBUG, ConsoleFile log4j.logger.org.apache.commons=ERROR, ConsoleFile its not creating my console.log file or anything, and I'm getting no debug output to the catalina.out file created by jsvc. My webapp also uses log4j and in its prop's i set log4j's debug to be on and it told me there was no rootlogger.. so somehow this file is not being parsed. Permissions are good, set as tomcat/tomcat the user that jsvc delegates to. I'm at a loss as to what is goin on, my windows dev box has this same setup and works great. The only diff is its not using jsvc, is that a possible problem here? For kicks and giggles I added the catalina_home/common/lib and classes dirs to jsvc's classpath it launches with but that didnt help either. Help appreciated!! -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: A cluster question
Is there any other way to force replication apart from calling session.setAttribute(name, bean) yes, there is, but not using the DeltaManager, instead use SimpleTcpReplicationMananger and set useDirtyFlag=false the useDirtyFlag is ignored on the delta manager, since the delta manager only replicates deltas. filip -Original Message- From: Ilyschenko, Vlad [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 9:32 AM To: Tomcat Users List Subject: A cluster question Hello, I have a session bean that changes its state as pages call methods on that bean. I want this bean to be replictated to other cluster members but it seems like it gets replicated only once, straight after it is created. Is there any other way to force replication apart from calling session.setAttribute(name, bean) ? I have tried useDirtyFlag true and false - no luck. The application is distributed and all other things do get replicated. Regards, Vlad This is a little test case for my problem: test.jsp: - jsp:useBean id=mybean class=TestBean scope=session / % out.print(mybean.a()); % TestBean.java - import org.apache.log4j.Logger; import java.io.Serializable; import java.io.IOException; import java.util.Random; public class TestBean implements Serializable{ private static Logger logger = Logger.getLogger(TestBean.class); private long m_a = 0; private Random rnd = new Random(System.currentTimeMillis()); public long a() { m_a = rnd.nextLong(); return m_a; } private void writeObject(java.io.ObjectOutputStream out) throws IOException { //logger.debug(Serialized); System.out.println(Serialized); out.defaultWriteObject(); } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); //logger.debug(Deserialized); System.out.println(Deserialized); } } The information contained in this email message may be confidential. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. Although this message and any attachments are believed to be free of viruses, no responsibility is accepted by Informa for any loss or damage arising in any way from receipt or use thereof. Messages to and from the company are monitored for operational reasons and in accordance with lawful business practices. If you have received this message in error, please notify us by return and delete the message and any attachments. Further enquiries/returns can be sent to [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: A cluster question
anytime, glad I could help! Filip -Original Message- From: Ilyschenko, Vlad [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 2:56 PM To: Tomcat Users List Subject: RE: A cluster question Thanks a lot Filip, SimpleTcpReplicationManager does indeed work the way i need it! Vlad -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Wed 5/26/2004 6:43 PM To: Tomcat Users List Cc: Subject:RE: A cluster question Is there any other way to force replication apart from calling session.setAttribute(name, bean) yes, there is, but not using the DeltaManager, instead use SimpleTcpReplicationMananger and set useDirtyFlag=false the useDirtyFlag is ignored on the delta manager, since the delta manager only replicates deltas. filip -Original Message- From: Ilyschenko, Vlad [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 9:32 AM To: Tomcat Users List Subject: A cluster question Hello, I have a session bean that changes its state as pages call methods on that bean. I want this bean to be replictated to other cluster members but it seems like it gets replicated only once, straight after it is created. Is there any other way to force replication apart from calling session.setAttribute(name, bean) ? I have tried useDirtyFlag true and false - no luck. The application is distributed and all other things do get replicated. Regards, Vlad This is a little test case for my problem: test.jsp: - jsp:useBean id=mybean class=TestBean scope=session / % out.print(mybean.a()); % TestBean.java - import org.apache.log4j.Logger; import java.io.Serializable; import java.io.IOException; import java.util.Random; public class TestBean implements Serializable{ private static Logger logger = Logger.getLogger(TestBean.class); private long m_a = 0; private Random rnd = new Random(System.currentTimeMillis()); public long a() { m_a = rnd.nextLong(); return m_a; } private void writeObject(java.io.ObjectOutputStream out) throws IOException { //logger.debug(Serialized); System.out.println(Serialized); out.defaultWriteObject(); } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); //logger.debug(Deserialized); System.out.println(Deserialized); } } The information contained in this email message may be confidential. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. Although this message and any attachments are believed to be free of viruses, no responsibility is accepted by Informa for any loss or damage arising in any way from receipt or use thereof. Messages to and from the company are monitored for operational reasons and in accordance with lawful business practices. If you have received this message in error, please notify us by return and delete the message and any attachments. Further enquiries/returns can be sent to [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: A cluster question
Ok, the SimpleTcpReplicationManager is a little behind, ie I haven't spent as much time on that one. Do you have an IM id, send it to fhanik at apache dot org, and we can work this out Filip -Original Message- From: Ilyschenko, Vlad [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 6:03 PM To: Tomcat Users List Subject: RE: A cluster question hi Filip, sorry to say but i've encountered another problem. Although SimpleTcpReplicationManager does replicate my bean ok it doesnt seem to maintain the session correctly. To test the cluster im using round-robin DNS record. Whenever the client browser is forced to switch from one tomcat instance to another a new session is getting created and the old session is lost. I must say that the browser does maintain cookies ok but amazingly JSESSIONID cookie value does not match session id of the newly created session. This only happens to SimpleTcpReplicationManager, DelataManager maintains sessions ok. The version of tomcat i'm testing on is 5.0.19 Regards, Vlad -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Wed 26/05/2004 22:12 To: Tomcat Users List Cc: Subject: RE: A cluster question anytime, glad I could help! Filip -Original Message- From: Ilyschenko, Vlad [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 2:56 PM To: Tomcat Users List Subject: RE: A cluster question Thanks a lot Filip, SimpleTcpReplicationManager does indeed work the way i need it! Vlad -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Wed 5/26/2004 6:43 PM To: Tomcat Users List Cc: Subject:RE: A cluster question Is there any other way to force replication apart from calling session.setAttribute(name, bean) yes, there is, but not using the DeltaManager, instead use SimpleTcpReplicationMananger and set useDirtyFlag=false the useDirtyFlag is ignored on the delta manager, since the delta manager only replicates deltas. filip -Original Message- From: Ilyschenko, Vlad [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 9:32 AM To: Tomcat Users List Subject: A cluster question Hello, I have a session bean that changes its state as pages call methods on that bean. I want this bean to be replictated to other cluster members but it seems like it gets replicated only once, straight after it is created. Is there any other way to force replication apart from calling session.setAttribute(name, bean) ? I have tried useDirtyFlag true and false - no luck. The application is distributed and all other things do get replicated. Regards, Vlad This is a little test case for my problem: test.jsp: - jsp:useBean id=mybean class=TestBean scope=session / % out.print(mybean.a()); % TestBean.java - import org.apache.log4j.Logger; import java.io.Serializable; import java.io.IOException; import java.util.Random; public class TestBean implements Serializable{ private static Logger logger = Logger.getLogger(TestBean.class); private long m_a = 0; private Random rnd = new Random(System.currentTimeMillis()); public long a() { m_a = rnd.nextLong(); return m_a; } private void writeObject(java.io.ObjectOutputStream out) throws IOException { //logger.debug(Serialized); System.out.println(Serialized); out.defaultWriteObject(); } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); //logger.debug(Deserialized); System.out.println(Deserialized); } } The information contained in this email message may be confidential. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. Although this message and any attachments are believed to be free
RE: Using JMS in Tomcat Valve
what initial context are you trying to connect to you can do this: Properties props = new Properties(); props.setProperty(...); Context cxt = new InitialContext(props); where you set the machine and port of the machine hosting your initial context. (should be the URL to the server where your JMS server is running) Filip -Original Message- From: Rui Zhang [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 6:45 PM To: Tomcat Users List Subject: Using JMS in Tomcat Valve Hi all, How can I configure tomcat to use JMS in its valve? I failed at the very beginning, when I tried to obtain the JNDI context, after moving the J2EE jms.jar to under server/lib. --- The Exception I got was: [main] ERROR digester.Digester - Begin event threw exception javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial --- My code in the valve constructor looks like the following. The same code runs perfectly fine in a normal J2EE application. Context cxt = new InitialContext(); cf = (ConnectionFactory)cxt.lookup(jms/TopicConnectionFactory); con = cf.createConnection(); session = con.createSession(false,Session.AUTO_ACKNOWLEDGE); dest = (Topic)cxt.lookup(jms/hWLMTopic); producer = session.createProducer(dest); --- Any advice will be hugely appreciated. Best regards, Rui - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Urgent: Issue with Tomcat Clustering
not an issue with clustering, the stack trace is in the mod_jk code, Filip -Original Message- From: Vikas Gupta [mailto:[EMAIL PROTECTED] Sent: Sunday, May 23, 2004 12:08 PM To: Tomcat Users List Subject: Urgent: Issue with Tomcat Clustering Hi All, I am trying to do tomcat clustering using tomcat 5.0.19 using mod_jk connector for Apache 2. I am stuck up in a problem for quite some time. I am able to run the sample application in my setup and the clustering and session replication works fine. But when I run my application in the cluster it bombs. The test scenarios is like this, We hvve tried using poolable and synchronous mode. The session object in is not getting replicated and is request.getSession(false) gives null value. The same scenario is working fine on the sample application. I think Cluster setup is fine because sample application Can you please tell us the reason of exception Is there any adverse impact of the following on session replication in clustering scenario: 1. usage of encodeURL (URL rewriting) 2. usage of large objects in session 3. usage of cookies I have attached the server.xml, web.xml and workers.properties. Please advise Regards Vikas May 23, 2004 8:51:11 PM org.apache.jk.common.ChannelSocket processConnection SEVERE: Error, processing connection java.net.SocketException: Software caused connection abort: recv failed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) at java.io.BufferedInputStream.read(BufferedInputStream.java:277) at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:580) at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:518) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.ja va:638) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ool.java:688) at java.lang.Thread.run(Thread.java:536) May 23, 2004 8:51:11 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 May 23, 2004 8:51:11 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 May 23, 2004 8:55:53 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberD --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Quiestion about Average cluster serialize/send
Nr of bytes sent=369314 over 400 ==923 bytes/request average number of bytes sent over in each replication request INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms) the average time it takes to perform a replication request. IE, this is the overhead you have per request when using clustering. 91ms, this time includes: 1. Serialize the request 2. Send the request over to the other server 3. Deserialize and recreate the request (including invoke any listeners on the session) on the other server 4. Send a ACK message back to the original server 5. Receive the ACK message Usually what takes time is the deserialization of the request. Send us info on the two machines and the two configurations Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:10 AM To: 'Tomcat Users List' Subject: Quiestion about Average cluster serialize/send Hello I got clustering up last night. In the log file I am seeing some thing that I was wondering if someone could help explain. What concerns me is the difference in Average cluster Is this the time it takes to serialize and send over the session info? I am trying to understand where the problem is? Thanks Box 1 log file snippet May 21, 2004 1:17:19 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=245486 over 200 ==1227 bytes/request May 21, 2004 1:19:24 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). May 21, 2004 1:36:31 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=302688 over 300 ==1008 bytes/request May 21, 2004 1:50:09 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=369314 over 400 ==923 bytes/request May 21, 2004 2:13:33 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms). Box 2 log file snippet May 21, 2004 1:39:17 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=9 ms for 100 requests (947ms). May 21, 2004 1:54:41 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=158650 over 200 ==793 bytes/request May 21, 2004 2:30:03 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=216767 over 300 ==722 bytes/request May 21, 2004 3:28:29 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=283745 over 400 ==709 bytes/request May 21, 2004 4:16:34 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=9 ms for 200 requests (1846ms). May 21, 2004 4:31:52 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=354565 over 500 ==709 bytes/request May 21, 2004 5:13:15 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=436113 over 600 ==726 bytes/request May 21, 2004 5:40:14 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). May 21, 2004 5:42:29 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=511204 over 700 ==730 bytes/request May 21, 2004 6:04:17 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=587590 over 800 ==734 bytes/request May 21, 2004 6:30:18 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=657453 over 900 ==730 bytes/request - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Quiestion about Average cluster serialize/send
and your loadbalancing algorithm is distributing the requests equally. also, in a previous email you wrote They are diffent sized boxes what does that mean? Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Quiestion about Average cluster serialize/send Thanks for any help These are two identical machines Rh9 Apache2 Tomcat 5.0.24 with hotfix Connected by gigaBit ethernet nics and switches. Box 1 is using mod_jk Box 2 is using mod_jk2 Box 1 has the real docroot Box 2 has box1 docroot mounted nfs (from previous message) Box 1 INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). Box 2 INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). As an FYI these are real servers in an LVS env. Both Boxes have same Cluster entries (different tcpListenAddress) Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=192.168.0.203 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;.*\.pdf;/ /Cluster -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 12:46 PM To: Tomcat Users List Subject: RE: Quiestion about Average cluster serialize/send Nr of bytes sent=369314 over 400 ==923 bytes/request average number of bytes sent over in each replication request INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms) the average time it takes to perform a replication request. IE, this is the overhead you have per request when using clustering. 91ms, this time includes: 1. Serialize the request 2. Send the request over to the other server 3. Deserialize and recreate the request (including invoke any listeners on the session) on the other server 4. Send a ACK message back to the original server 5. Receive the ACK message Usually what takes time is the deserialization of the request. Send us info on the two machines and the two configurations Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:10 AM To: 'Tomcat Users List' Subject: Quiestion about Average cluster serialize/send Hello I got clustering up last night. In the log file I am seeing some thing that I was wondering if someone could help explain. What concerns me is the difference in Average cluster Is this the time it takes to serialize and send over the session info? I am trying to understand where the problem is? Thanks Box 1 log file snippet May 21, 2004 1:17:19 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=245486 over 200 ==1227 bytes/request May 21, 2004 1:19:24 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). May 21, 2004 1:36:31 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=302688 over 300 ==1008 bytes/request May 21, 2004 1:50:09 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=369314 over 400 ==923 bytes/request May 21, 2004 2:13:33 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms). Box 2 log file snippet May 21, 2004 1:39:17 AM org.apache.catalina.cluster.tcp.ReplicationValve addClusterSendTime INFO: Average cluster serialize/send time=9 ms for 100 requests (947ms). May 21, 2004 1:54:41 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=158650 over 200 ==793 bytes/request May 21, 2004 2:30:03 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent=216767 over 300 ==722 bytes/request May 21, 2004 3:28:29 AM org.apache.catalina.cluster.tcp.ReplicationTransmitter addStats INFO: Nr of bytes sent
RE: Load Balance question(what a people doing)
some tips: Using any java code for load balancing is never gonna work, just doesn't scale. Software load balancing, three alternatives are: Pen (http://siag.nu/pen) Balance (http://balance.sourceforge.net) and mod_jk. My favorite is pen, it is fast, works great and runs on unix and windows. If you can get a hardware loadbalancer, that is what you will want to do. that way you get most effect out of it. Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 2:13 PM To: 'Tomcat Users List' Subject: Load Balance question(what a people doing) Hello, I would like to know what people are doing for their load balancing. I have a very busy web site that is a mix of static html, cgi (perl) , and j2ee stuff I am running rh9, apache 2 and tomcat 5 I am slowly migrating my perl/cgi stuff to j2ee Currently I have been trying to get a LVS setup working and just does not seem to work. (more details given if wanted) So what I am wondering is what are you guys doing. As I am looking to move more to j2ee, I am wondering if I should look at using apache2,mod_jk2 and tomcat5 load balancing, and getting rid of LVS The one part that bothers me, is all the articles and howto's show apache and tomcat load balancing on the same box. What I am thinking is having apache and tomcat on one box and then tomcat also on another box and let apache round robin the tomcat connects. Thanks for any help or guidance Randy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Quiestion about Average cluster serialize/send
Is it I am not understanding the message(oh what a shock that would be) Box 1 INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). Box 2 INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). I am not sure why we are seeing this. I couldn't tell more unless we actually ran a profile. Try to set your tcpSelectorTimeout to 10 instead of a 100, and let me know the results Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 2:14 PM To: 'Tomcat Users List' Subject: RE: Quiestion about Average cluster serialize/send Sorry for the confusion. Originally I was In a test env ( They are defend sized boxes ) Where I was not replicating the same context's on both boxes. Once I got it working in a test evn(thanks for your help) I turned It on in production last night(re: message below with config info) The load balancing is kind of distributing the requests equally, but not really. There are some issues with aol proxies, so the balance is not totally equal. But they are usually pretty close. Is it I am not understanding the message(oh what a shock that would be) Box 1 INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). Box 2 INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). I am just looking at these two messages and thinking that I would have thought theys should be closer, assuming it is for the same amount of requests. I am thinking that there may be more to be looking at ?? It is very obvious I am way over my head, and I appreciate the help you guys are giving me Randy -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 1:50 PM To: Tomcat Users List Subject: RE: Quiestion about Average cluster serialize/send and your loadbalancing algorithm is distributing the requests equally. also, in a previous email you wrote They are diffent sized boxes what does that mean? Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Quiestion about Average cluster serialize/send Thanks for any help These are two identical machines Rh9 Apache2 Tomcat 5.0.24 with hotfix Connected by gigaBit ethernet nics and switches. Box 1 is using mod_jk Box 2 is using mod_jk2 Box 1 has the real docroot Box 2 has box1 docroot mounted nfs (from previous message) Box 1 INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). Box 2 INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). As an FYI these are real servers in an LVS env. Both Boxes have same Cluster entries (different tcpListenAddress) Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=192.168.0.203 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;.*\.pdf;/ /Cluster -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 12:46 PM To: Tomcat Users List Subject: RE: Quiestion about Average cluster serialize/send Nr of bytes sent=369314 over 400 ==923 bytes/request average number of bytes sent over in each replication request INFO: Average cluster serialize/send time=91 ms for 400 requests (36640ms) the average time it takes to perform a replication request. IE, this is the overhead you have per request when using clustering. 91ms, this time includes: 1. Serialize the request 2. Send the request over to the other server 3. Deserialize and recreate the request (including invoke any listeners on the session) on the other server 4. Send a ACK message back to the original server 5. Receive the ACK message Usually what takes time is the deserialization of the request. Send us info on the two machines and the two configurations Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:10 AM To: 'Tomcat Users List' Subject: Quiestion about Average
RE: Quiestion about Average cluster serialize/send
yes, 120 milliseconds, I wrote in a previous email: 1. Serialize the request 2. Send the request over to the other server 3. Deserialize and recreate the request (including invoke any listeners on the session) on the other server 4. Send a ACK message back to the original server 5. Receive the ACK message also, make sure that your QA and your production servers use different multicast addresses. (property mcastAddress in server.xml) otherwise you are swapping sessions between QA and production Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 4:45 PM To: 'Tomcat Users List' Subject: RE: Quiestion about Average cluster serialize/send So here is what I understand, and I want to make sure that I am reading this correctly The log entry says: Average cluster serialize/send time=120 ms for 300 requests For 300 requests it took on average 120 to serialize this data. (does this include broadcasting it to the other servers?) What kind of profile? thanks -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 4:23 PM To: Tomcat Users List Subject: RE: Quiestion about Average cluster serialize/send Is it I am not understanding the message(oh what a shock that would be) Box 1 INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). Box 2 INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). I am not sure why we are seeing this. I couldn't tell more unless we actually ran a profile. Try to set your tcpSelectorTimeout to 10 instead of a 100, and let me know the results Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 2:14 PM To: 'Tomcat Users List' Subject: RE: Quiestion about Average cluster serialize/send Sorry for the confusion. Originally I was In a test env ( They are defend sized boxes ) Where I was not replicating the same context's on both boxes. Once I got it working in a test evn(thanks for your help) I turned It on in production last night(re: message below with config info) The load balancing is kind of distributing the requests equally, but not really. There are some issues with aol proxies, so the balance is not totally equal. But they are usually pretty close. Is it I am not understanding the message(oh what a shock that would be) Box 1 INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). Box 2 INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). I am just looking at these two messages and thinking that I would have thought theys should be closer, assuming it is for the same amount of requests. I am thinking that there may be more to be looking at ?? It is very obvious I am way over my head, and I appreciate the help you guys are giving me Randy -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 1:50 PM To: Tomcat Users List Subject: RE: Quiestion about Average cluster serialize/send and your loadbalancing algorithm is distributing the requests equally. also, in a previous email you wrote They are diffent sized boxes what does that mean? Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 1:27 PM To: 'Tomcat Users List' Subject: RE: Quiestion about Average cluster serialize/send Thanks for any help These are two identical machines Rh9 Apache2 Tomcat 5.0.24 with hotfix Connected by gigaBit ethernet nics and switches. Box 1 is using mod_jk Box 2 is using mod_jk2 Box 1 has the real docroot Box 2 has box1 docroot mounted nfs (from previous message) Box 1 INFO: Average cluster serialize/send time=120 ms for 300 requests (36046ms). Box 2 INFO: Average cluster serialize/send time=8 ms for 300 requests (2401ms). As an FYI these are real servers in an LVS env. Both Boxes have same Cluster entries (different tcpListenAddress) Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=192.168.0.203 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html
RE: Trying to get a Cluster/Session Replication working
yes! -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 6:01 PM To: 'Tomcat Users List' Subject: RE: Trying to get a Cluster/Session Replication working Ok Here is a stupid question How do I determine what context I am replicating? Is it the distributable/ in the web.xml? thanks -Original Message- From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 5:33 PM To: Tomcat Users List Subject: Re: Trying to get a Cluster/Session Replication working WARNING: Manager[], requesting session state from what is the name of the context you are replicating? Manager[] should have where x is the context name. Also, send me directly startup logs from both servers (clean ones, it only one start) Filip - Original Message - From: Randy [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 4:39 PM Subject: RE: Trying to get a Cluster/Session Replication working So I added LD_ASSUME_KERNEL=2.4 and exported it in catalina.sh But are saying I have to start them at the exact same time. That is not very possible in my envirnment. They are diffent sized boxes , so one starts faster than the other I still get the same two errors Randy -Original Message- From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 4:02 PM To: Tomcat Users List Subject: Re: Trying to get a Cluster/Session Replication working two things: 1. export LD_ASSUME_KERNEL=2.4 before you start tomcat (add it to your startscript) 2. Starting the two instances at the exact same time, no instance has a state to replicate, wait 5 seconds with one once the servers have been running for a while, it will request state from your longest running server Filip - Original Message - From: Randy [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 3:21 PM Subject: Trying to get a Cluster/Session Replication working Hello, (sorry I could not search the mail archives, for some reason the site is down) I am following http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html and trying to get Cluster/Session Replication I have commented out the Cluster part in the sample server.xml I have two boxes runnnig rh9, with tomcat 5 When I start up box two Box 1 gets the error == INFO: Server startup in 14355 ms May 19, 2004 3:04:19 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://66.208.187.21:4001 ,66.208.187.21,4001, alive=31] May 19, 2004 3:04:24 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived WARNING: Context manager doesn't exist: May 19, 2004 3:04:36 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://66.208.187.2 1:4001,66.208.187.21,4001, alive=14390] May 19, 2004 3:05:41 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://66.208.187.21:4001 ,66.208.187.21,4001, alive=31] May 19, 2004 3:05:47 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived WARNING: Context manager doesn't exist: Box 2 gets the error == INFO: Starting clustering manager...: May 19, 2004 3:05:35 PM org.apache.catalina.cluster.session.DeltaManager start WARNING: Manager[], requesting session state from org.apache.catalina.cluster.mcast.McastMember[tcp://66.208.187.70:4001,66.20 8.187.70,4001, alive=121560]. This operation will timeout if no session state has been received within 60 seconds May 19, 2004 3:06:35 PM org.apache.catalina.cluster.session.DeltaManager start SEVERE: Manager[], No session state received, timing out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG
RE: Trying to get a Cluster/Session Replication working
I am saying. don't start the servers at the same time :) Filip -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 4:40 PM To: 'Tomcat Users List' Subject: RE: Trying to get a Cluster/Session Replication working So I added LD_ASSUME_KERNEL=2.4 and exported it in catalina.sh But are saying I have to start them at the exact same time. That is not very possible in my envirnment. They are diffent sized boxes , so one starts faster than the other I still get the same two errors Randy -Original Message- From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 4:02 PM To: Tomcat Users List Subject: Re: Trying to get a Cluster/Session Replication working two things: 1. export LD_ASSUME_KERNEL=2.4 before you start tomcat (add it to your startscript) 2. Starting the two instances at the exact same time, no instance has a state to replicate, wait 5 seconds with one once the servers have been running for a while, it will request state from your longest running server Filip - Original Message - From: Randy [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 3:21 PM Subject: Trying to get a Cluster/Session Replication working Hello, (sorry I could not search the mail archives, for some reason the site is down) I am following http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html and trying to get Cluster/Session Replication I have commented out the Cluster part in the sample server.xml I have two boxes runnnig rh9, with tomcat 5 When I start up box two Box 1 gets the error == INFO: Server startup in 14355 ms May 19, 2004 3:04:19 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://66.208.187.21:4001 ,66.208.187.21,4001, alive=31] May 19, 2004 3:04:24 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived WARNING: Context manager doesn't exist: May 19, 2004 3:04:36 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://66.208.187.2 1:4001,66.208.187.21,4001, alive=14390] May 19, 2004 3:05:41 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://66.208.187.21:4001 ,66.208.187.21,4001, alive=31] May 19, 2004 3:05:47 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived WARNING: Context manager doesn't exist: Box 2 gets the error == INFO: Starting clustering manager...: May 19, 2004 3:05:35 PM org.apache.catalina.cluster.session.DeltaManager start WARNING: Manager[], requesting session state from org.apache.catalina.cluster.mcast.McastMember[tcp://66.208.187.70:4001,66.20 8.187.70,4001, alive=121560]. This operation will timeout if no session state has been received within 60 seconds May 19, 2004 3:06:35 PM org.apache.catalina.cluster.session.DeltaManager start SEVERE: Manager[], No session state received, timing out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: questions of Cluster
primary-secondary session replication only replicate the session to one other machine if Tomcat1 is crashed,only Tomcat2(if it's alive) can continue the services and replace Tomcat1 correct, if your system crashes two tomcats at a time, contact your system administrator or debug your code :) you would have the same problem in primary secondary if the primary and secondary servers crashed at the same time Filip -Original Message- From: [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 11:11 PM To: [EMAIL PROTECTED] Subject: questions of Cluster hello everyone! i have some questions: Question 1 I have read this from tomcat-doc(5.0.24): . For large clusters, the next release will support a primary-secondary session replication where the session will only be stored at one or maybe two backup servers . Can you explain more about primary-secondary session replication and how it works? Thank you very much :) Question 2 I have read this from tomcat-doc: .. In order to keep the network traffic down in an all-to-all environment, you can split your cluster into smaller groups. This can be easily achieved by using different multicast addresses for the different groups. A very simple setup would look like this: DNS Round Robin | Load Balancer / \ Cluster1 Cluster2 / \/ \ Tomcat1 Tomcat2 Tomcat3 Tomcat4 ... Do you mean that: if Tomcat1 is crashed,only Tomcat2(if it's alive) can continue the services and replace Tomcat1,other instances in Cluster2 can not do that, because different groups have different multicast addresses? If my guess is true,i thank it may make a reduction in the capability of Cluster. Am I correct? Thank you for any comment! _ MSN Hotmail http://www.hotmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TC5 java mail woes
javax.activation in both by webapp lib directory and common/lib don't put the same class file in two different locations to be loaded by two different classloaders. remove it from webapp/lib and keep it only in common/lib, and try again filip -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Friday, April 23, 2004 10:42 AM To: Tomcat Users List Subject: TC5 java mail woes Hello After posting this problem yesterday I went away and assumed that the problem must be the consequence of my IQ deficit and/or all crack smoking.. Before I start , yes I have the java mail 1.31 and a recent copy of javax.activation in both by webapp lib directory and common/lib I added the context in the relevant place in sever.xml Context path=/acme-mail docBase=acme-mail debug=9 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=acme-mail. suffix=.log timestamp=true/ Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams /Context i also tried Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valueout.aliceposta.it/value /parameter /ResourceParams nested in GlobalNamingResources because it seemed a really cool thing to do at the time and i wanted to impress my friends. in acme-mail (the webapp) web.xml resource-ref description/description res-ref-namemail/Session/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref after the taglib declarations as specified by the dtd http://java.sun.com/j2ee/dtds/web-app_2_2.dtd when i try to grab the mail session i get this.. java.lang.NoClassDefFoundError: javax/activation/DataSource point to the line where i try and feed session to the mime message constructor. Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session mailSession = (Session) envCtx.lookup(mail/Session); Message msg = new MimeMessage(mailSession); Has no body had this problem? Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: request.setRemoteUser(p)
one way of doing it is to create a valve, since the valve has direct access to the underlying objects, you can set the remoteUser Filip -Original Message- From: Schehl, Micah [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 9:33 AM To: 'Tomcat Users List' Subject: request.setRemoteUser(p) How can I programmatically set a user in the Tomcat container? i.e. request.setRemoteUser(p); I know that doesn't exist, but that is essentially what I need to do. My scenario is that I want to send a 1024-bit key to a user. That user would send that key to a specific servlet. The servlet would take the key and lookup the user's information and programmatically log them into Tomcat. On subsequent page requests, the request.getRemoteUser() would give me back the user. Thank you for any help, Micah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4 session replication in a production environment
hey there, several people are using it in production, however, it is not a supported implementation. I can upgrade the 4 version for a consulting fee, but time constraints limits me to work on T5 only at the moment. Filip -Original Message- From: Ryan Lissack [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 11:04 AM To: '[EMAIL PROTECTED]' Subject: Tomcat 4 session replication in a production environment Hi, Is anyone using Tomcat 4 session replication in a production environment, if so, could you please share your experiences ? Unfortunately we are unable to upgrade to TC 5 for now but I need to setup session replication for some of our TC 4 servers for fail-over purposes (we have HW load balancers for load balancing). I have successfully set it up in our stage environment to prove it is viable but I am interested in others experiences. Also, is it possible for me to create a new replication jar for TC 4 which incorporates the bug fixes done on the TC 5 branch ? Thanks, Ryan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session persistance
that will not work from a war file, cause you only get a facade to the actual session. in order to serialize a session you need access to the tomcat internal classes. what I suggest you do though is that you create session attribute listeners and store your sessions there. there should also be activate/passivate events that allow you to intercept these Filip -Original Message- From: Johan Wasserman - CPX Mngd Services [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 1:41 AM To: Tomcat Users List Subject: RE: Session persistance Any luck Anu? I have exactly the same request... I need to serialize the session (HttpSession to a byte array) and save it to a blob in MySql (i use Hibernate). I have tried, for example; ... ByteArrayOutputSream baos = new ByteArrayOutputstream(); ObjectOutputStream oos = new ObjectOutputStream(boas); oos.writeObject(session); //-- it fails here, nothing in the logs byte[] sessionAsBytes = baos.toByteArray(); ... I need this to give the user the option to restore a previous session (where they where before they last logged out, with all the session variables required to restore to that point). I guess that's what you need it for as well. By the way, hibernate's createBlob also doesn't do he trick. Something to do with the session. I'm thinking of creating a bean (and store it in session) to keep track of my app and then just serializing/deserializing that bean from/to the session on logout/login. I prefer the session though. Thanks, Johan. -Original Message- From: Anu Mathew [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 7:37 AM To: Tomcat Users List Subject: Re: Session persistance I already RTFM. From the manual I understood that you are also part of developing TFM. But in TFM, restoring of the session is mentioned as automatic when the applicatio/server restarts. But I want to control both storing and restoring of the session using my code. Is this possible? Thanks, Anu Mathew - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 15, 2004 6:45 PM Subject: RE: Session persistance Hi, I need to 1. Store the session object in a database (I can trigger this operation from a jsp say logoff.jsp ) 2. Retrieve the session object from the database (I can trigger this operation from a jsp say login.jsp ) Thoughts?? Here's one thought: RTFM. JDBC store for sessions: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory Leak
you're classes might not take a lot of memory, but the classes that your classes reference, such as byte[] char[] String etc will. so if the leak is in your code, you need a profile to track it down. Filip -Original Message- From: Chanan Braunstein [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 10:20 AM To: 'Tomcat Users List' Subject: RE: Memory Leak I am not sure I understand, my classes i.e. stuff I created under com.knovel.* take up almost nothing of the heap, I have the view sorted by size in memory and they are way down there. Most of the heap is taken up by char[]. Byte[], String, Object[], int[] and StringBuffer. The biggest class I have is taking 100k - it never grows, it is created in a singleton at startup and is only read from, I checked it is always at 100k - never growing bigger (as expected). Chanan Braunstein Knovel Corp. Web Development Manager 607-773-1840 x672 http://www.knovel.com -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Thursday, April 15, 2004 11:10 AM To: Tomcat Users List Subject: RE: Memory Leak In your profiler rather than looking at the type of object taking the memory look at the accumulated memory consumed by your classes. This will show you which classes are taking up the most memory and if you have a leak you might expect this accumulated value to be a high percentage of the overall heap being used.. look for a percetage of memory used. -Original Message- From: Chanan Braunstein [mailto:[EMAIL PROTECTED] Sent: 15 April 2004 15:27 To: 'Tomcat Users List' Subject: Memory Leak Hello, I am having a problem with Tomcat 5.0.19 on windows with JDK 1.4.2_02. The memory that java.exe is using keeps growing till the point that tomcat stops responding. Using a profiler, doesn't seem to give me any clues. I can see the memory being used by certain classes go up (mainly char[]) and even reach all the way to the point that used java heap equals to the java heap, but then GC kicks in and drops down back to where it was when I started the test. However, the memory in the task manager keeps going up. For example right now it is at 717,000 K, even though the heap used is at about 200,000 K. What am I missing here? My current params are -server -Xrs -Xms356M -Xmx356M - I tried all kinds of different sizes for the memory but that doesn't really help. Any suggestions as to where (how) to look to find my memory leak? Chanan Braunstein Knovel Corp. Web Development Manager 607-773-1840 x672 http://www.knovel.com FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session persistance
In this case you are probably better off copying the existing manager source code, and just modify the load and unload methods. Filip -Original Message- From: Anu Mathew [mailto:[EMAIL PROTECTED] Sent: Friday, April 16, 2004 12:37 AM To: Tomcat Users List Subject: Re: Session persistance I already RTFM. From the manual I understood that you are also part of developing TFM. But in TFM, restoring of the session is mentioned as automatic when the applicatio/server restarts. But I want to control both storing and restoring of the session using my code. Is this possible? Thanks, Anu Mathew - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 15, 2004 6:45 PM Subject: RE: Session persistance Hi, I need to 1. Store the session object in a database (I can trigger this operation from a jsp say logoff.jsp ) 2. Retrieve the session object from the database (I can trigger this operation from a jsp say login.jsp ) Thoughts?? Here's one thought: RTFM. JDBC store for sessions: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/manager.html Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5 clustering question...
wow, you wrote a book :) 1. where is the class com.mycompany.ourapp.common.model.ReturnPolicy? 2. WARNING: Manager[/ourapp], requesting session state from org.apache.catalina.cluster.mcast.McastMember[tcp://127.0.0.1:4001,127.0.0.1 ,4001, alive=1259] Your network is misconfigured. Your are using the AUTO setting, which does java.net.InetAddress.getLocalHost().getHostAddress(), and on your machine it return 127.0.0.1, it should return the actual IP. So either change auto to the actual IP, or add your hostname to /etc/hosts under the correct ip. 3. SEVERE: Session event listener threw exception java.lang.IllegalStateException: getAttribute: Session already invalidated Your session listener is trying to get an attribute out of the session upon session creation, the the valid flag has not yet been set. I believe this was fixed in the CVS tree by now. you can correspond with me at fhanik -at- apache -dot- org and I can help you get this straightened out. Filip -Original Message- From: Spiegelberg, Eric [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 10:35 AM To: [EMAIL PROTECTED] Subject: Tomcat 5 clustering question... We have a developed an large scale application that is clustered using WebLogic. I have been exploring getting the app clustered on Tomcat as a learning experience and to possibly sway the management away from WebLogic. I have Tomcat 5.0.19 set up with the latest production version of Apache using mod_jk. I have one Tomcat instance configured to use port 8080 and another on 9090 on a RedHat 9.0 box. I am setting LD_ASSUME_KERNEL to 2.4. No error messages are displayed during startup. I have done enough testing to feel confident in the Apache/jk_mod/tomcat configuration. For example, I can use Tomcat's included SessionExample to go to host:8080 and enter a session variable, and when I then go to host:9090 the variable is displayed along with the correct session id. The session has .worker1 appended to the end of the string. I can add variables and bounce back and forth (through apache, 8080, and 9090 url's) and all variables are displayed correctly with the same session id. This indicates to me that the two clusters are aware of each other and are passing session information back and forth. I can confirm this in the catalina.out log. In our app the web.xml contains the distributable/ tag and both Tomcat instances have the useDirtyFlag set to false. Now, when I log into our app and start driving around I receive several of the following exception: Apr 14, 2004 10:15:29 AM org.apache.catalina.cluster.session.DeltaManager messageReceived SEVERE: Unable to receive message through TCP channel java.lang.ClassNotFoundException: com.mycompany.ourapp.common.model.ReturnPolicy at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:630) at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1469) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1432) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.apache.catalina.cluster.session.DeltaRequest$AttributeInfo.readExternal( DeltaRequest.java:335) at org.apache.catalina.cluster.session.DeltaRequest.readExternal(DeltaRequest.j ava:247) at org.apache.catalina.cluster.session.DeltaManager.loadDeltaRequest(DeltaManag er.java:420) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManage r.java:921) at org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaMa nager.java:794) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT cpCluster.java:561) at
RE: Threads Locking cont.
this is not a tomcat, issue, it is your code (or should I say the webservice code) that is locking when trying to read data from the socket. you should set SO_TIMEOUT on the socket, and it will timeout and throw an error instead of hanging forever when there is no data from the other side. Filip -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 11:45 AM To: Tomcat Users List Subject: Threads Locking cont. After removing all System.out.println statements (including printStackTrace()) Tomcat is still experiencing thread locking issues. I just put this on a different machine running Win 2k Server service pack 4. Again, it's been running for over a year on a linux box with no issues. We've also had 2 people developing it on XP and Win2k pro for the year without seeing this. Has anyone else had any problems with threads locking? Windows 2K Server service pack III Tomcat 5.0.19 (also tried 5.0.18) Thread Dump: http80-Processor79 daemon prio=5 tid=0x008836d0 nid=0x2618 runnable [1abde000..1abdfd88] at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) at java.io.BufferedInputStream.read(BufferedInputStream.java:201) - locked 0x1011c860 (a java.io.BufferedInputStream) at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.j ava:506) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:127) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java: 71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180) at org.apache.axis.client.Call.invokeEngine(Call.java:2526) at org.apache.axis.client.Call.invoke(Call.java:2515) at org.apache.axis.client.Call.invoke(Call.java:2210) at org.apache.axis.client.Call.invoke(Call.java:2133) at org.apache.axis.client.Call.invoke(Call.java:1656) at com.fwdco.server.TimeSheetBean.fetchTimeSheetList(Unknown Source) at com.fwdco.server.TimeSheetServlet.doPost(Unknown Source) at com.fwdco.server.TimeSheetServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:732) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:688) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus
RE: threads locking
print to log4j instead, I assume you know print to the context log? Filip -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 12:29 PM To: 'Tomcat Users List' Subject: threads locking Has anyone else had any problems with threads locking (causing Tomcat to hang)? I just moved an app thats been working for over a year on Linux, win2k pro and winXP pro up to a server running Windows 2k server (dual 800 MHz Pentium III) and it locks up randomly. Using tomcat 5.0.19 Sun's J2sdk 1.4.0_04 Here is a thread dump: http80-Processor25 daemon prio=5 tid=0x186225f0 nid=0xd10 waiting for monitor entry [18fdf000..18f dfd8c] at java.io.PrintStream.println(PrintStream.java:585) - waiting to lock 0x105044a0 (a java.io.PrintStream) at org.apache.tomcat.util.log.SystemLogHandler.println(SystemLogHandler.java:27 4) at com.fwdco.server.ServletErrorHandler.init(Unknown Source) at com.fwdco.server.ServletErrorHandler.getInstance(Unknown Source) at com.fwdco.server.HrpServlet.init(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10 44) - locked 0x107233f0 (a org.apache.catalina.core.StandardWrapper) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:712) - locked 0x107233f0 (a org.apache.catalina.core.StandardWrapper) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:187) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:24 5) -- Ben Souther F.W. Davison Company, Inc. This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: threads locking
yes, I am afraid so :) Filip -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 12:38 PM To: Tomcat Users List Subject: Re: threads locking I don't. Does it involve changing all of my System.out.println statements? On Tuesday 13 April 2004 01:27 pm, Filip Hanik \(lists\) wrote: print to log4j instead, I assume you know print to the context log? Filip -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 12:29 PM To: 'Tomcat Users List' Subject: threads locking Has anyone else had any problems with threads locking (causing Tomcat to hang)? I just moved an app thats been working for over a year on Linux, win2k pro and winXP pro up to a server running Windows 2k server (dual 800 MHz Pentium III) and it locks up randomly. Using tomcat 5.0.19 Sun's J2sdk 1.4.0_04 Here is a thread dump: http80-Processor25 daemon prio=5 tid=0x186225f0 nid=0xd10 waiting for monitor entry [18fdf000..18f dfd8c] at java.io.PrintStream.println(PrintStream.java:585) - waiting to lock 0x105044a0 (a java.io.PrintStream) at org.apache.tomcat.util.log.SystemLogHandler.println(SystemLogHandler.java:2 7 4) at com.fwdco.server.ServletErrorHandler.init(Unknown Source) at com.fwdco.server.ServletErrorHandler.getInstance(Unknown Source) at com.fwdco.server.HrpServlet.init(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1 0 44) - locked 0x107233f0 (a org.apache.catalina.core.StandardWrapper) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:712) - locked 0x107233f0 (a org.apache.catalina.core.StandardWrapper) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j a va:187) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte x t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex t Valve.java:24 5) -- Ben Souther F.W. Davison Company, Inc. This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: threads locking
you can configure it to use either the JDK logger, log4j or the System logger, Filip -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 3:07 PM To: Tomcat Users List Subject: Re: threads locking Does Tomcat use log4j as it's context logger? I thought it didn't? On Tuesday 13 April 2004 01:27 pm, Filip Hanik \(lists\) wrote: print to log4j instead, I assume you know print to the context log? Filip -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 12:29 PM To: 'Tomcat Users List' Subject: threads locking Has anyone else had any problems with threads locking (causing Tomcat to hang)? I just moved an app thats been working for over a year on Linux, win2k pro and winXP pro up to a server running Windows 2k server (dual 800 MHz Pentium III) and it locks up randomly. Using tomcat 5.0.19 Sun's J2sdk 1.4.0_04 Here is a thread dump: http80-Processor25 daemon prio=5 tid=0x186225f0 nid=0xd10 waiting for monitor entry [18fdf000..18f dfd8c] at java.io.PrintStream.println(PrintStream.java:585) - waiting to lock 0x105044a0 (a java.io.PrintStream) at org.apache.tomcat.util.log.SystemLogHandler.println(SystemLogHandler.java:2 7 4) at com.fwdco.server.ServletErrorHandler.init(Unknown Source) at com.fwdco.server.ServletErrorHandler.getInstance(Unknown Source) at com.fwdco.server.HrpServlet.init(Unknown Source) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1 0 44) - locked 0x107233f0 (a org.apache.catalina.core.StandardWrapper) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:712) - locked 0x107233f0 (a org.apache.catalina.core.StandardWrapper) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j a va:187) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte x t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex t Valve.java:24 5) -- Ben Souther F.W. Davison Company, Inc. This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Clustering Application Scope Objects
and that is why we don't focus on implementing this, cause it not defined on how to resolve name/value pair conflicts if different servers set different values for the same name. If I were to implement this I would allow the user to have two ways of configure conflict resolution: 1. set-is-set, meaning that if the attribute with a given name is set, it can not be overwritten To set a new value, simply remove the old one, then set a new one. 2. override, meaning that whenever a broad cast with a new value, the last value is set To set a new value, just call context.setAttribute Filip -Original Message- From: Mike Duffy [mailto:[EMAIL PROTECTED] Sent: Sunday, April 11, 2004 10:53 PM To: Tomcat Users List; Struts Users Mailing List Subject: RE: Clustering Application Scope Objects how would you solve conflicts? For my purposes, I would let the database manage conflicts. Each application scope object would be tied to the database, a change made on a specific application server would first update the database. For example, the information from a table containing label/value pairs for product categories would be stored in application scope on each server at system startup. If a change were made to the product categories, the change would first made to the database and then a change notification would be broadcast to all servers in the cluster, each server would then reload the information from the database. In other cases, where application scoped objects are not backed by a database, the task of handling conflicts becomes more difficult. I think you would almost need to create some sort of locking mechanism that does not allow changes to be made during an update. Mike --- Filip Hanik (lists) [EMAIL PROTECTED] wrote: not implemented right now, how would you solve conflicts? Filip -Original Message- From: Mike Duffy [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 5:48 PM To: Tomcat Users List Subject: Clustering Application Scope Objects I've read documentation for The Tomcat 5 Servlet/JSP Container: Clustering/Session Replication HOW-TO http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html I understand clustering for individual user sessions. Are there any correlated methods for clustering application scope objects? The J2EE API for the Interface ServletContext states, In the case of a web application marked distributed in its deployment descriptor, there will be one context instance for each virtual machine. In this situation, the context cannot be used as a location to share global information (because the information won't be truly global). Use an external resource like a database instead. Rather than use a database, what I would like to be able to do is make a call to servlet.getServletContext().setAttribute(key, object); and have the object stored in the application scope of all servers in the cluster. I know that EJBs were designed to serve this purpose; however, I would like to bypass the overhead and complexities of EJBs. If there isn't a switch that can be flipped in Tomcat, there might be a way to create a lightweight JMS administration class to serve this purpose. Has anyone tried this? If the answer to this question is RTFM, please send a link; I've looked through the documentation and I can't seem to find a clear reference. Thanks for your time and consideration. Mike __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004
RE: Clustering Application Scope Objects
not implemented right now, how would you solve conflicts? Filip -Original Message- From: Mike Duffy [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 5:48 PM To: Tomcat Users List Subject: Clustering Application Scope Objects I've read documentation for The Tomcat 5 Servlet/JSP Container: Clustering/Session Replication HOW-TO http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html I understand clustering for individual user sessions. Are there any correlated methods for clustering application scope objects? The J2EE API for the Interface ServletContext states, In the case of a web application marked distributed in its deployment descriptor, there will be one context instance for each virtual machine. In this situation, the context cannot be used as a location to share global information (because the information won't be truly global). Use an external resource like a database instead. Rather than use a database, what I would like to be able to do is make a call to servlet.getServletContext().setAttribute(key, object); and have the object stored in the application scope of all servers in the cluster. I know that EJBs were designed to serve this purpose; however, I would like to bypass the overhead and complexities of EJBs. If there isn't a switch that can be flipped in Tomcat, there might be a way to create a lightweight JMS administration class to serve this purpose. Has anyone tried this? If the answer to this question is RTFM, please send a link; I've looked through the documentation and I can't seem to find a clear reference. Thanks for your time and consideration. Mike __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.654 / Virus Database: 419 - Release Date: 4/6/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HttpSession Replication in Tomcat Cluster not working with EJB's!
good stuff, thanks for replying, that helps with the archives -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 1:27 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! Filip, You were right. It's works with the handle. Thanx for all the co-operation. cheers Suraj -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Saturday, March 27, 2004 5:51 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! I think you need to store the EJBHandle, not the actual bean that you are referencing. is that what you are doing? Filip -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 4:20 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! Andy, I agree with your point about a SFSB being an extension of a client. But then, if I store the 'state' alone in the httpsession and update the state by using a new SFSB everytime, the whole concept of SFSB's are lost. I would rather use a stateless session bean and use httpsession for persisting my conversational state. (I know this line of thinking against use of SFSB has been advocated many a times and is a different discussion altogether) I beleive what ur suggesting to be a workaround and is not an acceptable solution. My design requirement requires a SFSB and I need servlets to invoke my SFSB. I will also need to cluster the TC5 servers. Passing the reference within the servlet and between method calls is the only way to hold a handle and interact with a single instance of a SFSB. If I use a JBOSS 3.2.3 server which comes bundled with TC then JBOSS takes care of my httpSession sharing between the various JBOSS servers in the cluster. (JBOSS has a different mechanism for httpSession sharing). But I would like to have a multitier cluster with seperate TC clusters and seperate JBOSS clusters. So the end question would be if TC 5.0.18 has the capability to handle such a scenario or not. cheers Suraj -Original Message- From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 4:42 PM To: '[EMAIL PROTECTED]' Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! Think of a stateful session bean as an extension of the client. By storing the remote reference inside your session, you are attempting to persist your Client extension across 2 different clients (2 different tomcat instances). I don't think this is a sensible idea, and I'm not sure it's even allowed. I would advise you not to store remote references inside your session objects. Try storing just the current 'state' inside the session. Use a ServiceLocator to get an instance of the session bean each time you need it, using the current session to populate the state. This may work better for you. Regards, Andy -Original Message- From: Suraj Prabhu To: [EMAIL PROTECTED] Sent: 19/03/2004 07:34 Subject: HttpSession Replication in Tomcat Cluster not working with EJB's! Hi everybody, I am trying to cluster Tomcat Servers ver 5.0.18 (Two servers) and my application servlets are accessing Stateful session beans. Typically, the first invocation of the servlet gets the Remote of the SFSB and stores it into the session. The other Tomcat's in the cluster throw up an error ClassNotFoundException while loading persisted sessions. I have the same war file deployed in all the Tomcats and the Tomcats in turn talk to the same app server (JBOSS 3.2.3). I am attaching my configuration and log outputs of both the servers. Would like to know if this is a bug/limitation or is there a solution to it. Cheers Suraj -- This is the log file o/p of the first server (which the client actually is accessing): INFO: Jk running ID=0 time=0/16 config=C:\Tomcat5\conf\jk2.properties Mar 18, 2004 4:25:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5297 ms Mar 18, 2004 4:26:20 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.9:4001 ,10.5.18.9,4001, alive=16] This is the log file o/p of the second server (which starts up and joins the cluster after a session has been created in the first server) Mar 18, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port Mar 18, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1125 ms Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine
RE: non-java files inside jar
how are you trying to get the XML file? make sure you use the correct class loader approach FIlip -Original Message- From: Linda Smith [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 10:07 AM To: [EMAIL PROTECTED] Subject: non-java files inside jar I get a ServletException caused by: java.lang.ExceptionInInitializerError when sending a request from a jsp to a servlet. the odd thing about it is, when I checked the logs, I saw it couldn't find one of the files in a specific jar archive: Caused by: java.lang.RuntimeException: Could not find log configuration file com/sri/oaa2/oaa_log_config.xml at com.sri.oaa2.lib.LibOaa.clinit(LibOaa.java:336) it is an .xml type file. the archive is copied correctly to /WEB-INF/lib, and the .xml file is indeed in the jar archive(double checked). actually, the class causing the error runs fine outside tomcat. notes: using tomcat 5.0.19, j2sdk1.4.2_02 same error occurs both in windows (xp) and linux (redhat) thanks for your time __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5 Clustering
1. http://siag.nu/pen/ (works on both windows and unix, you may need cygwin) 2. http://balance.sourceforge.net (unix only) 3. Apache mod_jk/mod_jk2 with load balancing the TCP based solutions (12) will work faster and are easier to install. mod_jk/2 comes with a different set of features in addition to just the loadbalancer, so you might want to look into that as well Filip -Original Message- From: armalai [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 9:25 AM To: Tomcat Users List Subject: Tomcat 5 Clustering Hi., Environement: Windows 2000, Tomcat 5.X I have Two tomcat instances and i enabled cluster settings in the server.xml. Looks like both instances working well.I can access my application thru the ip and assigend port for individual instances. My question is.. 1.How do i configure my instances to access by single url? so that if one instance failed, cluster will route to another one right. 2.If i can use Apache 2.x for this do i have to change the http connector to ajp in my tomcat? 3.Suggest me which one will be good for better page transactions. Thanks., MALAI --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session replication
hi Vijay, sorry to let you know that I don't have bandwidth to support session replication on Tomcat 4 as it was not part of the official release The latest code base is at http://cvs.apache.org/~fhanik/ is that what you are using? Filip -Original Message- From: Vijay Kandy [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 9:51 AM To: 'Tomcat Users List' Subject: Session replication Hello, This may seem trivial to most of you but I bet this will help learner like me so heres my question. I use the following method to validate a http session. I have 2 instance of Tomcat 4.1.24 + mod_jk + Apache2 that replicate session in-memory (JavaGroups stuff). After I deliberately shutdown one instance, I see that requests to the other instance but while validating sessions I go to the line where I put block comments (I get to this line on Node 2 ...) and eventually invalidate() them. Why does session.isNew() return true on the second instance? private boolean isValidSession(HttpServletRequest request, HttpServletResponse response) { try { HttpSession session = request.getSession(true); if( ! session.isNew() ) { if( session != null ) { Hashtable sessionStuff = (Hashtable)session.getAttribute(someSessionStuff); try { // Do something with sessionStuff ... } catch(Exception exp) { session.removeAttribute(sessionStuff); session.invalidate(); return false; } } else { session.invalidate(); return false; } } else { /** * I get to this line on Node 2 ... **/ session.invalidate(); return false; } } catch(Exception e) { e.printStackTrace(); } return true; } Regards, Vijay Kandy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session replication
it should be compatible, I wrote that article so long ago, that I am not sure what is in that code base anymore :) Filip -Original Message- From: Vijay Kandy [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 10:15 AM To: 'Tomcat Users List' Subject: RE: Session replication Hi Filip, I am using JavaGroups-2.0.jar...is 2.0 not compatible with Tomcat 4.1.24? Thanks for the good software and the docs (http://www.theserverside.com/articles/article.tss?l=Tomcat) !! Regards, Vijay Kandy -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 11:03 AM To: Tomcat Users List Subject: RE: Session replication hi Vijay, sorry to let you know that I don't have bandwidth to support session replication on Tomcat 4 as it was not part of the official release The latest code base is at http://cvs.apache.org/~fhanik/ is that what you are using? Filip -Original Message- From: Vijay Kandy [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 9:51 AM To: 'Tomcat Users List' Subject: Session replication Hello, This may seem trivial to most of you but I bet this will help learner like me so heres my question. I use the following method to validate a http session. I have 2 instance of Tomcat 4.1.24 + mod_jk + Apache2 that replicate session in-memory (JavaGroups stuff). After I deliberately shutdown one instance, I see that requests to the other instance but while validating sessions I go to the line where I put block comments (I get to this line on Node 2 ...) and eventually invalidate() them. Why does session.isNew() return true on the second instance? private boolean isValidSession(HttpServletRequest request, HttpServletResponse response) { try { HttpSession session = request.getSession(true); if( ! session.isNew() ) { if( session != null ) { Hashtable sessionStuff = (Hashtable)session.getAttribute(someSessionStuff); try { // Do something with sessionStuff ... } catch(Exception exp) { session.removeAttribute(sessionStuff); session.invalidate(); return false; } } else { session.invalidate(); return false; } } else { /** * I get to this line on Node 2 ... **/ session.invalidate(); return false; } } catch(Exception e) { e.printStackTrace(); } return true; } Regards, Vijay Kandy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: apache + 2 tomcat cluster memory problem
there was an earlier email about a mem leak in the connector for mod_jk, please go through the last weeks emails and let us know what you find out. Filip -Original Message- From: Asim Alp [mailto:[EMAIL PROTECTED] Sent: Saturday, March 27, 2004 7:55 PM To: Tomcat Users List Subject: apache + 2 tomcat cluster memory problem Hello everyone, I have 2 Tomcats (both 5.0.19) running on two separate machines. One machine also has Apache 2.0.49 installed on it for load balancing. Apache communicates with tomcat1 thru port 11005 and tomcat2 thru 12005. tomcat1 and Apache are on the same machine. Apache is set to forward /* to the load balancer (and then to Tomcats). We have over a hundred virtual hosts on our tomcats, so we don't want to worry about configuring Apache virtual hosts to serve the images and all the other files (that's why we forward /*, not just /*.jsp and /servlet/*). Both tomcats also have their http connector ports listening to port 8080 on their individual machines. We're using mod_jk_1.2.5_2.0.47.dll for Apache to Tomcat communication... Both our tomcats are running with the -Xms128m -Xmx256m options. With this configuration everything works perfect for about an hour, then our tomcats run out of memory... When we turn off clustering, and run a single Tomcat on port 80 (of course by shutting down Apache Httpd), we don't have any memory problems at all (for now, we're planning to use clustering to avoid down time, one server is actually enough to handle all the traffic). Does anyone have any idea why we'd run out of memory when our tomcats are talking to Apache through mod_jk? Thanks, Asim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HttpSession Replication in Tomcat Cluster not working with EJ B's!
I think you need to store the EJBHandle, not the actual bean that you are referencing. is that what you are doing? Filip -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 4:20 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! Andy, I agree with your point about a SFSB being an extension of a client. But then, if I store the 'state' alone in the httpsession and update the state by using a new SFSB everytime, the whole concept of SFSB's are lost. I would rather use a stateless session bean and use httpsession for persisting my conversational state. (I know this line of thinking against use of SFSB has been advocated many a times and is a different discussion altogether) I beleive what ur suggesting to be a workaround and is not an acceptable solution. My design requirement requires a SFSB and I need servlets to invoke my SFSB. I will also need to cluster the TC5 servers. Passing the reference within the servlet and between method calls is the only way to hold a handle and interact with a single instance of a SFSB. If I use a JBOSS 3.2.3 server which comes bundled with TC then JBOSS takes care of my httpSession sharing between the various JBOSS servers in the cluster. (JBOSS has a different mechanism for httpSession sharing). But I would like to have a multitier cluster with seperate TC clusters and seperate JBOSS clusters. So the end question would be if TC 5.0.18 has the capability to handle such a scenario or not. cheers Suraj -Original Message- From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 4:42 PM To: '[EMAIL PROTECTED]' Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJ B's! Think of a stateful session bean as an extension of the client. By storing the remote reference inside your session, you are attempting to persist your Client extension across 2 different clients (2 different tomcat instances). I don't think this is a sensible idea, and I'm not sure it's even allowed. I would advise you not to store remote references inside your session objects. Try storing just the current 'state' inside the session. Use a ServiceLocator to get an instance of the session bean each time you need it, using the current session to populate the state. This may work better for you. Regards, Andy -Original Message- From: Suraj Prabhu To: [EMAIL PROTECTED] Sent: 19/03/2004 07:34 Subject: HttpSession Replication in Tomcat Cluster not working with EJB's! Hi everybody, I am trying to cluster Tomcat Servers ver 5.0.18 (Two servers) and my application servlets are accessing Stateful session beans. Typically, the first invocation of the servlet gets the Remote of the SFSB and stores it into the session. The other Tomcat's in the cluster throw up an error ClassNotFoundException while loading persisted sessions. I have the same war file deployed in all the Tomcats and the Tomcats in turn talk to the same app server (JBOSS 3.2.3). I am attaching my configuration and log outputs of both the servers. Would like to know if this is a bug/limitation or is there a solution to it. Cheers Suraj -- This is the log file o/p of the first server (which the client actually is accessing): INFO: Jk running ID=0 time=0/16 config=C:\Tomcat5\conf\jk2.properties Mar 18, 2004 4:25:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5297 ms Mar 18, 2004 4:26:20 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.9:4001 ,10.5.18.9,4001, alive=16] This is the log file o/p of the second server (which starts up and joins the cluster after a session has been created in the first server) Mar 18, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port Mar 18, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1125 ms Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.18 Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Sleeping for 2000 secs to establish cluster membership Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.27:400 1,10.5.18.27,4001, alive=45657] Mar 18, 2004
RE: clustering/replication tomcat 5
should be a document in the doc folder shipped with tomcat. steps are pretty simple 1. ucomment the cluster section in server.xml 2. add distributable/ to web.xml 3. make all your attributes serializable 4. if you have two or more tomcat instances on the same machine then you will need to adjust the tcpListenPort in server.xml Filip -Original Message- From: pablo [mailto:[EMAIL PROTECTED] Sent: Thursday, March 25, 2004 7:05 AM To: [EMAIL PROTECTED] Subject: clustering/replication tomcat 5 Hi folks, I am looking for a step by step on how to do tomcat clustering/replication . I am unable to find anything decent on the web nor in my books (being that they are still tomcat 4 specific ). If anybody has a quick down and dirty on these procedures please let me know. -Pablo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HttpSession Replication in Tomcat Cluster not working with EJB's!
yes please, that would be helpful, what version of tomcat? -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:49 PM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJB's! Filip, Would you like me to fwd the war file??? Cheers Suraj -Original Message- From: Suraj Prabhu Sent: Saturday, March 20, 2004 1:12 PM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJB's! it's in a chnr.jar file inside my TestWeb.war -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Saturday, March 20, 2004 1:10 PM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJB's! where is the class chnhr.EmployeeEditorSB stored? -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:26 PM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJB's! Filip, Yes this class is on all the servers. Checked it up, no version clash either. Cheers. Suraj -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Saturday, March 20, 2004 12:10 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJB's! are you sure this class is on all the servers? Filip -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:31 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJB's! where is the class chnhr.EmployeeEditorSB stored? Filip -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 11:34 PM To: [EMAIL PROTECTED] Subject: HttpSession Replication in Tomcat Cluster not working with EJB's! Hi everybody, I am trying to cluster Tomcat Servers ver 5.0.18 (Two servers) and my application servlets are accessing Stateful session beans. Typically, the first invocation of the servlet gets the Remote of the SFSB and stores it into the session. The other Tomcat's in the cluster throw up an error ClassNotFoundException while loading persisted sessions. I have the same war file deployed in all the Tomcats and the Tomcats in turn talk to the same app server (JBOSS 3.2.3). I am attaching my configuration and log outputs of both the servers. Would like to know if this is a bug/limitation or is there a solution to it. Cheers Suraj -- This is the log file o/p of the first server (which the client actually is accessing): INFO: Jk running ID=0 time=0/16 config=C:\Tomcat5\conf\jk2.properties Mar 18, 2004 4:25:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5297 ms Mar 18, 2004 4:26:20 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.9:4001,10. 5.18.9,4001, alive=16] This is the log file o/p of the second server (which starts up and joins the cluster after a session has been created in the first server) Mar 18, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port Mar 18, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1125 ms Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.18 Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Sleeping for 2000 secs to establish cluster membership Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.27:4001,10 .5.18.27,4001, alive=45657] Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\admin.xml Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Mar 18, 2004 4:25:15 PM
RE: HttpSession Replication in Tomcat Cluster not working with EJB's!
where is the class chnhr.EmployeeEditorSB stored? Filip -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 11:34 PM To: [EMAIL PROTECTED] Subject: HttpSession Replication in Tomcat Cluster not working with EJB's! Hi everybody, I am trying to cluster Tomcat Servers ver 5.0.18 (Two servers) and my application servlets are accessing Stateful session beans. Typically, the first invocation of the servlet gets the Remote of the SFSB and stores it into the session. The other Tomcat's in the cluster throw up an error ClassNotFoundException while loading persisted sessions. I have the same war file deployed in all the Tomcats and the Tomcats in turn talk to the same app server (JBOSS 3.2.3). I am attaching my configuration and log outputs of both the servers. Would like to know if this is a bug/limitation or is there a solution to it. Cheers Suraj -- This is the log file o/p of the first server (which the client actually is accessing): INFO: Jk running ID=0 time=0/16 config=C:\Tomcat5\conf\jk2.properties Mar 18, 2004 4:25:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5297 ms Mar 18, 2004 4:26:20 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.9:4001,10. 5.18.9,4001, alive=16] This is the log file o/p of the second server (which starts up and joins the cluster after a session has been created in the first server) Mar 18, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port Mar 18, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1125 ms Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.18 Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Sleeping for 2000 secs to establish cluster membership Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.27:4001,10 .5.18.27,4001, alive=45657] Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\admin.xml Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\balancer.xml Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\manager.xml Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /TestWeb from URL file:C:/Tomcat5/webapps/TestWeb Mar 18, 2004 4:25:17 PM org.apache.catalina.cluster.session.DeltaManager start INFO: Starting clustering manager...:/TestWeb Mar 18, 2004 4:25:17 PM org.apache.catalina.cluster.session.DeltaManager doLoad SEVERE: ClassNotFoundException while loading persisted sessions: java.lang.ClassNotFoundException: chnhr.EmployeeEditorSB java.lang.ClassNotFoundException: chnhr.EmployeeEditorSB at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:630) at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1469) at
RE: HttpSession Replication in Tomcat Cluster not working with EJB's!
are you sure this class is on all the servers? Filip -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:31 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJB's! where is the class chnhr.EmployeeEditorSB stored? Filip -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 11:34 PM To: [EMAIL PROTECTED] Subject: HttpSession Replication in Tomcat Cluster not working with EJB's! Hi everybody, I am trying to cluster Tomcat Servers ver 5.0.18 (Two servers) and my application servlets are accessing Stateful session beans. Typically, the first invocation of the servlet gets the Remote of the SFSB and stores it into the session. The other Tomcat's in the cluster throw up an error ClassNotFoundException while loading persisted sessions. I have the same war file deployed in all the Tomcats and the Tomcats in turn talk to the same app server (JBOSS 3.2.3). I am attaching my configuration and log outputs of both the servers. Would like to know if this is a bug/limitation or is there a solution to it. Cheers Suraj -- This is the log file o/p of the first server (which the client actually is accessing): INFO: Jk running ID=0 time=0/16 config=C:\Tomcat5\conf\jk2.properties Mar 18, 2004 4:25:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5297 ms Mar 18, 2004 4:26:20 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.9:4001,10. 5.18.9,4001, alive=16] This is the log file o/p of the second server (which starts up and joins the cluster after a session has been created in the first server) Mar 18, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port Mar 18, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1125 ms Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.18 Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Sleeping for 2000 secs to establish cluster membership Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.27:4001,10 .5.18.27,4001, alive=45657] Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\admin.xml Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\balancer.xml Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\manager.xml Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /TestWeb from URL file:C:/Tomcat5/webapps/TestWeb Mar 18, 2004 4:25:17 PM org.apache.catalina.cluster.session.DeltaManager start INFO: Starting clustering manager...:/TestWeb Mar 18, 2004 4:25:17 PM org.apache.catalina.cluster.session.DeltaManager doLoad SEVERE: ClassNotFoundException while loading persisted sessions: java.lang.ClassNotFoundException: chnhr.EmployeeEditorSB java.lang.ClassNotFoundException: chnhr.EmployeeEditorSB at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method
RE: HttpSession Replication in Tomcat Cluster not working with EJB's!
where is the class chnhr.EmployeeEditorSB stored? -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 11:26 PM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJB's! Filip, Yes this class is on all the servers. Checked it up, no version clash either. Cheers. Suraj -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Saturday, March 20, 2004 12:10 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJB's! are you sure this class is on all the servers? Filip -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:31 AM To: Tomcat Users List Subject: RE: HttpSession Replication in Tomcat Cluster not working with EJB's! where is the class chnhr.EmployeeEditorSB stored? Filip -Original Message- From: Suraj Prabhu [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 11:34 PM To: [EMAIL PROTECTED] Subject: HttpSession Replication in Tomcat Cluster not working with EJB's! Hi everybody, I am trying to cluster Tomcat Servers ver 5.0.18 (Two servers) and my application servlets are accessing Stateful session beans. Typically, the first invocation of the servlet gets the Remote of the SFSB and stores it into the session. The other Tomcat's in the cluster throw up an error ClassNotFoundException while loading persisted sessions. I have the same war file deployed in all the Tomcats and the Tomcats in turn talk to the same app server (JBOSS 3.2.3). I am attaching my configuration and log outputs of both the servers. Would like to know if this is a bug/limitation or is there a solution to it. Cheers Suraj -- This is the log file o/p of the first server (which the client actually is accessing): INFO: Jk running ID=0 time=0/16 config=C:\Tomcat5\conf\jk2.properties Mar 18, 2004 4:25:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5297 ms Mar 18, 2004 4:26:20 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.9:4001,10. 5.18.9,4001, alive=16] This is the log file o/p of the second server (which starts up and joins the cluster after a session has been created in the first server) Mar 18, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port Mar 18, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1125 ms Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.18 Mar 18, 2004 4:25:12 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Sleeping for 2000 secs to establish cluster membership Mar 18, 2004 4:25:12 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.5.18.27:4001,10 .5.18.27,4001, alive=45657] Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Mar 18, 2004 4:25:14 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\admin.xml Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Mar 18, 2004 4:25:15 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\balancer.xml Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:C:\Tomcat5\conf\Catalina\localhost\manager.xml Mar 18, 2004 4:25:16 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /TestWeb from URL file:C:/Tomcat5/webapps/TestWeb Mar 18, 2004 4:25:17 PM org.apache.catalina.cluster.session.DeltaManager start INFO: Starting clustering manager...:/TestWeb Mar
RE: Cluster and attributes
only session attributes -Original Message- From: Duma Rolando [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 16, 2004 1:58 AM To: [EMAIL PROTECTED] Subject: Cluster and attributes Hi all, I would like to know if the ServletContext attributes are clusterized or this happens only for Session attributes. I'm using Tomcat 5.1.19, Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4 Clustering w/Session Replication Issue
your workaround will work fine, by putting the note in the session. good thinking :) Filip -Original Message- From: Walter Stokes [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 8:20 AM To: Tomcat Users List Subject: RE: Tomcat 4 Clustering w/Session Replication Issue Hi Filip, first let me thank you for your excellent replication code. Unfortunately, our current load balancing scheme does not guarantee session affinity. So, my requirements are to get session replication working across cluster in a non-sticky session environment. Through much research, I have seen some of your old source code, where it appeared you were considering replicating notes as well. I realize that this would force all notes to be serializable, and maybe that is why its not done. In the formauthenticator class, placing the original httprequest object in notes breaks the serializable model. My current workaround is to re-write the FormAuthenticator class to place the original http request info in session attributes, along with the Principal object. I am just hoping no other classes require these objects in the notes. Any thoughts or suggestions would be much appreciated! Filip Hanik (lists) [EMAIL PROTECTED] wrote:use sticky load balancing, that should do it Filip -Original Message- From: Walter Stokes [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 3:56 PM To: [EMAIL PROTECTED] Subject: Tomcat 4 Clustering w/Session Replication Issue I am experiencing a problem using software load balancer distributor (using round robin) to two Tomcat 4.1.24 instances running on the same machine. I am using the tomcat-replication.jar for in memory session replication. The context using session replication is also using a security-realm with form authentication. When the initial http request comes into server1, security constraint forces browser to my custom login form page. The submit of form(POST of j_security_check) then hits the server2. User authentication is successful, however server2 doesn't have the original http request. So he doesn't know the original URL to redirect to. This appears to happen b/c Tomcat places the original httprequest into the notes collection of the catalina session object. The notes collection doesn't appear to be replicated between servers. So, the second server doesn't have the original url. It looks like the principal gets replicated, along with all session attributes. So, the problem only happens at login. Meaning once the user is authenticated and redirected by the same server, I can switch servers successfully. From further testing, it looks like the same situation exists in Tomcat 5 with clustering code. I am wondering is this a known issue or if it should be considered an issue. Any configuration fixes or workarounds would be helpful. Thanks for your time! - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4 Clustering w/Session Replication Issue
use sticky load balancing, that should do it Filip -Original Message- From: Walter Stokes [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 3:56 PM To: [EMAIL PROTECTED] Subject: Tomcat 4 Clustering w/Session Replication Issue I am experiencing a problem using software load balancer distributor (using round robin) to two Tomcat 4.1.24 instances running on the same machine. I am using the tomcat-replication.jar for in memory session replication. The context using session replication is also using a security-realm with form authentication. When the initial http request comes into server1, security constraint forces browser to my custom login form page. The submit of form(POST of j_security_check) then hits the server2. User authentication is successful, however server2 doesn't have the original http request. So he doesn't know the original URL to redirect to. This appears to happen b/c Tomcat places the original httprequest into the notes collection of the catalina session object. The notes collection doesn't appear to be replicated between servers. So, the second server doesn't have the original url. It looks like the principal gets replicated, along with all session attributes. So, the problem only happens at login. Meaning once the user is authenticated and redirected by the same server, I can switch servers successfully. From further testing, it looks like the same situation exists in Tomcat 5 with clustering code. I am wondering is this a known issue or if it should be considered an issue. Any configuration fixes or workarounds would be helpful. Thanks for your time! - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
at most 4 cluster members, the cluster is at a host level, so yes, that would be 4 hosts in your scenario Filip -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 7:53 AM To: Tomcat Users List Subject: Re: clustering question? So let me get this straight. You are saying that I should only have 2-4 hosts in a cluster? or are saying that I should only have 2-4 physical boxes in a cluster? I have over 10 different host and was thinking that each one needed to be in its own cluster(is that the right way of thinking about it). Which lives on 2 tomcat boxes running and will be adding more in the long run. Thanks Daniel Schulken - Original Message - From: Aadi Deshpande [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 11:41 AM Subject: Re: clustering question? Hi, You're changing the wrong port. You should not change the mcastPort, instead you should change the tcpListenPort The mcastPort and mcastAddr should be the same for every instance participating in the cluster. Also, as a word of advice, it's best to keep the cluster size down to 2-3 ( and at most 4 ). we've had a lot of trouble with larger cluster sizes, not because of any fault of the cluster manager, just that it's a huge (network/memory ) resource hog having all your sessions replicated six times over. Of course, this is only for our case so YMMV. hth, -a [EMAIL PROTECTED] wrote: I am getting the following info in my log file. Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster start INFO: Cluster is about to start Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.tcp.ReplicationListener run SEVERE: Unable to start cluster listener. java.net.SocketException: Address already in use at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:108 ) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52) at org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationLi stener.java:148) at org.apache.catalina.cluster.tcp.ReplicationListener.run(ReplicationListe ner.java:129) at java.lang.Thread.run(Thread.java:534) Mar 8, 2004 12:45:10 PM org.apache.catalina.cluster.mcast.McastService start INFO: Sleeping for 2000 secs to establish cluster membership 2004-03-08 12:45:13,151 [main] DEBUG (ManagerBase.java:671) - Registering Tomcat-Standalone:type=Manager,path=/,host=etrak-plus.com 2004-03-08 12:45:13,156 [main] DEBUG (StandardManager.java:697) - Force random number initialization starting 2004-03-08 12:45:13,157 [main] DEBUG (ManagerBase.java:555) - Opening /dev/urandom 2004-03-08 12:45:13,158 [main] DEBUG (ManagerBase.java:366) - Getting message digest component for algorithm MD5 2004-03-08 12:45:13,158 [main] DEBUG (ManagerBase.java:380) - Completed getting message digest component 2004-03-08 12:45:13,159 [main] DEBUG (ManagerBase.java:383) - getDigest() 1 2004-03-08 12:45:13,160 [main] DEBUG (StandardManager.java:700) - Force random number initialization completed 2004-03-08 12:45:13,161 [main] DEBUG (StandardManager.java:406) - Start: Loading persisted sessions 2004-03-08 12:45:13,161 [main] DEBUG (StandardManager.java:416) - Loading persisted sessions from SESSIONS.ser 2004-03-08 12:45:13,165 [main] DEBUG (StandardManager.java:430) - Creating custom object input stream for class loader 2004-03-08 12:45:13,171 [main] DEBUG (StandardManager.java:460) - Loading 0 persisted sessions 2004-03-08 12:45:13,172 [main] DEBUG (StandardManager.java:507) - Finish: Loading persisted sessions Here is the cluster info that i have in my server.xml. Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster name=etrakCluster1 managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.106 mcastPort=45100 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster my mcastAddr range is from 228.0.0.106 - 228.0.0.115 and the ports run from 45100-45109. Note each host has its own cluster entry and i have 10 different hosts. This is on tomcat 5.0.19 running on slackware 9.X Would i need to reboot the server to clear this up? Is this a problem with clustering or could it be a setup problem on my part. Thanks, Daniel Schulken --- Outgoing mail is certified Virus
RE: HTTPS on Tomcat
only one instance of tomcat, the settings (and examples) are in server.xml, read the documentation for more info -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 8:37 PM To: [EMAIL PROTECTED] Subject: HTTPS on Tomcat Hi, I wanted to have the default page running on 80 port and when the user logs in, I need him to be in 443 port. I have made all the settings but I need a clarification on how to redirect the user who has logged in using 80 port to 443 port. How is this generally handled in realtime. Do I need 2 instances of the tomcat running? If so how? Thank you, Best Regards, Uma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java system toolkit (opensource) servlet access question
you are missing a DLL or something from your PATH variable, Eclipse is probably setting this for you, inside eclipse, print java.library.path variable from System.getProperties() at least that is what I think it is, to be on the safe side do a System.getProperties().list(System.out); Filip -Original Message- From: John MccLain [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 6:00 PM To: Tomcat user list Subject: java system toolkit (opensource) servlet access question I would like to use the cool opensource project JST, which accesses windows registries. I wish simply to read a value from it. When I run the sample app in eclipse, it works fine - I get my registry entry. But when I run it from a servlet I get the following error: --- java.lang.UnsatisfiedLinkError: no jst in java.library.path java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491) java.lang.Runtime.loadLibrary0(Runtime.java:788) . . . -- The JST code is JNI code that links to a .dll file (jst.dll) does this have something to do with it?? Why should it run different in a servlet container than as a standalone app? - From the error above, How do I set my java.library.path to include jst.dll?? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
request.registerRequests=false is related to jk2 and not to session replication. what is your problem with session replication? Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 11:53 AM To: Tomcat Users List Subject: Re: clustering question? Aadi, do you have this working properly with 5.0.19? I can't get session replication to work. I see lots of errors in my catalina.out request.registerRequests=false i added this to jk2.properties to stop the error messages. On Tue, 9 Mar 2004, Aadi Deshpande wrote: Date: Tue, 09 Mar 2004 11:41:43 -0500 From: Aadi Deshpande [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: clustering question? Hi, You're changing the wrong port. You should not change the mcastPort, instead you should change the tcpListenPort The mcastPort and mcastAddr should be the same for every instance participating in the cluster. Also, as a word of advice, it's best to keep the cluster size down to 2-3 ( and at most 4 ). we've had a lot of trouble with larger cluster sizes, not because of any fault of the cluster manager, just that it's a huge (network/memory ) resource hog having all your sessions replicated six times over. Of course, this is only for our case so YMMV. hth, -a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
on RH9, you MUST set export LD_ASSUME_KERNEL=2.4 before starting your Java process. There is a bug in the java.nio package Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 12:35 PM To: Tomcat Users List Subject: RE: clustering question? Mar 9, 2004 6:45:28 PM org.apache.jk.common.HandlerRequest decodeRequest WARNING: Error registering request This occurs when I uncomment the jk2.property noted below. All the classes that could/do/will/would get stored to session are serializable. I have two exact machines running rh 9.0 with java version 1.4.2_03 and running tomcat 5.0.19 from server.xml: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false debug=4 useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 debug=4 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=10.99.116.2 tcpListenPort=4001 tcpSelectorTimeout=100 debug=4 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter debug=4 replicationMode=asynchronous/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve debug=4 filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster From the other server set up identically (same code, same confs -- different ip) Mar 9, 2004 6:45:08 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://10.99.116.2: 4001,10.99.116.2,4001, alive=384926336] Mar 9, 2004 6:45:09 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.99.116.2:4001,1 0.99.116.2,4001, alive=18] Mar 9, 2004 6:45:09 PM org.apache.catalina.cluster.tcp.AsyncSocketSender init INFO: Started async sender thread for TCP replication. On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 12:17:31 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? request.registerRequests=false is related to jk2 and not to session replication. what is your problem with session replication? Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
I also stronly recommend using pooled as a replication mode, it is fast and guaranteed Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 12:35 PM To: Tomcat Users List Subject: RE: clustering question? Mar 9, 2004 6:45:28 PM org.apache.jk.common.HandlerRequest decodeRequest WARNING: Error registering request This occurs when I uncomment the jk2.property noted below. All the classes that could/do/will/would get stored to session are serializable. I have two exact machines running rh 9.0 with java version 1.4.2_03 and running tomcat 5.0.19 from server.xml: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false debug=4 useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 debug=4 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=10.99.116.2 tcpListenPort=4001 tcpSelectorTimeout=100 debug=4 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter debug=4 replicationMode=asynchronous/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve debug=4 filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/ /Cluster From the other server set up identically (same code, same confs -- different ip) Mar 9, 2004 6:45:08 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://10.99.116.2: 4001,10.99.116.2,4001, alive=384926336] Mar 9, 2004 6:45:09 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://10.99.116.2:4001,1 0.99.116.2,4001, alive=18] Mar 9, 2004 6:45:09 PM org.apache.catalina.cluster.tcp.AsyncSocketSender init INFO: Started async sender thread for TCP replication. On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 12:17:31 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? request.registerRequests=false is related to jk2 and not to session replication. what is your problem with session replication? Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
to get session replication working, take jk2 out of the equation first. use a loadbalancer like balance (balance.sourceforge.net) or pen (siag.nu) Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 12:58 PM To: Tomcat Users List Subject: RE: clustering question? I put the export LD_ASSUME_KERNEL=2.4 in my startup.sh which is called and still get: Mar 9, 2004 7:11:22 PM org.apache.jk.common.HandlerRequest decodeRequest WARNING: Error registering request Thanks for the suggestion though. I've been reading and googlin' for a week now... On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 13:04:00 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? on RH9, you MUST set export LD_ASSUME_KERNEL=2.4 before starting your Java process. There is a bug in the java.nio package Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering question?
that is correct, should work out of the box :) Filip -Original Message- From: Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 1:23 PM To: Tomcat Users List Subject: RE: clustering question? jk2 is only being utilized to provide the connection between IIS5.0 and tomcat using ajp13. when i've been testing, this is going direct to tomcats port 8080 and utilizing the tomcat web server. if i understand it properly, when the session is instantiated on one server, it's replicated via tcp to the other's that are listening and added to the pool that's been discovered by the multicast. correct? On Tue, 9 Mar 2004, Filip Hanik (lists) wrote: Date: Tue, 9 Mar 2004 13:34:45 -0600 From: Filip Hanik (lists) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: clustering question? to get session replication working, take jk2 out of the equation first. use a loadbalancer like balance (balance.sourceforge.net) or pen (siag.nu) Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1 JSPC not recongnizing change in compile time included file
that is expected behavior. %@ include file=main.jsp% is a static include, meaning, just copy and paste the file before compilation. if you had jsp:include then it should recognize the changes Filip -Original Message- From: Nathan Christiansen [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 7:26 AM To: [EMAIL PROTECTED] Subject: Tomcat 4.1 JSPC not recongnizing change in compile time included file I am running Tomcat 4.1.24. In nearly all JSP files in my webapp I have the following compile time include: %@ include file=main.jsp% However, changes to main.jsp are not caught by JSPC. And only the main_jsp.java source is changed. If I delete all the *_jsp.java files and recompile all of the JSP files, it works perfectly. Anyone have any suggestions? I am using ant 1.5.3 with the following task segment in my build file: jspc destdir=${jspc.src.jsp.dir} webinc=${jspc.base.dir}/fragment.xml package=jsp compiler=jasper41 classpath fileset dir=${publish.common.lib.dir} include name=ant.jar/ include name=jasper-compiler.jar/ include name=jasper-runtime.jar/ include name=servlet.jar/ /fileset pathelement path=${build.dir}/ /classpath webapp basedir=${deploy.dir}/ /jspc I even tried calling JSPC directly using the task fragment described in the Tomcat 4.1 documentation: taskdef classname=org.apache.jasper.JspC name=jasper2 classpath id=jspc.classpath pathelement location=${java.home}/../lib/tools.jar/ fileset dir=${tomcat.server.lib.dir} include name=*.jar/ /fileset fileset dir=${publish.common.lib.dir} include name=*.jar/ /fileset /classpath /taskdef jasper2 validateXml=false package=jsp uriroot=${deploy.dir} webXmlFragment=${jspc.base.dir}/fragment.xml outputDir=${jspc.src.jsp.dir} / -- Nathan Christiansen Software Engineer Tahitian Noni International http://www.tahitiannoni.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Call to webservice always fails on first try
take this to the BEA newsgroups, it is probably a VM problem if you are fine with Sun JDK. Filip -Original Message- From: tom ly [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 4:02 PM To: [EMAIL PROTECTED] Subject: Call to webservice always fails on first try I've got AXIS as a webapp inside Tomcat. When I use JRockit1.4.1SP2, for some reason it always fails on the first invoke to the webservice upon startup of Tomcat, but then runs fine after that. I don't get the problem with Sun JDK1.4.2. The error from the client is: (500)Internal Server Error at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630 ) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java: 71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180) at org.apache.axis.client.Call.invokeEngine(Call.java:2564) at org.apache.axis.client.Call.invoke(Call.java:2553) at org.apache.axis.client.Call.invoke(Call.java:2248) at org.apache.axis.client.Call.invoke(Call.java:2171) at org.apache.axis.client.Call.invoke(Call.java:1691) at com.aol.tei.routing.UCIInformationSoapBindingStub.re_getUCI(UCIInformationSo apBindingStub.java:143) at com.aol.tei.routing.UCITest.main(UCITest.java:51) - Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mac internet explorer issues
tags are evaluated on the server, and the browser will not have any effect Filip -Original Message- From: Alex Korneyev [mailto:[EMAIL PROTECTED] Sent: Thursday, March 04, 2004 7:06 PM Cc: Tomcat Users List Subject: mac internet explorer issues Hello, Has anyone noticed any problems with usebean tags with I.E. 5.2 on MAC? for some reason, session variables are coming thru. however, if i use regular request.getAttribute() all is well. alex korneyev - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: clustering tomcat 5.0.19 issues
1) context manager doesn't exist. yep, I am only printing this because of debug. All this means is that you are a member of the cluster but the server has not fully started up yet. hence you are receiving messages for a non existent context. 2)Unable to send replicated message, is server down? One of your nodes is not responding to messages, either you have some IP misconfiguration or something else is blocking the messages. I will add more info to that message to be able to track the problem down 3) SEVERE: TCP Worker thread in cluster caught 'java.io.IOException: While reading a message from another node, that node disappeared, got disconnected. This is also fine and should not affect your system any other questions, just let me know. someone else can answer your mod_jk load balancing questions. Filip -Original Message- From: shyam [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 2:40 PM To: 'Tomcat Users List' Subject: clustering tomcat 5.0.19 issues Hi All, I have done clustering of tomcat. I have two different machines running tomcat which join the cluster. I am testing my application . But in between I see some errors like 1) context manager doesn't exist. 2)Unable to send replicated message, is server down? 3) SEVERE: TCP Worker thread in cluster caught 'java.io.IOException: An established connection was aborted by the software in your host machine' closing channel It would be grateful if somebody can tell what are these errors for . And also I have another query. I have my apache as the load balancer. Currently the requests are dispatched to each tomcat by the apache. I want this dispatch to happen in a specific way like one tomcat getting 2 requests and other getting just one request. Like a ratio of 2:1 . How can I do it ? Thanks in advance shyam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Clustering Tomcat 5.0.19
works just fine for me. The configuration file changed between version 0.16 and 0.19, so make sure you have the 0.19 server.xml Filip -Original Message- From: Duma Rolando [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 9:22 AM To: [EMAIL PROTECTED] Subject: Clustering Tomcat 5.0.19 Hi all, I have a problem running Tomcat 5.0.19 on HP Itanium with JRockit 1.4.2. If I comment out the Cluster ReplicationValve from server.xml as mentioned in the docs, leaving the default attribute values my catalina.out shows the following exception: GRAVE: Unable to start cluster. java.lang.NullPointerException at org.apache.commons.beanutils.MethodUtils.invokeMethod(Ljava.lang.Object;Ljav a.lang.String;[Ljava.lang.Object;)Ljava.lang.Object;(MethodUtils.java:196) at org.apache.commons.beanutils.MethodUtils.invokeMethod(Ljava.lang.Object;Ljav a.lang.String;Ljava.lang.Object;)Ljava.lang.Object;(MethodUtils.java:150) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.start()V(SimpleTcpCluster.j ava:413) at org.apache.catalina.core.ContainerBase.start()V(ContainerBase.java:1116) at org.apache.catalina.core.StandardHost.start()V(StandardHost.java:832) at org.apache.catalina.core.ContainerBase.start()V(ContainerBase.java:1126) at org.apache.catalina.core.StandardEngine.start()V(StandardEngine.java:521) at org.apache.catalina.core.StandardService.start()V(StandardService.java:519) at org.apache.catalina.core.StandardServer.start()V(StandardServer.java:2345) at org.apache.catalina.startup.Catalina.start()V(Catalina.java:594) at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;JLjava.lang.Ob ject;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source) at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Obj ect;)Ljava.lang.Object;(Unknown Source) at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l ang.Object;)Ljava.lang.Object;(Unknown Source) at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;J)Ljava .lang.Object;(Unknown Source) at org.apache.catalina.startup.Bootstrap.start()V(Bootstrap.java:297) at org.apache.catalina.startup.Bootstrap.main([Ljava.lang.String;)V(Bootstrap.j ava:398) 1-mar-2004 17.30.07 org.apache.catalina.startup.Catalina start GRAVE: Catalina.start: LifecycleException: java.lang.NullPointerException at org.apache.catalina.cluster.tcp.SimpleTcpCluster.start()V(SimpleTcpCluster.j ava:424) at org.apache.catalina.core.ContainerBase.start()V(ContainerBase.java:1116) at org.apache.catalina.core.StandardHost.start()V(StandardHost.java:832) at org.apache.catalina.core.ContainerBase.start()V(ContainerBase.java:1126) at org.apache.catalina.core.StandardEngine.start()V(StandardEngine.java:521) at org.apache.catalina.core.StandardService.start()V(StandardService.java:519) at org.apache.catalina.core.StandardServer.start()V(StandardServer.java:2345) Can anyone help me? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cluster error when starting up web application
I just committed a fix into CVS, I didn't change the tellNew, instead I moved setValid(true) before I called tellNew() during session creation. Filip -Original Message- From: Aadi Deshpande [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 10:36 PM To: Tomcat Users List Subject: Re: Cluster error when starting up web application Upon further research, it seems that DeltaSession.setId() fires the sessionCreated events to registered listeners, but this happens before a session is declared valid ( i.e. setValid(true) has not been called ). so when a registered listener tries to utilize ( what it seems to believe is ) a newly created session, the setAttribute method throws the IllegalStateException.. Now I don't know too much about how the actual workings of the HttpSession should go, but in my opinion, the sessionCreated events should not be fired unless a valid session has been created. which seems to imply that maybe setValid() should doing the firing... However, that doesn't sit well with me since it doesn't make sense for a session to be truly valid unless it has a sessionId, which either forces there to be an implict order between setId() and setValid() which is no good, requiring that either/or check to see if the other has been truly satisfied, and setting up some sort of implicit sequence coupling. the alternative, as I see it, is move the tellNew() invocation to the DeltaManager ( it's declared public, so it's already exposed ). I tried that, by patching up the TC5 sources and it seemed to resolve the issue. Again, as I know little to nothing of how sessions should work and what other implications this refactoring may have, what should be my next course of action? Should I contact the webwork people? Is this not correct use of sessions and session listeners? Should I open up a bug and/or propose my patch? Thanks in advance for reading and/or responding, -a Aadi Deshpande wrote: Hi, I just got Tomcat 5.0.19 and after setting up the new delta based cluster manager, i get this during the startup my application : SEVERE: Session event listener threw exception java.lang.IllegalStateException: setAttribute: Session already invalidated at org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.j ava:1306) at org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.j ava:1283) at org.apache.catalina.cluster.session.DeltaSessionFacade.setAttribute(DeltaSes sionFacade.java:17 7) at com.opensymphony.webwork.lifecycle.SessionLifecycleListener.sessionCreated(S essionLifecycleLis tener.java:50) at org.apache.catalina.cluster.session.DeltaSession.tellNew(DeltaSession.java:4 59) at org.apache.catalina.cluster.session.DeltaSession.setId(DeltaSession.java:431 ) at org.apache.catalina.cluster.session.DeltaManager.createSession(DeltaManager. java:377) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManage r.java:895) at org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaMa nager.java:794) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT cpCluster.java:561 ) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:117) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica tionThread.java:17 6) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea d.java:114) As far as I can tell, it's happening when I request a page that has the webwork2 RequestLifecycleFilter set for that url pattern. The doFilter function creates a HttpSession if none exists, which I assume calls the SessionLifecycleListener.sessionCreated(), but for some reason, it seems like the session is being invalidated prematurely.. Here's the relevant piece from my web.xml : filter filter-namecontainer/filter-name filter-class com.opensymphony.webwork.lifecycle.RequestLifecycleFilter/filter-class /filter filter-mapping filter-namecontainer/filter-name url-pattern/*/url-pattern !-- modify appropriately -- /filter-mapping listener listener-class com.opensymphony.webwork.lifecycle.SessionLifecycleListener/listener-class /listener listener listener-class com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener/listener-cl ass /listener and from my server.xml file, taken pretty much verbatim from the default server.xml: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=224.64.64.128
RE: Cluster error when starting up web application
now remember, that I actually don't have to invoke the listeners upon replication, I am doing it anyway, cause I think it might help, but there is a risk in some apps that it may not. the spec is in the gray, it doesn't say that you have to or not. Filip -Original Message- From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] Sent: Monday, March 01, 2004 1:40 PM To: Tomcat Users List Subject: RE: Cluster error when starting up web application I just committed a fix into CVS, I didn't change the tellNew, instead I moved setValid(true) before I called tellNew() during session creation. Filip -Original Message- From: Aadi Deshpande [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 10:36 PM To: Tomcat Users List Subject: Re: Cluster error when starting up web application Upon further research, it seems that DeltaSession.setId() fires the sessionCreated events to registered listeners, but this happens before a session is declared valid ( i.e. setValid(true) has not been called ). so when a registered listener tries to utilize ( what it seems to believe is ) a newly created session, the setAttribute method throws the IllegalStateException.. Now I don't know too much about how the actual workings of the HttpSession should go, but in my opinion, the sessionCreated events should not be fired unless a valid session has been created. which seems to imply that maybe setValid() should doing the firing... However, that doesn't sit well with me since it doesn't make sense for a session to be truly valid unless it has a sessionId, which either forces there to be an implict order between setId() and setValid() which is no good, requiring that either/or check to see if the other has been truly satisfied, and setting up some sort of implicit sequence coupling. the alternative, as I see it, is move the tellNew() invocation to the DeltaManager ( it's declared public, so it's already exposed ). I tried that, by patching up the TC5 sources and it seemed to resolve the issue. Again, as I know little to nothing of how sessions should work and what other implications this refactoring may have, what should be my next course of action? Should I contact the webwork people? Is this not correct use of sessions and session listeners? Should I open up a bug and/or propose my patch? Thanks in advance for reading and/or responding, -a Aadi Deshpande wrote: Hi, I just got Tomcat 5.0.19 and after setting up the new delta based cluster manager, i get this during the startup my application : SEVERE: Session event listener threw exception java.lang.IllegalStateException: setAttribute: Session already invalidated at org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.j ava:1306) at org.apache.catalina.cluster.session.DeltaSession.setAttribute(DeltaSession.j ava:1283) at org.apache.catalina.cluster.session.DeltaSessionFacade.setAttribute(DeltaSes sionFacade.java:17 7) at com.opensymphony.webwork.lifecycle.SessionLifecycleListener.sessionCreated(S essionLifecycleLis tener.java:50) at org.apache.catalina.cluster.session.DeltaSession.tellNew(DeltaSession.java:4 59) at org.apache.catalina.cluster.session.DeltaSession.setId(DeltaSession.java:431 ) at org.apache.catalina.cluster.session.DeltaManager.createSession(DeltaManager. java:377) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManage r.java:895) at org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaMa nager.java:794) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT cpCluster.java:561 ) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:117) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica tionThread.java:17 6) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea d.java:114) As far as I can tell, it's happening when I request a page that has the webwork2 RequestLifecycleFilter set for that url pattern. The doFilter function creates a HttpSession if none exists, which I assume calls the SessionLifecycleListener.sessionCreated(), but for some reason, it seems like the session is being invalidated prematurely.. Here's the relevant piece from my web.xml : filter filter-namecontainer/filter-name filter-class com.opensymphony.webwork.lifecycle.RequestLifecycleFilter/filter-class /filter filter-mapping filter-namecontainer/filter-name url-pattern/*/url-pattern !-- modify appropriately -- /filter-mapping listener listener-class com.opensymphony.webwork.lifecycle.SessionLifecycleListener/listener-class /listener listener listener-class com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener/listener-cl ass /listener
RE: How limit size of catalina.out ?
1. you can change startup.sh/startup.bat to not print to catalina.out at all, or 2. there is a unix pipe program called cronolog that takes the out put from std out and std err (if you pipe) it and that one will rotate the logs for you Filip -Original Message- From: Philippe Couas [mailto:[EMAIL PROTECTED] Sent: Sunday, February 29, 2004 1:07 AM To: [EMAIL PROTECTED] Subject: How limit size of catalina.out ? Hi, How can i limit disk size of catalina.out file in Tomcat 4.1.30 ? Curently i use crontab each day but, theres is an option perhaps ? Thanks Philippe --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 5.0.19. [Newbie] Why it doesnt run my HelloServlet
you need to configure your HelloWorldServlet in webapps/ROOT/WEB-INF/web.xml -Original Message- From: Nathan Gross [mailto:[EMAIL PROTECTED] Sent: Sunday, February 29, 2004 2:02 PM To: [EMAIL PROTECTED] Subject: 5.0.19. [Newbie] Why it doesnt run my HelloServlet Hi. I am new to j2ee app server technology (although I wrote my own non-j2ee rmi version, until I realized that I am not so smart after all, and gave-up on re-inventing the wheel) and decided to take a quick into tutorial at: http://www.coreservlets.com/Apache-Tomcat-Tutorial/ . I followed it to the tee, and although it runs jsp's just fine, I cannot get to load the sample HelloServlet, it returns 404. I copied the tutor's server.xml but to no avail. I have the HelloServlet.class in the \jakarta-tomcat-5.0.19\webapps\ROOT\WEB-INF\classes directory. Should I discard this convenient methodology and just build and deploy complete apps? Thank you all; -nat I attched my conf/server and conf/web xml files. I don't know how your email receives this. If not appropiate, please excuse. Thank you. --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.594 / Virus Database: 377 - Release Date: 2/24/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]