Re: clustering questions
So the proper location for a Cluster element is inside a Host element? Host Does this mean I need to have a separate Cluster element for each virtual host? yes, unfortunately, the better solution is to do the virtual hosting in your apache server. That way you only need one cluster config. Filip Mark Eggers wrote: I'm looking at clustering and have a few questions. 1. In the documentation, the Cluster element is shown as a child of the Engine element. In the example server.xml the Cluster element is shown in the Host element. When I put the Cluster element in the Host element, I get clustering messages in catalina.out. I don't get this if I put the Cluster element in the Engine element. So the proper location for a Cluster element is inside a Host element? 2. There is a statement concerning number of threads would be optimal if it matched the number of nodes. I am fronting Tomcat with Apache/mod_jk. Would the number of nodes be the maximum clients I have configured for Apache times the number of Apache servers that can hit this Tomcat server? I am looking at having several virtual hosts running under one Tomcat instance. Does this mean I need to have a separate Cluster element for each virtual host? Thanks for helping me get started on this. /mde/ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - 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: picture of session state for nodes in cluster??
you would have to write a valve or other component that queries the Tomcat internal classes yourself, If you do come up with something very useful, we would love to include it into the code base. Filip John MccLain wrote: How can I get a picture of session state for each node in a cluster every time a session is replicated? is there some valve or filter out there I can use? I am having clustering problems with our app, and I want to see what the difference is in session state between the nodes in the cluster John McClain Senior Software Engineer TCS Healthcare [EMAIL PROTECTED] (530)886-1700x235 Skepticism is the first step toward truth - 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: How to query for number of active participants in the tomcat 5.5 cluster
you would need to write a component that queries the cluster classes (internal tomcat components) yourself. I believe you can reach the cluster object through JMX and through the tomcat classes (host etc) the interface CatalinaCluster.getMembers() returns all members in a cluster. Filip Edmon Begoli wrote: Hi, Is it possible to query host tomcat for the number of active participants in the cluster that host tomcat belongs to. If yes - can you please point me to the API, and possibly examples. Thank you, Edmon - 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: Clustering without farmwardeployer
Two suggestions: 1. Make sure the farm war deployer is really turned off, and by the way, the farm war deployer doesn't deploy into webapps, instead into the dir you specify in server.xml 2. Check your scripts again, chances are you are the one redeploying your own old code. Filip Todd Huss wrote: We have a Tomcat cluster setup across 9 servers with clustering for session replication. However, we are not using the farmwardeployer because we have our own script that we use to shutdown each tomcat, deploy a fix version, and then start it up again so we don't incur any downtime. However, we're seeing some very unusual behavior. After shutting down one node, deleting contents of webapps and work directories, dropping in a new war, and restarting, the new files that get exploded in the webapps directory are not those of the war dropped into the webapps directory. They are instead the files from the previous war which is no longer on the local filesystem. It leads me to believe that even though we have the farmwardeployer turned off, that when we start tomcat in clustered mode, rather than exploding the local war, it's getting the contents of the war from another node. Any ideas? Thanks, Todd - 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: how to determine clustering problem?
turn on logging, see Tomcat docs then through log4j you can turn on logging for only org.apache.catalina.cluster and you will be able to see all messages going through. Filip John MccLain wrote: We have a webapp that runs fine in 1 tomcat instance. We have insured that all classes being stored in session are serializable When I put the app into a cluster of 3 Tomcats on my machine, it kind of works, but I am getting inconsistent failures. It is like constantly running down rabbit holes as the errors change continually. Is there a way to debug clustered apps? If this is a possible memory, issue, How do I change the memory configuration for each Tomcat instance? Is there a timeout for each screen request? can I configure it? John McClain Senior Software Engineer TCS Healthcare [EMAIL PROTECTED] (530)886-1700x235 Skepticism is the first step toward truth - 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: How to use Database persistence for tomcat clustering?
Configure the PersistenceManager as your session manager hang zhao wrote: Hi, everyone I am trying some configuration with my small tomcat cluster (2 tomcats, 1 apache, connected with mod_jk2 as load balancer). The problem is that I want to use a shared database (Mysql) to do session replication instead of in-memory session replication. But to the best of my knowledge, you seems can not make session level fail over to work with shared database session replication. The changed session data is not sent to database immediately. In another word, how can I configure so that when I change session data, it is sent to database immediately. And so when some nodes dies, the other node can pick up the unfinished request silently without session data loss. Thanks in advance Hang __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - 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: Limit catalina.out size
or like we do, we pipe the output through cronolog Filip Tim Funk wrote: There shouldn't be anything going to standard output (Unless your code is writing to System.out) An overly simple way to rotate logs in unix ... cd $tomcat_log_dir cp -f catalina.out catalina.out.`date +%Y.%m.%d` cat /dev/null catalina.out -Tim Jimmy Ray wrote: Running on HPUX...SDK 1.4.2...the standard output is going to catlaina.out. Is it possible to change the logger settings reduce the size of the catalina.out file and perform circular logging? If so where are these settings? Regards, Jimmy Ray - 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: Cluster Deployment Question
Make sure your WAR file gets properly installed on both instances SEVERE: Unable to install WAR file java.io.FileNotFoundException: C:\tmp\war-deploy\clustertest.war (The system cannot find the path specified) Durfee, Bernard wrote: I am ready to set Tomcat up in a clustered environment. So to test I have installed two instances of Tomcat 5.5.7 on the same XP machine. One listens on 8080 and the other on 8081. I configured the server.xml as follows... Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true notifyListenersOnReplication=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=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=10 / Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled ackTimeout=15000 / Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt; / Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer tempDir=/tmp/war-temp/ deployDir=/tmp/war-deploy/ watchDir=/tmp/war-listen/ watchEnabled=false / /Cluster ...with tcpListenPort as 4001 in one instance and 4002 in the other. With watchEnabled false on one but true on the other. The Tomcat instances start fine and both indicate... INFO: Replication member added ...when started. This tells me that they see each other. When I try to deploy a web-app by dropping it in the war-listen directory I get... SEVERE: Unable to install WAR file java.io.FileNotFoundException: C:\tmp\war-deploy\clustertest.war (The system cannot find the path specified) ...okay, so that doesn't work. So I try to deploy through the manager on 8080 using Select WAR file to upload... The 8080 server says: WARNING: Manager[/clustertest], requesting session state from org.apache.catalina.cluster.mcast.McastMember[tcp://123.321.21.25:4002,1 41.254.21.25,4002, alive=227500]. This operation will timeout if no session state has been received within... The 8081 server then says: Mar 18, 2005 3:03:35 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived WARNING: Context manager doesn't exist:/clustertest ...then the 8080 server waits, then times out and says... SEVERE: Manager[/clustertest], No session state received, timing out. ...any ideas? Seems like the Tomcats are talking and trying, but can't send the WAR from one to the other. Bernard Durfee - 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: Apache/Tomcat 4.1.18 - Displaying empty Strings as null
install tomcat 4.1.31 on your new server Mendez, Eric wrote: Hello, I recently installed Apache/Tomcat v 4.1.18 on my new server, and I have a JSP page that extracts values from an Oracle database, if the value in the database is an empty String (), it returns as a null value in my JSP page. I have another server with Tomcat v. 4.1.31, and I am not having this issue. The new server has JDK v. 1.4.2 and my old server has v. 1.4.1. Any ideas will help. Thanks Confidentiality Note: The preceding e-mail message (including any attachments) contains information that may be confidential, protected by applicable legal privileges, or constitute non-public information. It is intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this message, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution or reproduction of this message by unintended recipients is not authorized and may be unlawful. - 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 load-balancing maintenance strategy?
its fixed in 5.5.x, you need a patch for 5.0.x? Dan Carwin wrote: I also experienced cluster failure when restarting a downed cluster member in 5.0. I tested with Tomcat 5.0.30. Randall, what version of Tomcat did you succeed with? Thanks, Dan -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 10:45 AM To: Tomcat Users List Subject: RE: tomcat load-balancing maintenance strategy? Jim, Also check the archives for my post on restarting a downed Tomcat cluster member. This was not working well prior to Tomcat 5.5.8. When the instance was restarted it would throw exceptions trying to re-synchronize vi session replication. - Richard -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 9:40 AM To: Tomcat Users List Subject: RE: tomcat load-balancing maintenance strategy? You need to implement either in memory session replication or persist the session in a database or a shared file system. I have finally got my tomcat cluster working and session replication is functional. Randall - 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: SV: Cluster: will session listeners got called again after replication?
listeners will not be invoked on a state transfer, as it is not considered an event. when a new member joins the cluster, it requests a state transfer from one of the other members. Joseph Lam wrote: I have it turned on already. But seems that after a node is killed and then started up again, even though it can pick up the sessions from the other nodes, my HttpSessionBindingListener and HttpSessionListener were not called at all during the replication. Joseph On Fri, 25 Feb 2005, Filip Hanik - Dev Lists wrote: there is a flag you can set so that listeners don't get called, its optional its called notifyListenersOnReplication, see server.xml for example, default is true Filip Jesper Ekberg wrote: Hello! My first mail to this list. :) I have read it for a long time tho. We have a tried to cluster 3 Tomcat 5.5.7 machines and I found that HttpSessionBindingListener will be notified when the session is replicated and the machine crashes. I think this must be a bug?? The scenario: 3 Tomcat 5.5.7 machines on Windows 2003 Server (I know, not my fault ;)). JK2 Connector for load balancing. I log on and session is created and is replicated correctly to all machines. I shut down the server that I'm working on. The session is destroyed and method valueUnbound is called on the crashed machine. It seems odd to me that the method valueUnbound is called when the session is replicated, the session still lives on the other Tomcat machines. Sorry for my sometimes bad English ;) //Jesper -Ursprungligt meddelande- Från: Joseph Lam [mailto:[EMAIL PROTECTED] Skickat: den 24 februari 2005 08:44 Till: Tomcat Users List Ämne: Cluster: will session listeners got called again after replication? Anyone knows when a session is replicated to other nodes, will the HttpSessionBindingListener and HttpSessionAttributeListener objects be notified again? On the receiver nodes, how can I detect when a session from the sender node comes in so that I can do something with it? Joseph - 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]
Re: Tomcat clustering and NotSerializableException
As Richard says, don't store your request in the session, not a good idea. Richard Mixon (qwest) wrote: CoyoteRequestFacade is the first element in the stack trace - it is not the session stored object that is causing the NotSerializableException. As I said in my prior posting, to resolve this issue you need to: 1) Identify each object that you are explicitly storing in the session and make sure it directly or indirectly (through inheritance) specified that it implements Serializable. 2) Follow the chain from each session object to other objects that it references and make sure they are ALL marked as serializable (again - either directly or indirectly) That will fix your problem. These issues often do not come up until either you: 1. Try and use session replication. 2. Try to persist sessions to a datastore and access from a cluster. 3. Try to persist sessions across a restart of Tomcat. Also, please just reply to the list - not to the list and to the poster. HTH - Richard Sng Wee Jim wrote: But the stacktrace says java.io.NotSerializableException: org.apache.coyote.tomcat5.CoyoteRequestFacade at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13 32) at Since CoyoteRequestFacade is a tomcat class, I assume it has to be fixed by the tomcat team. Unless the actual object that is not Serializable not CoyoteRequestFacade is available somewhere else... - Jim -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 11:13 PM To: Tomcat Users List Subject: RE: Tomcat clustering and NotSerializableException As Matt said its probably your applications objects. When we switched to clustering I was surprised at how many of my session objects I needed to add serializable to. But it was easy work and quickl done. HTH - Richard Dale, Matt wrote: I would guess that this means you have an object in your session that does not implement the serializable interface. Ta Matt -Original Message- From: Sng Wee Jim [mailto:[EMAIL PROTECTED] Sent: 28 February 2005 09:21 To: tomcat-user@jakarta.apache.org Subject: Tomcat clustering and NotSerializableException Hi, I am using Tomcat 5.0.28 on MS Win2k server. After I have uncommented the Cluster element in server.xml, I get the following exceptions on the tomcat console for some actions that are using displaytag. Is it a tomcat bug, since org.apache.coyote.tomcat5.CoyoteRequestFacade is involved? (DeltaManager.java:813)- Unable to serialize delta request java.io.NotSerializableException: org.apache.coyote.tomcat5.CoyoteRequestFacade at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java 1332) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:13 04) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav a:1247) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) at org.apache.catalina.cluster.session.DeltaRequest$AttributeInfo.writeE xternal(DeltaRequest.java:300) at org.apache.catalina.cluster.session.DeltaRequest.writeExternal(DeltaR equest.java:217) at org.apache.catalina.cluster.session.DeltaManager.unloadDeltaRequest(D eltaManager.java:393) at org.apache.catalina.cluster.session.DeltaManager.requestCompleted(Del taManager.java:782) at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationVa lve.java:203) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:102) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16 0) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.ja va:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at
Re: skipping state transfer. No members active in cluster group
your multicast isn't working. Filip Randall Svancara wrote: I have a problem in my tomcat logs. I am using tomcat 5.5.7 and whenever I start up tomcat for the first time, I receive this error message. INFO: Manager[/testapp], skipping state transfer. No members active in cluster group. After the delta manager starts, I receive this error. Should I be concerned about this I have set distributable/ in my web.xml. My server.xml has all the clustering stuff enable. I have provided it below!! I have started up ethereal and I can see the multicast packets broadcasting. The data portion contains the ip address of the server. Everything looks like it should work. Randall Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=false notifyListenersOnReplication=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=224.0.0.3 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000 mcastBindAddress=10.111.22.163/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=10.111.22.163 tcpListenPort=4002 tcpSelectorTimeout=200 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled ackTimeout=15000/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt; / Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer tempDir=/tmp/war-temp/ deployDir=/tmp/war-deploy/ watchDir=/tmp/war-listen/ watchEnabled=false/ /Cluster - 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: SV: Cluster: will session listeners got called again after replication?
there is a flag you can set so that listeners don't get called, its optional its called notifyListenersOnReplication, see server.xml for example, default is true Filip Jesper Ekberg wrote: Hello! My first mail to this list. :) I have read it for a long time tho. We have a tried to cluster 3 Tomcat 5.5.7 machines and I found that HttpSessionBindingListener will be notified when the session is replicated and the machine crashes. I think this must be a bug?? The scenario: 3 Tomcat 5.5.7 machines on Windows 2003 Server (I know, not my fault ;)). JK2 Connector for load balancing. I log on and session is created and is replicated correctly to all machines. I shut down the server that I'm working on. The session is destroyed and method valueUnbound is called on the crashed machine. It seems odd to me that the method valueUnbound is called when the session is replicated, the session still lives on the other Tomcat machines. Sorry for my sometimes bad English ;) //Jesper -Ursprungligt meddelande- Från: Joseph Lam [mailto:[EMAIL PROTECTED] Skickat: den 24 februari 2005 08:44 Till: Tomcat Users List Ämne: Cluster: will session listeners got called again after replication? Anyone knows when a session is replicated to other nodes, will the HttpSessionBindingListener and HttpSessionAttributeListener objects be notified again? On the receiver nodes, how can I detect when a session from the sender node comes in so that I can do something with it? Joseph - 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]
Re: Cluster: Is session's lastAccessedTime got replicated?
unless the session is primary, the last accessed time wont matter, when the session becomes primary, the last access time gets set immediately. Filip Joseph Lam wrote: Found that only when a replication is explicitly triggered by set/removeAttribute(), the other nodes' session.getLastAccessedTime() will be synchronized. Joseph On Thu, 24 Feb 2005, Joseph Lam wrote: Hi, It seems that in my 4-node cluster (TC 5.5.8), the session.getLastAccessedTime() only returns the last accessed time in each particular node only. Is this normal? How can I get the last accessed time of a session across the whole cluster? Regards, Joseph Lam - 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]
Re: SV: Cluster: will session listeners got called again after replication?
there is a difference between a crashed tomcat and a shutdown tomcat. Filip Filip Hanik - Dev Lists wrote: there is a flag you can set so that listeners don't get called, its optional its called notifyListenersOnReplication, see server.xml for example, default is true Filip Jesper Ekberg wrote: Hello! My first mail to this list. :) I have read it for a long time tho. We have a tried to cluster 3 Tomcat 5.5.7 machines and I found that HttpSessionBindingListener will be notified when the session is replicated and the machine crashes. I think this must be a bug?? The scenario: 3 Tomcat 5.5.7 machines on Windows 2003 Server (I know, not my fault ;)). JK2 Connector for load balancing. I log on and session is created and is replicated correctly to all machines. I shut down the server that I'm working on. The session is destroyed and method valueUnbound is called on the crashed machine. It seems odd to me that the method valueUnbound is called when the session is replicated, the session still lives on the other Tomcat machines. Sorry for my sometimes bad English ;) //Jesper -Ursprungligt meddelande- Från: Joseph Lam [mailto:[EMAIL PROTECTED] Skickat: den 24 februari 2005 08:44 Till: Tomcat Users List Ämne: Cluster: will session listeners got called again after replication? Anyone knows when a session is replicated to other nodes, will the HttpSessionBindingListener and HttpSessionAttributeListener objects be notified again? On the receiver nodes, how can I detect when a session from the sender node comes in so that I can do something with it? Joseph - 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]
Re: Cluster: how to set mcast interface for dual LAN card?
there is an attribute mcastBindAddr that allows you to bind to the interface. Joseph Lam wrote: Hi, If I have two LAN cards and I want my Tomcat to mcast through one of them, what parameter should I set? Regards, Joseph - 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: Load balancing SSL sessions
you can also use DNS round robin, www.mysite.com resolves to two or more IP addresses. Filip Andrew Miehs wrote: We use F5 BigIPs, but they are probably overkill for your application - The cisco probably will be as well. A 'Cheap' software solution might be to work with redirects, and 2 separate IP addresses. ie: ssl1.mysite.com and ssl2.mysite.com - You will need 2 ssl keys though for this to work. Does all of your app require ssl? or just a certain part, ie: payment. Do you need the stickiness for the whole app? or just for the ssl (seeing you are using tomcat, you will probably need it for the whole app)... Andrew On Feb 22, 2005, at 10:24 PM, Kelly Vista wrote: Hi - We are looking to deploy our app, running on Tomcat 5, soon and are exploring load balancing options. We are looking at H/W and S/W solutions, and I was wondering if anyone had any past experience/advice they would like to share. Our deployment is as pretty run-of-the-mill as it gets: 2 machines, each running Tomcat. We would like to avoid replicating state (since we have a lot of state in these apps, for reasons beyond our current control). Even in-memory session replication would not be option here, so we're punting on the Tomcat cluster solution. - 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: dodgy session class
Nice catch Vlad, I'll look into it. Filip [EMAIL PROTECTED] wrote: thanks for your reply Peter. unfortunately none of the applications has explicitly configured sessions manager. I have managed to consistently reproduce the problem. The problem involves two webapps, app1 and app2. App1 is distributable. App2 contains a filter that forwards requests to app1. As it turns out all sessions created via filter are instances of StandardSession! This is with app1 being distributable and with cluster session manager. Making app2 distributable doesnt seem to have any effect on the sessions that are being created in app1 context. I've attached a test case with two sample webapps, to run them you just have to make sure crossContext is enabled for app2 and context of app1 is actually called /app1. App1 does some nasty hack to display what Class is actually hiding behind session facade, so you would have to excuse me for that. Another thing that i've noticed along the way: if a request goes to app1 via filter in app2 two sessions are created, one for each context. Filter in app2 does not create sessions explicitly (as you will see from the example) and session would not be created for app2 context if filter didnt forward requests to app1 context. The question is why session gets created implicitly in context of app2? It is not that I cannot live with it, just cant think of a logical explanation to this. Ideas anyone? Regards, Vlad -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: Sat 2/12/2005 9:22 AM To: Tomcat Users List Cc: Subject:Re: dodgy session class Hmm, please check that all your applications with distributable=true have no configured Manager in there context.xml's regards Peter Filip Hanik - Dev schrieb: Any chance you have a test case to reproduce this? Shouldn't happen, unless the way sessions are created have changed. Filip - Original Message - From: [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Friday, February 11, 2005 11:47 AM Subject: dodgy session class Hi, I'm running tomcat 5.0.30 on two machines A and B (Linux RHAS3). When tomcat A restarts it fails to sync session state with session state not received or something to that effect and tomcat B logs this message: 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR org.apache.catalina.cluster.session.SimpleTcpReplicationManager - Unable to receive message through TCP channel java.lang.ClassCastException at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR eceived(SimpleTcpReplicationManager.java:530) at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD ataReceived(SimpleTcpReplicationManager.java:596) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim pleTcpCluster.java:580) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70 ) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep licationThread.java:129) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT hread.java:67) I changed SimpleTcpReplicationManager to output class names of the sessions it is trying to cast to ReplicatedSession and got the following picture: 11 Feb 2005 17:21:44 [Cluster-MembershipReceiver] INFO org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.56.21: 4001,192.168.56.21,4001, alive=3] 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
Re: dodgy session class
Actually, I didn't get your attachments, could you open a bug in bugzilla and attach them there. Filip [EMAIL PROTECTED] wrote: thanks for your reply Peter. unfortunately none of the applications has explicitly configured sessions manager. I have managed to consistently reproduce the problem. The problem involves two webapps, app1 and app2. App1 is distributable. App2 contains a filter that forwards requests to app1. As it turns out all sessions created via filter are instances of StandardSession! This is with app1 being distributable and with cluster session manager. Making app2 distributable doesnt seem to have any effect on the sessions that are being created in app1 context. I've attached a test case with two sample webapps, to run them you just have to make sure crossContext is enabled for app2 and context of app1 is actually called /app1. App1 does some nasty hack to display what Class is actually hiding behind session facade, so you would have to excuse me for that. Another thing that i've noticed along the way: if a request goes to app1 via filter in app2 two sessions are created, one for each context. Filter in app2 does not create sessions explicitly (as you will see from the example) and session would not be created for app2 context if filter didnt forward requests to app1 context. The question is why session gets created implicitly in context of app2? It is not that I cannot live with it, just cant think of a logical explanation to this. Ideas anyone? Regards, Vlad -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: Sat 2/12/2005 9:22 AM To: Tomcat Users List Cc: Subject:Re: dodgy session class Hmm, please check that all your applications with distributable=true have no configured Manager in there context.xml's regards Peter Filip Hanik - Dev schrieb: Any chance you have a test case to reproduce this? Shouldn't happen, unless the way sessions are created have changed. Filip - Original Message - From: [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Friday, February 11, 2005 11:47 AM Subject: dodgy session class Hi, I'm running tomcat 5.0.30 on two machines A and B (Linux RHAS3). When tomcat A restarts it fails to sync session state with session state not received or something to that effect and tomcat B logs this message: 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR org.apache.catalina.cluster.session.SimpleTcpReplicationManager - Unable to receive message through TCP channel java.lang.ClassCastException at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR eceived(SimpleTcpReplicationManager.java:530) at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD ataReceived(SimpleTcpReplicationManager.java:596) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim pleTcpCluster.java:580) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70 ) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep licationThread.java:129) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT hread.java:67) I changed SimpleTcpReplicationManager to output class names of the sessions it is trying to cast to ReplicatedSession and got the following picture: 11 Feb 2005 17:21:44 [Cluster-MembershipReceiver] INFO org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.56.21: 4001,192.168.56.21,4001, alive=3] 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49
Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5
expireSessionsOnShutdown=true set this property to false! this will not kill the sessions on the other servers during shutdown. but, yes kill -9 or taskmanager killing it, will work too Filip Richard Mixon (qwest) wrote: Filip, Thanks so much for some reason taking the Manager statement completely out of the context worked. I can now see session replication occurring, which then identified some objects that were not serializable. I have fixed these and can see the session replicating correctly in the log messages. I quickly realized that I could not just run catalina stop as this caused the session to be deleted on both the tomcat instance that was stopping and on the remaining Tomcat instance - hence the reason I was always prompted to re-login in. So how do I trigger the maintenance failover? If I use the Admin console to delete the port 8009 connector (first Tomcat instance), this does not prevent JK from continuing to route traffic to this instance. I also tried using ant stop from the tomcat-deployer, but this results in a HTTP Status 503 - This application is not currently available message. I feel like I'm very close, but not quite there. Thank you - Richard Filip Hanik - Dev wrote: you said you enabled it in your context.xml file, if so remove it Filip - Original Message - From: Richard Mixon (qwest) [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Cc: Sent: Thursday, January 27, 2005 12:08 PM Subject: RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5 Filip, Yes you did say that earlier. However I do not reference PersistentManager anywhere in my server.xml. How is it getting enable? Here is the clustering part if my server.xml (I can send the entire server.xml if necessary). Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.D eltaManager expireSessionsOnShutdown=true useDirtyFlag=true notifyListenersOnReplication=true Membership className=org.apache.catalina.cluster.mcast.McastServic e mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000/ Receiver className=org.apache.catalina.cluster.tcp.ReplicationLi stener tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6/ Sender className=org.apache.catalina.cluster.tcp.ReplicationTr ansmitter replicationMode=pooled ackTimeout=15000/ Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.ht ml;.*\.css;.*\.txt;/ Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer tempDir=c:/jakarta-tomcat-5.5.7/temp deployDir=c:/jakarta-tomcat-5.5.7/webapps watchDir=c:/jakarta-tomcat-5.5.7-deployer/build/w ebapp watchEnabled=false/ /Cluster Thank you - Richard -Original Message- From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] Sent: Thursday, January 27, 2005 10:34 AM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5 As mentioned, you can't have the persistence manager, with clustering. DEBUG TP-Processor3 org.apache.catalina.cluster.session.JvmRouteBinderValve - No Cluster DeltaManager [EMAIL PROTECTED] at /stars - Original Message - From: Richard Mixon (qwest) [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, January 27, 2005 10:55 AM Subject: RE: JK, Session Replication/Clustering, SSL and failover in Tomcat 5 Filip/all, Thank you - with your suggestion I was able to get it configured as follows: 1) After the Server line in server.xml I added Listener className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi fecycleListener / 2) I added to the conf/context.xml this line: Valve className=org.apache.catalina.cluster.session.JvmRouteBinderValve / All starts fine. But I still get prompted to logon when the failover occurs from srv1 to srv2. Here are the Tomcat logs (I have mostly just the cluster logging enabled. Can you see anything that is not correct? TOMCAT LOG - SRV1 BEGIN DEBUG main org.apache.catalina.cluster.tcp.ReplicationTransmitter - Setting replcation mode to pooled DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Loading request filters=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt; DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request filter=.*\.gif DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request filter=.*\.js DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve - Request filter=.*\.jpg DEBUG main org.apache.catalina.cluster.tcp.ReplicationValve -
Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5
Interesting, I haven't done any work with the latest work of tomcat because of engagements elsewhere. but you have the time to create a very small simple war file where this occurs, I will look at it tomorrow. It looks like the context class loader is not getting set properly, and this could be an actual bug. I'll try to get this running tomorrow. Filip Richard Mixon (qwest) wrote: Filip Hanik - Dev lists wrote: expireSessionsOnShutdown=true set this property to false! this will not kill the sessions on the other servers during shutdown. but, yes kill -9 or taskmanager killing it, will work too Filip, Thank you so much. Setting expireSessionsOnShutdown=false allowed failover to occur without prompting the user to login again. Wonderful! However, I then brought srv1 back up I got a number of exceptions when they tried to re-synchronize with the still running srv2. Any ideas on how to resolve this? Thanks again - Richard TOMCAT LOG: INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is about to start DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking addValve on StandardEngine[Catalina].StandardHost[localhost] with class=org.apache.catalina.cluster.tcp.ReplicationValve DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener - Starting replication listener on address:192.168.1.140 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for 2000 secs to establish cluster membership INFO Cluster-MembershipReceiver org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140: 4002,192.168.1.140,4002, alive=153297] INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster FarmWarDeployer started. INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve - JvmRouteBinderValve started DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Creating ClusterManager for context /stars using class org.apache.catalina.cluster.session.DeltaManager DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.catalina.cluster.tcp.SimpleTcpCluster - Assuming clocks are synched: Replication took=141 ms. DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.catalina.cluster.session.DeltaManager - readObject() loading session B8CBD8B217266316C21F64ED963EB502.srv2 DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.catalina.cluster.session.DeltaManager - readObject() loading session D0FC475D32E30BD6BDC4814DDFED39F7.srv2 ERROR org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.struts.util.MessageResourcesFactory - MessageResourcesFactory.createFactory java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:1 19) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageReso urcesFactory.java:150) at org.apache.struts.util.MessageResources.getMessageResources(MessageResou rces.java:495) at com.ltoj.webapp.util.ClassGrid.clinit(ClassGrid.java:63) at java.io.ObjectStreamClass.hasStaticInitializer(Native Method) at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1641 ) at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:47) at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:175) at java.security.AccessController.doPrivileged(Native Method) at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:172 ) at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:515) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693 ) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at org.apache.catalina.cluster.session.DeltaSession.readObject(DeltaSession .java:1414) at org.apache.catalina.cluster.session.DeltaSession.readObjectData(DeltaSes sion.java:910) at org.apache.catalina.cluster.session.DeltaManager.doLoad(DeltaManager.jav a:391) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaMa nager.java:842) at org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(Del taManager.java:712
Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5
I meant, if you have time to create a simple test app, that I can work with, it will speed up the process Filip Filip Hanik - Dev lists wrote: Interesting, I haven't done any work with the latest work of tomcat because of engagements elsewhere. but you have the time to create a very small simple war file where this occurs, I will look at it tomorrow. It looks like the context class loader is not getting set properly, and this could be an actual bug. I'll try to get this running tomorrow. Filip Richard Mixon (qwest) wrote: Filip Hanik - Dev lists wrote: expireSessionsOnShutdown=true set this property to false! this will not kill the sessions on the other servers during shutdown. but, yes kill -9 or taskmanager killing it, will work too Filip, Thank you so much. Setting expireSessionsOnShutdown=false allowed failover to occur without prompting the user to login again. Wonderful! However, I then brought srv1 back up I got a number of exceptions when they tried to re-synchronize with the still running srv2. Any ideas on how to resolve this? Thanks again - Richard TOMCAT LOG: INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is about to start DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking addValve on StandardEngine[Catalina].StandardHost[localhost] with class=org.apache.catalina.cluster.tcp.ReplicationValve DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener - Starting replication listener on address:192.168.1.140 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for 2000 secs to establish cluster membership INFO Cluster-MembershipReceiver org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140: 4002,192.168.1.140,4002, alive=153297] INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster FarmWarDeployer started. INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve - JvmRouteBinderValve started DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Creating ClusterManager for context /stars using class org.apache.catalina.cluster.session.DeltaManager DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.catalina.cluster.tcp.SimpleTcpCluster - Assuming clocks are synched: Replication took=141 ms. DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.catalina.cluster.session.DeltaManager - readObject() loading session B8CBD8B217266316C21F64ED963EB502.srv2 DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.catalina.cluster.session.DeltaManager - readObject() loading session D0FC475D32E30BD6BDC4814DDFED39F7.srv2 ERROR org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.struts.util.MessageResourcesFactory - MessageResourcesFactory.createFactory java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:1 19) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageReso urcesFactory.java:150) at org.apache.struts.util.MessageResources.getMessageResources(MessageResou rces.java:495) at com.ltoj.webapp.util.ClassGrid.clinit(ClassGrid.java:63) at java.io.ObjectStreamClass.hasStaticInitializer(Native Method) at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1641 ) at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:47) at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:175) at java.security.AccessController.doPrivileged(Native Method) at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:172 ) at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:515) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693 ) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at org.apache.catalina.cluster.session.DeltaSession.readObject(DeltaSession .java:1414) at org.apache.catalina.cluster.session.DeltaSession.readObjectData(DeltaSes sion.java:910) at org.apache.catalina.cluster.session.DeltaManager.doLoad(DeltaManager.jav a:391) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaMa nager.java:842) at org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(Del taManager.java:712
Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5
another thought, this object com.ltoj.webapp.util.ClassGrid does it contain a reference to a struts object, and maybe that is why the loading doesn't work, just a thought. Filip Filip Hanik - Dev lists wrote: Interesting, I haven't done any work with the latest work of tomcat because of engagements elsewhere. but you have the time to create a very small simple war file where this occurs, I will look at it tomorrow. It looks like the context class loader is not getting set properly, and this could be an actual bug. I'll try to get this running tomorrow. Filip Richard Mixon (qwest) wrote: Filip Hanik - Dev lists wrote: expireSessionsOnShutdown=true set this property to false! this will not kill the sessions on the other servers during shutdown. but, yes kill -9 or taskmanager killing it, will work too Filip, Thank you so much. Setting expireSessionsOnShutdown=false allowed failover to occur without prompting the user to login again. Wonderful! However, I then brought srv1 back up I got a number of exceptions when they tried to re-synchronize with the still running srv2. Any ideas on how to resolve this? Thanks again - Richard TOMCAT LOG: INFO main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Cluster is about to start DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Invoking addValve on StandardEngine[Catalina].StandardHost[localhost] with class=org.apache.catalina.cluster.tcp.ReplicationValve DEBUG main org.apache.catalina.cluster.tcp.ReplicationListener - Starting replication listener on address:192.168.1.140 INFO main org.apache.catalina.cluster.mcast.McastService - Sleeping for 2000 secs to establish cluster membership INFO Cluster-MembershipReceiver org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.140: 4002,192.168.1.140,4002, alive=153297] INFO main org.apache.catalina.cluster.deploy.FarmWarDeployer - Cluster FarmWarDeployer started. INFO main org.apache.catalina.cluster.session.JvmRouteBinderValve - JvmRouteBinderValve started DEBUG main org.apache.catalina.cluster.tcp.SimpleTcpCluster - Creating ClusterManager for context /stars using class org.apache.catalina.cluster.session.DeltaManager DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.catalina.cluster.tcp.SimpleTcpCluster - Assuming clocks are synched: Replication took=141 ms. DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.catalina.cluster.session.DeltaManager - readObject() loading session B8CBD8B217266316C21F64ED963EB502.srv2 DEBUG org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.catalina.cluster.session.DeltaManager - readObject() loading session D0FC475D32E30BD6BDC4814DDFED39F7.srv2 ERROR org.apache.catalina.cluster.tcp.TcpReplicationThread[2] org.apache.struts.util.MessageResourcesFactory - MessageResourcesFactory.createFactory java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:1 19) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageReso urcesFactory.java:150) at org.apache.struts.util.MessageResources.getMessageResources(MessageResou rces.java:495) at com.ltoj.webapp.util.ClassGrid.clinit(ClassGrid.java:63) at java.io.ObjectStreamClass.hasStaticInitializer(Native Method) at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1641 ) at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:47) at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:175) at java.security.AccessController.doPrivileged(Native Method) at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:172 ) at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:515) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693 ) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at org.apache.catalina.cluster.session.DeltaSession.readObject(DeltaSession .java:1414) at org.apache.catalina.cluster.session.DeltaSession.readObjectData(DeltaSes sion.java:910) at org.apache.catalina.cluster.session.DeltaManager.doLoad(DeltaManager.jav a:391) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaMa nager.java:842
Re: JK, Session Replication/Clustering, SSL and failover in Tomcat 5
Hi Richard, Static variable don't get serialized with an object (anyone correct me if I am wrong), so that is not the problem. I believe it to be a bug. Struts is taking a class loader and loading the data, my guess is that its taking the context classloader, and that one is not set properly. Let me see what I can dig up before I send you off to do something crazy :) Filip Richard Mixon (qwest) wrote: Filip Hanik - Dev lists wrote: another thought, this object com.ltoj.webapp.util.ClassGrid does it contain a reference to a struts object, and maybe that is why the loading doesn't work, just a thought. Filip Hanik - Dev lists wrote: Interesting, I haven't done any work with the latest work of tomcat because of engagements elsewhere. but you have the time to create a very small simple war file where this occurs, I will look at it tomorrow. It looks like the context class loader is not getting set properly, and this could be an actual bug. I'll try to get this running tomorrow. Filip, I believe you hit it once again. I've got code such as: ... public class ClassGrid implements java.io.Serializable { static MessageResources msgRsrcs = MessageResources.getMessageResources(ApplicationResources); private static Log log = LogFactory.getLog(ClassGrid.class); Both the variables log and msgRsrcs are static initialized and would be a problem when replicating from one JVM to another. The instance variable log should not even be static - can fix that. The variable msgRsrcs I'm not sure how to fix. I've been fighting with too much reference to Struts in my business logic for a while. I know better, but have had problems seeing around how to handle such things as i18n message resource handling which Struts does so well. Any suggestions? I realize this is quite off-topic. Thank you much - Richard - 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: 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]
[Fwd: Problem when deploying a new .war]
can anyone help me with this? Considering that no one has replied to my original email, did it make sense? More information required maybe? Regards Original Message Subject: Problem when deploying a new .war From:Distribution Lists [EMAIL PROTECTED] Date:Wed, June 2, 2004 3:00 pm To: [EMAIL PROTECTED] -- I'm running apache 2.0.46, Tomcat 4.1.29 with JK2 2.0.2 I have this problem when I stop and remove an application through the tomcat manager, then upload a new WAR when I hit start I get this error FAIL - Application at context path /AnicoWeb could not be started FAIL - Encountered exception java.lang.IllegalStateException: standardHost.start /AnicoWeb: LifecycleException: Container StandardContext[/AnicoWeb] has already been started Checking further in the logs I see this - Any ideas what this means? Thanks 004-06-01 16:15:49 HTMLManager: list: Listing contexts for virtual host 'localhost' 2004-06-01 16:15:50 HTMLManager: stop: Stopping web application at '/AnicoWeb' 2004-06-01 16:15:50 StandardHost[localhost]: standardHost.stop /AnicoWeb 2004-06-01 16:15:50 HTMLManager: list: Listing contexts for virtual host 'localhost' 2004-06-01 16:15:51 HTMLManager: remove: Removing web application at '/AnicoWeb' 2004-06-01 16:15:51 StandardHost[localhost]: Removing web application at context path /AnicoWeb 2004-06-01 16:15:51 StandardHost[localhost]: ContainerBase.removeChild: stop: LifecycleException: Container StandardContext[/AnicoWeb] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3658) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1036) at org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.java:520) at org.apache.catalina.core.StandardHost.remove(StandardHost.java:893) at org.apache.catalina.servlets.ManagerServlet.remove(ManagerServlet.java:843) at org.apache.catalina.servlets.HTMLManagerServlet.remove(HTMLManagerServlet.java:519) at org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:553) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781
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]
Problem when deploying a new .war
I'm running apache 2.0.46, Tomcat 4.1.29 with JK2 2.0.2 I have this problem when I stop and remove an application through the tomcat manager, then upload a new WAR when I hit start I get this error FAIL - Application at context path /AnicoWeb could not be started FAIL - Encountered exception java.lang.IllegalStateException: standardHost.start /AnicoWeb: LifecycleException: Container StandardContext[/AnicoWeb] has already been started Checking further in the logs I see this - Any ideas what this means? Thanks 004-06-01 16:15:49 HTMLManager: list: Listing contexts for virtual host 'localhost' 2004-06-01 16:15:50 HTMLManager: stop: Stopping web application at '/AnicoWeb' 2004-06-01 16:15:50 StandardHost[localhost]: standardHost.stop /AnicoWeb 2004-06-01 16:15:50 HTMLManager: list: Listing contexts for virtual host 'localhost' 2004-06-01 16:15:51 HTMLManager: remove: Removing web application at '/AnicoWeb' 2004-06-01 16:15:51 StandardHost[localhost]: Removing web application at context path /AnicoWeb 2004-06-01 16:15:51 StandardHost[localhost]: ContainerBase.removeChild: stop: LifecycleException: Container StandardContext[/AnicoWeb] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3658) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1036) at org.apache.catalina.core.StandardHostDeployer.remove(StandardHostDeployer.java:520) at org.apache.catalina.core.StandardHost.remove(StandardHost.java:893) at org.apache.catalina.servlets.ManagerServlet.remove(ManagerServlet.java:843) at org.apache.catalina.servlets.HTMLManagerServlet.remove(HTMLManagerServlet.java:519) at org.apache.catalina.servlets.HTMLManagerServlet.doGet(HTMLManagerServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:553) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:534) 2004-06-01 16:15:51 HTMLManager: list: Listing contexts for virtual
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]