RE: Problem with RealmBase and digested passwords
Maybe one of these days I'll finally understand classpath! :) It was as simple as putting catalina.jar in my WEB-INF\lib folder. Doh. Sorry all. -Original Message- From: Barnett, Brian W. To: 'Tomcat Users List ' Sent: 9/23/2005 9:23 PM Subject: Problem with RealmBase and digested passwords Hello, I'm trying to get my passwords digested, and I think I'm nearly there. I ran the command line utility to calculate a digested password and then put it in an existing user's record using MySQL Query Browser. I then logged in as that user and everything was fine. So, Tomcat is authenticating with digested passwords just great. The problem is that when I add a new user through the web app, it errors out with this message: java.lang.NoClassDefFoundError: org/apache/catalina/realm/RealmBase when I try to calc the digested version of the password prior to storing the new user to the database. I suspect it's a classpath issue but I'm not sure what to do. The class compiles fine in Eclipse. I added $CATALINA_HOME/server/lib/catalina.jar to my classpath in Eclipse. Do I need to do something else? Any help would be greatly appreciated. (Using Tomcat 5.0.28) TIA, Brian Barnett This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
heap size in tomcat 5.0
win2k server tomcat 5.0.x how to set heap size (min & max)? i know how to do it in tomcat 5.5, but wasnt sure which script controlled the JAVA_OPTS in 5.0 thx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to setup context.xml for virual hosts
ok so i define my connection pools etc in the context.xml but when the site is accessed from the virutal host, it does not see the connection pool since its defined as: etc in other words, access the site as localhost/struts and the context.xml stuff works, but when you access it as struts.acme.com, it cannot see anything in that context.xml file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with RealmBase and digested passwords
Hello, I'm trying to get my passwords digested, and I think I'm nearly there. I ran the command line utility to calculate a digested password and then put it in an existing user's record using MySQL Query Browser. I then logged in as that user and everything was fine. So, Tomcat is authenticating with digested passwords just great. The problem is that when I add a new user through the web app, it errors out with this message: java.lang.NoClassDefFoundError: org/apache/catalina/realm/RealmBase when I try to calc the digested version of the password prior to storing the new user to the database. I suspect it's a classpath issue but I'm not sure what to do. The class compiles fine in Eclipse. I added $CATALINA_HOME/server/lib/catalina.jar to my classpath in Eclipse. Do I need to do something else? Any help would be greatly appreciated. (Using Tomcat 5.0.28) TIA, Brian Barnett This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: force reload of individual class files
Leon Rosenberg <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > On 9/23/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > I think it's forbidden by the spec. > > SRV.3.7 Reloading Considerations > Although a Container Provider implementation of a class reloading > scheme for ease > of development is not required, any such implementation must ensure > that all servlets, and classes that they may use, are loaded in the > scope of a single class > loader. This requirement is needed to guarantee that the application > will behave as expected by the Developer. > > ah i see, that would make sense. but it seems strange that this sort of thing is accepted as the norm. i would think that its a common requirement and that a lot of developers would get sick of restarting the server to get some minor bug fix into production. does anyone have a workaround? btw, i moved to storing my name-value pairs (used to be props files) in the db for this very reason. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: force reload of individual class files
On 9/23/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > given a change to class file(s), does anyone know a > hack workaround to > force tomcat to reload * just those files *. I know > about restarting the > app from the console and context.xml. but i cannot > afford to knock users > off in the middle of their sessions just to reload a > few minor class files. I think it's forbidden by the spec. SRV.3.7 Reloading Considerations Although a Container Provider implementation of a class reloading scheme for ease of development is not required, any such implementation must ensure that all servlets, and classes that they may use, are loaded in the scope of a single class loader. This requirement is needed to guarantee that the application will behave as expected by the Developer. > > btw, i think bea has this feature. Previous generations of containers created new class loaders to load a servlet, distinct from class loaders used to load other servlets or classes used in the servlet context. This could cause object references within a servlet context to point at unexpected classes or objects, and cause unexpected behavior. The requirement is needed to prevent problems caused by demand generation of new class loaders. So probably an old BEA weblogic or something, but not if it's confirm with 2.3. Btw, Java WebServer 2.0 (the sun thing that was reference implementation before tomcat 3) had this functionality too. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No Timestamp in catalina.out
catalina.out contents are actually system.out-s so you shouldn't expect any timestamps there, unless you have a logkit like log4j and configured your logger to go for standard out (which is bad :-)) However, we had same problem and have a workaround for this: We are starting a Thread in our configuration servlet which just does following: private static long startupTime; static { startupTime=System.currentTimeMillis(); } private void log() { System.out.println((System.currentTimeMillis()-startupTime)+" " +new Date().toString()+" -MARK-"); } public run(){ while(true){ try{ sleep(5000); }catch(InterruptedException ignored){} log(); } } if you set the thread to daemon you will have no problems with container app. reloading. regards leon On 9/23/05, Partheeban Boopathy <[EMAIL PROTECTED]> wrote: > Common guys i need help on this ,since its effecting our support to > production. > I dont have any clue what to do on this > I am using Tomcat5.0.27 > > The Logging Pattern in Catalina.out is missing with Timestamp . > I am getting blank instead of TimeStamp. > I was using same Tomcat version in my local machine and i can able to see > the timestamp in Catalina.out.The only difference is we changed > server.xmlport of 8080 to > 8015.Will that cause any problem.Or is that i am missing any thing??? > > Here is my catalina.out > - Initializing Coyote HTTP/1.1 on http-8014 > - Initialization processed in 3938 ms > - Starting service Catalina > - Starting Servlet Engine: Apache Tomcat/5.0.27 > - XML validation disabled > - Create Host deployer for direct deployment ( non-jmx ) > - Processing Context configuration file URL > file:/opt/tomcat-strata/conf/Catalin > a/localhost/admin.xml > - Processing Context configuration file URL > file:/opt/tomcat-strata/conf/Catalin > a/localhost/balancer.xml > - Processing Context configuration file URL > file:/opt/tomcat-strata/conf/Catalin > a/localhost/manager.xml > - Installing web application at context path from URL > file:/opt/tomcat-strata/w > ebapps/ROOT > - Installing web application at context path /strata from URL > file:/opt/tomcat-s > trata/webapps/strata > - Installing web application at context path /tomcat-docs from URL > file:/opt/tom > cat-strata/webapps/tomcat-docs > - Starting Coyote HTTP/1.1 on http-8014 > - Port busy 8009 java.net.BindException: Address already in use > - JK2: ajp13 listening on /0.0.0.0:8010 > - Jk running ID=1 time=2/101 config=/opt/tomcat-strata/conf/jk2.properties > - Server startup in 6990 ms > > Badly looking for response. > > Parthi > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to limit the size of TOMCATs stdout file
actually tomcat spams a lot in the catalina.out, this is my favorite: [EMAIL PROTECTED]: Exception Processing ErrorPa ge[errorCode=404, location=/down/404.html] ClientAbortException: java.net.SocketException: Connection reset at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331) at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297) at org.apache.coyote.tomcat5.CoyoteResponse.flushBuffer(CoyoteResponse.j ava:537) at org.apache.coyote.tomcat5.CoyoteResponseFacade.flushBuffer(CoyoteResp onseFacade.java:238) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.j ava:303) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:147) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:520) (20 more lines and the page is actually there) another cool log output: when you manage to throw an uncaught exception in a jsp under some circumstances, each and every request gets: response already commited with 30-40 lines of stacktraces. The server itself dies in this scenario btw. Also quite funny: configure tomcat to use 600 threads. Start on an old linux distribution with 2.4.x kernel (no nptl). Start 600 test http1.1 threads. Watch the logfile. (For even more fun watch the number of threads tomcat actually uses in another window) :-) But number one spammer in catalina.out are struts-taglibs! regards Leon On 9/23/05, Tim Funk <[EMAIL PROTECTED]> wrote: > See http://jakarta.apache.org/tomcat/faq/logging.html#catalina.out > > ClientAbortExceptions are thrown by tomcat when the client presses stop > before the page is downloaded but does not log the exception. If there is > custom code trapping exception - it might be logging it. In this case - the > custom code is too agressive in catching exceptions and should let the > container handle them correctly. (And probably incorrectly using > error.printStackTrace() instead of a logger) > > -Tim > > [EMAIL PROTECTED] wrote: > > > How do you limit the size of Tomcats stdout file. > > > > If you look at version 5.5, the dialog for the service lets you put in > > default or some path for the stdout file. > > > > But there is no option to set the limiting size or other parameters as you > > would with log4j. > > > > This is the stdout log file which tomcat logs to if it gets something like a > > network connection reset error. > > > > This is not really the applications log file per se. > > > > I tried asking this to the tomcat team via bugzilla and they were not > > helpful. > > > > thanks > > > > > > - > 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]
Deploying a webapp under two different URIs (re-sent)
Hi, I want to deploy the same webapp under two different URIs. I created two context descriptors like this: Everything seems to work fine, I just want to make sure that this is the right thing to do. Are there any unwanted consequences bu doing this? Or is there even a better way for achieving this (without using Apache) ? Thanks, Carsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: db-connectin is working fine, but is it pooling?
Hi Thanks Pete. That seems to be the case. \trond -Original Message- From: Lucuk, Pete [mailto:[EMAIL PROTECTED] Sent: 23. september 2005 17:43 To: Tomcat Users List Subject: RE: db-connectin is working fine, but is it pooling? I had a similar question while doing connection pooling with Oracle 8i of. OK, if I set my connection pool to 10, why do I only see a 1 connection in Oracle Well, the answer was that when you create a pool of 10, it only starts out with 1 connection, NOT 10 If the connection pool starts needing more than 1 connection, it will create and *keep* new connections. Oracle's connection pooling jar was smart enough to do it. I opened up 4 web browsers and hit my web based app like crazy and saw the acutal physical connections in Oracle jump up to like 5 and stayed at 5 connections. I assume it is the same in MySQL >-Original Message- >From: KEREM ERKAN [mailto:[EMAIL PROTECTED] >Sent: Friday, September 23, 2005 2:50 AM >To: 'Tomcat Users List' >Subject: RE: db-connectin is working fine, but is it pooling? > > >Write a test connection page and stress test it with a lot of virtual >clients. That way, you will have more than 1 connection opened >to ypur pool. > > >> -Original Message- >> From: Trond Hersløv [mailto:[EMAIL PROTECTED] >> Sent: Friday, September 23, 2005 3:24 AM >> To: Tomcat Users List >> Subject: RE: db-connectin is working fine, but is it pooling? >> >> Thanks, I'll do that, but still - how can I be sure that my >> pool have more than just this one connection. Writing two >> servlets with endless loops, avoiding checking the >> connections back would give me the answer I guess. >> But why is there only one connection established to my DB server?? >> >> Is there a way to configure the pool to pre generate eg. 10 >> connections? >> >> \trond >> >> >> -Original Message- >> From: Kyle [mailto:[EMAIL PROTECTED] >> Sent: 23. september 2005 02:14 >> To: Tomcat Users List >> Subject: Re: db-connectin is working fine, but is it pooling? >> >> Print out your Connection Object .toString() to stdout or on >> a page and you should see that it is a Pool(ed|able) >> Connection object. >> >> K >> >> Trond Hersløv wrote: >> >> >Everything works just fine, but I'm a little bit concerned >> that maybe I am generating a singel connection to the DB and >> not a pool of connections. >> >As I run netstat -a on the machine hosting the DB, I >> expected to find >> >a lot of connections to port 3306, which my MySQL server >> listens to, but there is only one single connection. Even >> when I press F5 for a long time to refresh my IE window like >> a 100 times or with more windows open at the same time there >> is just this one connection to be found. >> > >> > >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >** >> This email message has been swept by >> MIMEsweeper for the presence of computer viruses. >> >** >> >> >> - >> 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 exception handling
you want to define an error page in your web.xml. try adding something like the following: 500 /yourErrorPage.html On 9/23/05, James Cowan <[EMAIL PROTECTED]> wrote: > > > thanks for the reply. > > I tried that but it does not seem to make any difference. > > what version of tomcat are you using? > > James > - Original Message - > From: "Jilles van Gurp" <[EMAIL PROTECTED]> > To: "Tomcat Users List" > Sent: Thursday, September 22, 2005 5:33 PM > Subject: Re: tomcat exception handling > > > > swallowoutput=true in your context should help > > > > Jilles > > > > James Cowan wrote: > > > Hi > > > > > > How do I suppress the stack trace from exception handling globally ( > i.e. > not > > > using an errorPage directive)? > > > > > > I have tried setting the Verbosity of the Logger elements in the > server.xml > > > (for Tomcat 5.0.28) to 0 but this does not seem to stop stack trace. > > > > > > A simple jsp like this: > > > > > > <% > > > if (true) > > > throw new Exception("Some exception"); > > > %> > > > > > > produces this output: > > > exception > > > > > > javax.servlet.ServletException: Some exception > > > > > > > org.apache.jasper.runtime.PageContextImpl.doHandlePageException > (PageContextI > > > mpl.java:825) > > > > org.apache.jasper.runtime.PageContextImpl.handlePageException > (PageContextImp > > > l.java:758) > > > org.apache.jsp.e_jsp._jspService(e_jsp.java:53) > > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java > :3 > > > 24) > > > 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:802) > > > > > > I just want the HTTP 500 error displayed and no more information. > > > > > > James Cowan > > > > > > > > > - > > > 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: starting Tomcat service
My two cents: Write a Script in Windows, make it service (Plenty of code on Web), which starts on when Windows start. On 9/23/05, Tuan Quan <[EMAIL PROTECTED]> wrote: > Thanks Kerem, > But I want the script to run at boot time, in Windows. > Rather than having to login and run the script manually. > > > KEREM ERKAN <[EMAIL PROTECTED]> wrote: > You may write a shell script which includes a java program to test oracle > connectivity and if it can connect, it can be used to start Tomcat. If it > fails, it may say "Oracle down, I am not starting Tomcat". > > Cheers, > > Kerem > > > -Original Message- > > From: Tuan Quan [mailto:[EMAIL PROTECTED] > > Sent: Thursday, September 22, 2005 10:48 PM > > To: tomcat-user@jakarta.apache.org > > Subject: starting Tomcat service > > > > In windows, one of my webapp needs to connect to a database > > in order to work correctly. > > How can I check for oracle database ready before starting > > Tomcat service? > > Set 'DependOnService' parameter in registry to point to > > Oracle db service, may work, but what if the database is on a > > different PC? > > > > thanks > > > > > > > > - > > Yahoo! for Good > > Click here to donate to the Hurricane Katrina relief effort. > > > > > - > Yahoo! for Good > Click here to donate to the Hurricane Katrina relief effort. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to limit the size of TOMCATs stdout file
See http://jakarta.apache.org/tomcat/faq/logging.html#catalina.out ClientAbortExceptions are thrown by tomcat when the client presses stop before the page is downloaded but does not log the exception. If there is custom code trapping exception - it might be logging it. In this case - the custom code is too agressive in catching exceptions and should let the container handle them correctly. (And probably incorrectly using error.printStackTrace() instead of a logger) -Tim [EMAIL PROTECTED] wrote: How do you limit the size of Tomcats stdout file. If you look at version 5.5, the dialog for the service lets you put in default or some path for the stdout file. But there is no option to set the limiting size or other parameters as you would with log4j. This is the stdout log file which tomcat logs to if it gets something like a network connection reset error. This is not really the applications log file per se. I tried asking this to the tomcat team via bugzilla and they were not helpful. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to limit the size of TOMCATs stdout file
> I tried asking this to the tomcat team via bugzilla and they were not > helpful. > Nobody pointed you to this link?: See http://jakarta.apache.org/tomcat/faq/logging.html for logging help first - it answers this question. :) On Fri, 2005-09-23 at 14:45, [EMAIL PROTECTED] wrote: > How do you limit the size of Tomcats stdout file. > > If you look at version 5.5, the dialog for the service lets you put in > default or some path for the stdout file. > > But there is no option to set the limiting size or other parameters as you > would with log4j. > > This is the stdout log file which tomcat logs to if it gets something like a > network connection reset error. > > This is not really the applications log file per se. > > I tried asking this to the tomcat team via bugzilla and they were not > helpful. > > thanks > -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to limit the size of TOMCATs stdout file
How do you limit the size of Tomcats stdout file. If you look at version 5.5, the dialog for the service lets you put in default or some path for the stdout file. But there is no option to set the limiting size or other parameters as you would with log4j. This is the stdout log file which tomcat logs to if it gets something like a network connection reset error. This is not really the applications log file per se. I tried asking this to the tomcat team via bugzilla and they were not helpful. thanks
RE: Tomcat Out of Memory - Host appBase related
It's possible. I think I saw something about it on the running.txt file. Assaf --- "Vadlamudi, Kamala" <[EMAIL PROTECTED]> wrote: > Hi Assaf > > Thanks for the mail. I used the site you sent me to > Check the following > - The ram on my system is > 128MB. > - The out of memory problem is showing up way before >system is running out of threshold. > > Is it possible the out of memory is coming because > the > system ran out of file descriptors. I vaguely > remember > some one at work noticing this problem on > linix boxes running tomcat. Appreciate your thoughts > > on this matter. > > Thanks > Kamala > > -Original Message- > From: Assaf [mailto:[EMAIL PROTECTED] > Sent: Friday, September 23, 2005 10:38 AM > To: Tomcat Users List > Subject: Re: Tomcat Out of Memory - Host appBase > related > > Hi Kamala, > > Try http://jakarta.apache.org/tomcat/faq/memory.html > > Usually it is the -X settings you need to play with. > > Assaf > > --- "Vadlamudi, Kamala" > <[EMAIL PROTECTED]> wrote: > > > When starting tomcat it is running Out of Memory. > > > > There were three Hosts in server.xml file pointing > > to > > > > same appBase. If I remove one of the Hosts or if I > > change appBase > > > > the problem is disappearing. Do you know why? Your > > explanation will > > > > be greatly appreciated. > > > > > > > > Thanks > > > > Kamala > > > > > > > > > > > > > __ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Out of Memory - Host appBase related
if ((your code does not leak memory) and (you use struts) and (you use tomcat manager/ant task to deploy/undeploy your web app) and !(you use tomcat 5.5.9/+)) { Upgrade_to_5.5.9/+; } -Original Message- From: Vadlamudi, Kamala [mailto:[EMAIL PROTECTED] Sent: September 23, 2005 10:57 AM To: Tomcat Users List Subject: RE: Tomcat Out of Memory - Host appBase related Hi Assaf Thanks for the mail. I used the site you sent me to Check the following - The ram on my system is > 128MB. - The out of memory problem is showing up way before system is running out of threshold. Is it possible the out of memory is coming because the system ran out of file descriptors. I vaguely remember some one at work noticing this problem on linix boxes running tomcat. Appreciate your thoughts on this matter. Thanks Kamala -Original Message- From: Assaf [mailto:[EMAIL PROTECTED] Sent: Friday, September 23, 2005 10:38 AM To: Tomcat Users List Subject: Re: Tomcat Out of Memory - Host appBase related Hi Kamala, Try http://jakarta.apache.org/tomcat/faq/memory.html Usually it is the -X settings you need to play with. Assaf --- "Vadlamudi, Kamala" <[EMAIL PROTECTED]> wrote: > When starting tomcat it is running Out of Memory. > > There were three Hosts in server.xml file pointing > to > > same appBase. If I remove one of the Hosts or if I > change appBase > > the problem is disappearing. Do you know why? Your > explanation will > > be greatly appreciated. > > > > Thanks > > Kamala > > > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:433417fb270111440213224!
tomcat start exception
I have a Tomcat5.5.9 server that works fine with JDBCRealm. I am trying to configure a customRealm for the sever. The customRealm.jar file was placed in the directory of $Tomcat_Home/server/lib. The realm in the server.xml has been defined as: After starting tomcat, I can see tomcat page via IE browser, but when click on Tomcat Manager, just got a blank page. I got exception in catalina.out as: WARNING: Exception executing accept java.net.SocketException: Invalid argument at java.net.PlainSocketImpl.socketSetOption(Native Method) at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:264) at java.net.Socket.setSoLinger(Socket.java:869) at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:300) at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.j$ at org.apache.jk.common.SocketAcceptor.runIt(ChannelSocket.java:852) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread$ at java.lang.Thread.run(Thread.java:595) In most case this exception means "The server is not running (nobody is listening on the specified port)" or "The host is not reachable". Is there any additional configuration I missed? How to fix this problem? Please help. Julia Zhu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help customize socket options ??
Is there any way to customize some of the socket options used by tomcat ?? I would like to add the so_reuseaddr option to the sockets created by tomcat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
No Timestamp in catalina.out
Common guys i need help on this ,since its effecting our support to production. I dont have any clue what to do on this I am using Tomcat5.0.27 The Logging Pattern in Catalina.out is missing with Timestamp . I am getting blank instead of TimeStamp. I was using same Tomcat version in my local machine and i can able to see the timestamp in Catalina.out.The only difference is we changed server.xmlport of 8080 to 8015.Will that cause any problem.Or is that i am missing any thing??? Here is my catalina.out - Initializing Coyote HTTP/1.1 on http-8014 - Initialization processed in 3938 ms - Starting service Catalina - Starting Servlet Engine: Apache Tomcat/5.0.27 - XML validation disabled - Create Host deployer for direct deployment ( non-jmx ) - Processing Context configuration file URL file:/opt/tomcat-strata/conf/Catalin a/localhost/admin.xml - Processing Context configuration file URL file:/opt/tomcat-strata/conf/Catalin a/localhost/balancer.xml - Processing Context configuration file URL file:/opt/tomcat-strata/conf/Catalin a/localhost/manager.xml - Installing web application at context path from URL file:/opt/tomcat-strata/w ebapps/ROOT - Installing web application at context path /strata from URL file:/opt/tomcat-s trata/webapps/strata - Installing web application at context path /tomcat-docs from URL file:/opt/tom cat-strata/webapps/tomcat-docs - Starting Coyote HTTP/1.1 on http-8014 - Port busy 8009 java.net.BindException: Address already in use - JK2: ajp13 listening on /0.0.0.0:8010 - Jk running ID=1 time=2/101 config=/opt/tomcat-strata/conf/jk2.properties - Server startup in 6990 ms Badly looking for response. Parthi
force reload of individual class files
given a change to class file(s), does anyone know a hack workaround to force tomcat to reload * just those files *. I know about restarting the app from the console and context.xml. but i cannot afford to knock users off in the middle of their sessions just to reload a few minor class files. btw, i think bea has this feature. thx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat on Unix - error message at shutdown
Hi, Every time I stop tomcat 5.0 on Unix , it gives the following error. I think this issue is already been discussed, but I could not find any link to the solution. I would appreciate if you could help me solving this issue. Sep 23, 2005 1:31:22 PM org.apache.jk.common.ChannelSocket acceptConnections WARNING: Exception executing accept java.net.SocketException: Invalid argument at java.net.PlainSocketImpl.socketSetOption(Native Method) at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:240) at java.net.Socket.setSoLinger(Socket.java:814) at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:300) at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:638) at org.apache.jk.common.SocketAcceptor.runIt(ChannelSocket.java:847) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) thanks sanugu
RE: Please verify this is correct: Need multiple virtual directories for isapi_redirector
Hi; Trying again... Thanks - dave -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 22, 2005 9:10 AM To: 'Tomcat Users List' Subject: Please verify this is correct: Need multiple virtual directories for isapi_redirector Hi; I want to make sure this is correct: If you want to run Tomcat against multiple websites, not just the default website, this is what I have had to do. This is on Windows 2003/IIS 6.0. I removed isapi_redirector.dll from the default web site ISAPI Filters and put it in the parent "Web Sites" ISAPI Filter properties. I added a jakarta virtual directory for each website (and I have a lot.). Now it appears to work. ??? - thanks - 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: Desperately need help: What is correct for workers.properties.minimal
Hi; Asking again. The error messages worry me... Thanks - dave -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 22, 2005 9:09 AM To: 'Tomcat Users List' Subject: Desperately need help: What is correct for workers.properties.minimal Hi; I'm running Tomcat 5.5 on Windows 2003/IIS 6.0 using isapi_redirect The isapi_redirect.exe installer creates a worker.properties.minimal of: worker.list=wlb,jkstatus worker.ajp13w.type=ajp13 worker.ajp13w.host=localhost worker.ajp13w.port=8009 worker.wlb.type=lb worker.wlb.balance_workers=ajp13w worker.jkstatus.type=status While the docs show one of: worker.list=ajp13w worker.ajp13w.type=ajp13 worker.ajp13w.host=localhost worker.ajp13w.port=8009 First, what use is the load balancing if I have just one server running one instance of Tomcat? Does it load balance within that one instance? Second, what is jkstatus for? Third, I am using the non-lb listing above. And it appears to work fine but occasionally I am getting the following. What does it mean: [Thu Sep 22 07:30:02 2005] [error] HttpExtensionProc::jk_isapi_plugin.c (1029): could not get a worker for name ajp13 [Thu Sep 22 07:36:20 2005] [info] ajp_send_request::jk_ajp_common.c (1178): Socket 320 is not connected any more (errno=-1) [Thu Sep 22 07:36:20 2005] [info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection Thanks - 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: getRequestURL and forwards
[EMAIL PROTECTED] wrote: Hi, We have an application that does the following ( we use struts 1.2.4, tomcat 5.0.28, jdk 1.4.2) a) user requests /x/y/action.do?x=1 b) the action executes then JSP forwards (via ActionForward) to /x/y/somefile.jsp c) the resulting JSP page calls request.getRequestURL(). It returns /x/y/action.do (which is what we expect) We just upgraded Tomcat to 5.5.9 and to jdk 1.5, (struts still the same) now the behavior has changed. a) user requests /x/y/action.do?x=1 b) the action executes then JSP forwards (via ActionForward) to /x/y/somefile.jsp c) the resulting JSP page calls request.getRequestURL(). It returns /x/y/somefile.jsp (instead of action.do) Our app is broke because of this, any ideas? Read section SRV.8.4 of the Servlet specification. 5.0.28 was not following the spec. 5.5.9 is. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE:problems with cvs and ant tomcat build script (please help cvs proxy authenticate ???)
My proxy server requires authentication, please tell me how to get cvs and ant tomcat build script working ??? C:\tomcat-source>cvs -d :pserver;proxy=caproxy.ca.com;proxyport=80:[EMAIL PROTECTED]:/home/cvs public login Logging in to :pserver:[EMAIL PROTECTED]:2401:/home/cvspublic CVS password: *** cvs [login aborted]: Proxy server requires authentication - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getRequestURL and forwards
Hi, We have an application that does the following ( we use struts 1.2.4, tomcat 5.0.28, jdk 1.4.2) a) user requests /x/y/action.do?x=1 b) the action executes then JSP forwards (via ActionForward) to /x/y/somefile.jsp c) the resulting JSP page calls request.getRequestURL(). It returns /x/y/action.do (which is what we expect) We just upgraded Tomcat to 5.5.9 and to jdk 1.5, (struts still the same) now the behavior has changed. a) user requests /x/y/action.do?x=1 b) the action executes then JSP forwards (via ActionForward) to /x/y/somefile.jsp c) the resulting JSP page calls request.getRequestURL(). It returns /x/y/somefile.jsp (instead of action.do) Our app is broke because of this, any ideas? thanks!
[ANN] Apache Tomcat 5.5.12-alpha Released
23 September 2005 - Apache Tomcat 5.5.12-alpha Released The Apache Tomcat team is proud to announce the immediate availability of Tomcat 5.5.12-alpha. This version contains several bug fixes, including an import change to session attribute storage concurrency that is required by the upcoming Servlet Specification v2.5. In addition to these changes, this release is a significant milestone for two reasons: This release is the last one to be done using the CVS repository at Apache. The Tomcat team is moving to the Subversion (SVN) repository as part of the overall Apache initiative to do so. Access instructions for the SVN repository are available at http://www.apache.org/dev/version-control.html. The move is expected to be complete within the next week. This release is also likely the last one to use the Jakarta pages. As part of Tomcat's move to a top-level project (TLP) at Apache, we will be migrating our content to http://tomcat.apache.org, which is still under construction at this time. That site will have its own download pages and related information. We will keep the key jakarta URLs intact with redirection, but please keep an eye out and update your bookmarks to http://tomcat.apache.org as/when appropriate. As part of the TLP move, distribution names have changed from jakarta-tomcat-* to apache-tomcat-*, and similar minor branding changes will gradually become visible in the web site and documentation. We thank the Jakarta project for its support over the years, and we will continue collaborating on projects and issues of common interest. The Release notes are available at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES Please refer to the change log for the list of changes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi#tomcat-5.5 Sources: http://jakarta.apache.org/site/sourceindex.cgi#tomcat-5.5 The Apache Tomcat Team - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: starting Tomcat service
> From: Tuan Quan [mailto:[EMAIL PROTECTED] > But I want the script to run at boot time, in Windows. You might wish to look at srvany (http://support.microsoft.com/default.aspx/kb/q137890/). This allows you to start any process as a Windows service. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tld processing performance at startup
Create a directory at META-INF at your webapps/ Create file context.xml inside META-INF context.xml is the tomcat deployment descriptor http://jakarta.apache.org/tomcat/tomcat-5.5-doc/deployer-howto.html http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html Restart the app or the complete server and I am sure that tld processing is off. Peter Brad Flynn schrieb: Hi Peter, Thanks for your wicked fast help I am unsure of what you mean byt setting up a META-INF/context.xml inside my app. Where/how do I create this? Should I be able to view images if I call them directly like here http://207.97.221.210:8080/jsp-examples/wirefusion/ScreenshotServer.jsp ? I don't understand your question? This is totally new to me so I appreciate your patience with a no0b! Cheers. Bradley -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: Friday, September 23, 2005 10:22 AM To: Tomcat Users List Subject: Re: tld processing performance at startup Setup a META-INF/context.xml inside your app And check Tim's tipps :-) regards Peter Tim Funk schrieb: There is an option to disable TLD processing. This is nice if: 1) You precompile 2) Or don't use tld files See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html for disabling them If you place listeners in your TLD files - I am unsure if they are picked up if the TLD is explicitly listed in web.xml. If not - you can place the listener explicitly in web.xml. -Tim Jilles van Gurp wrote: Hi, I have a large site running on tomcat with some tag libs. Restarting tomcat can take up to 30-40 seconds which is not that bad except that we'd prefer to minimize this time because apache can queue a lot of incoming requests in this 30 seconds. We need to restart often because we are still tinkering with the site even though it already went live. In general, shorter startup times would be really nice anyhow. Some analysis of what is taking up most of this time has shown that tomcat is spending a lot of time (>40-50%) processing all the files in the web application looking for tld descriptors. In this particular web application there a few thousand small files (e.g. xml descriptors, jsps, some static stuff, lots of scripts, etc). Only a small subset is jar files (about 20) and only about ten of the files are actually tlds, all conveniently located in a subdirectory of WEB-INF. The whole thing is deployed as an unzipped directory rather than a war file so we can update stuff faster (copy some jar files, stop/start). Auto reload is not compatible with our web app so we don't have that enabled. This web log post: http://www.webweavertech.com/costin/archives/000164.html suggests that the reason for the poor performance may be a design flaw in the jsp spec which makes it necessary to do a lot of work. The ideal way would be for the tld descriptors to always be in the META-INF directory. However, the spec doesn't require this and tlds may be located anywhere in the webapplication. Is this analysis of the problem still correct for tomcat 5.0.28? On the other hand the web.xml does specify explicitly where the tlds are so I don't fully understand the need to look through the whole web application directory. Is there a way to optimize this problem away (even partially) by e.g. telling tomcat explicitly what tlds to process? - 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: starting Tomcat service
Thanks Kerem, But I want the script to run at boot time, in Windows. Rather than having to login and run the script manually. KEREM ERKAN <[EMAIL PROTECTED]> wrote: You may write a shell script which includes a java program to test oracle connectivity and if it can connect, it can be used to start Tomcat. If it fails, it may say "Oracle down, I am not starting Tomcat". Cheers, Kerem > -Original Message- > From: Tuan Quan [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 22, 2005 10:48 PM > To: tomcat-user@jakarta.apache.org > Subject: starting Tomcat service > > In windows, one of my webapp needs to connect to a database > in order to work correctly. > How can I check for oracle database ready before starting > Tomcat service? > Set 'DependOnService' parameter in registry to point to > Oracle db service, may work, but what if the database is on a > different PC? > > thanks > > > > - > Yahoo! for Good > Click here to donate to the Hurricane Katrina relief effort. > - Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort.
RE: db-connectin is working fine, but is it pooling?
I had a similar question while doing connection pooling with Oracle 8i of. OK, if I set my connection pool to 10, why do I only see a 1 connection in Oracle Well, the answer was that when you create a pool of 10, it only starts out with 1 connection, NOT 10 If the connection pool starts needing more than 1 connection, it will create and *keep* new connections. Oracle's connection pooling jar was smart enough to do it. I opened up 4 web browsers and hit my web based app like crazy and saw the acutal physical connections in Oracle jump up to like 5 and stayed at 5 connections. I assume it is the same in MySQL >-Original Message- >From: KEREM ERKAN [mailto:[EMAIL PROTECTED] >Sent: Friday, September 23, 2005 2:50 AM >To: 'Tomcat Users List' >Subject: RE: db-connectin is working fine, but is it pooling? > > >Write a test connection page and stress test it with a lot of virtual >clients. That way, you will have more than 1 connection opened >to ypur pool. > > >> -Original Message- >> From: Trond Hersløv [mailto:[EMAIL PROTECTED] >> Sent: Friday, September 23, 2005 3:24 AM >> To: Tomcat Users List >> Subject: RE: db-connectin is working fine, but is it pooling? >> >> Thanks, I'll do that, but still - how can I be sure that my >> pool have more than just this one connection. Writing two >> servlets with endless loops, avoiding checking the >> connections back would give me the answer I guess. >> But why is there only one connection established to my DB server?? >> >> Is there a way to configure the pool to pre generate eg. 10 >> connections? >> >> \trond >> >> >> -Original Message- >> From: Kyle [mailto:[EMAIL PROTECTED] >> Sent: 23. september 2005 02:14 >> To: Tomcat Users List >> Subject: Re: db-connectin is working fine, but is it pooling? >> >> Print out your Connection Object .toString() to stdout or on >> a page and you should see that it is a Pool(ed|able) >> Connection object. >> >> K >> >> Trond Hersløv wrote: >> >> >Everything works just fine, but I'm a little bit concerned >> that maybe I am generating a singel connection to the DB and >> not a pool of connections. >> >As I run netstat -a on the machine hosting the DB, I >> expected to find >> >a lot of connections to port 3306, which my MySQL server >> listens to, but there is only one single connection. Even >> when I press F5 for a long time to refresh my IE window like >> a 100 times or with more windows open at the same time there >> is just this one connection to be found. >> > >> > >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >** >> This email message has been swept by >> MIMEsweeper for the presence of computer viruses. >> >** >> >> >> - >> 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]
jsvc question
I am new to Tomcat, and this is basic question. I have jsvc setup to start Tomcat, and then run as user wwwadmin on port 80. When I execute, I get two processes running, a parent running as root, and the child as the wwwadmin user. Is this normal? I thought the root process was supposed to go away after setting up the listen connection on port 80. -Andrew Stueve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tld processing performance at startup
Hi Peter, Thanks for your wicked fast help I am unsure of what you mean byt setting up a META-INF/context.xml inside my app. Where/how do I create this? Should I be able to view images if I call them directly like here http://207.97.221.210:8080/jsp-examples/wirefusion/ScreenshotServer.jsp ? This is totally new to me so I appreciate your patience with a no0b! Cheers. Bradley -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: Friday, September 23, 2005 10:22 AM To: Tomcat Users List Subject: Re: tld processing performance at startup Setup a META-INF/context.xml inside your app And check Tim's tipps :-) regards Peter Tim Funk schrieb: > There is an option to disable TLD processing. This is nice if: > 1) You precompile > 2) Or don't use tld files > > > See > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html > for disabling them > > If you place listeners in your TLD files - I am unsure if they are > picked up if the TLD is explicitly listed in web.xml. If not - you can > place the listener explicitly in web.xml. > > > -Tim > > Jilles van Gurp wrote: > >> Hi, >> >> I have a large site running on tomcat with some tag libs. Restarting >> tomcat can take up to 30-40 seconds which is not that bad except that >> we'd prefer to minimize this time because apache can queue a lot of >> incoming requests in this 30 seconds. We need to restart often >> because we are still tinkering with the site even though it already >> went live. In general, shorter startup times would be really nice >> anyhow. >> >> Some analysis of what is taking up most of this time has shown that >> tomcat is spending a lot of time (>40-50%) processing all the files >> in the web application looking for tld descriptors. In this >> particular web application there a few thousand small files (e.g. xml >> descriptors, jsps, some static stuff, lots of scripts, etc). Only a >> small subset is jar files (about 20) and only about ten of the files >> are actually tlds, all conveniently located in a subdirectory of >> WEB-INF. The whole thing is deployed as an unzipped directory rather >> than a war file so we can update stuff faster (copy some jar files, >> stop/start). Auto reload is not compatible with our web app so we >> don't have that enabled. >> >> This web log post: >> http://www.webweavertech.com/costin/archives/000164.html suggests >> that the reason for the poor performance may be a design flaw in the >> jsp spec which makes it necessary to do a lot of work. The ideal way >> would be for the tld descriptors to always be in the META-INF >> directory. However, the spec doesn't require this and tlds may be >> located anywhere in the webapplication. Is this analysis of the >> problem still correct for tomcat 5.0.28? >> >> On the other hand the web.xml does specify explicitly where the tlds >> are so I don't fully understand the need to look through the whole >> web application directory. >> >> Is there a way to optimize this problem away (even partially) by e.g. >> telling tomcat explicitly what tlds to process? >> > > - > 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: Run Tomcat From Own Java Application
Maybe this can help (Embed with Tomcat) http://www.vsj.co.uk/articles/display.asp?id=319 On 9/23/05, NoKideen <[EMAIL PROTECTED]> wrote: > > It least I install JProbe Free Edition, > I see that JProbe can run Tomcat from JProbe it self, .. > > How we can build application to run Tomcat, not a Bash Script but A Java > Application ... > > example, we have provide CLASSPATH , and all things. > > thanks > > - > 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: tld processing performance at startup
Setup a META-INF/context.xml inside your app And check Tim's tipps :-) regards Peter Tim Funk schrieb: There is an option to disable TLD processing. This is nice if: 1) You precompile 2) Or don't use tld files See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html for disabling them If you place listeners in your TLD files - I am unsure if they are picked up if the TLD is explicitly listed in web.xml. If not - you can place the listener explicitly in web.xml. -Tim Jilles van Gurp wrote: Hi, I have a large site running on tomcat with some tag libs. Restarting tomcat can take up to 30-40 seconds which is not that bad except that we'd prefer to minimize this time because apache can queue a lot of incoming requests in this 30 seconds. We need to restart often because we are still tinkering with the site even though it already went live. In general, shorter startup times would be really nice anyhow. Some analysis of what is taking up most of this time has shown that tomcat is spending a lot of time (>40-50%) processing all the files in the web application looking for tld descriptors. In this particular web application there a few thousand small files (e.g. xml descriptors, jsps, some static stuff, lots of scripts, etc). Only a small subset is jar files (about 20) and only about ten of the files are actually tlds, all conveniently located in a subdirectory of WEB-INF. The whole thing is deployed as an unzipped directory rather than a war file so we can update stuff faster (copy some jar files, stop/start). Auto reload is not compatible with our web app so we don't have that enabled. This web log post: http://www.webweavertech.com/costin/archives/000164.html suggests that the reason for the poor performance may be a design flaw in the jsp spec which makes it necessary to do a lot of work. The ideal way would be for the tld descriptors to always be in the META-INF directory. However, the spec doesn't require this and tlds may be located anywhere in the webapplication. Is this analysis of the problem still correct for tomcat 5.0.28? On the other hand the web.xml does specify explicitly where the tlds are so I don't fully understand the need to look through the whole web application directory. Is there a way to optimize this problem away (even partially) by e.g. telling tomcat explicitly what tlds to process? - 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: tld processing performance at startup
There is an option to disable TLD processing. This is nice if: 1) You precompile 2) Or don't use tld files See http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html for disabling them If you place listeners in your TLD files - I am unsure if they are picked up if the TLD is explicitly listed in web.xml. If not - you can place the listener explicitly in web.xml. -Tim Jilles van Gurp wrote: Hi, I have a large site running on tomcat with some tag libs. Restarting tomcat can take up to 30-40 seconds which is not that bad except that we'd prefer to minimize this time because apache can queue a lot of incoming requests in this 30 seconds. We need to restart often because we are still tinkering with the site even though it already went live. In general, shorter startup times would be really nice anyhow. Some analysis of what is taking up most of this time has shown that tomcat is spending a lot of time (>40-50%) processing all the files in the web application looking for tld descriptors. In this particular web application there a few thousand small files (e.g. xml descriptors, jsps, some static stuff, lots of scripts, etc). Only a small subset is jar files (about 20) and only about ten of the files are actually tlds, all conveniently located in a subdirectory of WEB-INF. The whole thing is deployed as an unzipped directory rather than a war file so we can update stuff faster (copy some jar files, stop/start). Auto reload is not compatible with our web app so we don't have that enabled. This web log post: http://www.webweavertech.com/costin/archives/000164.html suggests that the reason for the poor performance may be a design flaw in the jsp spec which makes it necessary to do a lot of work. The ideal way would be for the tld descriptors to always be in the META-INF directory. However, the spec doesn't require this and tlds may be located anywhere in the webapplication. Is this analysis of the problem still correct for tomcat 5.0.28? On the other hand the web.xml does specify explicitly where the tlds are so I don't fully understand the need to look through the whole web application directory. Is there a way to optimize this problem away (even partially) by e.g. telling tomcat explicitly what tlds to process? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Out of Memory - Host appBase related
Hi Assaf Thanks for the mail. I used the site you sent me to Check the following - The ram on my system is > 128MB. - The out of memory problem is showing up way before system is running out of threshold. Is it possible the out of memory is coming because the system ran out of file descriptors. I vaguely remember some one at work noticing this problem on linix boxes running tomcat. Appreciate your thoughts on this matter. Thanks Kamala -Original Message- From: Assaf [mailto:[EMAIL PROTECTED] Sent: Friday, September 23, 2005 10:38 AM To: Tomcat Users List Subject: Re: Tomcat Out of Memory - Host appBase related Hi Kamala, Try http://jakarta.apache.org/tomcat/faq/memory.html Usually it is the -X settings you need to play with. Assaf --- "Vadlamudi, Kamala" <[EMAIL PROTECTED]> wrote: > When starting tomcat it is running Out of Memory. > > There were three Hosts in server.xml file pointing > to > > same appBase. If I remove one of the Hosts or if I > change appBase > > the problem is disappearing. Do you know why? Your > explanation will > > be greatly appreciated. > > > > Thanks > > Kamala > > > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tld processing performance at startup
Hi, I have a large site running on tomcat with some tag libs. Restarting tomcat can take up to 30-40 seconds which is not that bad except that we'd prefer to minimize this time because apache can queue a lot of incoming requests in this 30 seconds. We need to restart often because we are still tinkering with the site even though it already went live. In general, shorter startup times would be really nice anyhow. Some analysis of what is taking up most of this time has shown that tomcat is spending a lot of time (>40-50%) processing all the files in the web application looking for tld descriptors. In this particular web application there a few thousand small files (e.g. xml descriptors, jsps, some static stuff, lots of scripts, etc). Only a small subset is jar files (about 20) and only about ten of the files are actually tlds, all conveniently located in a subdirectory of WEB-INF. The whole thing is deployed as an unzipped directory rather than a war file so we can update stuff faster (copy some jar files, stop/start). Auto reload is not compatible with our web app so we don't have that enabled. This web log post: http://www.webweavertech.com/costin/archives/000164.html suggests that the reason for the poor performance may be a design flaw in the jsp spec which makes it necessary to do a lot of work. The ideal way would be for the tld descriptors to always be in the META-INF directory. However, the spec doesn't require this and tlds may be located anywhere in the webapplication. Is this analysis of the problem still correct for tomcat 5.0.28? On the other hand the web.xml does specify explicitly where the tlds are so I don't fully understand the need to look through the whole web application directory. Is there a way to optimize this problem away (even partially) by e.g. telling tomcat explicitly what tlds to process? Regards, Jilles van Gurp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Out of Memory - Host appBase related
Hi Kamala, Try http://jakarta.apache.org/tomcat/faq/memory.html Usually it is the -X settings you need to play with. Assaf --- "Vadlamudi, Kamala" <[EMAIL PROTECTED]> wrote: > When starting tomcat it is running Out of Memory. > > There were three Hosts in server.xml file pointing > to > > same appBase. If I remove one of the Hosts or if I > change appBase > > the problem is disappearing. Do you know why? Your > explanation will > > be greatly appreciated. > > > > Thanks > > Kamala > > > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Out of Memory - Host appBase related
When starting tomcat it is running Out of Memory. There were three Hosts in server.xml file pointing to same appBase. If I remove one of the Hosts or if I change appBase the problem is disappearing. Do you know why? Your explanation will be greatly appreciated. Thanks Kamala
Tomcat working directory
Hi, How do I set tomcat-5's working directory to something other than C:\Windows\System32 when it is run as windows (XP) service . Even if I set CATALINA_HOME to point to the tomcat installation directory it doesn't take it. Everything works great if I run tomcat from the command line using tomcat's startup.bat file. Any help would be appreciated. ~Samit Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HOW DOES TOMCAT JNDI CONNECTION POOLING WORKS
1. Does tomcat really look into the pool? Yes. The pool code is really the commons DBCP project code refactored slightly to avoid collisions with the real DBCP project code. 2. on conn.close(), are we really pushing the connection back into the pool? Yes. Sorry I can't help you on the Eclipse debugger question since I don't use it. It may be an artifact of the debugger or maybe DBCP's code. You might find the DBCP project documentation helpful in answering these questions though. --David rahul wrote: >Hi all, >My questing is derived from the sample code given >at : >http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how >to.html#Database%20Connection%20Pool%20(DBCP)%20Configurations > > >If you can see the subsection 4(i.e. testcode) of section "MySQL DBCP >Example", >to get a connection following code is used: >*** >Context ctx = new InitialContext(); >if(ctx == null ) >throw new Exception("Boom - No Context"); >DataSource ds = >(DataSource)ctx.lookup( >"java:comp/env/jdbc/TestDB"); >if (ds != null) { >Connection conn = ds.getConnection(); >*** > >I guess by doing this a connection is obtained FROM THE POOL providing that >a connection is free in the pool. > >I have got two questions regarding this- > >Q 1. Does tomcat really looks into the pool to get me a connection? or it >just creates >a newone? I am asking this question because I am seeing(using eclipse >debugger) >two connection opened at the same time even after defining >maxActive="1" maxIdle="1" in my application'c context > > >Q 2. once your database operation is done you free the connection using > >conn.close(); > >by doing this are we pushing the connection back into pool? if not then how >is >pool maintained? > > >Any help is appreciated > >--RahulJoshi > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > -- === David Smith Network Operations Supervisor Department of Entomology College of Agriculture & Life Sciences Cornell University 2132 Comstock Hall Ithaca, NY 14853 Phone: 607.255.9571 Fax: 607.255.0939 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Run Tomcat From Own Java Application
It least I install JProbe Free Edition, I see that JProbe can run Tomcat from JProbe it self, .. How we can build application to run Tomcat, not a Bash Script but A Java Application ... example, we have provide CLASSPATH , and all things. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to start Tomcat with JDK 1.4 compatibility pack on JDK 5. 0?
You could try what you suggested before and send your comments about it to us ;-) Or you could do this: Write a shell script that changes the names of compatibility jars to something with an extension different from *.jar Then you could start Tomcat from the same script and rename the jar files back to their original names. That will absolutely work :-) Cheers, Kerem > -Original Message- > From: Stagger Lee [mailto:[EMAIL PROTECTED] > Sent: Friday, September 23, 2005 1:28 PM > To: Tomcat Users List > Subject: Re: How to start Tomcat with JDK 1.4 compatibility > pack on JDK 5.0? > > Come on guys, don't tell me no one had to solve this yet. Anyone? > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > smime.p7s Description: S/MIME cryptographic signature
HOW DOES TOMCAT JNDI CONNECTION POOLING WORKS
Hi all, My questing is derived from the sample code given at : http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how to.html#Database%20Connection%20Pool%20(DBCP)%20Configurations If you can see the subsection 4(i.e. testcode) of section "MySQL DBCP Example", to get a connection following code is used: *** Context ctx = new InitialContext(); if(ctx == null ) throw new Exception("Boom - No Context"); DataSource ds = (DataSource)ctx.lookup( "java:comp/env/jdbc/TestDB"); if (ds != null) { Connection conn = ds.getConnection(); *** I guess by doing this a connection is obtained FROM THE POOL providing that a connection is free in the pool. I have got two questions regarding this- Q 1. Does tomcat really looks into the pool to get me a connection? or it just creates a newone? I am asking this question because I am seeing(using eclipse debugger) two connection opened at the same time even after defining maxActive="1" maxIdle="1" in my application'c context Q 2. once your database operation is done you free the connection using conn.close(); by doing this are we pushing the connection back into pool? if not then how is pool maintained? Any help is appreciated --RahulJoshi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to start Tomcat with JDK 1.4 compatibility pack on JDK 5.0?
Come on guys, don't tell me no one had to solve this yet. Anyone? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat exception handling
thanks for the reply. I tried that but it does not seem to make any difference. what version of tomcat are you using? James - Original Message - From: "Jilles van Gurp" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Thursday, September 22, 2005 5:33 PM Subject: Re: tomcat exception handling > swallowoutput=true in your context should help > > Jilles > > James Cowan wrote: > > Hi > > > > How do I suppress the stack trace from exception handling globally (i.e. not > > using an errorPage directive)? > > > > I have tried setting the Verbosity of the Logger elements in the server.xml > > (for Tomcat 5.0.28) to 0 but this does not seem to stop stack trace. > > > > A simple jsp like this: > > > > <% > > if (true) > > throw new Exception("Some exception"); > > %> > > > > produces this output: > > exception > > > > javax.servlet.ServletException: Some exception > > > > org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI > > mpl.java:825) > > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp > > l.java:758) > > org.apache.jsp.e_jsp._jspService(e_jsp.java:53) > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 > > 24) > > 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:802) > > > > I just want the HTTP 500 error displayed and no more information. > > > > James Cowan > > > > > > - > > 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]
AW: AW: Removing session id from url links
Well, what you basically want to do is disable URL Rewriting. What I saw so far it's not explicitly possible via the spec, but what you can do is just not encoding the URL. So I don't know struts, but can you not just use plain link? An alternative would be to dig in the code of and search for the URL Encoding there and remove this. There must be something like "encodeURL" in the source code, which causes the session id to be appended. Bernhard > -Ursprüngliche Nachricht- > Von: Assaf [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 22. September 2005 18:49 > An: Tomcat Users List > Betreff: Re: AW: Removing session id from url links > > > Thanks Bernard, > > My problem is to do with Search Engine bots. They seem > to be getting jsessionid when they crawl and do not > remove them. This causes them to index pages INCLUDING > the session id and therefore it appears on the search > engine listing. Any way to remove that? > > Assaf > > --- Bernhard Slominski > <[EMAIL PROTECTED]> wrote: > > > The session ids in the URL (URL Rewriting) are only > > used when cookies are > > switched off as a fallback, so when cookies are > > switched on on your machine > > you shouldn't see the session Id in the URL. > > > > When you don't need a seesion on your page you can > > use this page directive > > to switch off the session, so you won't have > > anything in the URL: > > <%@ page session="false" %> > > > > Cheers > > > > Bernhard > > > > > -Ursprüngliche Nachricht- > > > Von: Assaf [mailto:[EMAIL PROTECTED] > > > Gesendet: Donnerstag, 22. September 2005 13:40 > > > An: Tomcat Users List > > > Betreff: Removing session id from url links > > > > > > > > > Hi, > > > > > > I have a problem with tomcat displaying urls on my > > > site that include the jsessionid attached at the > > end. > > > This is particularly a problem with search engine > > who > > > crawl the site and index the page including the > > > session id. > > > > > > Is there a way to disable it? > > > > > > I am also using struts so that might > > be > > > the place to disable. > > > > > > Cheers, > > > > > > Assaf > > > > > > __ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > > http://mail.yahoo.com > > > > > > > > > - > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > - > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > __ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat JVM using 99.9% cpu
Very interesting links, thanx a lot :) Jost Richstein schrieb: For more information see: http://fishbowl.pastiche.org/2005/04/27/the_string_memory_gotcha http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6294060 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4513622 Ingo Rockel wrote: Hi Jost, do you have any bug numbers concerning the OOM-issue with String.trim() and substring at hand? cheers, Ingo Jost Richstein schrieb: Most likely the garbage collector causes your CPU load. At some point there is not enough memory and the collector tries to free some of it and tries and tries and tries. Usually your server runs fine even with this CPU load, it even sends quick responses (the collector has a low priority), but it results sooner or later in an "out of memory" exception. We had the same problem and the solution was not so obvious (for me at least). The memory leak we experienced was a String.substring() and String.trim() problem. These methodes do not create new Strings instead they point into the underlying char-array of the original String. The consequence is that the original string can not be freed until all substrings and trims are freed. If you are using caches, static strings - check this. And, by the way: all is fine if you are using new String(str.substring()). It is well documented in the bug parade. Azariah Jeyakumar wrote: Hi, Has anyone seen Tomcat JVM using 99.9% cpu when there is no HTTP load at all? The JSP pages are accessible fine without any loss in functionality, but the machine is sluggish (expectedly, as the JVM is using all the CPU). If tomcat is restarted, the problem goes away and the CPU usage returns to normal. I have not been able to reproduce the problem at will. It has been noticed only twice or so in the past week, out of hundreds of attempts. I have seen other posts asking to tweak the settings like socket_* in workers.properties files. But since I have not been able to reproduce the problem at will, I am hesitant to change the parameters, not knowing which change will fix the problem. Thanks for any input or pointers on: - the nature of the problem that causes this 99.9% CPU usage - how to reproduce the problem - what parameters should be set in workers.properties file or elsewhere to avoid this problem in the future. I am using Tomcat 5.0.28, Apache 2.x, jk2, Sun JRE 1.4.2_08 on Suse Linux Enterprise Server (SLES 9 SP2). Thanks Azariah - 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] -- PIRONET NDH AG Dipl. Inf. Ingo Rockel - Produktentwicklung Maarweg 149-161, 50825 Koeln Tel.: +49 (0)221-770-1788 / Fax: +49 (0)221-770-1005 mailto:[EMAIL PROTECTED] - http://www.pironet-ndh.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat JVM using 99.9% cpu
For more information see: http://fishbowl.pastiche.org/2005/04/27/the_string_memory_gotcha http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6294060 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4513622 Ingo Rockel wrote: Hi Jost, do you have any bug numbers concerning the OOM-issue with String.trim() and substring at hand? cheers, Ingo Jost Richstein schrieb: Most likely the garbage collector causes your CPU load. At some point there is not enough memory and the collector tries to free some of it and tries and tries and tries. Usually your server runs fine even with this CPU load, it even sends quick responses (the collector has a low priority), but it results sooner or later in an "out of memory" exception. We had the same problem and the solution was not so obvious (for me at least). The memory leak we experienced was a String.substring() and String.trim() problem. These methodes do not create new Strings instead they point into the underlying char-array of the original String. The consequence is that the original string can not be freed until all substrings and trims are freed. If you are using caches, static strings - check this. And, by the way: all is fine if you are using new String(str.substring()). It is well documented in the bug parade. Azariah Jeyakumar wrote: Hi, Has anyone seen Tomcat JVM using 99.9% cpu when there is no HTTP load at all? The JSP pages are accessible fine without any loss in functionality, but the machine is sluggish (expectedly, as the JVM is using all the CPU). If tomcat is restarted, the problem goes away and the CPU usage returns to normal. I have not been able to reproduce the problem at will. It has been noticed only twice or so in the past week, out of hundreds of attempts. I have seen other posts asking to tweak the settings like socket_* in workers.properties files. But since I have not been able to reproduce the problem at will, I am hesitant to change the parameters, not knowing which change will fix the problem. Thanks for any input or pointers on: - the nature of the problem that causes this 99.9% CPU usage - how to reproduce the problem - what parameters should be set in workers.properties file or elsewhere to avoid this problem in the future. I am using Tomcat 5.0.28, Apache 2.x, jk2, Sun JRE 1.4.2_08 on Suse Linux Enterprise Server (SLES 9 SP2). Thanks Azariah - 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 JVM using 99.9% cpu
Hi Jost, do you have any bug numbers concerning the OOM-issue with String.trim() and substring at hand? cheers, Ingo Jost Richstein schrieb: Most likely the garbage collector causes your CPU load. At some point there is not enough memory and the collector tries to free some of it and tries and tries and tries. Usually your server runs fine even with this CPU load, it even sends quick responses (the collector has a low priority), but it results sooner or later in an "out of memory" exception. We had the same problem and the solution was not so obvious (for me at least). The memory leak we experienced was a String.substring() and String.trim() problem. These methodes do not create new Strings instead they point into the underlying char-array of the original String. The consequence is that the original string can not be freed until all substrings and trims are freed. If you are using caches, static strings - check this. And, by the way: all is fine if you are using new String(str.substring()). It is well documented in the bug parade. Azariah Jeyakumar wrote: Hi, Has anyone seen Tomcat JVM using 99.9% cpu when there is no HTTP load at all? The JSP pages are accessible fine without any loss in functionality, but the machine is sluggish (expectedly, as the JVM is using all the CPU). If tomcat is restarted, the problem goes away and the CPU usage returns to normal. I have not been able to reproduce the problem at will. It has been noticed only twice or so in the past week, out of hundreds of attempts. I have seen other posts asking to tweak the settings like socket_* in workers.properties files. But since I have not been able to reproduce the problem at will, I am hesitant to change the parameters, not knowing which change will fix the problem. Thanks for any input or pointers on: - the nature of the problem that causes this 99.9% CPU usage - how to reproduce the problem - what parameters should be set in workers.properties file or elsewhere to avoid this problem in the future. I am using Tomcat 5.0.28, Apache 2.x, jk2, Sun JRE 1.4.2_08 on Suse Linux Enterprise Server (SLES 9 SP2). Thanks Azariah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- PIRONET NDH AG Dipl. Inf. Ingo Rockel - Produktentwicklung Maarweg 149-161, 50825 Koeln Tel.: +49 (0)221-770-1788 / Fax: +49 (0)221-770-1005 mailto:[EMAIL PROTECTED] - http://www.pironet-ndh.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat JVM using 99.9% cpu
Most likely the garbage collector causes your CPU load. At some point there is not enough memory and the collector tries to free some of it and tries and tries and tries. Usually your server runs fine even with this CPU load, it even sends quick responses (the collector has a low priority), but it results sooner or later in an "out of memory" exception. We had the same problem and the solution was not so obvious (for me at least). The memory leak we experienced was a String.substring() and String.trim() problem. These methodes do not create new Strings instead they point into the underlying char-array of the original String. The consequence is that the original string can not be freed until all substrings and trims are freed. If you are using caches, static strings - check this. And, by the way: all is fine if you are using new String(str.substring()). It is well documented in the bug parade. Azariah Jeyakumar wrote: Hi, Has anyone seen Tomcat JVM using 99.9% cpu when there is no HTTP load at all? The JSP pages are accessible fine without any loss in functionality, but the machine is sluggish (expectedly, as the JVM is using all the CPU). If tomcat is restarted, the problem goes away and the CPU usage returns to normal. I have not been able to reproduce the problem at will. It has been noticed only twice or so in the past week, out of hundreds of attempts. I have seen other posts asking to tweak the settings like socket_* in workers.properties files. But since I have not been able to reproduce the problem at will, I am hesitant to change the parameters, not knowing which change will fix the problem. Thanks for any input or pointers on: - the nature of the problem that causes this 99.9% CPU usage - how to reproduce the problem - what parameters should be set in workers.properties file or elsewhere to avoid this problem in the future. I am using Tomcat 5.0.28, Apache 2.x, jk2, Sun JRE 1.4.2_08 on Suse Linux Enterprise Server (SLES 9 SP2). Thanks Azariah - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]