RE: Tomcat 5 Dies...
Increase the number of allowed file handles in your OS kernel settings. Google that for your particular OS. Carl -Original Message- From: Quinton Delpeche [mailto:[EMAIL PROTECTED] Sent: Thursday, November 25, 2004 12:09 PM To: [EMAIL PROTECTED] Subject: Tomcat 5 Dies... Okay, I have now narrowed the problem down to the following: WebappClassLoader: Failed to open JAR java.util.zip.ZipException: Too many open files So like what does this mean? I have and am busy googling... ...but I haven't been successful just yet. Q -- Quinton Delpeche Internal Systems Developer Softline VIP Telephone: +27 12 420 7000 Direct:+27 12 420 7007 Facsimile: +27 12 420 7344 http://www.vippayroll.co.za/ At Group L, Stoffel oversees six first-rate programmers, a managerial challenge roughly comparable to herding cats. -- The Washington Post Magazine, 9 June, 1985 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Too many jars
Place your JARs in the WEB-INF/lib directory of your web app - or if they are shared in the /common/lib (5.x) location of Tomat. These locations are scanned and used automagically by Tomcat when doing classloading. You may want to check out the tomcat architecture descriptions for the version of Tomcat you are using , for 5.0.x: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html Carl -Original Message- From: Toby Vidler [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 8:23 AM To: Tomcat Users List Subject: Too many jars Hi All, I'm sure this must be a reasonably common scenario but havn't been unable to find a suitable solution as yet: For my application I utilise many jar files from the rich and varied open source apps that are out there. After deploying the webapp I am now getting a Jasper compilation error when viewing the JSPs for the first time: org.apache.jasper.JasperException: Unable to compile class for JSP This is apparently due to the fact that classpath parameter is too long for the Windows allowed command line length when the javac command is called. This can be fixed by shortening the names of the jars or moving CATALINA_HOME to be in a less verbose directory location (eg not ..\Program Files\Apache Group\Tomcat.. etc). Does anyone have a better solution for this? Thanks, Toby - 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 disable directory listing
Yes there is. In the $CATALINA_HOME/conf/web.xml Change the init paramter listings to false see below: listings false Regards, Carl -Original Message- From: Lee Chin Khiong [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 8:29 AM To: 'Tomcat Users List' Subject: RE: How to disable directory listing Is there any better way to configure Tomcat 5 to no Directory listing just like IIS ? -Original Message- From: Quinton Delpeche [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 2:19 PM To: [EMAIL PROTECTED] Subject: Re: How to disable directory listing On Wednesday 24 November 2004 08:09, Lee Chin Khiong wrote: > How to disable directory listing under Tomcat 5 ? I use a blank index.html file and put it in all the directories that I don't want to have listed. :) Q -- Quinton Delpeche Internal Systems Developer Softline VIP Telephone: +27 12 420 7000 Direct:+27 12 420 7007 Facsimile: +27 12 420 7344 http://www.vippayroll.co.za/ "All snakes who wish to remain in Ireland will please raise their right hands." -- Saint Patrick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Hi. Thanks - yes I realise. Wonderin why tihs has been done? Was the old classloader mechanisms in 5.0.x that broken? Not criticising, just trying to understand the reasoning here. Also I tried with the antiARLocking="true", but had some very strange behaviours - I could not delete a jar - in order to replace it. Also, when I used the ant JAR task - it replaced the contents of the JAR, however when I attemted to access my web app Exceptions were thrown regarding unexpected end of ZIP/JAR files etc - specifically when the class that was replaced was looked for by the classloader - after which a class not found exception was thrown! I checked the new JAR using different tools and it is fine! Thanks, Carl -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 1:08 PM To: Tomcat Users List Subject: Re: Tomcat 5.5.4 - classes in classpath not being "released" On Mon, 22 Nov 2004 16:37:39 +0200, Carl Olivier <[EMAIL PROTECTED]> wrote: > Ooppps. > > Sorry -meant 300 seconds! I think this could be improved, but the penalty will stay significant. antiJARLocking prevents locking through usage of getResource on the classloader (where you get a URL to an entry in a JAR, and which would lock the JAR if you carelessly open it - Xerces with Struts does that) is more limited, but less expensive. -- x Rémy Maucherat Developer & Consultant JBoss Group (Europe) SàRL x - 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: help with out of memory error
Oh another thing: C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll Should read: C:\j2sdk1.4.2_04\jre\bin\server\jvm.dll So as not to cause a problem with the -server switch Carl -Original Message- From: Stephen Charles Huey [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 12:56 AM To: Tomcat Users List Subject: RE: help with out of memory error I've seen most of that info before, but thanks for pointing it out. I'm really kind of clueless about what the problem could be. When I look at the Virtual Memory for Tomcat in the Task Manager, I see about 1.6 GB right now (whereas regular memory for Tomcat is about 300 MB). For Java, regular memory is currently 11 MB and Virtual Memory is 16 MB in the production environment, but I guess none of that info is very significant. And as I said, I've never seen the memory usage very high when we've run into this problem. Can you see anything wrong with our installation of Tomcat as a service down below? Thanks... D:\tomcat\bin\tomcat.exe -install "Apache_Tomcat" "C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll" -server -Xmx1536m -Xms1536m -Djava.class.path="D:\Tomcat\bin\bootstrap.jar" -Dcatalina.home="D:\Tomcat" -Djava.endorsed.dirs="D:\Tomcat\common\endorsed" -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out "D:\Tomcat\logs\stdout.log" -err "D:\Tomcat\logs\stderr.log" - Original message - From: "Phillip Qin" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Date: Mon, 22 Nov 2004 16:56:25 -0500 Subject: RE: help with out of memory error Have you looked at this page? http://jakarta.apache.org/tomcat/faq/memory.html -Original Message- From: Stephen Charles Huey [mailto:[EMAIL PROTECTED] Sent: November 22, 2004 4:50 PM To: Tomcat User Subject: help with out of memory error Is this just a really ambiguous error message, or are there some specific places I can be hunting for an issue: Nov 22, 2004 3:53:42 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception executing [EMAIL PROTECTED], terminating thread java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start(Native Method) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.(ThreadPool. java:582) at org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460) at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:534) Less than half of the 3GB of RAM on our Win2000 box was in use, and only about 300MB was in use by Tomcat, and the site was just giving us a "The page cannot be displayed" error when we would try to log into it, and yet, the database was being updated by the web application (apparently, one or more users had had a long operation started). In other words, it seemed like Tomcat/the web app was partially running, but not letting anyone else in, or something like that. How do we troubleshoot this? We allocate about 1.5GB to the JVM (for initial and max heap size). Thanks, Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:41a25ef9128851503898241! - 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: help with out of memory error
Greetings. I would suggest using the following switch in your startup - you can research and tweak as required: -Xss512k I have had the same problem you are having on a number of occassions - where the JVM mem usage is NOT high, and the machine apparently has enough RAM allocated. After extensive and mostly fruitless investigation I found that on Windows, each thread created in Java has a native thread created. Now apparently, the default thread stack size on the native side on Windows is 1MB per thread. Thus, I tried setting the thread stack size down (using the -Xss512k switch) to 512 kb per thread (thus in theory doubling my total native thread count maximum?). I must admit that this has helped a great deal! I have not seen that error for about two weeks now and the servers are as busy as they were before. I do not believe that this is a definitive answer to the question/problem - as I believe that this kind of memory problem is related to so many variable problems that there are a number of "tweaks" you need to work out and apply to solve it in your environment. I would suggest you try that switch - also look at other potential helpfuls in the VM option flags as well as potentially compiling with fork set to true... Hope that helps. Regards, Carl -Original Message- From: Stephen Charles Huey [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 12:56 AM To: Tomcat Users List Subject: RE: help with out of memory error I've seen most of that info before, but thanks for pointing it out. I'm really kind of clueless about what the problem could be. When I look at the Virtual Memory for Tomcat in the Task Manager, I see about 1.6 GB right now (whereas regular memory for Tomcat is about 300 MB). For Java, regular memory is currently 11 MB and Virtual Memory is 16 MB in the production environment, but I guess none of that info is very significant. And as I said, I've never seen the memory usage very high when we've run into this problem. Can you see anything wrong with our installation of Tomcat as a service down below? Thanks... D:\tomcat\bin\tomcat.exe -install "Apache_Tomcat" "C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll" -server -Xmx1536m -Xms1536m -Djava.class.path="D:\Tomcat\bin\bootstrap.jar" -Dcatalina.home="D:\Tomcat" -Djava.endorsed.dirs="D:\Tomcat\common\endorsed" -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out "D:\Tomcat\logs\stdout.log" -err "D:\Tomcat\logs\stderr.log" - Original message - From: "Phillip Qin" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Date: Mon, 22 Nov 2004 16:56:25 -0500 Subject: RE: help with out of memory error Have you looked at this page? http://jakarta.apache.org/tomcat/faq/memory.html -Original Message- From: Stephen Charles Huey [mailto:[EMAIL PROTECTED] Sent: November 22, 2004 4:50 PM To: Tomcat User Subject: help with out of memory error Is this just a really ambiguous error message, or are there some specific places I can be hunting for an issue: Nov 22, 2004 3:53:42 PM org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run SEVERE: Caught exception executing [EMAIL PROTECTED], terminating thread java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start(Native Method) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.(ThreadPool. java:582) at org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460) at org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:534) Less than half of the 3GB of RAM on our Win2000 box was in use, and only about 300MB was in use by Tomcat, and the site was just giving us a "The page cannot be displayed" error when we would try to log into it, and yet, the database was being updated by the web application (apparently, one or more users had had a long operation started). In other words, it seemed like Tomcat/the web app was partially running, but not letting anyone else in, or something like that. How do we troubleshoot this? We allocate about 1.5GB to the JVM (for initial and max heap size). Thanks, Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:41a25ef9128851503898241! - 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 5.5.4 - classes in classpath not being "released"
Ooppps. Sorry -meant 300 seconds! -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 4:37 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" Hectic. When it says startup performance penalties its not kidding eh? Context set tot antiResourceLocking="true" and added like 30 seconds to the server startup time :) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 3:58 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" Hi, You would need to turn on the antiJARLocking or antiResourceLocking features of Tomcat 5.5.x (they are Context attributes, use either one but not both at the same time). Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 3:45 AM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > >Hi. > >Further to my email below, I have noticed that it happens after the first >time I re-deoply classes - i.e. after the first context reload... > >Carl > >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 8:50 AM >To: Tomcat Users List >Subject: Tomcat 5.5.4 - classes in classpath not being "released" > >Greetings. > >Having the following problem using Tomcat 5.5.4 under JDK 1.5: > >After running my webapp for a bit in a development environment, I want to >copy new and replacement classes to the webapp classes location, but >sometimes (about 50/50) I cannot overrite/delete some of the classes - as >the VM has not let them go (file handles I assume)? I have to shut the JVM >(Tomcat) down before I can deploy my new classes > >Is this something in the new JDK/JRE (5.0)? Or is this something in the >Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to >replicate) the problem on 5.0.x under JDK 1.4.x. > >Any input would be appreciated. > >Thanks! > >Carl > >- >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, 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]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Agreed. Just nice to be aware of the penalties! If you undeploy and redeploy a site (using the core Catalina) classes etc, if this was NOT activated (the antiResourceLocking) would there be any effects? I am not talking about a redeployment via class changes, but a manual redeploy from within code (e.g. get the StandardHost and call remove on the service/engine and then recreate a StandardHost instance with all the relevant settings, then calling deploy and start on it...) Thanks, Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 4:45 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" Hi, Yup, not kidding. However, the reason to turn this on is to do in-place reloading, as opposed to server restarting, so the penalty is easily amortized over a few (not many) reloads. Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 9:37 AM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > >Hectic. > >When it says startup performance penalties its not kidding eh? Context set >tot antiResourceLocking="true" and added like 30 seconds to the server >startup time :) > > > >-Original Message- >From: Shapira, Yoav [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 3:58 PM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > > >Hi, >You would need to turn on the antiJARLocking or antiResourceLocking >features of Tomcat 5.5.x (they are Context attributes, use either one >but not both >at >the same time). > >Yoav Shapira http://www.yoavshapira.com > > >>-Original Message- >>From: Carl Olivier [mailto:[EMAIL PROTECTED] >>Sent: Monday, November 22, 2004 3:45 AM >>To: Tomcat Users List >>Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" >> >>Hi. >> >>Further to my email below, I have noticed that it happens after the >first >>time I re-deoply classes - i.e. after the first context reload... >> >>Carl >> >>-Original Message- >>From: Carl Olivier [mailto:[EMAIL PROTECTED] >>Sent: Monday, November 22, 2004 8:50 AM >>To: Tomcat Users List >>Subject: Tomcat 5.5.4 - classes in classpath not being "released" >> >>Greetings. >> >>Having the following problem using Tomcat 5.5.4 under JDK 1.5: >> >>After running my webapp for a bit in a development environment, I want >to >>copy new and replacement classes to the webapp classes location, but >>sometimes (about 50/50) I cannot overrite/delete some of the classes - >as >>the VM has not let them go (file handles I assume)? I have to shut the >JVM >>(Tomcat) down before I can deploy my new classes >> >>Is this something in the new JDK/JRE (5.0)? Or is this something in the >>Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to >>replicate) the problem on 5.0.x under JDK 1.4.x. >> >>Any input would be appreciated. >> >>Thanks! >> >>Carl >> >>- >>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, 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, 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 s
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Hectic. When it says startup performance penalties its not kidding eh? Context set tot antiResourceLocking="true" and added like 30 seconds to the server startup time :) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 3:58 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" Hi, You would need to turn on the antiJARLocking or antiResourceLocking features of Tomcat 5.5.x (they are Context attributes, use either one but not both at the same time). Yoav Shapira http://www.yoavshapira.com >-Original Message----- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 3:45 AM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > >Hi. > >Further to my email below, I have noticed that it happens after the first >time I re-deoply classes - i.e. after the first context reload... > >Carl > >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 8:50 AM >To: Tomcat Users List >Subject: Tomcat 5.5.4 - classes in classpath not being "released" > >Greetings. > >Having the following problem using Tomcat 5.5.4 under JDK 1.5: > >After running my webapp for a bit in a development environment, I want to >copy new and replacement classes to the webapp classes location, but >sometimes (about 50/50) I cannot overrite/delete some of the classes - as >the VM has not let them go (file handles I assume)? I have to shut the JVM >(Tomcat) down before I can deploy my new classes > >Is this something in the new JDK/JRE (5.0)? Or is this something in the >Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to >replicate) the problem on 5.0.x under JDK 1.4.x. > >Any input would be appreciated. > >Thanks! > >Carl > >- >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, 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]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Ok, thanks!! Appreciate the response as always! Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 3:58 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" Hi, You would need to turn on the antiJARLocking or antiResourceLocking features of Tomcat 5.5.x (they are Context attributes, use either one but not both at the same time). Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 3:45 AM >To: Tomcat Users List >Subject: RE: Tomcat 5.5.4 - classes in classpath not being "released" > >Hi. > >Further to my email below, I have noticed that it happens after the first >time I re-deoply classes - i.e. after the first context reload... > >Carl > >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 8:50 AM >To: Tomcat Users List >Subject: Tomcat 5.5.4 - classes in classpath not being "released" > >Greetings. > >Having the following problem using Tomcat 5.5.4 under JDK 1.5: > >After running my webapp for a bit in a development environment, I want to >copy new and replacement classes to the webapp classes location, but >sometimes (about 50/50) I cannot overrite/delete some of the classes - as >the VM has not let them go (file handles I assume)? I have to shut the JVM >(Tomcat) down before I can deploy my new classes > >Is this something in the new JDK/JRE (5.0)? Or is this something in the >Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to >replicate) the problem on 5.0.x under JDK 1.4.x. > >Any input would be appreciated. > >Thanks! > >Carl > >- >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, 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]
RE: Tomcat 5.5.4 - classes in classpath not being "released"
Hi. Further to my email below, I have noticed that it happens after the first time I re-deoply classes - i.e. after the first context reload... Carl -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 8:50 AM To: Tomcat Users List Subject: Tomcat 5.5.4 - classes in classpath not being "released" Greetings. Having the following problem using Tomcat 5.5.4 under JDK 1.5: After running my webapp for a bit in a development environment, I want to copy new and replacement classes to the webapp classes location, but sometimes (about 50/50) I cannot overrite/delete some of the classes - as the VM has not let them go (file handles I assume)? I have to shut the JVM (Tomcat) down before I can deploy my new classes Is this something in the new JDK/JRE (5.0)? Or is this something in the Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to replicate) the problem on 5.0.x under JDK 1.4.x. Any input would be appreciated. Thanks! Carl - 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: Problem with ssl
Hi. Thanks. Just cannot seem to see that attribute in the docs? Maybe I am just blind! :) Carl -Original Message- From: Bill Barker [mailto:[EMAIL PROTECTED] Sent: Saturday, November 20, 2004 9:42 PM To: [EMAIL PROTECTED] Subject: Re: Problem with ssl "Carl Olivier" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings. > > Where is this specified? In which element? The Connector (where all of the other SSL attributes are :). > > Thanks! > > Carl > > -Original Message- > From: Bill Barker [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 20, 2004 4:42 AM > To: [EMAIL PROTECTED] > Subject: Re: Problem with ssl > > > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I'm using ssl with tomcat 5.0.28 >> I use a keystore that contains several certificates How can I tell >> tomcat which one to use for SSL transaction ? >> Is there a parameter like "alias" ? >> > > The correct attribute is 'keyAlias' to specify which cert Tomcat > should use. > >> Valerie > > > > > - > 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]
Tomcat 5.5.4 - classes in classpath not being "released"
Greetings. Having the following problem using Tomcat 5.5.4 under JDK 1.5: After running my webapp for a bit in a development environment, I want to copy new and replacement classes to the webapp classes location, but sometimes (about 50/50) I cannot overrite/delete some of the classes - as the VM has not let them go (file handles I assume)? I have to shut the JVM (Tomcat) down before I can deploy my new classes Is this something in the new JDK/JRE (5.0)? Or is this something in the Tomcat 5.5.4 classloaders? I cannot recall (and have not been able to replicate) the problem on 5.0.x under JDK 1.4.x. Any input would be appreciated. Thanks! Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with ssl
Greetings. Where is this specified? In which element? Thanks! Carl -Original Message- From: Bill Barker [mailto:[EMAIL PROTECTED] Sent: Saturday, November 20, 2004 4:42 AM To: [EMAIL PROTECTED] Subject: Re: Problem with ssl <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm using ssl with tomcat 5.0.28 > I use a keystore that contains several certificates How can I tell > tomcat which one to use for SSL transaction ? > Is there a parameter like "alias" ? > The correct attribute is 'keyAlias' to specify which cert Tomcat should use. > Valerie - 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: SSL
Those examples again - did not come out too great! HTTP to HTTPS redirection /shopping/* CONFIDENTIAL HTTP to HTTPS redirection /payment/* CONFIDENTIAL -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: Friday, November 19, 2004 2:11 PM To: Tomcat Users List Subject: RE: SSL Well, not at the definition entry itself, but you can modify the to only force the redirection under certain contexts. You can also have multiple entries. For example: HTTP to HTTPS redirection /shopping/* <- only requests under the /shopping/ context CONFIDENTIAL HTTP to HTTPS redirection /payment/* <- or under the /payment/ context CONFIDENTIAL Hope that helps. Carl -Original Message- From: Richard HALLIER [mailto:[EMAIL PROTECTED] Sent: Friday, November 19, 2004 12:38 PM To: Tomcat Users List Subject: RE: SSL Is there a means to write this security constraint at the context definition level ? Richard -Message d'origine- De : Carl Olivier [mailto:[EMAIL PROTECTED] Envoyé : vendredi 19 novembre 2004 07:10 À : Tomcat Users List Objet : RE: SSL Alternatively, if you wish to accept HTTP connections, but redirect (forced to https) you could add a to your webapps /WEB-INF/web.xml - before the : HTTP to HTTPS redirection /* CONFIDENTIAL Thus, both the http and https connectors can exist in the same - where you web app host lives, but the WEBAPP ITSELF will ensure that even http requests to it will be redirected to https. Be sure to specify the correct redirectPort attribute in your HTTP connector - to 443 or 8443 depending on what port your HTTPS connector listens on. Thus, people can request your site/webapp using http - but will be redirected to https immediately for all requests. Hope that helps. Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, November 18, 2004 7:53 PM To: Tomcat Users List Subject: RE: SSL Hi, Yeah, reorganize your server.xml into two engines, with one connector and webapp each. One engine will have the SSL connector and webapp, and the other engine will have the non-SSL connector and webapp. Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Richard HALLIER [mailto:[EMAIL PROTECTED] >Sent: Thursday, November 18, 2004 12:42 PM >To: Tomcat Users List >Subject: RE: SSL > >Thank you for your reply, but I've omitted to say that I have another >webapp that is non-ssl, so I must have the two connectors (http, https) >up. >Do you have a solution ? >Really thank you for your help. >Richard > >-Message d'origine- >De : Shapira, Yoav [mailto:[EMAIL PROTECTED] Envoye : jeudi 18 >novembre 2004 18:09 A : Tomcat Users List Objet : RE: SSL > > > >Hi, >Comment out the non-SSL connector element in server.xml. > >Yoav Shapira http://www.yoavshapira.com > > >>-Original Message- >>From: Richard HALLIER [mailto:[EMAIL PROTECTED] >>Sent: Thursday, November 18, 2004 12:02 PM >>To: tomcat mailing-list >>Subject: SSL >> >>Hi everybody, >>Sorry if this question has been already asked, but i didnt find any >>pointers in the archive. >>I'm in the following context : Tomcat 5.0.x, Connector SSL active. >>I'd like to prevent everybody from using my webapp with the HTTP >protocol, >>in fact I'd like to restrict access to my webapp only to the https >>protocol. >>For the moment and with a standard configuration, I can access my >webapp >>from http and https protocol ... >>Thank you for your help. >>Richard >> >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL
RE: SSL
Well, not at the definition entry itself, but you can modify the to only force the redirection under certain contexts. You can also have multiple entries. For example: HTTP to HTTPS redirection /shopping/* <- only requests under the /shopping/ context CONFIDENTIAL HTTP to HTTPS redirection /payment/* <- or under the /payment/ context CONFIDENTIAL Hope that helps. Carl -Original Message- From: Richard HALLIER [mailto:[EMAIL PROTECTED] Sent: Friday, November 19, 2004 12:38 PM To: Tomcat Users List Subject: RE: SSL Is there a means to write this security constraint at the context definition level ? Richard -Message d'origine- De : Carl Olivier [mailto:[EMAIL PROTECTED] Envoyé : vendredi 19 novembre 2004 07:10 À : Tomcat Users List Objet : RE: SSL Alternatively, if you wish to accept HTTP connections, but redirect (forced to https) you could add a to your webapps /WEB-INF/web.xml - before the : HTTP to HTTPS redirection /* CONFIDENTIAL Thus, both the http and https connectors can exist in the same - where you web app host lives, but the WEBAPP ITSELF will ensure that even http requests to it will be redirected to https. Be sure to specify the correct redirectPort attribute in your HTTP connector - to 443 or 8443 depending on what port your HTTPS connector listens on. Thus, people can request your site/webapp using http - but will be redirected to https immediately for all requests. Hope that helps. Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, November 18, 2004 7:53 PM To: Tomcat Users List Subject: RE: SSL Hi, Yeah, reorganize your server.xml into two engines, with one connector and webapp each. One engine will have the SSL connector and webapp, and the other engine will have the non-SSL connector and webapp. Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Richard HALLIER [mailto:[EMAIL PROTECTED] >Sent: Thursday, November 18, 2004 12:42 PM >To: Tomcat Users List >Subject: RE: SSL > >Thank you for your reply, but I've omitted to say that I have another >webapp that is non-ssl, so I must have the two connectors (http, https) >up. >Do you have a solution ? >Really thank you for your help. >Richard > >-Message d'origine- >De : Shapira, Yoav [mailto:[EMAIL PROTECTED] Envoye : jeudi 18 >novembre 2004 18:09 A : Tomcat Users List Objet : RE: SSL > > > >Hi, >Comment out the non-SSL connector element in server.xml. > >Yoav Shapira http://www.yoavshapira.com > > >>-Original Message- >>From: Richard HALLIER [mailto:[EMAIL PROTECTED] >>Sent: Thursday, November 18, 2004 12:02 PM >>To: tomcat mailing-list >>Subject: SSL >> >>Hi everybody, >>Sorry if this question has been already asked, but i didnt find any >>pointers in the archive. >>I'm in the following context : Tomcat 5.0.x, Connector SSL active. >>I'd like to prevent everybody from using my webapp with the HTTP >protocol, >>in fact I'd like to restrict access to my webapp only to the https >>protocol. >>For the moment and with a standard configuration, I can access my >webapp >>from http and https protocol ... >>Thank you for your help. >>Richard >> >> >>- >>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] > > > >--
RE: SSL
Alternatively, if you wish to accept HTTP connections, but redirect (forced to https) you could add a to your webapps /WEB-INF/web.xml - before the : HTTP to HTTPS redirection /* CONFIDENTIAL Thus, both the http and https connectors can exist in the same - where you web app host lives, but the WEBAPP ITSELF will ensure that even http requests to it will be redirected to https. Be sure to specify the correct redirectPort attribute in your HTTP connector - to 443 or 8443 depending on what port your HTTPS connector listens on. Thus, people can request your site/webapp using http - but will be redirected to https immediately for all requests. Hope that helps. Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, November 18, 2004 7:53 PM To: Tomcat Users List Subject: RE: SSL Hi, Yeah, reorganize your server.xml into two engines, with one connector and webapp each. One engine will have the SSL connector and webapp, and the other engine will have the non-SSL connector and webapp. Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Richard HALLIER [mailto:[EMAIL PROTECTED] >Sent: Thursday, November 18, 2004 12:42 PM >To: Tomcat Users List >Subject: RE: SSL > >Thank you for your reply, but I've omitted to say that I have another >webapp that is non-ssl, so I must have the two connectors (http, https) >up. >Do you have a solution ? >Really thank you for your help. >Richard > >-Message d'origine- >De : Shapira, Yoav [mailto:[EMAIL PROTECTED] Envoye : jeudi 18 >novembre 2004 18:09 A : Tomcat Users List Objet : RE: SSL > > > >Hi, >Comment out the non-SSL connector element in server.xml. > >Yoav Shapira http://www.yoavshapira.com > > >>-Original Message- >>From: Richard HALLIER [mailto:[EMAIL PROTECTED] >>Sent: Thursday, November 18, 2004 12:02 PM >>To: tomcat mailing-list >>Subject: SSL >> >>Hi everybody, >>Sorry if this question has been already asked, but i didnt find any >>pointers in the archive. >>I'm in the following context : Tomcat 5.0.x, Connector SSL active. >>I'd like to prevent everybody from using my webapp with the HTTP >protocol, >>in fact I'd like to restrict access to my webapp only to the https >>protocol. >>For the moment and with a standard configuration, I can access my >webapp >>from http and https protocol ... >>Thank you for your help. >>Richard >> >> >>- >>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, 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]
keystore manipulation
Greetings. I think I asked a similar question on this list a while ago - but did not get a response - so here goes one last time. I am importing/generating new certificates into the keystore that is set as the truststore for the JVM that runs Tomcat - via the javax.net.ssl.trustStore System property. On first load (when I initial a URL load of a HTTPS URI) all is fine. At this point it seems that the JVM caches the certificates stored in the specified (javax.net.ssl.trustStore) keystore. If, after the first access of the truststore, I import a certificate to the trustore, it is not picked up until a RESTART the JVM. This is problematic as I do NOT want to have to restart the JVM just to read a certificate! Does anyone know how I would refresh the certificate list from the keystore referenced by the SystemProperty: javax.net.ssl.trustStore I would appreciate any pointers! Thanks in advance. Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: http request sent to https port
Hi. Your HTTP Connector will default to 443 as the redirectPort. You then also must have a HTTPS Conntector listening on 443 in the same engine/service as the HTTP connector (i.e. the host must be accessible on both). The redirectPort will be used if you have a specified in your webapps web.xml. The security contraint can be set to CONFIDENTIAL - do a search on and CONFIIDENTIAL - you should get a number of results back. Briefly a simple security constraint in the web.xml (at the end for my implementations): HTTP Login SLL Forwarding /login/* CONFIDENTIAL Note - you can have multiple of those. Hope that helps. Regards, Carl -Original Message- From: Nishant Deshpande [mailto:[EMAIL PROTECTED] Sent: Friday, November 12, 2004 7:48 AM To: Tomcat Users List Subject: http request sent to https port I have https enabled on port 80. If i request 'http://localhost/', it comes back with some errenous http reply which my browser can't interpret (nor can wget). On other web sites, I see that my http request gets redirected to https, but seemingly on the same port. Anyone know how this is done? i.e. am I being redirected to a different port but its 'hidden' (i can redirect but can't hide the port), or being redirected to the same port but for https (this i don't know how to do..) i.e. to clarify: i type in 'http://somewebsite/login' and i go to 'https://somewebsite/login' - 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: Buffering and redirection to the errorPage
Greetings. Maybe I should rephrase my question. I do know how and why the behaviour is as it is... Rephrased question: In earlier versions of tomcat - if an exception was thrown and "bubbled" up before the response was committed, it was redirected to the error page. No problem. If the reponse had already flushed, then the tomcat internals would manually request the set error page, passing it the exception, and would append the output of the manual error page call to the reponse, then flush, then return. Is that correct? Is there a reason this is no longer being done? I will emulate it in my system (or at least investigate the viablility therof) if this was taken out for a particular reason. Thanks, Carl -Original Message- From: Steven J. Owens [mailto:[EMAIL PROTECTED] Sent: Thursday, November 11, 2004 12:07 PM To: Tomcat Users List Subject: Re: Buffering and redirection to the errorPage On Thu, Nov 11, 2004 at 11:28:21AM +1100, Derek Clarkson wrote: > This sounds like something I have encountered. The basic question is > that how do you redirect to an error page if youa re writing to the > output stream rather than going to another JSP, and have an exception > ? I thought I posted a reply to this earlier, but I don't see it in my inbox, so maybe I should repost. In a nutshell, this topic makes a lot more sense if you understand what an HTTP request and an HTTP response really look like. My number one recommendation to folks doing web applications is to get a packet sniffer, or a logging proxy, and take a look at what the browser and server are actually sending back and forth. Each HTTP request and response look a lot like an ordinary email: a series of header lines, a blank line, and a message body. The header lines are all name: value. In an HTTP response the body is the HTML of the page, or the binary data of an image. In some cases there is no body at all (a client-side redirect, for example). Any logical operation is handled with a header - setting a cookie, redirecting the browser, etc. Once the blank line separating the header from the body has been sent, you can't go back and send another header line. So you _must_ do any sort of redirect before the server starts to flush output back to the client. If you try to set a header after the server has already sent the blank lnie separating the headers from the body, you'll get a java.lang.IllegalStateException. One way to make this easier to do is to set your buffer larger, so the server will wait longer before flushing output to the browser. Another way is to use an MVC architecture. Have the submit from the browser go to a servlet that does any logical processing you need, but doesn't send any output back to the user. Instead, the controller servlet sets request attributes and user session attributes containing the results of the logic, then redirects the request off to the right view page. The view page looks for the request attributes and user session attributes and generates HTML tags for the display. The controller doesn't muck with display stuff, the view page doesn't muck with the headers. -- Steven J. Owens [EMAIL PROTECTED] "I'm going to make broad, sweeping generalizations and strong, declarative statements, because otherwise I'll be here all night and this document will be four times longer and much less fun to read. Take it all with a grain of salt." - http://darksleep.com/notablog - 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]
Buffering and redirection to the errorPage
Greetings. I have a question with regards buffering of output and subsequent errorPage redirection. Maybe I am missing something. The default buffer size for a JSP page response is 8kb. If an exception is thrown AFTER 8kb has been written (and the initial chunks has been committed) then the redirection to the errorPage (if specified) does not occur. Does this sound right? I have solved this during debugging by increasing the buffer size to a larger kb amount on offending pages, then removing the setting once debugging has occurred. Is there anyway to enforce the redirection to the errorPage? Thanks. Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Compression - problematic?
Greetings. I am trying out the compression feature on the HTTP Connector in Tomcat 5.0.27 and 5.0.28. I have simply set the connector attribute compression="on" - everything else like buffering, socketBuffer etc has been left as default. The default list of MIME types to compress I have also left as per the default. There are some strange things happening - pretty random at this stage. I even had some content from A DIFFERENT HOST (using the same connector) appearing in the output!!! Not sure if this HAS to do with the compression being turned on for the connect - but that is the only major thing that has changed on the server! Anyone have any thoughts/insights? Thanks in advance. Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OutOfMemoryError: unable to create new native thread
Hi. No problem! :) Reduced Maintenance is definitely one reason. Another reason is that I generally share a connector on the same port/protocol - and place all of these in a The other connectors are all for HTTPS sites - each running on the same port but bound to different Ips. I also have a management tool that abstracts all the conf entries - and doing this in one tomcat instance is easier than with multiple! Question: Having multiple tomcat instances on the same server - would this not increase the memory usage - due to multiple JVMs? Thanks Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 6:56 PM To: Tomcat Users List Subject: RE: OutOfMemoryError: unable to create new native thread Hi, >Apparently Windows NT/2000 defaults to a 1mb virtual thread stack size per >thread unless otherwise stated. In addition a maximum of 2gb of thread >stack space per process is allowed by Windows (not sure if this can be >changed or not!). Thus the tomcat JVM could only have 2000 odd concurrent >threads - and on a server that hosts 50 sites, of which 20 are fairly busy >this could be a problem. Thanks for posting your findings and solutions. These type of posts make the best archival materials, assuming people bother to search the archives. Just out of curiosity, why are you running all the sites on one Tomcat instance? Reduced maintenance? I'm not arguing against it, it clearly works fine, and I do similar things myself. Just curious for your reasoning. Yoav 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]
RE: OutOfMemoryError: unable to create new native thread
Hi Yoav. Thanks for the response. I believe I have found the issue. Apparently Windows NT/2000 defaults to a 1mb virtual thread stack size per thread unless otherwise stated. In addition a maximum of 2gb of thread stack space per process is allowed by Windows (not sure if this can be changed or not!). Thus the tomcat JVM could only have 2000 odd concurrent threads - and on a server that hosts 50 sites, of which 20 are fairly busy this could be a problem. Thus I reduced the thread stack size to 512k (via -Xss512k). In addition there were about 12 connectors in tomcat where the minSpareThreads were set too high - so set them back to default of 4 (from between 50 and 100). Hectic. Now we see how she bahaves! Regards, Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 5:38 PM To: Tomcat Users List Subject: RE: OutOfMemoryError: unable to create new native thread Hi, >- Actually ran out of memory >- Hit max # of threads allowed to run (OS dependant?) This is the most likely cause in your case, and it's OS-dependent as you surmised. On *nix this is adjusted via the ulimit (-n) command. But on Windows 2000 Server, I'm not sure off the top of my head. Google? Yoav 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]
OutOfMemoryError: unable to create new native thread
Greetings. I am periodically having to restart a normally very stable tomcat 5 instance due to: OutOfMemoryError: unable to create new native thread Now, as far as I understand the following are the reasons for this: - Actually ran out of memory - Hit max # of threads allowed to run (OS dependant?) - Ran out of file handles - File handles include open files AND sockets - (?) Your JVM is bigger than the max process size allowed - Other things I don't know Does anyone have any tips on how to track this sucker down? The OS is Windows 2000 Server Jdk1.4.2_01 Tomcat 5.0.27 How do you increase the max thread count at an OS level? Tomcat seems fine as the heap is never huge at the time of the memory (in fact only 40% MAX utilisation)? Thanks in advance! Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
keystore manipulation
Greetings. Not sure if this is the right place to ask, but I reckon someone here will have some ideas! So here goes... I don't suppose anyone on the list knows of a way to dynamically (from code) reload a previously loaded keystore (e.g. one used with the system property: "javax.net.ssl.trustStore"). Problem I am having is that I programatically import/add a new cert to my keystore no worries. However, on first access of the keystore as specified in the "javax.net.ssl.trustStore" system property, the JVM parses the entire keystore and caches the all the entries. Theen, when I add a new cert, the entire JVM needs to be restarted before it will recognise the new cert entry! Thus, I need to be able to dynamically reload the keystore after adding a new cert to it - or clear the JVM level cache, forcing it to reload. Anyone have any ideas? Thanks. Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting a handle to a Container/Catalina/Embedded instance
Hi Yoav. Thank you for your quick response (as always!). I will look into your suggestions! Thanks! Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, July 29, 2004 5:55 PM To: Tomcat Users List Subject: RE: Getting a handle to a Container/Catalina/Embedded instance Hi, Sure, in a couple of ways. One is to use the Catalina code, starting with: Server server = ServerFactory.getServer(); You can then cast to StandardServer, crawl down the hierarchy to Service, Engine, Host, Connector, Context, etc, and call methods on each in turn as you need. Server and ServerFactory are in org.apache.catalina, so your code would need to import those classes and run in a classloader that sees them. The other way is using JMX. Not all the operations and attributes are exposed via JMX, but most are. Yoav Shapira Millennium Research Informatics >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 29, 2004 11:47 AM >To: Tomcat Users List >Subject: Getting a handle to a Container/Catalina/Embedded instance > >Greetings.. > >Not sure this is possible, but here goes: > >I want to be able to get a handle to the Catalina/Embedded instance in a >standard Tomcat standalone implementation. I will deploy a webapp to the >server/webapps location and mount it to a host which runs in its own >service for security reasons etc. > >Is this possible? > >I want to be able to dynamicall add a host to the server instance, setting >it up in memory, adding the new instance to a specified Container/Engine >component, and then start it - thus not having to restart Tomcat completely >when a new host is added. > >Am I looking in the correct places/going in the right direction here? Or >can someone point me in a better direction? > >Regards, > >Carl > >- >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]
Getting a handle to a Container/Catalina/Embedded instance
Greetings.. Not sure this is possible, but here goes: I want to be able to get a handle to the Catalina/Embedded instance in a standard Tomcat standalone implementation. I will deploy a webapp to the server/webapps location and mount it to a host which runs in its own service for security reasons etc. Is this possible? I want to be able to dynamicall add a host to the server instance, setting it up in memory, adding the new instance to a specified Container/Engine component, and then start it - thus not having to restart Tomcat completely when a new host is added. Am I looking in the correct places/going in the right direction here? Or can someone point me in a better direction? Regards, Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Max possible ram usage
In addition, you also need to ensure that there is enough RAM left for the OS to use when assigning native heap. AFAIK the general rul of thumb is to have the same anount of RAM you assign to the JAVA HEAP left to the OS for the native heap. Carl -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 21, 2004 3:00 PM To: Tomcat Users List Subject: RE: Max possible ram usage That is just java related. Tomcat has no upper limitations. The maximal memory depends on the vm implementation. You might try a newer version of the jdk or a jdk from a different vendor. > -Original Message- > From: Albrecht Marcus [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 21, 2004 2:54 PM > To: [EMAIL PROTECTED] > Subject: Max possible ram usage > > My java options are > JAVA_OPTS="-Xms512m -Xmx3072m" > > The tomcat won't start with this options. > > Error occurred during initialization of VM Could not reserve enough > space for object heap" > > If i lower the max value i get it running with a max of 1792 MB > setting (JAVA_OPTS="-Xms512m -Xmx1792m"). > > Can anyone tell me the max ram size that tomcat/java can use? > I have't found that information anywhere on the net or mailing lists. > - 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 - Win2k service - GC output
Greetings. OK, well I believe that the output from the -verbose:gc flag in 1.3 will write to a .gc file in your [windows]\system32 dirctory - although I am not certain about this. DO a system whide search for a .gc file on your server - the output does not go to the normal log output file(s). Carl -Original Message- From: Pooleery, Manoj [mailto:[EMAIL PROTECTED] Sent: 15 July 2004 05:21 PM To: 'Tomcat Users List' Subject: RE: Tomcat - Win2k service - GC output Hi, Thank you for the quick response. I'm using jdk 1.3.1_05 and hence I cannot use -Xloggc option. Thanks -Manoj Pooleery. -Original Message----- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 11:17 AM To: Tomcat Users List Subject: RE: Tomcat - Win2k service - GC output Hi. If you are using JSDK 1.4.x use the following VM flag: -Xloggc:normal.gc This will create and write GC log entries to the following location on your windows server: [WINDOWS_SYSTEM_DIR]\system32\normal.gc Regards, Carl -Original Message- From: Pooleery, Manoj [mailto:[EMAIL PROTECTED] Sent: 15 July 2004 05:14 PM To: '[EMAIL PROTECTED]' Subject: Tomcat - Win2k service - GC output Hi, I have set up Tomcat 4.1.27 as a service on a Win2k machine using the following script - tomcat -install "Apache Tomcat" "%JAVA_HOME%\jre\bin\server\jvm.dll" -verbose:gc -Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar" -Djava.endorsed.dir="%CATALINA_HOME%\common\endorsed" -Dsun.io.useCanonCaches=false -Dcatalina.home="%CATALINA_HOME%" -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out "%CATALINA_HOME%\logs\stderr.log" I wanted to see the GC ouput, so, I added the -verbose:gc flag. When I see the registry, I can see this has gone in as a JVM option. But in the log file, I cannot see any GC output at all. When I try the -verbose:gc in the console mode(putting it in the catalina.bat file), I can see the GC output on the console. Am I doing it correctly? If not, what am I doing wrong? Thanks -Manoj Pooleery. - 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 - Win2k service - GC output
Hi. If you are using JSDK 1.4.x use the following VM flag: -Xloggc:normal.gc This will create and write GC log entries to the following location on your windows server: [WINDOWS_SYSTEM_DIR]\system32\normal.gc Regards, Carl -Original Message- From: Pooleery, Manoj [mailto:[EMAIL PROTECTED] Sent: 15 July 2004 05:14 PM To: '[EMAIL PROTECTED]' Subject: Tomcat - Win2k service - GC output Hi, I have set up Tomcat 4.1.27 as a service on a Win2k machine using the following script - tomcat -install "Apache Tomcat" "%JAVA_HOME%\jre\bin\server\jvm.dll" -verbose:gc -Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar" -Djava.endorsed.dir="%CATALINA_HOME%\common\endorsed" -Dsun.io.useCanonCaches=false -Dcatalina.home="%CATALINA_HOME%" -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out "%CATALINA_HOME%\logs\stderr.log" I wanted to see the GC ouput, so, I added the -verbose:gc flag. When I see the registry, I can see this has gone in as a JVM option. But in the log file, I cannot see any GC output at all. When I try the -verbose:gc in the console mode(putting it in the catalina.bat file), I can see the GC output on the console. Am I doing it correctly? If not, what am I doing wrong? Thanks -Manoj Pooleery. - 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: Memory settings and thread management
Greetings. Try the following settings: -Xms220m -Xmx1024m To allow for memory allocation on the native heap. Have you looked at your SHM* settings for the Linux kernel? Carl -Original Message- From: Jim Van Fleet [mailto:[EMAIL PROTECTED] Sent: 15 July 2004 05:08 PM To: [EMAIL PROTECTED] Subject: Memory settings and thread management I'm in a little over my head with a task I've got brewing in production land. I'm a junior developer that was hired to be an entire team. Roughly ten times as many people are registered to use the project than I was told, so I purchased more RAM. That makes the machine stats these. Pentium IV 2.4Ghz 2GB DDR ECC RAM Debian Linux 2 stable Tomcat 4.1.30 A segment of the system is designed to send e-mail to everyone on a list. Each e-mail is sent by starting a thread that terminates when the sending is complete. The upper bound of emails in this list is about a thousand, but will rarely exceed five hundred. The system was running as expected (e.g. capable of sending multiple hundreds of messages) before at 512MB of RAM with the following options appended to JAVA_OPTS in catalina.sh -Xms 220M -Xmx 440M Now that the products have gotten the RAM upgrade, I changed these options to -Xms220m -Xmx1536m The result was a drop to about forty messages before I got an "Out of Memory- unable to start new native thread" error. As a result of looking around, particularly at the links like http://h21007.www2.hp.com/cmdspp/QuestionAnswer/1,1764,4AF428BF-32E1-4297-93 8A-0A1F93DE31B1,00.html and http://jboss.org/wiki/Wiki.jsp?page=OutOfMemoryExceptionWhenCannotCreateThre ad I changed the options to these -Xss1024K -Xms1536m -Xmx1536m but this only gets the boundary to about one hundred before thread creation fails. We're nowhere near the process limit for Linux, running at approximately 400 or so. Should I just keep tweaking the configuration settings hoping to find something that works? Give up a little bit more maximum heap size? The one similar post I've seen since March had the user going down to 16k stack size. Is that safe? I can't be blowing my stack on the production machine, that's worse than the problem I have now! I don't have any recursion going on, but I've seen some pretty deep stack traces. Is there something programmatically I could do, like having the call that starts the thread wait for awhile then try again if it fails? I've tried to do my homework, but I think I actually passed my limits on this project some time ago. :-) Thanks and good karma in advance for any and all help. Cheers, Jim - 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: can a virtual host have its own privatly used SSL certificate ?
Hi. OK, thanks! My terminology bad! Carl -Original Message- From: Graham Leggett [mailto:[EMAIL PROTECTED] Sent: 15 July 2004 03:16 PM To: Tomcat Users List Subject: Re: can a virtual host have its own privatly used SSL certificate ? Carl Olivier wrote: > Actually, you can as far as I know. Technically no - what you're describing is the setup for a dedicated IP per host, not virtual host. You're describing the correct solution, it's just that calling it a "virtual host" is potentially confusing, as the "virtual" part is no longer there in this case. Regards, Graham -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: can a virtual host have its own privatly used SSL certificate ?
Actually, you can as far as I know. What is required is a dedicated IP per virtual host. In the tomcat configuration you would add a SSL per virtual host, on port 443 (for example) eah bound to a separate IP - each with its own keystore - containing the cert for the relevant virtual host. This should be done in a separate Tomcat and . Example: Hope that helps. Regards, Carl -Original Message- From: Graham Leggett [mailto:[EMAIL PROTECTED] Sent: 15 July 2004 10:49 AM To: Tomcat Users List Subject: Re: can a virtual host have its own privatly used SSL certificate? Guy Katz wrote: > i am going to put my application in a shared hosting solution which > does not provide any shared SSL support. > is it possible to buy and put a SSL certificate in the scope of my > virtual host in the hosting company. (i mean is it technically > possible - disregarding the hosting company policy). Technical short answer: no. Regards, Graham -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is there such a beast ? (virtual directories)
Inside a host you could add a Regards, Carl -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: 13 July 2004 05:13 PM To: [EMAIL PROTECTED] Subject: Is there such a beast ? (virtual directories) Hello all, I had a friend ask me on the phone a couple days ago, and now a question has popped up at javaranch. I've looked in the docs and googled, but haven't found a definitive 'no' answer (shouldn't life be that simple?). Thought I'd ask here. Is there such a thing as directory aliasing / virtual directories (like you get in Apache), available in Tomcat? so you'd specify that /images is *really* over here at /usr/local/some/funky/place/images I like to tell people they don't need Apache, unless they're doing "special" stuff. Would this be one of those "special" things ? - 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: jspc
Hi. In addition to sacing resources on the webserver it also allows you to run your tomcat server (the live one) without javac being on the machine - which is a security step. Carl -Original Message- From: Paul Wallace [mailto:[EMAIL PROTECTED] Sent: 25 June 2004 03:38 AM To: Tomcat Users List Subject: RE: jspc Hi, Yes..that is what I thought, but I learned from a 'reliable' source I could accomplish this on saving overhead. So rather than looking into the whys and whats, I looked into how to do it, and look into the performance benefits later. I will provide the list with my sources reasoning, when it becomes available! A thought..and to answer a question with a question (Why would you precompile jsp files?), why is jspc there? If only to increase performance on the first hit? Thanks Paul. It will increase speed on the first viewing of the jsp, but after that I can't see how there will be any difference. How much memory can you save if any? And how would that work? Thanks On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace <[EMAIL PROTECTED]> wrote: > In an effort to increase speed/free up memory that otherwise might be > consumed by Tomcat otherwise > > Why would you precompile jsp files? > > On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace <[EMAIL PROTECTED]> > wrote: > >> (sorry, wrong key!) >> >> Hi Jason, >> Thanks for that. Yes, it does make sense. A couple of things though, >> I just ran it with -compile - great. But my query about the > work >> directory and was more towards what I am being 'encouraged' to do from >> the powers that be. I.e not WAR the app., but put it in the work >> directory. Is this ill-advised/poor practice? >> To accomplish this, is it as simple as dragging the compiled source >> under my work directory, and modifying my web.xml as advised? >> Why does -compile work, but not appear in the usage?! >> Also, can I specify a path for the compilation, rather than the >> classes be placed in the same dirs as the source? (I tried adding a > path >> after the -compile switch, but it constructed and compiled a file with >> the same name as the class directory destination). >> >> Do I make sense?! >> >> Paul. >> >> Paul, >> >> I just use the -compile option and have jspc do the compilation from >> .java to .class for me. It seems to work fairly well. Once all the >> fully compiled (ie >> .class) files are placed in you applications >> WEB-INF/classes directory you just need to place the generated >> web.xml file in WEB-INF. There is an option to create a complete >> web.xml file that you can place in WEB-INF or, if you already have a >> web.xml file you want to keep, you can have jspc create an xml >> fragment that just contains the servlet definitions and >> mappings that you then add (in the appropriate place) >> to your existing web.xml. Then just war up you >> application directory in the normal way (you can even >> delete the jsps once your certain the servlet mappings >> are working). >>If you try to put the generated files in your >> working directory you won't be able to war them up and >> deploy them in the normal "put war file under webapps >> directory and tomcat will expand it when it starts" >> way. You'd have to ship a complete tomcat directory >> structure with the work directory already filled in >> with your compiled jsps. Does that make sense? >> >> Jason >> >> --- Paul Wallace <[EMAIL PROTECTED]> wrote: >>> Hello, >>> I have compiled my JSPs thus: >>> >>> jspc -webapp C:\src\site -d C:\src\site\classes -s >>> -l -uriroot >>> C:\src\site >>> >>> this builds the Java source files to the specified location, but how >>> might I deploy them? >>> >>> What is a typical deployment after a JSP >>> compilation? Compilation of >>> Java source files, then WAR/JAR? Can I not define >>> the JSP compile to go >>> under my work directory? >>> >>> The purpose of my efforts is to try and speed up / >>> make TC less memory >>> consumptive. >>> >>> cheers >>> >>> Paul. >>> >>> >>> >> >> >> >> >> __ >> 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] >> >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > > -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To
RE: how to check if a String is empty?
There is a trim() funtion in java.lang.String ? -Original Message- From: Marten Lehmann [mailto:[EMAIL PROTECTED] Sent: 24 June 2004 06:20 PM To: 'Tomcat Users List' Subject: how to check if a String is empty? Hello, maybe this is not the perfect group for my question, but as my problem appears at the development of JSPs and tomcat is concerned with that, I hope you can answer it. I often see the condition String test = req.getParameter("test"); if (test == null) { /* string is empty */ } else { /* string contains something */ } But if test contains just blanks and other whitespaces, it's not null, but doesn't contain usable data anyhow. How can I check if a string contains whitespaces only? I though of something like if (test == null || test.trim().equals("")) { } but there's no trim()-function, right? How do you solve this problem? With whitespaces I mean blanks, tabs and newlines. Regards Marten - 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: AW: How can I add without restarting Tomcat?
Hi, yeah thanks - have been doing that this morning! Regards, Carl -Original Message- From: Ivan Jouikov [mailto:[EMAIL PROTECTED] Sent: 21 June 2004 09:34 PM To: 'Tomcat Users List' Subject: RE: AW: How can I add without restarting Tomcat? Look at tomcat's administration tool - it can dynamically add hosts. Looks at its codes. Go from there. -Original Message----- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 7:00 AM To: 'Tomcat Users List' Subject: RE: AW: How can I add without restarting Tomcat? Hmmm Is it possible to prgramatically init and start a new StandardHost? I have code that deploys the context for a new Host and writes the Host block into the server.xml - now I want to be able to programatically init and start the new host - making it available WITHOUT having to do a server restart! Is this possible? Thanks! Carl -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 12:49 PM To: Tomcat Users List Subject: Re: AW: How can I add without restarting Tomcat? Hey, you can used the admin application. Tipp: Add a user with admin role at your conf/tomcat-users.xml! Before you create the new host, create the webapps directory! After create your new host, copy the Catalina/localhost/manager.xml to Catalina//manager.xml and you have at usefull new host without server restart. Tested with Tomcat 5.0.25. regards Peter Nikola Milutinovic schrieb: > Gunnar Pцrschke wrote: > >> Non way, because it is written in server.xml file. >> You'll need to stop the server, I guess > > > Tomcat has a manager application. It can deploy new contexts > (applications) on-the-fly, but I'm not sure about hosts. > > Nix. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- J2EE Systemarchitekt und Tomcat Experte http://objektpark.de/ http://www.webapp.de/ Am Josephsschacht 72, 44879 Bochum, Deutschland Telefon: (49) 234 9413228 Mobil:(49) 175 1660884 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.701 / Virus Database: 458 - Release Date: 07.06.2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.701 / Virus Database: 458 - Release Date: 07.06.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]
RE: Tomcat 4.1.24 stops responding due to attack
Hi. I had this problem myself - and I have found that there is a potential memory leak in the JK connector code (in the mod and the Java implementation?). My solution was to remove Apache and go solo with Tomcat 5.0.25 (will keep upgrading though). My problem has gone away! Tomcat stays up serving requests beautifully with NO memory problems whatsoever! I will be posting a better summary of my problem, the tests I ran, and the eventual solution. Regards, Carl -Original Message- From: Kedar [mailto:[EMAIL PROTECTED] Sent: 22 June 2004 06:09 AM To: [EMAIL PROTECTED] Subject: Tomcat 4.1.24 stops responding due to attack Hi, I am facing following problem : Problem : After working properly for a day or 2, I cannot access my website. Only way to restart is kill the process and again run "startup.sh". I cannot stop normally using "shutdown.sh" Configuration : Red Hat Linux release 9 (Shrike), Tomcat 4.1.24, Postgres 7.3.4 Points Checked - 1. The tomcat is not down, I can see process by "ps -ef" 2. However, as a result of "netstat -tcp" I am getting some unknown users accessing my "mysqld". Under normal working conditions I can recognise the IP address and accessed processes listed under "netstat -tcp" Actually I am not using "mysql" at all. No other application on server is using mysqld. 3. The default Apache 80 port can be accessed normally(Tomcat is running on 8080). 4. I have changed the port to 8081, but problem persists. Is it that someone is making lot of fake connections to slow down my tomcat, or am I infected by virus? Any hint or pointer will be appreciated. Regards, Kedar - 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: AW: How can I add without restarting Tomcat?
Hmmm Is it possible to prgramatically init and start a new StandardHost? I have code that deploys the context for a new Host and writes the Host block into the server.xml - now I want to be able to programatically init and start the new host - making it available WITHOUT having to do a server restart! Is this possible? Thanks! Carl -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 12:49 PM To: Tomcat Users List Subject: Re: AW: How can I add without restarting Tomcat? Hey, you can used the admin application. Tipp: Add a user with admin role at your conf/tomcat-users.xml! Before you create the new host, create the webapps directory! After create your new host, copy the Catalina/localhost/manager.xml to Catalina//manager.xml and you have at usefull new host without server restart. Tested with Tomcat 5.0.25. regards Peter Nikola Milutinovic schrieb: > Gunnar Pörschke wrote: > >> Non way, because it is written in server.xml file. >> You'll need to stop the server, I guess > > > Tomcat has a manager application. It can deploy new contexts > (applications) on-the-fly, but I'm not sure about hosts. > > Nix. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- J2EE Systemarchitekt und Tomcat Experte http://objektpark.de/ http://www.webapp.de/ Am Josephsschacht 72, 44879 Bochum, Deutschland Telefon: (49) 234 9413228 Mobil:(49) 175 1660884 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: Load-balancing with MS IIS and tomcat 5
To unsubscribe, e-mail: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 21 June 2004 08:50 AM To: [EMAIL PROTECTED] Subject: Re: Load-balancing with MS IIS and tomcat 5 i have no idea what you are talking about i just want to get unsubscribed out of this website - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Stand-alone
Hi Yoav. Just a have a potentially stupid question - but if I am NOT using the Management app at all - is there a way to disable the Mbean Server registrations etc? Thanks Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 03:34 PM To: Tomcat Users List Subject: RE: Tomcat Stand-alone Hi, It's MX4J 1.1, not 2.x, and we have an enhancement item open for that. Your assumption is correct, it's in the JMX jar in the /bin folder. However, that will be separated out as well, into the jmx.jar containing just the JMX API itself without an implementation, and an implementation jar. This separation, along with coding for JDK 1.5's JMX Remote, will be done in the tomcat 5.1 release branch I think. Yoav Shapira Millennium Research Informatics >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Friday, June 18, 2004 9:26 AM >To: 'Tomcat Users List' >Subject: RE: Tomcat Stand-alone > >Hi. > >Does anyone know what version of mx4j is being shipped with TC 5.0.25? > >I assume it is the jmx.jar in the /bin folder? > >Regards, > >Calr > >-Original Message- >From: Shapira, Yoav [mailto:[EMAIL PROTECTED] >Sent: 18 June 2004 02:59 PM >To: Tomcat Users List >Subject: RE: Tomcat Stand-alone > > > >Hi, >The problem is not related to the one you saw, they just share the same >generic error. Please submit a Bugzilla item for this. > >Yoav Shapira >Millennium Research Informatics > > >>-Original Message- >>From: Carl Olivier [mailto:[EMAIL PROTECTED] >>Sent: Friday, June 18, 2004 7:55 AM >>To: '[EMAIL PROTECTED]' >>Subject: Tomcat Stand-alone >> >> >>Greetings again all. >> >>Having a very irritating problem. I am trying to run Tomcat 5.0.25 >>standalone using 3 HTTP1.1 Coyote connectors - one for "behind the >firwall >>access", one for standard HTTP requests to all hosts and contexts and 1 >for >>1 site running HTTPS (SSL) on a specific IP. >> >>Now, when the server starts all goes well up until near the end - where >the >>following error is thrown in the tomcat logs: >> >>2004/06/18 01:47:32 org.apache.coyote.tomcat5.MapperListener init >>WARNING: Error registering contexts >>java.util.ConcurrentModificationException >> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) >> at java.util.HashMap$EntryIterator.next(HashMap.java:824) >> at java.util.HashMap.putAllForCreate(HashMap.java:424) >> at java.util.HashMap.clone(HashMap.java:656) >> at >>mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:5 6 >) >> at >>mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1 6 >03) >> at >>mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568 ) >> at >>mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) >> at >>org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115) >> at >>org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1 5 >10) >> at >>org.apache.catalina.core.StandardService.start(StandardService.java:48 5 >) >> at >>org.apache.catalina.core.StandardServer.start(StandardServer.java:2298 ) >> at org.apache.catalina.startup.Catalina.start(Catalina.java:556) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j a >va:3 >>9 >>) >> at >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess o >rImp >>l >>.java:25) >> at java.lang.reflect.Method.invoke(Method.java:324) >> at >org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) >> at >org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) >> >>After this, all 3 the HTTP1.1 Coyote connectors are paused. >> >>This clearly does not help matters. I read a bugzilla report about a >>similar problem in Tomcat 4.1.30 - being fixed, and was wondering if >this >>is >>related and would be fixed for TC 5? >>(http://issues.apache.org/bugzilla/show_bug.cgi?id=27315) >> >>The funny thing is have another server that is identically setup (same >>hardware, software, same TC, same sites/hosts/context) and this does >NOT >>happen there? >> >>Any assistance would be much appreciated! >> >>Regards, >> >>Carl Olivier >> >>
RE: Tomcat Stand-alone
Hi. Does anyone know what version of mx4j is being shipped with TC 5.0.25? I assume it is the jmx.jar in the /bin folder? Regards, Calr -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 02:59 PM To: Tomcat Users List Subject: RE: Tomcat Stand-alone Hi, The problem is not related to the one you saw, they just share the same generic error. Please submit a Bugzilla item for this. Yoav Shapira Millennium Research Informatics >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Friday, June 18, 2004 7:55 AM >To: '[EMAIL PROTECTED]' >Subject: Tomcat Stand-alone > > >Greetings again all. > >Having a very irritating problem. I am trying to run Tomcat 5.0.25 >standalone using 3 HTTP1.1 Coyote connectors - one for "behind the firwall >access", one for standard HTTP requests to all hosts and contexts and 1 for >1 site running HTTPS (SSL) on a specific IP. > >Now, when the server starts all goes well up until near the end - where the >following error is thrown in the tomcat logs: > >2004/06/18 01:47:32 org.apache.coyote.tomcat5.MapperListener init >WARNING: Error registering contexts >java.util.ConcurrentModificationException > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) > at java.util.HashMap$EntryIterator.next(HashMap.java:824) > at java.util.HashMap.putAllForCreate(HashMap.java:424) > at java.util.HashMap.clone(HashMap.java:656) > at >mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56 ) > at >mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:16 03) > at >mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) > at >mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) > at >org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115) > at >org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:15 10) > at >org.apache.catalina.core.StandardService.start(StandardService.java:485 ) > at >org.apache.catalina.core.StandardServer.start(StandardServer.java:2298) > at org.apache.catalina.startup.Catalina.start(Catalina.java:556) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:3 >9 >) > at >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImp >l >.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) > >After this, all 3 the HTTP1.1 Coyote connectors are paused. > >This clearly does not help matters. I read a bugzilla report about a >similar problem in Tomcat 4.1.30 - being fixed, and was wondering if this >is >related and would be fixed for TC 5? >(http://issues.apache.org/bugzilla/show_bug.cgi?id=27315) > >The funny thing is have another server that is identically setup (same >hardware, software, same TC, same sites/hosts/context) and this does NOT >happen there? > >Any assistance would be much appreciated! > >Regards, > >Carl Olivier > >- >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]
RE: Tomcat Stand-alone
Hi Yoav. Have just done so - I am busy looking at the source and will hopefully be add a path attachment! Bugzilla: http://issues.apache.org/bugzilla/show_bug.cgi?id=29671 Regards, -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 02:59 PM To: Tomcat Users List Subject: RE: Tomcat Stand-alone Hi, The problem is not related to the one you saw, they just share the same generic error. Please submit a Bugzilla item for this. Yoav Shapira Millennium Research Informatics >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Friday, June 18, 2004 7:55 AM >To: '[EMAIL PROTECTED]' >Subject: Tomcat Stand-alone > > >Greetings again all. > >Having a very irritating problem. I am trying to run Tomcat 5.0.25 >standalone using 3 HTTP1.1 Coyote connectors - one for "behind the firwall >access", one for standard HTTP requests to all hosts and contexts and 1 for >1 site running HTTPS (SSL) on a specific IP. > >Now, when the server starts all goes well up until near the end - where the >following error is thrown in the tomcat logs: > >2004/06/18 01:47:32 org.apache.coyote.tomcat5.MapperListener init >WARNING: Error registering contexts >java.util.ConcurrentModificationException > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) > at java.util.HashMap$EntryIterator.next(HashMap.java:824) > at java.util.HashMap.putAllForCreate(HashMap.java:424) > at java.util.HashMap.clone(HashMap.java:656) > at >mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56 ) > at >mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:16 03) > at >mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) > at >mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) > at >org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115) > at >org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:15 10) > at >org.apache.catalina.core.StandardService.start(StandardService.java:485 ) > at >org.apache.catalina.core.StandardServer.start(StandardServer.java:2298) > at org.apache.catalina.startup.Catalina.start(Catalina.java:556) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:3 >9 >) > at >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImp >l >.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) > >After this, all 3 the HTTP1.1 Coyote connectors are paused. > >This clearly does not help matters. I read a bugzilla report about a >similar problem in Tomcat 4.1.30 - being fixed, and was wondering if this >is >related and would be fixed for TC 5? >(http://issues.apache.org/bugzilla/show_bug.cgi?id=27315) > >The funny thing is have another server that is identically setup (same >hardware, software, same TC, same sites/hosts/context) and this does NOT >happen there? > >Any assistance would be much appreciated! > >Regards, > >Carl Olivier > >- >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]
Tomcat Stand-alone
Greetings again all. Having a very irritating problem. I am trying to run Tomcat 5.0.25 standalone using 3 HTTP1.1 Coyote connectors - one for "behind the firwall access", one for standard HTTP requests to all hosts and contexts and 1 for 1 site running HTTPS (SSL) on a specific IP. Now, when the server starts all goes well up until near the end - where the following error is thrown in the tomcat logs: 2004/06/18 01:47:32 org.apache.coyote.tomcat5.MapperListener init WARNING: Error registering contexts java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at java.util.HashMap$EntryIterator.next(HashMap.java:824) at java.util.HashMap.putAllForCreate(HashMap.java:424) at java.util.HashMap.clone(HashMap.java:656) at mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56) at mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603) at mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) at mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115) at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1510) at org.apache.catalina.core.StandardService.start(StandardService.java:485) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) After this, all 3 the HTTP1.1 Coyote connectors are paused. This clearly does not help matters. I read a bugzilla report about a similar problem in Tomcat 4.1.30 - being fixed, and was wondering if this is related and would be fixed for TC 5? (http://issues.apache.org/bugzilla/show_bug.cgi?id=27315) The funny thing is have another server that is identically setup (same hardware, software, same TC, same sites/hosts/context) and this does NOT happen there? Any assistance would be much appreciated! Regards, Carl Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2 memory leak?
Greetings. Ok, I posted yesterday about the fork attribute - no response yet and stuff. Now I indicated that the fork setting of true *seemed* to have solved many of my problems RE the apparent memory leak on my server. I am now revising that statement in that the server now stayed up for 25 hours as opposed to the 12 or so it was before I set the fork init-param to true. So now I am where the OTHER memory leak is. I have run profilers on the server and cannot seem to find anything obvious in my code (in fact my code seems to garbage collect very well and properly)... I do recall certain posts on this list about a potential memory leak in mod_jk2 - I am running Apache 2.0.49 with mod_jk2 connecting to Tomcat behind. Does anyone know if this was ever proved to be the case? I will be attempting to run the server on Tomcat standalone - to see if the memory leak persists or not. Anyway, any pointers would be welcome! Regards, Carl Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jasper2 fork
Greetings. Quick question re the jasper2 (org.apache.jasper.servlet.JspServlet) fork init param. The default of the fork setting is true, however the Tomcat 5 binary (and I think source) distribution ships with this init-param set to false. Now the reason I am curious about this shipping with this overridden to false is that I have innumerable memory problems - up until I was pointed in setting the fork init param to true. This *seems* to have solved pretty much all my problems! Is there some reason NOT to use this fork setting? Thanks a stack to those that assisted me! Very much appreciated! Regards, Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HOW-TO : Mail session and authentication password
Hi. I extended an javax.mail.Authenticator to set username and password for SMTP authentication: private static class SMTPAuthenticator extends Authenticator { String username, password; SMTPAuthenticator( String username, String password ) { this.username = username; this.password = password; } public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication( username, password ); } } You then set mail.smtp.auth property to true When constructing the MimeMessage, use a javax.mail.Session object created using a Properties instance (with your properties set) and the instance of the Authenticator (as above) that has the username and password set. Hope that helps Carl -Original Message- From: Q. Werty [mailto:[EMAIL PROTECTED] Sent: 17 June 2004 05:02 PM To: tomcat-user Subject: HOW-TO : Mail session and authentication password How can I declare a JavaMail Session in server.xml with AUTHENTICATION informations? It's OK for some properties (mail.smtp.port|from|user|auth) but never found a way to indicate PASSWORD. Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn) - 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]
Apache and Tomcat - Apache.exe application error
Greetings. I am having a problem with Apache 2.0.49 causing an Application Error on Windows. I know this is the tomcat list - but the issue ony crops up when using mod_jk2 with Tomcat - so I am posting here in case anyone has any ideas?! I have also posted a bug report on the HTTPD bugzilla. I am using Apache 2.0.49 with (major non-standard mods): mod_ssl mod_jk2 with Tomcat 5.0.x being connected to via mod_jk2. I am running on Windows XP Professional, as well as Windows 2000 Server, Windows 2000 Advanced Server, Windows 2003 Server. In all cases I have installed the Apache2 service using the Apache.exe -k install mechanism. When restarting the service using: - net stop Apache2 - The ApacheMonitor interface - The services control panel in windows I invariably get the following dialog popping up: Apache.exe - Application Error The instruction at "0x77f51baa" referenced memory at "0x0010". The memory could not be "written". If you cick OK or Cancel, the popup dialog eternally pops straight back up. Apache DOES actually stop and start OK - but the popup cannot be minimized, closed or anything. It is VERY annoying. Could this have to do with the Tomcat mod_jk - specifcally the sharded memory file (SHM) that both Tomcat and Apache use for workers (if I am understanding that correctly)? This bug was definitely NOT around when I was using Apache 2.0.46 and mod_jk2.02/3, but since upgrading to Apache2.0.49 and mod_jk2.04/5dev it has started. Funny thing is it does NOT happen on all servers! Any assistance would be greatly appreciated! Regards, Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Server Specs
Hi Jeff. Thanks for the response, but I am using the Type 4 JDBC driver for SQL 2000 from MS, not DBCP. Thansks though! Carl -Original Message- From: Jeff Hoffmann [mailto:[EMAIL PROTECTED] Sent: 15 June 2004 04:31 PM To: Tomcat Users List Subject: Re: Server Specs Carl Olivier wrote: > Windows 2000 Server > Tomcat 5.0.25 > Apache 2.0.49 > Mod_jk2 > J2SDK 1.4.2_01 > The sites use JDBC to a MS SQL 2000 server I just noticed that commons-dbcp-1.1 has a memory leak in it (http://issues.apache.org/bugzilla/show_bug.cgi?id=27465). I believe that's the version that ships with tomcat-5.0.25. If you're using DBCP for your database connections, you might want to check that. It's something I've just stumbled on and I don't know if it has any relation to anything, but it sounds like it'd be worth looking into. -- Jeff Hoffmann [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]
Server Specs
Greetings. I am hoping someone can give me a helping hand with my query. I a webserver running: Windows 2000 Server Tomcat 5.0.25 Apache 2.0.49 Mod_jk2 J2SDK 1.4.2_01 The server hosts about 80 websites (via name based virtualhosts) with Apache in front of TC for the SSL and static serving. The machine is a quad Xeon (2.4Ghz) Dell PowerEdge with 1GB of RAM. Tomcat currently has 704MB assigned as the max heap size. The problem I am having is that the mahine runs out of memory every day or so, and Tomcat has to be restarted. This is clearly not a good thing! Now, the load on the server is average - nothing spectacular - although some of the sites do get 50 000+ hits per day. The sites use JDBC to a MS SQL 2000 server - the SQL Server is on a differnet machine (similar spec to the web server) on the same 100mb LAN. 40 of the sites are management sites - i.e. thet allow users to manage content (for the other 40 sites hosted) - the management functions include image uploading (using commons-fileupload) document uploading, image manipulation (very limited) etc etc. Each public site (40 in total) are also accessed once every 5 minutes (the index page currently) by a product called Servers Alive to ensure the site is up - if not SMS alerts etc. I am changing that so that SA will access a servlet whch returns plain text (thus less load). I have set the server to use the -XX:+UseParallelGC JVM setting. I have increased the number of maxThreads in both Apache and Tomcat to Apaches (1920) I have run 3 differnet profilers on the server - and cannot for the life of me find a memory leak anywhere. I have NOT tried to use the fork compile setting in Tomcat (read somewhere that this is not good in production?) Is my memory too low? I have just ordered additional RAM (upto 2GB and will assign 1.5GB to Tomcat). Are there other settings I am missing? Is the Garbage collector causing the trouble? I know that this is very subjective situation but I am going completely mad! I appreciate any feedback and suggestions! Best regards, Carl Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache/tomcat serving weird pages
I have had similar problems. What version of Tomcat are you using? It could be that your mod_jk2.so is not of the correct version. If you are using TC 5.0.19 you should be using jk2.04 Carl -Original Message- From: Mike DiChiappari [mailto:[EMAIL PROTECTED] Sent: 12 June 2004 01:02 AM To: [EMAIL PROTECTED] Subject: Apache/tomcat serving weird pages I am seeing some weird behavior with Apache and Tomcat. When I quickly refresh the page from the browser, sometimes the wrong page appears. We have two web sites on our server with virtual hosts. If I am reloading a page on web site A, sometimes a page from web site B appears. This seems to only occur with JSPs. I am using Apache 2.0, Tomcat 4.1.24, and I believe jk2. I didn't originally configure the server. But this is how it seems to be configured. The workers2.properties file contains two workers - one for each of the virtual web sites. The lines look like: worker=ajp13:localhost:8019. The line for the other site uses 8009 for the port. The jk2.properties file is very simple. It has the following two lines: handler.list = channerlSocket,request channelSocket.port = 8009 I am still looking into how to interpret these configuration files. Any ideas or pointers would be appreciated. Thanks, Mike - 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: jk2 error explanations
And this one too: [Fri Jun 11 16:20:59 2004] [error] mod_jk2.handler() Error connecting to tomcat 3, status 200 Thanks -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 11 June 2004 04:21 PM To: '[EMAIL PROTECTED]' Subject: jk2 error explanations Greetings. Could anyone tell me what these error messages mean (I know they indicate problems connecting to the AJP worker and Tomcat) - but is there a list of what the status codes etc actually indicate? [Fri Jun 11 16:18:54 2004] [error] ajp13.service() Error forwarding ajp13:localhost:8009 1 1 [Fri Jun 11 16:19:32 2004] [error] mod_jk2.handler() Error connecting to tomcat 12, status 0 Thanks! Carl - 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]
jk2 error explanations
Greetings. Could anyone tell me what these error messages mean (I know they indicate problems connecting to the AJP worker and Tomcat) - but is there a list of what the status codes etc actually indicate? [Fri Jun 11 16:18:54 2004] [error] ajp13.service() Error forwarding ajp13:localhost:8009 1 1 [Fri Jun 11 16:19:32 2004] [error] mod_jk2.handler() Error connecting to tomcat 12, status 0 Thanks! Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jk_nt_service.exe
You are welcome! Carl -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: 10 June 2004 04:20 PM To: Tomcat Users List Subject: Re: jk_nt_service.exe Thank you, Carl. It's working. On Wednesday 09 June 2004 10:33 am, Carl Olivier wrote: > Hey. > > I think you should check: > http://www.alexandriasc.com/software/JavaService/index.html > > Regards, > > Carl > > > > -Original Message- > From: Ben Souther [mailto:[EMAIL PROTECTED] > Sent: 09 June 2004 04:27 PM > To: Tomcat Users List > Subject: jk_nt_service.exe > > > > Is jk_nt_service still available? > Does it work with tomcat 5x? > > The installer that ships with Tomcat doesn't allow for multiple > instances of > > tomcat as windows services and the service.bat script seems not to be > working. > > Has anyone else been able to install multiple instances of tomcat on a > windows box as NT Services? > > - > 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] -- 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jk_nt_service.exe
Hey. I think you should check: http://www.alexandriasc.com/software/JavaService/index.html Regards, Carl -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: 09 June 2004 04:27 PM To: Tomcat Users List Subject: jk_nt_service.exe Is jk_nt_service still available? Does it work with tomcat 5x? The installer that ships with Tomcat doesn't allow for multiple instances of tomcat as windows services and the service.bat script seems not to be working. Has anyone else been able to install multiple instances of tomcat on a windows box as NT Services? - 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: No response from Tomcat 5 with IIS
Hi. (B (BAre you doing any database work? Is it possible that you have a database (Block happening in the middle of a transaction? (B (BCarl (B (B-Original Message- (BFrom: George [mailto:[EMAIL PROTECTED] (BSent: 09 June 2004 02:33 AM (BTo: Tomcat Users List (BSubject: RE: No response from Tomcat 5 with IIS (B (B (BThank you very much Raymond. (BHowever all memories you pointed out are enough. (BCPU load is almost zero. (BDuring this problem is happenning, I create another small (Btest application and run. And I could get the result that "Tomcat is running (Bproperly". What's happen??? I think only my original application just hung (Bup. No error messages. No warnnings. No logs. To recover this problem, is to (Breboot Tomcat. (B (BAny suggestion would be appreciated. (B (BGeorge (B (B--- "STOCKHOLM, Raymond" <[EMAIL PROTECTED]> wrote: (BMaybe you are running low in memory, and the GC is (B> taking all the process. (B> check : (B> long totalMemory = (B> Runtime.getRuntime().totalMemory(); (B> long freeMemory = (B> Runtime.getRuntime().freeMemory(); (B> long maxMemory = Runtime.getRuntime().maxMemory(); (B> log.info("totalMemory="+totalMemory); (B> log.info("freeMemory ="+freeMemory); (B> log.info("maxMemory ="+maxMemory); (B> (B> -Message d'origine- (B> De$BA~(J: George [mailto:[EMAIL PROTECTED] (B> Envoy$BC)A~(J: mardi 8 juin 2004 17:31 (B> $B%F%D(J : [EMAIL PROTECTED] (B> Objet$BA~(J: Re: No response from Tomcat 5 with IIS (B> (B> (B> Hello! all. (B> Please give me any advice since this issue is top (B> urgent (B> for me. (B> Any suggenstion would be appreciated for me. (B> Thank you very much. (B> George (B> (B> --- Reply from George <[EMAIL PROTECTED]>: (B> > Hi! (B> > I'm having following problem. (B> > (B> > (B> > Tomcat 5.0.24 running on Windows 2000 server and (B> IIS (B> > 5, (B> > JK2 2.0.4 (B> > The server is put under hardware load balancer (B> > "BIG-IP" by (B> > F5 inc. (B> > (B> > (B> > Sometime when the system load is high (about 10 to (B> > 20 (B> > users are using the aplication), tomcat does not (B> > respond (B> > suddenly. (B> > No event log has written. (B> > (B> > Is there anyone who can teach me any tunr arround? (B> > (B> > Please help me! (B> > (B> > George (B> > (B> > (B> > __ (B> > Do You Yahoo!? (B> > http://bb.yahoo.co.jp/ (B> > (B> > (B> > (B> (B- (B> > To unsubscribe, e-mail: [EMAIL PROTECTED] (B> > For additional commands, e-mail: (B> > [EMAIL PROTECTED] (B> > (B> (B> __ (B> Do You Yahoo!? (B> http://bb.yahoo.co.jp/ (B> (B> (B> (B- (B> To unsubscribe, e-mail: [EMAIL PROTECTED] (B> For additional commands, e-mail: (B> [EMAIL PROTECTED] (B> (B> (B (B__ (BDo You Yahoo!? (Bhttp://bb.yahoo.co.jp/ (B (B (B- (BTo unsubscribe, e-mail: [EMAIL PROTECTED] (BFor additional commands, e-mail: [EMAIL PROTECTED] (B (B- (BTo unsubscribe, e-mail: [EMAIL PROTECTED] (BFor additional commands, e-mail: [EMAIL PROTECTED]
RE: SSL and starting tomcat - issues
ta -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: 05 June 2004 05:26 PM To: Tomcat Users List Subject: Re: SSL and starting tomcat - issues FYI: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22388 - Original Message - From: "Carl Olivier" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 05, 2004 6:56 AM Subject: SSL and starting tomcat - issues > Greetings. > > I am having some weird error when starting tomcat - the exception in > the logs is: > > WARNING: Error registering contexts > java.util.ConcurrentModificationException > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) > at java.util.HashMap$EntryIterator.next(HashMap.java:824) > at java.util.HashMap.putAllForCreate(HashMap.java:424) > at java.util.HashMap.clone(HashMap.java:656) > at > mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:5 > 6) > at > mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603) > at > mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) > at > mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) > at > org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:136) > at > org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1510) > at > org.apache.catalina.core.StandardService.start(StandardService.java:485) > at > org.apache.catalina.core.StandardServer.start(StandardServer.java:2298) > at org.apache.catalina.startup.Catalina.start(Catalina.java:556) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) > > This results in none of the 49 contexts (hosts) to start correctly (or > rather to be available). When I request one of the hosts it returns a HTTP > 400 - Bad Request! > > If I retart Tomcat enough times - it does come up eventually! > > The only thing I have added is a HTTPS Coyote Connector - using a > PKCS12 keystore for a cert for ONE of the contexts (hosts)! Nothing > else has changed - and it has been running for a fairly long time! > > Any ideas? > > Carl > > - > 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: SSL and starting tomcat - issues
Hi Michael. Thanks for the response! I am running tomcat 5.0.24 - This is a production server - so I think I should wait till TC5.026 is procounced stable? Thanks Carl -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: 05 June 2004 05:25 PM To: Tomcat Users List Subject: Re: SSL and starting tomcat - issues Hi Carl: Obviously there are some concurrency issues when registering contexts. What version of Tomcat are you running? You might want to upgrade to 5.0.26 (don't use 5.0.24) - from what I gathered this was a bug in 5.0.7. Let me know how you fare. Michael - Original Message - From: "Carl Olivier" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 05, 2004 6:56 AM Subject: SSL and starting tomcat - issues > Greetings. > > I am having some weird error when starting tomcat - the exception in > the logs is: > > WARNING: Error registering contexts > java.util.ConcurrentModificationException > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) > at java.util.HashMap$EntryIterator.next(HashMap.java:824) > at java.util.HashMap.putAllForCreate(HashMap.java:424) > at java.util.HashMap.clone(HashMap.java:656) > at > mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:5 > 6) > at > mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603) > at > mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) > at > mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) > at > org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:136) > at > org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1510) > at > org.apache.catalina.core.StandardService.start(StandardService.java:485) > at > org.apache.catalina.core.StandardServer.start(StandardServer.java:2298) > at org.apache.catalina.startup.Catalina.start(Catalina.java:556) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) > > This results in none of the 49 contexts (hosts) to start correctly (or > rather to be available). When I request one of the hosts it returns a HTTP > 400 - Bad Request! > > If I retart Tomcat enough times - it does come up eventually! > > The only thing I have added is a HTTPS Coyote Connector - using a > PKCS12 keystore for a cert for ONE of the contexts (hosts)! Nothing > else has changed - and it has been running for a fairly long time! > > Any ideas? > > Carl > > - > 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: SSL and starting tomcat - issues
Sigh, Once again a reply to myself - but the contexts do NOT seem to always come online! Most bizzarre. Does anyone know what that error is? Has it got to do with the cert in the cert store? Please help - this is dodgy. Yoav: Question - is this case (where I have multiple HTTP based sites (hosts) running on the same IP - but SOME on the same IP running HTTPS) a good time to use Apache in front of Tomcat over jk? Thanks Carl -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 05 June 2004 04:02 PM To: 'Tomcat Users List' Subject: RE: SSL and starting tomcat - issues Hmmm. Replying to my own post - the Hosts do actully come up after a while - just takes longer than it used it. I do have another question - if you have a HTTPS connector listening - and have a number of Hosts running - but only one should serve on HTTPS - how do you ensure that it is the only host to get HTTPS access? Currently if I direct my browser to https://another.host.on.server it gets served - but obviously the cert I have in place is not correct for that site (URL)! Would you have to bind the HTTPS connector to a different IP and map only that site through? Thanks in advance, Carl -Original Message----- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 05 June 2004 03:57 PM To: '[EMAIL PROTECTED]' Subject: SSL and starting tomcat - issues Greetings. I am having some weird error when starting tomcat - the exception in the logs is: WARNING: Error registering contexts java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at java.util.HashMap$EntryIterator.next(HashMap.java:824) at java.util.HashMap.putAllForCreate(HashMap.java:424) at java.util.HashMap.clone(HashMap.java:656) at mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56) at mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603) at mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) at mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:136) at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1510) at org.apache.catalina.core.StandardService.start(StandardService.java:485) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) This results in none of the 49 contexts (hosts) to start correctly (or rather to be available). When I request one of the hosts it returns a HTTP 400 - Bad Request! If I retart Tomcat enough times - it does come up eventually! The only thing I have added is a HTTPS Coyote Connector - using a PKCS12 keystore for a cert for ONE of the contexts (hosts)! Nothing else has changed - and it has been running for a fairly long time! Any ideas? Carl - 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: SSL and starting tomcat - issues
Hmmm. Replying to my own post - the Hosts do actully come up after a while - just takes longer than it used it. I do have another question - if you have a HTTPS connector listening - and have a number of Hosts running - but only one should serve on HTTPS - how do you ensure that it is the only host to get HTTPS access? Currently if I direct my browser to https://another.host.on.server it gets served - but obviously the cert I have in place is not correct for that site (URL)! Would you have to bind the HTTPS connector to a different IP and map only that site through? Thanks in advance, Carl -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 05 June 2004 03:57 PM To: '[EMAIL PROTECTED]' Subject: SSL and starting tomcat - issues Greetings. I am having some weird error when starting tomcat - the exception in the logs is: WARNING: Error registering contexts java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at java.util.HashMap$EntryIterator.next(HashMap.java:824) at java.util.HashMap.putAllForCreate(HashMap.java:424) at java.util.HashMap.clone(HashMap.java:656) at mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56) at mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603) at mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) at mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:136) at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1510) at org.apache.catalina.core.StandardService.start(StandardService.java:485) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) This results in none of the 49 contexts (hosts) to start correctly (or rather to be available). When I request one of the hosts it returns a HTTP 400 - Bad Request! If I retart Tomcat enough times - it does come up eventually! The only thing I have added is a HTTPS Coyote Connector - using a PKCS12 keystore for a cert for ONE of the contexts (hosts)! Nothing else has changed - and it has been running for a fairly long time! Any ideas? Carl - 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]
SSL and starting tomcat - issues
Greetings. I am having some weird error when starting tomcat - the exception in the logs is: WARNING: Error registering contexts java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at java.util.HashMap$EntryIterator.next(HashMap.java:824) at java.util.HashMap.putAllForCreate(HashMap.java:424) at java.util.HashMap.clone(HashMap.java:656) at mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56) at mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603) at mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568) at mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512) at org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:136) at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1510) at org.apache.catalina.core.StandardService.start(StandardService.java:485) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) This results in none of the 49 contexts (hosts) to start correctly (or rather to be available). When I request one of the hosts it returns a HTTP 400 - Bad Request! If I retart Tomcat enough times - it does come up eventually! The only thing I have added is a HTTPS Coyote Connector - using a PKCS12 keystore for a cert for ONE of the contexts (hosts)! Nothing else has changed - and it has been running for a fairly long time! Any ideas? Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: registering Tomcat as service
Hi there. The GUI is not always going to be good for me as I need to make the change command line settings via my own web based server management interface. I assume that the app changes registry enties? Is there documentation on the registry entries? I could then make changes directly in the registry Carl -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: 28 May 2004 04:53 PM To: Tomcat Users List Subject: RE: registering Tomcat as service You can modify the service parameters via the GUI. See... http://jakarta.apache.org/commons/daemon/procrun.html Even though most of the instructions on that page are outdated, the information near the bottom of the page is still useful. In particular... "Changing the Service Parameters from the GUI" tomcat5w //ES//Tomcat5 That pops up a GUI where you can see all the parameters that are currently added to the service. Add/Remove as needed. Jake Quoting Carl Olivier <[EMAIL PROTECTED]>: > Hi. > > On this subject - in the older Tomcat service executable (specifically > jk_nt_service.exe for TC 3) the executable was pointed at a > wrapper.properties file. > > This wrapper.properties provided the means to add new -X and -D > properties to the executable without having to re-install the service > as it was read in at start time. > > Is there any plan/chance that this could also be possible for the new > tomcat5.exe? > > The main reason is if you wanted to change the -Xmx setting (as a good > example) through code - it is a lot simpler to do this in a > wrapper.properties and then simply restart the service - as opposed to > removing the service and then re-installing it. > > Thanks in advance. > > Carl > > -Original Message- > From: None None [mailto:[EMAIL PROTECTED] > Sent: 28 May 2004 03:17 PM > To: [EMAIL PROTECTED] > Subject: RE: registering Tomcat as service > > > Take a look in tomcat/bin. There is a service.bat file that can > install and > > uninstall the service. Should do the trick for you. > > >From: "Paul Wallace" <[EMAIL PROTECTED]> > >Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Subject: registering Tomcat as service > >Date: Fri, 28 May 2004 16:31:57 +1000 > > > >Hello, > > I installed Tomcat, formally run from the console. I am now > >trying to get it to run as a service. I have in the registry: > > > >HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tomcat\Parameter > >s: > > > >JVM Option Count REG_DWORD0X0004 (4) > > > >JVM Option Number 0 REG_SZ-Xms256m > >JVM Option Number 1 REG_SZ-Xmx512m > >JVM Option Number 2 REG_SZ > >-Djava.class.path=C:\eCommerce\Tomcat-4.1.30\bin\bootstrap.jar;C:\eCo > >mm > >e > >rce\Tomcat-4.1.30\common\lib\servlet.jar;C:\j2sdk1.4.2_04\lib\tools.jar > >JVM Option Number 3 REG_SZ > >-Dcatalina.home=C:\eCommerce\Tomcat-4.1.30 > > > >the paths are correct (JDK/Tomcat) but when I try to start Tomcat > >from the service window, I get a popup: > > > >"The Tomcat Service on a Local Computer started and then stopped. > >Some services stop automatically if they have no work to do, for > >example, the Performance Logs and Alerts service" > > > >The service does not subsequently run. Now my service may not have > >any work to do, but I most certainly do. > > > >Any info is much appreciated. > > > >Paul. > > > > > > _ > FREE pop-up blocking with the new MSN Toolbar - get it now! > http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ > > > - > 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: registering Tomcat as service
Hi. On this subject - in the older Tomcat service executable (specifically jk_nt_service.exe for TC 3) the executable was pointed at a wrapper.properties file. This wrapper.properties provided the means to add new -X and -D properties to the executable without having to re-install the service as it was read in at start time. Is there any plan/chance that this could also be possible for the new tomcat5.exe? The main reason is if you wanted to change the -Xmx setting (as a good example) through code - it is a lot simpler to do this in a wrapper.properties and then simply restart the service - as opposed to removing the service and then re-installing it. Thanks in advance. Carl -Original Message- From: None None [mailto:[EMAIL PROTECTED] Sent: 28 May 2004 03:17 PM To: [EMAIL PROTECTED] Subject: RE: registering Tomcat as service Take a look in tomcat/bin. There is a service.bat file that can install and uninstall the service. Should do the trick for you. >From: "Paul Wallace" <[EMAIL PROTECTED]> >Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Subject: registering Tomcat as service >Date: Fri, 28 May 2004 16:31:57 +1000 > >Hello, > I installed Tomcat, formally run from the console. I am now trying >to get it to run as a service. I have in the registry: > >HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tomcat\Parameters: > >JVM Option Count REG_DWORD0X0004 (4) > >JVM Option Number 0 REG_SZ-Xms256m >JVM Option Number 1 REG_SZ-Xmx512m >JVM Option Number 2 REG_SZ >-Djava.class.path=C:\eCommerce\Tomcat-4.1.30\bin\bootstrap.jar;C:\eComm >e >rce\Tomcat-4.1.30\common\lib\servlet.jar;C:\j2sdk1.4.2_04\lib\tools.jar >JVM Option Number 3 REG_SZ >-Dcatalina.home=C:\eCommerce\Tomcat-4.1.30 > >the paths are correct (JDK/Tomcat) but when I try to start Tomcat from >the service window, I get a popup: > >"The Tomcat Service on a Local Computer started and then stopped. Some >services stop automatically if they have no work to do, for example, >the Performance Logs and Alerts service" > >The service does not subsequently run. Now my service may not have any >work to do, but I most certainly do. > >Any info is much appreciated. > >Paul. > > _ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - 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: mod_jk problems - Need help!
Greetings. In the post below - I detail the error I was encountering prior to using mod_jk2.04 with Tomcat 5.0.19. After deploying mod_jk2.04 with TC 5.0.19 the problem did not appear again. Unfortunately the problem is now back (see below for details). It re-appeared after I upgraded to Tomcat 5.0.24 using mod_jk2.04. I then rebuilt the mod_jk2.so using the source provided with the TC 5.0.24 source bundle (which seems to be mod_jk2.05 dev. This did not sort the problem out at all. Does anyone have ANY ideas? Thanks and regards, Carl Olivier -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 07 May 2004 02:21 PM To: 'Tomcat Users List' Subject: RE: mod_jk problems - Need help! Hey. In reply to my own post: I have now deployed the latest mod_jk2 buiild (2.04) that I compiled to the server mentioned below. The problem has now gone! Unfortunately there is one small problem though - which I detailed in a Bugzilla post: http://issues.apache.org/bugzilla/show_bug.cgi?id=28758 Any input would still be appreciated! Best regards, Carl -Original Message----- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 07 May 2004 01:53 PM To: '[EMAIL PROTECTED]' Subject: mod_jk problems - Need help! Greetings. Having a problem with mod_jk2 in some instances. Am hoping someone has some sort of feedback as to what could be causing it. Right the scenario: WinXP Pro Apache 2.0.49 (with the WinSock2 API disabled - same even with it enabled) Tomcat 5.0.19 mod_jk2/2.02 The JSP: A JSP page with a large amount of processing and/or generating a large amount of HTML to return to the client. The processing is mostly handled with custom tags on the JSP page. the output uses tables for positioning of the returning data - and in the offending JSP(s) there is a fair amount of processing that occurs while builiding the output buffer (note that we are buffering te output before sending it back to the client. The problems that occur: When running through Apache (mod_jk2) to the JSP page all works fine on a number of JSP pages. At a certain point (always the JSP described above) the output that is generated from the request is REALLY messed up! Below is a chunk of the HTML that is returned from the request (sorry it is ugly!): = BROKEN OUTPUT CHUNK === $ = END BROKEN OUTPUT CHUNK === In addition, the HTTP headers are also being written out to the content on the above JSP (as follows) after another batch of similar to above. One this that is interesting is if you look at the chunk below, you will see that there are blocks being written to the HTML!! Also these blocks are for OTHER sites runnin on the same server (same Apache different Virtual Hosts, same Tomcat, differnet hosts). Note that all the sites are using the same AJP Connector in the jk comms (the uri mounts are done in the Apache VirtualHosts blocks using JkUriSet directives within nested blocks. Anyway, the other messed output chunk: = HTTP HEADER CHUNK = ÂÃÂÃXTâ @ÃÂ8 ` ÂV B ` H [EMAIL PROTECTED] 0 x Z ÂV âÃe{ÃâÃe{ÃâÃe{ÃâÃe{à t l d C a c h e . s e r â H , Âà ur [Ljava.lang.String;ÂÃVÃÃ{G xpâyGâyG B B FILE0 Ã&& 8 @ âV B ` H Ã;$e{ÃÃ;$e{ÃÃ;$e{Ãâ ;Â4à 0 p X b Ã;$e{ÃÃ;$e{ÃÃ;$e{ÃÃ;$e{à W W W I N T ~ 1 . 0 1 0 x ` b Ã;$e{ÃÃ;$e{ÃÃ;$e{ÃÃ;$e{à w w w . i n t r a n e t . 0 1 Â Â Ë $ I 3 0 0 Ë Ë âV h R âV Ã;$e{ÃIÃÂ4ÃIÃÂ4ÃIÃÂ4Ãh B f R O O T . x m l âyG B FILE0 Â&& 8  âV B ` H Ã;$e{ÃIÃÂ4ÃIÃÂ4ÃpWÃÂ4à 0 p R âV Ã;$e{ÃÃ;$e{ÃÃ;$e{ÃÃ;$e{à R O O T . x m l â â f âyG B B FILE0 a~Ãà 8 0 âV B ` H pÃ1e{ÃpÃ1e{ÃpÃ1e{à ÂÃâÃ.à 0 p X CV pÃ1e{ÃpÃ1e{ÃpÃ1e{ÃpÃ1e{à W W W I N T ~ 1 . 0 1 0 x ` CV pÃ1e{ÃpÃ1e{ÃpÃ1e{ÃpÃ1e{à w w w . i n t r a n e t . 0 1 Â Â Ë $ I 3 0 0 x x âVX D âV pÃ1e{ÃÃB]{{ÃÃB]{{Ã`ÅÃâÃ.à B _ âyG B FILE0 ?~ÃÃ@ÃÂ8 âV < ` H pÃ1e{ÃÃB]{{ÃÃB]{{à ÂÃâÃ.à 0 ` D
RE: TEI and custom tag class - Classloading issues
Sigh. Sorry the error stack trace mentioned (and ommitted) below looks like: StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /logon.jsp(1,1) Failed to load or instantiate TagExtraInfo class: com.platform_basic.modules.virtualpage.VirtualPageTEI at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler. java:39) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357 ) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:81) at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:339) at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:372) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539) at org.apache.jasper.compiler.Parser.parse(Parser.java:126) at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:22 0) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:101) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:422) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 07) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 74) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:296) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:372) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:694) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:626) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:807) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:644) at java.lang.Thread.run(Thread.java:534) Regards, Carl -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 04:00 PM To: '[EMAIL PROTECTED]' Subject: TEI and custom tag class - Classloading issues Greetings. I have sent a number of posts on an issue I have been experiencing in TC 5 (5.0.19 and now 5.0.24) regarding classloading of TEI classes (one in one or two instances custom tag classes). Yoav asked me to try and create a WAR with the problem existing within the WAR. I have failed to do this I am afraid. I have however been able to determine a number of additional bits of information: Problem synopsis: After a restart of Tomcat (5.0.24) and Apache 2.0.49 (jk2.04) - the first request the the webapp produces the following error more often than not - (however after a refresh this error goes away): Alternatively, the follo
TEI and custom tag class - Classloading issues
Greetings. I have sent a number of posts on an issue I have been experiencing in TC 5 (5.0.19 and now 5.0.24) regarding classloading of TEI classes (one in one or two instances custom tag classes). Yoav asked me to try and create a WAR with the problem existing within the WAR. I have failed to do this I am afraid. I have however been able to determine a number of additional bits of information: Problem synopsis: After a restart of Tomcat (5.0.24) and Apache 2.0.49 (jk2.04) - the first request the the webapp produces the following error more often than not - (however after a refresh this error goes away): Alternatively, the following error is sometimes thrown (also goes away after a refresh): org.apache.jasper.JasperException: /doclib/foldermain.jsp(14,0) Unable to load tag handler class "com.platform_basic.security.IfAccessTag" for tag "pb:ifAccess" org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler. java:39) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357 ) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:191 ) org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1318) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1560) org.apache.jasper.compiler.Parser.parse(Parser.java:126) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:22 0) org.apache.jasper.compiler.ParserController.parse(ParserController.java:101) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.compiler.Compiler.compile(Compiler.java:422) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 07) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 74) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) A number of bits of (?) important info: 1. The problem NEVER occurs when access the webapp directly via Tomcat (the HTTP1.1 connector) - it only occurs when accessing the webapp via Apache and AJP1.3 using mod_jk2.04. 2. The problem is more apprent if the webapp uses frames in its structure (with each frame containing a JSP that accesses the taglib) 3. If I manually classload the TEI classes in an Init servlet that the container loads at startup the errors do not seem to occur. Is there a difference between some classloader (WebAppClassLoader) initialisation routines if the access is via the Tomcat HTTP connector vs. the AJP JK Connector? Hope someone has some ideas! Regards, Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PrintWriter performance
Oops: StringBuffer ret = new StringBuffer(""); ;) -Original Message----- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 03:43 PM To: 'Tomcat Users List' Subject: RE: PrintWriter performance I would definitely use the second option. If you wanted the first I would also change it to be: PrintWriter out = response.getWriter(); StringBuffer ret = ""; for (count = 0; rs.next(); count++) ret.append(rs.getString("column_name")); // result of db query out.print(ret.toString()); out.close(); Carl -Original Message- From: Rostislav Svoboda [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 03:40 PM To: Tomcat Users List Subject: PrintWriter performance Hi all I'd like to ask you if there's a significant difference in performance between: PrintWriter out = response.getWriter(); String ret = ""; for (count = 0; rs.next(); count++) ret += rs.getString("column_name"); // result of db query out.print(ret); out.close(); and: PrintWriter out = response.getWriter(); for (count = 0; rs.next(); count++) out.print(rs.getString("column_name"); // result of db query out.close(); I know I have the extra string which is (theoretically) a slow-down but I don't know anything about the way how tomcat handles with large strings (in my case about 1MB), if is there any limited buffering etc. I know as well I can test it by myself very easilly but I hope someone's gonna give me a bit of explanation along with 20 funny stories etc. :) EOF & thx Bost - 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: PrintWriter performance
I would definitely use the second option. If you wanted the first I would also change it to be: PrintWriter out = response.getWriter(); StringBuffer ret = ""; for (count = 0; rs.next(); count++) ret.append(rs.getString("column_name")); // result of db query out.print(ret.toString()); out.close(); Carl -Original Message- From: Rostislav Svoboda [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 03:40 PM To: Tomcat Users List Subject: PrintWriter performance Hi all I'd like to ask you if there's a significant difference in performance between: PrintWriter out = response.getWriter(); String ret = ""; for (count = 0; rs.next(); count++) ret += rs.getString("column_name"); // result of db query out.print(ret); out.close(); and: PrintWriter out = response.getWriter(); for (count = 0; rs.next(); count++) out.print(rs.getString("column_name"); // result of db query out.close(); I know I have the extra string which is (theoretically) a slow-down but I don't know anything about the way how tomcat handles with large strings (in my case about 1MB), if is there any limited buffering etc. I know as well I can test it by myself very easilly but I hope someone's gonna give me a bit of explanation along with 20 funny stories etc. :) EOF & thx Bost - 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 5.0.24 startup errors
Hi. Ok, added them, same errors in the logs. Lines added (below Server and above Service) were: Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 03:20 PM To: Tomcat Users List Subject: RE: Tomcat 5.0.24 startup errors Hi, Add to your server.xml the MBean declaration from the default one that ships with tomcat (they're right near the top of the file, under Server and above Service), restart tomcat, and let us know what happens. Yoav Shapira Millennium Research Informatics >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Tuesday, May 25, 2004 9:16 AM >To: 'Tomcat Users List' >Subject: RE: Tomcat 5.0.24 startup errors > >Hi Yoav. > >Clean install yes - into a new directory yes. My server XML is a "custom" >VERy minimal one - looks as follows: > >server.xml >== > > > > > > > > > > > className="org.apache.catalina.logger.FileLogger" /> > > > > > > > /> > > > > autoDeploy="false" > > docBase="D:\testwww2\Test2\ROOT" reloadable="true" /> > /> > > > > autoDeploy="false" > > docBase="D:\testwww2\Test2admin\ROOT" reloadable="true" /> > /> > > > > > > docBase="D:\testwww2\TestingT\ROOT" reloadable="true" /> > docBase="D:\testwww2\TestingT\userimages" /> > > > > autoDeploy="false" > > docBase="D:\testwww2\TestingTadmin\ROOT" reloadable="true" /> > docBase="D:\testwww2\TestingT\userimages" /> > > > > > > >== >END server.xml > >? :) > >Carl > > >-Original Message- >From: Shapira, Yoav [mailto:[EMAIL PROTECTED] >Sent: 25 May 2004 03:01 PM >To: Tomcat Users List >Subject: RE: Tomcat 5.0.24 startup errors > > > >Hi, >You did a clean install to a new directory, right? There's no chance of an >old configuration file (e.g. server.xml) sneaking into your new >installation from the older one? > >Yoav Shapira >Millennium Research Informatics > > >>-Original Message- >>From: Carl Olivier [mailto:[EMAIL PROTECTED] >>Sent: Tuesday, May 25, 2004 5:30 AM >>To: '[EMAIL PROTECTED]' >>Subject: Tomcat 5.0.24 startup errors >> >>Greetings. >> >>I recently upgraded to TC 5.0.24 on Windows XP Pro, using the packaged >>tomcat5.exe and service.bat to install the TC service. >> >>On startup I am noticing the following errors in the logs (note that >>everything does still seem to work fine though): >> >>SEVERE: Error registering >>Platform:type=protocolHandler,className=org.apache.jk.server.JkCoyoteH a >ndle >>r >>javax.management.MBeanRegistrationException: nested exception is >>javax.management.ReflectionException: Cannot find Class for >>org.apache.jk.core.JkHandlernested exception is >>java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler >>javax.management.ReflectionException: Cannot find Class for >>org.apache.jk.core.JkHandlernested exception is >>java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler >>java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler >> at >>org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClass L >oade >>r >>.java:854) >> at >>org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClass L >oade >>r >>.java:721) >> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) >> at java.lang.Class.forName0(Native Method) >> at java.lang.Class.forName(Class.java:141) >> at >>org.apache.commons.modeler.BaseModelMBean.getAttributeClass(BaseModelM B >ean. >>j >>
RE: Tomcat 5.0.24 startup errors
Hi Yoav. Clean install yes - into a new directory yes. My server XML is a "custom" VERy minimal one - looks as follows: server.xml == == END server.xml ? :) Carl -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 03:01 PM To: Tomcat Users List Subject: RE: Tomcat 5.0.24 startup errors Hi, You did a clean install to a new directory, right? There's no chance of an old configuration file (e.g. server.xml) sneaking into your new installation from the older one? Yoav Shapira Millennium Research Informatics >-Original Message- >From: Carl Olivier [mailto:[EMAIL PROTECTED] >Sent: Tuesday, May 25, 2004 5:30 AM >To: '[EMAIL PROTECTED]' >Subject: Tomcat 5.0.24 startup errors > >Greetings. > >I recently upgraded to TC 5.0.24 on Windows XP Pro, using the packaged >tomcat5.exe and service.bat to install the TC service. > >On startup I am noticing the following errors in the logs (note that >everything does still seem to work fine though): > >SEVERE: Error registering >Platform:type=protocolHandler,className=org.apache.jk.server.JkCoyoteHa ndle >r >javax.management.MBeanRegistrationException: nested exception is >javax.management.ReflectionException: Cannot find Class for >org.apache.jk.core.JkHandlernested exception is >java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler >javax.management.ReflectionException: Cannot find Class for >org.apache.jk.core.JkHandlernested exception is >java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler >java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler > at >org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade >r >.java:854) > at >org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassL oade >r >.java:721) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:141) > at >org.apache.commons.modeler.BaseModelMBean.getAttributeClass(BaseModelMB ean. >j >ava:558) > at >org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:46 7) > at >mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBe anSe >r >verInterceptor.java:209) > at >mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBe anSe >r >verInterceptor.java:123) > at >mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityM Bean >S >erverInterceptor.java:79) > at >mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBe anSe >r >verInterceptor.java:123) > at >mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBe anSe >r >verInterceptor.java:123) > at >mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke (Con >t >extClassLoaderMBeanServerInterceptor.java:144) > at mx4j.server.MBeanServerImpl.invoke(MBeanServerImpl.java:1353) > at org.apache.jk.core.JkHandler.preRegister(JkHandler.java:174) > at >org.apache.jk.server.JkCoyoteHandler.preRegister(JkCoyoteHandler.java:5 29) > at >org.apache.commons.modeler.BaseModelMBean.preRegister(BaseModelMBean.ja va:1 >3 >97) > at >mx4j.server.interceptor.InvokerMBeanServerInterceptor.registration(Invo kerM >B >eanServerInterceptor.java:150) > at >mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(Defa ultM >B >eanServerInterceptor.java:113) > at >mx4j.server.interceptor.SecurityMBeanServerInterceptor.registration(Sec urit >y >MBeanServe
Tomcat 5.0.24 startup errors
Greetings. I recently upgraded to TC 5.0.24 on Windows XP Pro, using the packaged tomcat5.exe and service.bat to install the TC service. On startup I am noticing the following errors in the logs (note that everything does still seem to work fine though): SEVERE: Error registering Platform:type=protocolHandler,className=org.apache.jk.server.JkCoyoteHandler javax.management.MBeanRegistrationException: nested exception is javax.management.ReflectionException: Cannot find Class for org.apache.jk.core.JkHandlernested exception is java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler javax.management.ReflectionException: Cannot find Class for org.apache.jk.core.JkHandlernested exception is java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler java.lang.ClassNotFoundException: org.apache.jk.core.JkHandler at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:854) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:721) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at org.apache.commons.modeler.BaseModelMBean.getAttributeClass(BaseModelMBean.j ava:558) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:467) at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanSer verInterceptor.java:209) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanSer verInterceptor.java:123) at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanS erverInterceptor.java:79) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanSer verInterceptor.java:123) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanSer verInterceptor.java:123) at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(Cont extClassLoaderMBeanServerInterceptor.java:144) at mx4j.server.MBeanServerImpl.invoke(MBeanServerImpl.java:1353) at org.apache.jk.core.JkHandler.preRegister(JkHandler.java:174) at org.apache.jk.server.JkCoyoteHandler.preRegister(JkCoyoteHandler.java:529) at org.apache.commons.modeler.BaseModelMBean.preRegister(BaseModelMBean.java:13 97) at mx4j.server.interceptor.InvokerMBeanServerInterceptor.registration(InvokerMB eanServerInterceptor.java:150) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(DefaultMB eanServerInterceptor.java:113) at mx4j.server.interceptor.SecurityMBeanServerInterceptor.registration(Security MBeanServerInterceptor.java:128) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(DefaultMB eanServerInterceptor.java:113) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.registration(DefaultMB eanServerInterceptor.java:113) at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.registratio n(ContextClassLoaderMBeanServerInterceptor.java:108) at mx4j.server.MBeanServerImpl.registerImpl(MBeanServerImpl.java:1051) at mx4j.server.MBeanServerImpl.registerMBeanImpl(MBeanServerImpl.java:1002) at mx4j.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:978) at org.apache.commons.modeler.Registry.registerComponent(Registry.java:871) at org.apache.commons.modeler.Registry.registerComponent(Registry.java:346) at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1487) at org.apache.catalina.core.StandardService.start(StandardService.java:485) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) I checked and the class being referenced in the error above is definitely in the tomcat-jk2.jar in the CATALINA_HOME/server/lib location. Any ideas? Regards, Carl Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk problems - Need help!
Hey. In reply to my own post: I have now deployed the latest mod_jk2 buiild (2.04) that I compiled to the server mentioned below. The problem has now gone! Unfortunately there is one small problem though - which I detailed in a Bugzilla post: http://issues.apache.org/bugzilla/show_bug.cgi?id=28758 Any input would still be appreciated! Best regards, Carl -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 07 May 2004 01:53 PM To: '[EMAIL PROTECTED]' Subject: mod_jk problems - Need help! Greetings. Having a problem with mod_jk2 in some instances. Am hoping someone has some sort of feedback as to what could be causing it. Right the scenario: WinXP Pro Apache 2.0.49 (with the WinSock2 API disabled - same even with it enabled) Tomcat 5.0.19 mod_jk2/2.02 The JSP: A JSP page with a large amount of processing and/or generating a large amount of HTML to return to the client. The processing is mostly handled with custom tags on the JSP page. the output uses tables for positioning of the returning data - and in the offending JSP(s) there is a fair amount of processing that occurs while builiding the output buffer (note that we are buffering te output before sending it back to the client. The problems that occur: When running through Apache (mod_jk2) to the JSP page all works fine on a number of JSP pages. At a certain point (always the JSP described above) the output that is generated from the request is REALLY messed up! Below is a chunk of the HTML that is returned from the request (sorry it is ugly!): = BROKEN OUTPUT CHUNK === $ = END BROKEN OUTPUT CHUNK === In addition, the HTTP headers are also being written out to the content on the above JSP (as follows) after another batch of similar to above. One this that is interesting is if you look at the chunk below, you will see that there are blocks being written to the HTML!! Also these blocks are for OTHER sites runnin on the same server (same Apache different Virtual Hosts, same Tomcat, differnet hosts). Note that all the sites are using the same AJP Connector in the jk comms (the uri mounts are done in the Apache VirtualHosts blocks using JkUriSet directives within nested blocks. Anyway, the other messed output chunk: = HTTP HEADER CHUNK = ÂÃÂÃXTâ @ÃÂ8 ` ÂV B ` H [EMAIL PROTECTED] 0 x Z ÂV âÃe{ÃâÃe{ÃâÃe{ÃâÃe{à t l d C a c h e . s e r â H , Âà ur [Ljava.lang.String;ÂÃVÃÃ{G xpâyGâyG B B FILE0 Ã&& 8 @ âV B ` H Ã;$e{ÃÃ;$e{ÃÃ;$e{Ãâ ;Â4à 0 p X b Ã;$e{ÃÃ;$e{ÃÃ;$e{ÃÃ;$e{à W W W I N T ~ 1 . 0 1 0 x ` b Ã;$e{ÃÃ;$e{ÃÃ;$e{ÃÃ;$e{à w w w . i n t r a n e t . 0 1 Â Â Ë $ I 3 0 0 Ë Ë âV h R âV Ã;$e{ÃIÃÂ4ÃIÃÂ4ÃIÃÂ4Ãh B f R O O T . x m l âyG B FILE0 Â&& 8  âV B ` H Ã;$e{ÃIÃÂ4ÃIÃÂ4ÃpWÃÂ4à 0 p R âV Ã;$e{ÃÃ;$e{ÃÃ;$e{ÃÃ;$e{à R O O T . x m l â â f âyG B B FILE0 a~Ãà 8 0 âV B ` H pÃ1e{ÃpÃ1e{ÃpÃ1e{à ÂÃâÃ.à 0 p X CV pÃ1e{ÃpÃ1e{ÃpÃ1e{ÃpÃ1e{à W W W I N T ~ 1 . 0 1 0 x ` CV pÃ1e{ÃpÃ1e{ÃpÃ1e{ÃpÃ1e{à w w w . i n t r a n e t . 0 1 Â Â Ë $ I 3 0 0 x x âVX D âV pÃ1e{ÃÃB]{{ÃÃB]{{Ã`ÅÃâÃ.à B _ âyG B FILE0 ?~ÃÃ@ÃÂ8 âV < ` H pÃ1e{ÃÃB]{{ÃÃB]{{à ÂÃâÃ.à 0 ` D âV pÃ1e{ÃpÃ1e{ÃpÃ1e{ÃpÃ1e{à _  à $ I 3 0 0 à à âWX H âVÃB]{{ÃÃB]{{ÃÃB]{{Ã`ÅÃâÃ.à o r g âV p Z âVâÂse{ÃÃâ3}à ÂÃâÃ.à âÂ4Ã0 , t l d C a c h e . s e r < âyG < FILE0 Ã& 8 ` âV < ` H âÂse{ÃÃâ3}à ÂÃâÃ.à âÂ4à 0 x Z âVâÂse{ÃâÂse{ÃâÂse{ÃâÂse{à t l d C a c h e . s e r â H , Âà ur [Ljava.lang.String;ÂÃVÃÃ{G xpâyGâyG < < FILE0 ^ && 8 8 âV < à ` H [E
mod_jk problems - Need help!
u s e r i m a g e s . x m l âà p Z âV @HÃÃN3ÃÃÂEÂ4ÃÃÂEÂ4ÃÃÂEÂ4à U S E R I M ~ 1 . X M L âyG < FILE0 < && 8 Ë âV < ` H pÃâe{Ãp ÅÂ4Ãp ÅÂ4à ÅÂÂ4à 0 p R âV pÃâe{ÃpÃâe{ÃpÃâe{ÃpÃâe{à R O O T . x m l â Ë j âyG < âÃXTâ OK P,âe: Fri, 07 May 2004 09:41:20 GMT Server: Apache/2.0.49 (Win32) mod_ssl/2.0.46 OpenSSL/0.9.7b mod_jk2/2.0.2 Content-Type: text/html; charset=ISO-8859-1 Connection: close END HTTP HEADER CHUNK === Now the reason I believe that this is a mod_jk2 (or related) problem is that, when I access the same JSP page(s) directly via Tomcat (http1.1 connector), this does not EVER happen (except once on Tomcat 4.1.30)! We do need to run through Apache2 however for various reasons such as static content serving, SSL certificate management (although this particular site runs over HTTP). In the Apache2 error.log file I see a number of these outputs: = APACHE ERROR LOG SNIPPET === [Fri May 07 12:25:32 2004] [error] Error ajp_process_callback - write failed [Fri May 07 12:25:32 2004] [error] ajp13.service() ajpGetReply recoverable error 3 [Fri May 07 12:25:33 2004] [error] ajp13.service() Error forwarding ajp13:localhost:8009 1 0 [Fri May 07 12:25:33 2004] [error] mod_jk.handler() Error connecting to tomcat 3 END APACHE ERROR LOG SNIPPET = There does not seem to be any error reports being generated by Tomcat (in any of the logs) other than these: === TOMCAT ERROR LOG SNIPPET = 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.java:638) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:688) at java.lang.Thread.run(Thread.java:534) 2004/05/07 11:47:25 org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 2004/05/07 12:25:32 org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 2004/05/07 12:25:33 org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 = END TOMCAT ERROR LOG SNIPPET === It should also be noted that I have encountered the same (or VERY similar issues) with mod_jk 1.2 using Apache 2.0.46 and Tomcat 3.2.x, 3.3.x and 4.x.x. This problem could also be related the the CoyoteeConnector implementation within Tomcat? I must admit to being at a rather large loss, and this problem is starting to impact negatively on my business - hence the length and almost desparate email! I look forward to any assistance possible! Best regards, Carl Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK AJP Connectors
Greetings all. I would appreciate some advise on an issue I am experiencing. The problem is as follows: Firstly, lets set the stage: Server: Windows 2000 Server 1GB RAM Tomcat 5.0.19 Apache 2.0.46 mod_jk2 My configurations are: 40 VirtualHosts in Apache with the matching 40 Tomcat Hosts with 1 Context per Tomcat host. Each Apache VirtualHost uses the JkUriSet to map JSP and relevant servlets through to an AJP1.3 worker in Tomcat. Now, the problem is that periodically the sites stop responding due to the AJP Threadpool reaching its maximum limit. Now I could put the maxThread attribute up and still use one AJP connector accross all sites - but as additional sites (Hosts) get added to the server I would need to increase this (periodically). Now - the other option I have is to add a new AJP connector/worker for EACH site (host). This however could cause too many concurrent connections to be "allowed" and thus increase the memory requirement for the server (which is not a major problem). I am unsure (hence this post). Essentially I am trying to figure out a good balance for this problem. Can anyone tell me how JK2 works from a connection level. I know that it uses a pool - but how does this actually function. If I have 40 virtual hosts that use the same worker/connector when are the connections established, and how long do they stay open for? I did a netstat on my server and found over 167 established connections to port 8009 (the AJP Connector port). Do they close? Well, this does not seem to happening as they server does "fall over" when the maximum connection limit is reached. My AJP/1.3 connector looks as follows in my server.xml: Do the maxThreads and minSpareThreads and acceptCount work for the AJP/1.3 Connector? In the TC docs they are not included there? Maybe I am just confused. Any assistance here would be greatly appreciated! Best regards, Carl
ping
Anyone getting these? Carl
RE: mod_jk2 - Win32 Alias problems
Greetings. I assume from the lack of response my post (below) that no one else has encountered these problems? Should I report both as bugs on Bugzilla? Regards, Carl -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 03 May 2004 05:47 PM To: '[EMAIL PROTECTED]' Subject: mod_jk2 - Win32 Alias problems Greetings. Having a (couple of) problem(s) with the latest mod_jk2 build (which I am compiling myself with VisualC++ 6 - as well as trying the precompiled binary - same behaviour). I tried to see if there were any other posts regarding this issue - could not find any! The first problem is thus: I have multiple virtual hosts configured in Apache2 and Tomcat5. Some of the hosts have multiple aliases. The confiugration option I am using specifies the ServerAlias entries in the Apache2 VirtualHost blocks where applicable. I have the matching entries in the TC5 blocks. Then for each VirtualHost I have the following JK directive set to ensure that JSP requests are passed to TC from Apache: JkUriSet worker ajp13:localhost:8009 This is the last thing before When using the latest mod_jk (which is now a .so even on Windows it seems - instead of a DLL) the ServerName (main server URL) works perfectly. All JSP posts happily get processed by TC as expected. Problem arises when you access the site using one of the ServerAliases - the index.jsp is processed fine by TC5 - however ALL OTHER JSP requests are being "processed" by Apache (i.e. shows the source as text or asks you to download the .jsp file when the JSP is a HREF link!). This definitely did not happen with earlier version of JK2! Another problem is that sometimes - when there is a highly processor intensive JSP page being processed by TC - or a JSP page that has a LOT of HTML commin back - JK seems to "lose it". The HTML is all messed up - or it does not finish loading - or it includes HTML from JSPs beikng hosted on the same server - but completely different Hosts!! This definitely seems to be a JK2/CoyoteConnector issue (although I did also experience it with JK1.2 on older versions of TC (3 and 4)) as when you go through Tomcat's HTTP1.1 connector on a different port the problems never crop up. Has anyone else experienced this? Any feedback/assistance would be greatly appreciated! Best regards, Carl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2 - Win32 Alias problems
Greetings. Having a (couple of) problem(s) with the latest mod_jk2 build (which I am compiling myself with VisualC++ 6 - as well as trying the precompiled binary - same behaviour). I tried to see if there were any other posts regarding this issue - could not find any! The first problem is thus: I have multiple virtual hosts configured in Apache2 and Tomcat5. Some of the hosts have multiple aliases. The confiugration option I am using specifies the ServerAlias entries in the Apache2 VirtualHost blocks where applicable. I have the matching entries in the TC5 blocks. Then for each VirtualHost I have the following JK directive set to ensure that JSP requests are passed to TC from Apache: JkUriSet worker ajp13:localhost:8009 This is the last thing before When using the latest mod_jk (which is now a .so even on Windows it seems - instead of a DLL) the ServerName (main server URL) works perfectly. All JSP posts happily get processed by TC as expected. Problem arises when you access the site using one of the ServerAliases - the index.jsp is processed fine by TC5 - however ALL OTHER JSP requests are being "processed" by Apache (i.e. shows the source as text or asks you to download the .jsp file when the JSP is a HREF link!). This definitely did not happen with earlier version of JK2! Another problem is that sometimes - when there is a highly processor intensive JSP page being processed by TC - or a JSP page that has a LOT of HTML commin back - JK seems to "lose it". The HTML is all messed up - or it does not finish loading - or it includes HTML from JSPs beikng hosted on the same server - but completely different Hosts!! This definitely seems to be a JK2/CoyoteConnector issue (although I did also experience it with JK1.2 on older versions of TC (3 and 4)) as when you go through Tomcat's HTTP1.1 connector on a different port the problems never crop up. Has anyone else experienced this? Any feedback/assistance would be greatly appreciated! Best regards, Carl
RE: FW: Os X
Erm, the .java file is incorrectly named: HttpSessionAttruteListener.java Should matcht he class declaration: HttpSessionAttributeListener.java (the missing i) Carl -Original Message- From: Andrew Robinson [mailto:[EMAIL PROTECTED] Sent: 11 April 2004 09:44 PM To: 'Tomcat Users List' Subject: RE: FW: Os X Good point, I tried to do the build and I got a few of these errors [javac] public interface HttpSessionActivationListener extends EventListener { [javac]^ [javac] /Users/macusr/Desktop/apache-ant-1.6.1/jakarta-tomcat-5.0.19-src/ jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/ HttpSessionAttruteListener.java:71: class HttpSessionAttributeListener is public, should be declared in a file named HttpSessionAttributeListener.java Any ideas? Thanks, Andrew -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] rg] On Behalf Of Hassan Schroeder Sent: Sunday, April 11, 2004 3:24 PM To: Tomcat Users List Subject: Re: FW: Os X Andrew Robinson wrote: > I'm new to this list...Has anyone sucessfully installed tomcat on an > OS X machine, I can't seem to get it to work. Yes. It would probably be more useful if you specified what exactly you did and what exact problem you're having, eh? -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - 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 5 out of memory
Hi - maybe try the incremental GC (JVM Hotspot switch: -Xincgc). Carl -Original Message- From: Angelov, Rossen [mailto:[EMAIL PROTECTED] Sent: 08 April 2004 12:17 AM To: 'Tomcat Users List' Subject: Tomcat 5 out of memory Hi, We are having problems with Tomcat when restarting the virtual servers or the contexts - the memory usage goes up with about 2-3 MB per restart. We have the following java options when starting Catalina: -Xms128m -Xmx256m -verbose:gc Does anybody know what's causing such a behavior and how it can be limited? Thanks, Ross "This communication is intended solely for the addressee and is confidential and not for third party unauthorized distribution." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Howto run tomcat 4.06 as windows service
Hi. Visit: http://www.alexandriasc.com/software/JavaService/index.html Download the free JavaService wrapper - read the docs and use it to easily install a service for your tomcat 4 (in fact they have a batch file in their distro that is pre-done for TC4!) Regards, Carl -Original Message- From: baldyeti [mailto:[EMAIL PROTECTED] Sent: 07 April 2004 09:18 PM To: [EMAIL PROTECTED] Subject: Howto run tomcat 4.06 as windows service Hello, I have an existing tc4 installation (copied in a hurry from another system ;-) which works fine when launched via the startup.bat script. Is there a way to turn it into a proper windows (XP) service? I know tc5 has service.bat, but short of upgrading, what would be the equivalent here? Tia, --bald - 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]
TEI Classloading
Hi. With regards the TEI classloading issue I mentioned in my previous mail (Issues on Tomcat5.0.19) - I *think* that the engine reports this error - but in previous versions of Tomcat the exception was not thrown (bubbled to the top) - blocking the running of ANY JSP page referencing the taglib in question. Maybe in Tomcat 5.0.19 this exception should be caught and logged but not thrown all the way to the top? Yoav: To replicate it is easy of course: Create a custom tag-lib - the tld file and some classes for the tags - however one or more of your tags MUST have a TEI class in the Tag definition in the TLD file - but the class file this TEI class entry reference must NOT exist in the classpath. This *should* cause ANY page that includes/reference the tag library to throw an exception about not being able to find the TEI class - running in Tomcat 5.0.19. With regards my reasoning - I deployed a site of ours to JBoss (embedding Tomcat 4.1.29) today - and noticed that the ENGINE component was reporting the exception about not finding certain TEI classes - however the webapp deployment worked fine. Now - I know this is not the error I reported in ym last mail - but it is related I think. In my mail I mentioned that on the first request to a site running on Tomcat 5.0.19 after a restart I SOMETIMES (I would say 30% of the time) get the same exception - except that the TEI class the exception was being reported on ACTUALLY DOES exist in the webapp's /WEB-INF/classes path. It seems that the classloader has not finished loading (is that possible?) at the time that tomcat tries to compile the JSP (which involves parsing any custom taglibs the page references). Unfortunately I have not got an EASY SMALL replication the the instance where the the class does exists and the exception is thrown - working on it! Any thoughts will be appreciated. Carl Olivier Director tel +27 21 7955197 fax +27 21 7955212 cell +27 82 7729753 [EMAIL PROTECTED] www.zero-one.co.za developers of the future 01 zero one - Confidentiality agreement: This email contains information which is the property of Zero One. The information contained herein is confidential and may not be disclosed to any parties other than the intended recipient without the express written consent of Zero One.
RE: measure memory
Try: Runtime runtime = Runtime.getRuntime(); long totalMemory = runtime.totalMemory(); long freeMemory = runtime.freeMemory(); Also Thread counting: ThreadGroup group = Thread.currentThread().getThreadGroup(); while (group.getParent() != null) group = group.getParent(); int activeCount = group.activeCount(); Regards, Carl -Original Message- From: Salvatierra, Mauricio h (M.H.) [mailto:[EMAIL PROTECTED] Sent: 07 April 2004 02:58 PM To: Tomcat Users List Subject: measure memory Hi people. I need measure the memory use for my application in the tomcat 4.1.12. Some body know how do. Thanks and sorry mi inglish Saludos !! SALVATIERRA, Mauricio Hugo Information Technology Ford Argentina S.C.A. Phono/Fax: 54-11-4756-8750 mailto: [EMAIL PROTECTED] Visit our page: http//www.ford.com.ar/ STRICTLY CONFIDENTIAL. The contents of this e-mail and any attachments are strictly confidential and property of Ford Argentina S.C.A. They may not be used or disclosed by someone who is not a named recipient. If you have received this e-mail in error please notify the sender by replying to this email inserting the word "Misdirected" as the message and delete the present message. -Original Message- From: Mark Nye [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 09:53 To: 'Tomcat Users List' Subject: RE: JK2 connector built and installed but is there something wrong? Hi, I had a similar problem. The line for the uri has to have a directory that is under $TOMCAT_HOME/webapps. [uri:/jsp-examples/*] would require the directory $TOMCAT_HOME/webapps/jsp-examples. As Drew said you can try servlets-examples instead of jsp-examples. Those directories are under the webapps folder by default. Mark -Original Message- From: Hamilton, Andrew [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 8:28 AM To: Tomcat Users List Subject: RE: JK2 connector built and installed but is there something wrong? try doing this [uri:/jsp-examples/*] worker=ajp13:localhost:8009 There is no examples structure. You can also try servlets-examples. Drew -Original Message- From: Kevin Struckhoff [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 7:22 PM To: [EMAIL PROTECTED] Subject: JK2 connector built and installed but is there something wrong? After downloading the source and building it, I finally have mod_jk2 at least loaded into Apache Web Server 2.0.48. However, in the docs, it says to add these 2 directives to workers2.properties: [uri:/examples/*] worker=ajp13:localhost:8009 When I send the browser to http://localhost/examples/, I get a -404 error (not found). What am I missing? Apache starts up just fine. TIA. = Thanks. Kevin -- Enjoy Life, Drink and Code Java! __ 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] - 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: Issues in tomcat 5.0.19
Hi David. Ok, well I am trying our stress testing out with a LOWER maxThread count and a higher acceptCount. Nice to have some confirmation about the theory! Thanks for your feedback. Yes - those 10 second pages need to be optimised - the problem is that those pages are dependant upon data retrieval - with the AMOUNT of data being variable. Also the implementation of our tag library by a web developer could be done in a number of different ways - so we will need to get the subroutines optimised as much as possible! Anyway - thanks for your reply - appreciated. Regards, Carl -Original Message- From: David Rees [mailto:[EMAIL PROTECTED] Sent: 07 April 2004 08:59 AM To: Tomcat Users List Subject: Re: Issues in tomcat 5.0.19 Carl Olivier wrote, On 4/6/2004 10:30 AM: > > Could the problem be that too many high processor-requirement threads > are being started, and as such each gets less time on the processor - > thus taking longer to process..and thus, should we not set the AJP > worker maxThreads DOWN thus allowing the processor to finish each > processor intensive task quicker? Maybe set the acceptCount > up.hmmm - thoughts? I think you've found the problem. If you have a page which takes 10s to process (and you say that it's CPU bound, not IO bound), once you have as many threads running as you have CPUs on your server, that 10s is goint to start taking a longer. You said your server was a single CPU machine, so if you're running 2 concurrent threads, now it will take 20s per request to process. There isn't much you can do. You need to limit the number of concurrent requests so that at maximum load, your slow page takes a reasonable time to complete. Once you hit that limit you either need to start queueing requests or rejecting them. If you don't, the server will just bog further and further down. Once you get more than 10 or so CPU hogging threads going at a time, performance will really start to degrade and requests will take longer than 10x to complete than usual due to context switching overhead. You can limit the number of concurrent requests at the connector level and then you might want increase the accept count as you suggested. The next thing you'll want to do is figure out how to turn those 10s page requests into 1s or less. ;-) -Dave - 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: Issues in tomcat 5.0.19
Oh, by the way - one thing: When we tested Tomcat standalone it was actually worse than when we run it through Apache and mod_jk. The reason is clearly that as Tomcat slows down, even the static content (none JSP/servlet) takes ages to come back - whereas through Apache, Apache would serve that quickly without sending to tomcat (thus taking some load off). An interesting thing we noted recently is that it seems to be the processing time more than anything else that causes trouble, not throughput (which is good). Could the problem be that too many high processor-requirement threads are being started, and as such each gets less time on the processor - thus taking longer to process..and thus, should we not set the AJP worker maxThreads DOWN thus allowing the processor to finish each processor intensive task quicker? Maybe set the acceptCount up.hmmm - thoughts? Thanks! Regards, Carl -Original Message- From: Carl Olivier [mailto:[EMAIL PROTECTED] Sent: 06 April 2004 06:01 PM To: 'Tomcat Users List' Subject: RE: Issues in tomcat 5.0.19 Hi Yoav. Thanks for your response - was hoping someone would wade through my rather lengthy email! Anyway, just some additional info/responses that may assist with understanding our problem(s): 1. We have tested Tomcat standalone. We probably shouldn't have even mentioned the Apache/AJP setup as it just confuses the issue. 2. There are several pages on our server which take over 10 seconds to process. If we leave these pages out of the stress test, we don't have any problems. If these are included in the stress test, they seem to create bottlenecks which eventually result in Tomcat not responding (or responding VERY slowly) and needing to be restarted. Surely Tomcat should be able to process the slower connections/requests without affecting the other, faster requests. Many of our tags do database retrievals (currently the database server IS on the server - sorry forgot to include this in my last post - we running MSSQL 2000 - using the JDBC Type 4 driver from MS - through a highly efficient connection pool). We have run a profiler on the SQL Server - and that definitely does not have a bottleneck - very quick indeed. 2. Memory: this used to be our biggest problem; however, increasing the heap and using the -XX:+UseParallelGC switch seemed to solve most of our memory problems. In fact, with this garbage collector, we rarely see any errors during our test, it simply goes slower and slower over time. 3. CPU usage goes to 100% during the stress test and stays that way for a minute or two after we stop the test. 4. If we delete Tomcat's working folder and restart (thus forcing recompilation), it cannot handle our stress test (lots of timeouts and exceptions) and we have to leave it for a minute before trying again. 5. Our TLD file contains over 200 tags but only 6 TEI's. The first time we request a JSP on any site after restarting Tomcat, we get a ClassNotFoundException for a TEI, even if that JSP does not use a tag with a TEI. The second JSP request for that site always succeeds. This behaviour occurs 100% of the time. Ok, well - I will look into sending you something to try emulate the TEI problem (probably tomorrow). Thanks a stack for your help so far - I will try some of your suggestions. Regards, Carl Olivier -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 06 April 2004 04:53 PM To: Tomcat Users List Subject: RE: Issues in tomcat 5.0.19 Hi, That was a nice, detailed message and explanation. >In Tomcat we have all 25 hosts set up using the Tomcat blocks - >each has its own pointing at the correct location on >the drive for the site context ROOT. 25 hosts/contexts for tomcat shouldn't be a problem. >Each Apache VirtualHost sends the Tomcat related requests to Tomcat using >the same worker (ajp13:localhost:8009) - is this a potential problem? Yes, though I don't know enough to say for sure. Have you tried using multiple workers and rerunning your stress test? >In order to get around memory issues Tomcat is started with the following >VM Settings: > >-Xms128m -Xmx256m -XX:+UseParallelGC Does performance change if you allocate more memory to the heap, i.e. are you memory-bound, cpu-bound, i/o-bound, or a combination thereof? >1. First request to sites are causing problems with TEI classloading - >even though the classes ARE in fact in the WEB-INF/classes location of the >relevant web app. This I'm completely unfamiliar with. Does it happen with tomcat standalone? If so, can you create a small WAR that will allow us to reproduce the problem? >2. Load - when we run load tests on the server we have major issues. The >sites run REALLY slowly - our test is a custom written load tester that >parses apache request logs for the exact test sites we have on the box (the >live equivs) and duplicates the r
RE: Issues in tomcat 5.0.19
Hi Yoav. Thanks for your response - was hoping someone would wade through my rather lengthy email! Anyway, just some additional info/responses that may assist with understanding our problem(s): 1. We have tested Tomcat standalone. We probably shouldn't have even mentioned the Apache/AJP setup as it just confuses the issue. 2. There are several pages on our server which take over 10 seconds to process. If we leave these pages out of the stress test, we don't have any problems. If these are included in the stress test, they seem to create bottlenecks which eventually result in Tomcat not responding (or responding VERY slowly) and needing to be restarted. Surely Tomcat should be able to process the slower connections/requests without affecting the other, faster requests. Many of our tags do database retrievals (currently the database server IS on the server - sorry forgot to include this in my last post - we running MSSQL 2000 - using the JDBC Type 4 driver from MS - through a highly efficient connection pool). We have run a profiler on the SQL Server - and that definitely does not have a bottleneck - very quick indeed. 2. Memory: this used to be our biggest problem; however, increasing the heap and using the -XX:+UseParallelGC switch seemed to solve most of our memory problems. In fact, with this garbage collector, we rarely see any errors during our test, it simply goes slower and slower over time. 3. CPU usage goes to 100% during the stress test and stays that way for a minute or two after we stop the test. 4. If we delete Tomcat's working folder and restart (thus forcing recompilation), it cannot handle our stress test (lots of timeouts and exceptions) and we have to leave it for a minute before trying again. 5. Our TLD file contains over 200 tags but only 6 TEI's. The first time we request a JSP on any site after restarting Tomcat, we get a ClassNotFoundException for a TEI, even if that JSP does not use a tag with a TEI. The second JSP request for that site always succeeds. This behaviour occurs 100% of the time. Ok, well - I will look into sending you something to try emulate the TEI problem (probably tomorrow). Thanks a stack for your help so far - I will try some of your suggestions. Regards, Carl Olivier -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 06 April 2004 04:53 PM To: Tomcat Users List Subject: RE: Issues in tomcat 5.0.19 Hi, That was a nice, detailed message and explanation. >In Tomcat we have all 25 hosts set up using the Tomcat blocks - >each has its own pointing at the correct location on >the drive for the site context ROOT. 25 hosts/contexts for tomcat shouldn't be a problem. >Each Apache VirtualHost sends the Tomcat related requests to Tomcat using >the same worker (ajp13:localhost:8009) - is this a potential problem? Yes, though I don't know enough to say for sure. Have you tried using multiple workers and rerunning your stress test? >In order to get around memory issues Tomcat is started with the following >VM Settings: > >-Xms128m -Xmx256m -XX:+UseParallelGC Does performance change if you allocate more memory to the heap, i.e. are you memory-bound, cpu-bound, i/o-bound, or a combination thereof? >1. First request to sites are causing problems with TEI classloading - >even though the classes ARE in fact in the WEB-INF/classes location of the >relevant web app. This I'm completely unfamiliar with. Does it happen with tomcat standalone? If so, can you create a small WAR that will allow us to reproduce the problem? >2. Load - when we run load tests on the server we have major issues. The >sites run REALLY slowly - our test is a custom written load tester that >parses apache request logs for the exact test sites we have on the box (the >live equivs) and duplicates the requests - except we can configure the >number of concurrent requests to run the test on. The page responses are >REALLY slow after a while and we also get IOExceptions occurring. A couple of notes: JMeter's last release has something that will parse web server access logs to create comparable load in a stress test plan for you to run, so you might be able to ditch your custom tester. (Which is good, because no one can reproduce results obtained with your custom tester). Are you saying the requests are first run fast, and then slow, when they should all be taking the same time? >1. The number of concurrent requests and the fact that pages and the >request reponse times are getting slow cause a major bottleneck in Tomcat - >which leads to the piling up of queued requests - until the acceptCount is >reached - and the server becomes totally unresponsive. Are the requests slow because your tags take a while (you mentioned they were "big" tags, which I assume means they do a lot of work)? Or are they slow because tomcat is churning? I
RE: Tomcat Java OutOfMemory Error
Hi. When using the jk_nt_service.exe you need to setup the wrapper.properties file. The very last line is where you set any additional VM parameters - use that. Thus you would change it from: wrapper.cmd_line=$(wrapper.javabin) -classpath $(wrapper.class_path) $(wrapper.startup_class) -config $(wrapper.server_xml) -home $(wrapper.tomcat_home) To: wrapper.cmd_line=$(wrapper.javabin) -Xms128m -Xmx512m -classpath $(wrapper.class_path) $(wrapper.startup_class) -config $(wrapper.server_xml) -home $(wrapper.tomcat_home) Hope that helps! Regards, Carl -Original Message- From: Baldacchini Marco [mailto:[EMAIL PROTECTED] Sent: 06 April 2004 03:13 PM To: Tomcat Users List Subject: Re: Tomcat Java OutOfMemory Error I have already tried but it does not work (I have tried also TOMCAT_OPTS as environmental variable), remains set up to the default (64MB). Thanks shyam Scrive: > Hi, > I not sure about tomcat 3.2.1. In tomcat 4 I have used the JAVA_OPTS . > I set JAVA_OPTS as my environmental variable and that was it. Hope > this helps you shyam > > > > -Original Message- > From: Baldacchini Marco [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 06, 2004 5:41 AM > To: [EMAIL PROTECTED] > Subject: Tomcat Java OutOfMemory Error > > Hi, > I'm running Tomcat 3.2.1 on Windows 2000 Server as service with > jk_nt_service.exe utility. > I receive java.lang.OutOfMemory error in my JSP page. > I need to increment memory for JVM to 512 MB by setting -Xms512m > -Xmx512m. > Where I do it? > Thanks in advance. > > Marco > > - > 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 5.X - Apache2.X - Mod-JK2
Hi. That is apprently when jk is trying to register the request with JMX. You can disable that (and hence stop the error message) by adding the following line at the end if your jk2.properties: request.registerRequests=false With regards problems and stability the most stable I have been able to get it is with: Apache 2.0.46 Tomcat 5.0.19 mod_jk2.03 - mod_jk2.04 J2SDK1.4.2_01 I would recommend that you compile mod_jk2 for your version of Apache (although I am not clear on how much of a difference this makes?) Regards, Carl -Original Message- From: armalai [mailto:[EMAIL PROTECTED] Sent: 06 April 2004 03:04 PM To: Tomcat Users List Subject: Tomcat 5.X - Apache2.X - Mod-JK2 Hi., I'm getting lot of issues in this combination in windows. In did not find any document or forums discussion on that. 1.Can any one suggest me to change ot right vesrion or i can stick on with this one? 2.when i hit my application i'm getting this WARNING message..is this causing any probs...anyway application is working..but it is very slow. Tomcat Log:- Apr 5, 2004 6:14:02 PM org.apache.jk.common.HandlerRequest decodeRequest WARNING: Error registering request Thanks., MALAI - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Issues in tomcat 5.0.19
ctive(Parser.java:523) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577) at org.apache.jasper.compiler.Parser.parse(Parser.java:171) at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:25 8) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:139) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:456) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 53) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 91) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) 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.ApplicationDispatcher.invoke(ApplicationDispatcher. java:750) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis patcher.java:510) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch er.java:445) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .java:359) at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:712 ) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:682) at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:827) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:800) at org.apache.jsp.vote.index_jsp._jspService(index_jsp.java:229) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 11) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) 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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:339) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:415) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:716) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:650) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:688) at java.lang.Thread.run(Thread.java:534) I look forward to any assistance that you may be able to give! Regards, Carl Olivier ---
RE: 5.0.19 - won't start on anything other thatn *nix
Add the commons-launcher.jar commons-logging-api.jar Jars into the bootstrap classpath to get Tomcat5.0.19 started properly on Win systems. Regards, Carl -Original Message- From: Alistair Young [mailto:[EMAIL PROTECTED] Sent: 06 April 2004 11:57 AM To: Tomcat Users List Subject: Re: 5.0.19 - won't start on anything other thatn *nix OK, I think I'm getting somewhere: org.apache.catalina.startup.Bootstrap in /bin calls org.apache.catalina.startup.Catalina.setAwait(boolean) in /server/lib which inherits setAwait from org.apache.catalina.startup.Embedded I checked the jars and setAwait is defined in both Catalina.class and Embedded.class so why is the class loader failing to load those files correctly? catalina.out: java.lang.NoSuchMethodException: org.apache.catalina.startup.Catalina.setAwait(boolean) at java.lang.Class.getMethod(Class.java:978) at org.apache.catalina.startup.Bootstrap.setAwait(Bootstrap.java:337) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:396) I've looked for another catalina.jar in the CLASSPATH but there isn't one. Can anyone shed some light? thanks, Alistair On 6 Apr 2004, at 10:28, Alistair Young wrote: > Thanks for that - I've never had problems with Tomcat before! It's > seems to be something to do with Embedded - whatever that is. > bootstrap.jar is using catalina.jar and trying to call setAwait - > which doesn't exist. Can anyone say why setAwait is being called when > it clearly doesn't exist in catalina.jar? > Is there something in catalina.sh that's making Tomcat think it should > run in Embedded mode - is embedded mode a bad thing? > thanks, > Alistair > > On 6 Apr 2004, at 10:01, Anand Ravi wrote: > >> Hi! >> >> I'm using Tomcat 5.0.19 on Win 98,NT,XP and 2K. Seems to be working >> fine. >> >> Regards, >> Anand Ravi >> >> -Original Message- >> From: Alistair Young [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, April 06, 2004 1:57 PM >> To: Tomcat Users List >> Subject: 5.0.19 - won't start on anything other thatn *nix >> >> >> Hi folks, >> I've now tried Tomcat 5.0.19 on 3 different machines and 2 OSes: On >> Windows XP and MAC OS X 10.3.3, running bin/startup.bat/sh or >> bin/catalina.bat/sh start produces the error: >> java.lang.NoSuchMethodException: >> org.apache.catalina.startup.Catalina.setAwait(boolean) >> at java.lang.Class.getMethod(Class.java:978) >> at >> org.apache.catalina.startup.Bootstrap.setAwait(Bootstrap.java:337) >> at >> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:396) >> JAVA_HOME and CATALINE_HOME are set OK. No errors are produced by >> catalina.bat regarding environment variables. I'm using JDK 1.4.2_03 >> Can anyone please help as Tomcat is now unusable outside *nix! >> cheers, >> Alistair >> >> >> - >> 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]
InProcess Workers
Greetings. I havea Tomcat 3.2.3 running behind Apache 1.3.20. I use mod_jk to pass request from Apache to Tomcat. I have multiple virtual hosts set up, and each host uses its own worker. >From what I understand this means that each host has its own JVM of sorts? Is this correct? If so, is there any way to restart 1 worker without restarting the rest? Thanks in advance, Carl