Re: very slow class loading on initial JSP/servlet request after restart
Sam Hokin wrote: Mark Thomas wrote: Sam Hokin wrote: Thanks, Chris. I ran e2fsck with the -c option, which runs badblocks, when I tested it earlier. And I just ran badblocks again - 0 bad blocks found. I wish I could fix this by simply as swapping out a bad disk (notwithstanding Andre's desire for intellectual pursuits), but I really think it's software, either in some service mucking up the JVM or the JVM itself. But it only manifests itself under Tomcat, and then only when this particular package is imported. Do you see the same issue if you pre-compile that JSP? Surprisingly, yes. So it's not only a compilation issue. Ok. To summarise when you include net.ims.jcms.* in your imports the page compiles quickly but takes ages to respond to the first request. I wonder if this is related to loading a specific class in your library. Can you use a test JSP try and isolate which class(es) are causing the slow down? My thinking is if we can reduce the scope of the problem to importing a single class, we can then separate out that class and reduce the code in it bit by bit until we have the bare minimum that causes the problem. Hopefully, there will be little enough code left that it will be obvious. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very slow class loading on initial JSP/servlet request after restart
Thanks, Juha. Actually Pieter suggested it a little while ago, and I've been trying to get some information out of strace. The best I can do is to put strace in front of the java command that's inside catalina.sh. That's the command that shows with ps -ef when Tomcat is running. BUT, I get nothing out of strace when I make page requests on a site, it just shows output during Tomcat startup. So, I've not figured out how to get strace to say what the JVM is during the delay. Try this strace command: strace -f -etrace=\!futex,gettimeofday,clock_gettime -p PID_OF_TOMCAT_JAVA where PID_OF_TOMCAT_JAVA is the PID of your Tomcat, duh! :) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Using SSL tomcat
Hello Apache tomcat team, I've a tomcat 5.5 and jdk1.5.0_16 install on a windows 2003. (NB: jdk is install on D: and a jre on C:, but the JAVA_HOME is define to d:) I've build a auto-sign jks certificate. (following the http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html) I've setup in server.xml file a listen port to 80 and define a redirectPort to 443. I've also activate and setup ssl section, and adding keystoreFile=D:\myfolder\mycert.keystore keystorePass=x and changing 443 port. I've also change the redirectPort in ajp section. When i try to connect on http://localhost/mywebapp, all works fine. But when i try to connect on https://localhost/mywebapp/ i got an unable to connect error after a will. In looking in tomcat\logs I haven't any error, even if i change password, or delete mycert.keystore and restart tomcat. The only error, i have is : WARNING: A docBase D:\tomcat\webapps\mywebapp inside the host appBase has been specified Kings Regards, Hevoila. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
On 25.02.2009 02:47, Mohit Anchlia wrote: In httpd conf I just see JkMount and no other directive. I searched for Jk. There should be others as well, for instance JkWorkersFile to point to your workers.properties. The names of the directives are case insensitive, they can also be in files included to your main httpd configuration file via include directives. Here is workers.properties file: ... # appfe1 ... worker.appfe1.socket_timeout=5 I generally don't like socket_timeout. Others do :) worker.appfe1.prepost_timeout=5 5 milliseconds prepost timeout? You're kidding. I assume it should have been 5000. worker.appfe1.recycle_timeout=900 This is deprecated. Use connection_pool_timeout instead. The value is OK, you should set connectionTimeout on the Tomcat AJP connector to 90 then. Since you are using prefork MPM, you might want to set connection_pool_minsize to 0 if you want to keep the number of established connections low. And the same for the other members of the load balancer. On Tue, Feb 24, 2009 at 4:50 PM, Rainer Jungrainer.j...@kippdata.de wrote: On 25.02.2009 00:00, Mohit Anchlia wrote: Reposting: Apache Server - 2.2 Tomcat server 6 Jboss - 4.2 We have Web Servers talking to Jboss App Servers over mod_jk. When we do our patch or upgrade of software we do it in rolling fashion so that there is 0 customer impact. But it looks like mod_jk load balancer on Web server doesn't detect it as soon as Jboss App Server goes down. Our goal is to have 0 customer impact. So my question is what can we do to overcome this problem. Web Server sees Http Error Code 503. Information from log file: [Mon Feb 23 13:39:42.146 2009] [31682:4143745888] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (appfe4) can't receive the response message from tomcat, network problems or tomcat (10.10.81.89:8009) is down (errno=104) [Mon Feb 23 13:39:42.147 2009] [31682:4143745888] [error] ajp_service::jk_ajp_common.c (2097): (appfe4) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port This means that mod_jk detected that your backend is down and thus puts it into an error state. All following requests will no longer be sent to this backend. Once a minute it will send a request there and try, but as long as it is down this test will not succeed and thus all requests will be sent to other nodes. The first request that gets sent to the backend you stopped might get an error back. If you want to prevent that from happening, use Cping/Cpong: http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html so we will detect the broken node before actually sending a request there. More details are not possible to give without your JK configuration (Jk directive sin httpd configuration files, workers.properties and if used uriworkermap.properties). The line number of the above message tells me you are using mod_jk 1.2.25. Although there's nothing wrong in principal with 1.2.25, we always try to improve and you might consider switching to 1.2.27. You should also increase your JkLogLevel to info. As long as only occasional info messages are in your log file everything is fine, but once error messages show up, the additional info messages contain useful formation. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk
On 25.02.2009 03:12, ilndinesh wrote: But if you have only one Tomcat to send requests to, then all this tells you is that this Tomcat is not responding. So now what do you do ? In this case, I want apache to treat the request as DECLINED by mod_jk, so that if we put some static content in apache at this place, it will be served at least until tomcat is ready again. Which means, if we can test tomcat's availability before sending it the actual request, we can DECLINE the request if necessary, and thereby apache will serve it if it can. Can you please file an enhancement request in Bugzilla, so that we don't forget about this. We could make that behaviour configurable. By default we would da lb failover or return an error page if no worker is left or no lb is involved, but optionally we could return DECLINE in all such cases or at least when no failover worker is left. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat webapp FORM authentication problem
Thanks. I thought it should be something stupid and obvious... Here we are. Embrassing, but I guess I deserved that. Everything works now, I after I put the resources outside the protected area. And from now on, I will treat my browser with more respect, and I will give back its cache and cookies. Thanks again, Alex On Feb 24, 2009, at 10:13 PM, Caldarale, Charles R wrote: From: Alexander Soudackov [mailto:so...@chem.psu.edu] Subject: tomcat webapp FORM authentication problem I have a very annoying problem with a secured folder in my tomcat web application. You could start the problem description by telling us the version of Tomcat you're using. It's likely not pertinent for this particular issue, but it's annoying to hide such information. The problem #1 is: login.html displays a form BUT there is NO images, NO CSS formatting, and Javascript! Think about it: you've declared the resources noted as being protected, authentication has not occurred, yet somehow you're expecting Tomcat to magically ignore the protection settings when the browser requests these resources? You can't have it both ways - you need to place the resources the form needs outside of the protected area. The problem #2 is: after successful authentication the browser shows the SOURCE of the first javascript referenced in index.html, instead of index.html Try fixing the first problem and see if the second one disappears. The problems reoccur after cleaning the cash and cookies of the browser. You robbed your browser? Or did you clean out its cache? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org == Alexander Soudackov Research Assistant Professor Department of Chemistry Pennsylvania State University 104 Chemistry Bldg University Park, PA 16802 -- Phone: (814) 865-1354 Fax:(814) 863-5319 E-mail: so...@chem.psu.edu http://www.personal.psu.edu/avs10 == - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
TWO Axis web services listening on different ports
Hi all. All my web services are currently available on standard tomcat port: 8080 I need to expose one of those web services to another company and I would like to use, for example, 8085 port. Is it possible ? How ? There is no problem to stop Tomcat instance for all web services (8080 and 8085). I mean if I need to restart Tomcat there's no SLA for web service on 8085 port. Talking about multiple Tomcat Instances I've read http://tomcat.apache.org/tomcat-5.5-doc/RUNNING.txt . Is it the only solution I could apply ? Is there any xml tag to let one Tomcat instance listen to multiple port ? Thanks -- View this message in context: http://www.nabble.com/TWO-Axis-web-services-listening-on-different-ports-tp22201284p22201284.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat error messages sent to client browsesr
Tomcat out of the box doesn't provide a way to suppress the stack traces for those errors. Like your post said, you need to use web.xml to configure your error pages. -Tim Edao, Aliye wrote: Dear all, I am trying to find out if there is an alternative way of telling Tomcat not to send information to the client browser in a case of an error (Stack trace, Root Cause ...) in the application rather than by defining an error-page in web.xml. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very slow class loading on initial JSP/servlet request after restart
While I am late to this ... Is this an accurate summary? - Slow re-load on a server - Server is a production server - Other servers are OK so it can only be reproduced on production server - Initial looks at network seem to be no network activity - There seems to be a hint at File.exists() causing an issue - The wisdom of the crowds is pointing to disk issue Would it be possible to copy the tomcat installation and webapp to another disk (or new directory) on the same machine and then run the copy on an alternate port? If it fails like it does on the lower port - you have a better sandbox for debugging. If not ... you have a new interesting data point in the debug process. Last oddball question - even though this is a Linux server, is there any virus scanning software running? -Tim Mark Thomas wrote: Sam Hokin wrote: Mark Thomas wrote: Sam Hokin wrote: Thanks, Chris. I ran e2fsck with the -c option, which runs badblocks, when I tested it earlier. And I just ran badblocks again - 0 bad blocks found. I wish I could fix this by simply as swapping out a bad disk (notwithstanding Andre's desire for intellectual pursuits), but I really think it's software, either in some service mucking up the JVM or the JVM itself. But it only manifests itself under Tomcat, and then only when this particular package is imported. Do you see the same issue if you pre-compile that JSP? Surprisingly, yes. So it's not only a compilation issue. Ok. To summarise when you include net.ims.jcms.* in your imports the page compiles quickly but takes ages to respond to the first request. I wonder if this is related to loading a specific class in your library. Can you use a test JSP try and isolate which class(es) are causing the slow down? My thinking is if we can reduce the scope of the problem to importing a single class, we can then separate out that class and reduce the code in it bit by bit until we have the bare minimum that causes the problem. Hopefully, there will be little enough code left that it will be obvious. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TWO Axis web services listening on different ports
From: marcopb [mailto:marc...@interfree.it] Subject: TWO Axis web services listening on different ports Is there any xml tag to let one Tomcat instance listen to multiple port ? Just configure an additional Connector for the desired port: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Using SSL tomcat
From: hevo...@free.fr [mailto:hevo...@free.fr] Subject: Using SSL tomcat I've setup in server.xml file a listen port to 80 and define a redirectPort to 443. I've also activate and setup ssl section, and adding keystoreFile=D:\myfolder\mycert.keystore keystorePass=x and changing 443 port. Post your actual server.xml file, rather than describing what you think you changed. I've also change the redirectPort in ajp section. If you're not using AJP, you should comment out the Connector, not modify it. The only error, i have is : WARNING: A docBase D:\tomcat\webapps\mywebapp inside the host appBase has been specified You should fix that; remove the docBase attribute from the offending Context element. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
how
what should I do to not use port number when writting the address of a page on the Apache server? -- View this message in context: http://www.nabble.com/how-tp22203518p22203518.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: not using the port number in the address???
nicumarius wrote: what should I do to not use port number when writting the address of a page on the Apache server? Make your web server listen to port #80. It's the default HTTP port. -- Chef de projet chez Vectoris http://www.google.com/search?q=mihamina+rakotomandimby System: xUbuntu 8.10 with almost all from package install - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: not using the port number in the address???
Bind your server to port 80. nicumarius wrote: what should I do to not use port number when writting the address of a page on the Apache server? --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat restart remotely
Hi We have Tomcat 6.0 installed on Windows 2003 Server and we want to restart apache tomcat service remotely but in a secure way... some ideas? In the same server we have IIS + .NET installed... Thanks a lot Laura - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: how
From: nicumarius [mailto:nicumar...@yahoo.com] Subject: how what should I do to not use port number when writting the address of a page on the Apache server? http://www.catb.org/~esr/faqs/smart-questions.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat restart remotely
From: Laura Bartolomé [mailto:la...@secways.com] Subject: tomcat restart remotely We have Tomcat 6.0 installed on Windows 2003 Server and we want to restart apache tomcat service remotely but in a secure way... Logging in via Remote Desktop Connection is probably the simplest; are you looking for something more sophisticated? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat restart remotely
ssh is the most common way to manage a remote server. But under windows :aie: ;) Laura Bartolomé a écrit : Hi We have Tomcat 6.0 installed on Windows 2003 Server and we want to restart apache tomcat service remotely but in a secure way... some ideas? In the same server we have IIS + .NET installed... Thanks a lot Laura - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: not using the port number in the address???
David Smith-2 wrote: Bind your server to port 80. nicumarius wrote: what should I do to not use port number when writting the address of a page on the Apache server? --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org I have others applications on port 80 and 8080 -- View this message in context: http://www.nabble.com/not-using-the-port-number-in-the-addresstp22203518p22203921.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: not using the port number in the address???
David Smith-2 wrote: Bind your server to port 80. nicumarius wrote: what should I do to not use port number when writting the address of a page on the Apache server? --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org I have others applications on port 80 and 8080 .I've choosed to use 8081 -- View this message in context: http://www.nabble.com/not-using-the-port-number-in-the-addresstp22203518p22203923.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat restart remotely
Yes, I don't want to give acces via RDP with these permissions... Caldarale, Charles R escribió: From: Laura Bartolomé [mailto:la...@secways.com] Subject: tomcat restart remotely We have Tomcat 6.0 installed on Windows 2003 Server and we want to restart apache tomcat service remotely but in a secure way... Logging in via Remote Desktop Connection is probably the simplest; are you looking for something more sophisticated? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat restart remotely
www.freesshd.com I could recommend as an SSH server for Windows. I used it a few times, it's OK. Then you can use net start and stop to do it. Morc. On 25/02/2009 15:30, Piller Sébastien wrote: ssh is the most common way to manage a remote server. But under windows :aie: ;) Laura Bartolomé a écrit : Hi We have Tomcat 6.0 installed on Windows 2003 Server and we want to restart apache tomcat service remotely but in a secure way... some ideas? In the same server we have IIS + .NET installed... Thanks a lot Laura - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat restart remotely
well, under windows I can have ssh with cygwin without problems but I don't know if I'll be able to restart the service in this way Piller Sébastien escribió: ssh is the most common way to manage a remote server. But under windows :aie: ;) Laura Bartolomé a écrit : Hi We have Tomcat 6.0 installed on Windows 2003 Server and we want to restart apache tomcat service remotely but in a secure way... some ideas? In the same server we have IIS + .NET installed... Thanks a lot Laura - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat restart remotely
Where will be the problem? If you can run the startup.bat and shutdown.bat, then you won't have any problem. I do it from a looong time (under linux) and never had a problem. Laura Bartolomé a écrit : well, under windows I can have ssh with cygwin without problems but I don't know if I'll be able to restart the service in this way Piller Sébastien escribió: ssh is the most common way to manage a remote server. But under windows :aie: ;) Laura Bartolomé a écrit : Hi We have Tomcat 6.0 installed on Windows 2003 Server and we want to restart apache tomcat service remotely but in a secure way... some ideas? In the same server we have IIS + .NET installed... Thanks a lot Laura - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat restart remotely
My problem was I haven't thought before! :) I'm going to test it right now Thanks a lot! Piller Sébastien escribió: Where will be the problem? If you can run the startup.bat and shutdown.bat, then you won't have any problem. I do it from a looong time (under linux) and never had a problem. Laura Bartolomé a écrit : well, under windows I can have ssh with cygwin without problems but I don't know if I'll be able to restart the service in this way Piller Sébastien escribió: ssh is the most common way to manage a remote server. But under windows :aie: ;) Laura Bartolomé a écrit : Hi We have Tomcat 6.0 installed on Windows 2003 Server and we want to restart apache tomcat service remotely but in a secure way... some ideas? In the same server we have IIS + .NET installed... Thanks a lot Laura - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat restart remotely
From: Laura Bartolomé [mailto:la...@secways.com] Subject: Re: tomcat restart remotely My problem was I haven't thought before! :) I'm going to test it right now I fail to see any difference between using Remote Desktop vs SSH in this situation; whatever account you log in with will require sufficient privilege to start and stop a service (note that startup.bat and shutdown.bat do not interact with the Tomcat service). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: not using the port number in the address???
nicumarius wrote: David Smith-2 wrote: Bind your server to port 80. nicumarius wrote: what should I do to not use port number when writting the address of a page on the Apache server? --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org I have others applications on port 80 and 8080 Well.. as they say on Mythbusters, There's your problem. As I see it, you have two choices: 1. Proxy your app through one of the existing apps that is bound to port 80 using either standard reverse proxy or mod_jk (assuming the app on 80 is Httpd or IIS). 2. Reconfigure the existing apps to bind to a specific IP and port, leaving one combination of IP and port 80 available for this one. Since you haven't let us know anything about your server setup, we can only suggest very general things. Port 80 is the well known port for HTTP protocol and the one your browser assumes when you don't type it in the address bar. There's no way I know of to make it behave differently. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: not using the port number in the address???
David Smith wrote: Since you haven't let us know anything about your server setup, we can only suggest very general things. Port 80 is the well known port for HTTP protocol and the one your browser assumes when you don't type it in the address bar. By the way, someone playing with Tomcat should know that... that's the basis. Dont misunderstand me, I dont say he's dumb: I just wonder how could someone be in that situation (messing with web server setup and not knowing such basical theory). -- Chef de projet chez Vectoris http://www.google.com/search?q=mihamina+rakotomandimby System: xUbuntu 8.10 with almost all from package install - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: not using the port number in the address???
Sometimes people people without any swimming lessons get thrown into the deep end of the pool. Given the economy and layoffs, we'll probably see it more often. Mihamina Rakotomandimby (R12y) wrote: David Smith wrote: Since you haven't let us know anything about your server setup, we can only suggest very general things. Port 80 is the well known port for HTTP protocol and the one your browser assumes when you don't type it in the address bar. By the way, someone playing with Tomcat should know that... that's the basis. Dont misunderstand me, I dont say he's dumb: I just wonder how could someone be in that situation (messing with web server setup and not knowing such basical theory). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat restart remotely
install ssh on your server with ssh2admin.exe https://www.ssh.com/support/documentation/online/ssh/winadminguide/40/Windows_Server_Graphical_Configuration_Utility.html#indexdef-91 HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Wed, 25 Feb 2009 15:38:01 +0100 From: la...@secways.com To: users@tomcat.apache.org Subject: Re: tomcat restart remotely My problem was I haven't thought before! :) I'm going to test it right now Thanks a lot! Piller Sébastien escribió: Where will be the problem? If you can run the startup.bat and shutdown.bat, then you won't have any problem. I do it from a looong time (under linux) and never had a problem. Laura Bartolomé a écrit : well, under windows I can have ssh with cygwin without problems but I don't know if I'll be able to restart the service in this way Piller Sébastien escribió: ssh is the most common way to manage a remote server. But under windows :aie: ;) Laura Bartolomé a écrit : Hi We have Tomcat 6.0 installed on Windows 2003 Server and we want to restart apache tomcat service remotely but in a secure way... some ideas? In the same server we have IIS + .NET installed... Thanks a lot Laura - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ It’s the same Hotmail®. If by “same” you mean up to 70% faster. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_AE_Same_022009
Re: mod_jk not working as expected - is there a bug??
I am not sure the stickiness should be attached to the tc worker. I would rather do it for the the real workers level, that is at appfe[1234]. Consider also worker.appfe[1234].sticky_session_force = False for each appfe[1234] worker. János On Feb 24, 2009, at 8:47 PM, Mohit Anchlia wrote: In httpd conf I just see JkMount and no other directive. I searched for Jk. Here is workers.properties file: ## worker.list=status,tc ## Worker Configuration## # All entries in this section take the form: # worker.workername.directive=value # Worker names are defined in the worker.list directive above. # Configuration specifying the worker named status as a status worker. # This worker can be used to administer the other configured workers. worker.status.type=status # Configuration for the default load balancer worker. # Uncomment the configuration for the tc # worker, and the two node workers below to enable. # Also add lb to the workers.list directive # above. The default for the load balancer worker is # round-robin distribution of requests over # all active nodes. There are currently two nodes set # up for the load balanced worker, add more # to this list if required. Sticky sessions is defaulted to true. worker.tc.type=lb worker.tc.balance_workers=appfe1,appfe2,appfe3,appfe4 worker.tc.sticky_session=true # Two load balanced workers, called node1 and node2. # Copy the configurations and add to the # worker.tc.balanced_workers # list above to add more nodes to the Tomcat cluster. # appfe1 worker.appfe1.type=ajp13 worker.appfe1.port=8009 worker.appfe1.host=appfe1 worker.appfe1.socket_timeout=5 worker.appfe1.socket_keepalive=true worker.appfe1.prepost_timeout=5 worker.appfe1.connect_timeout=5000 worker.appfe1.retries=3 worker.appfe1.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe1.reply_timeout=0 # appfe2 worker.appfe2.type=ajp13 worker.appfe2.port=8009 worker.appfe2.host=appfe2 worker.appfe2.socket_timeout=5 worker.appfe2.socket_keepalive=true worker.appfe2.prepost_timeout=5 worker.appfe2.connect_timeout=5000 worker.appfe2.retries=3 worker.appfe2.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe2.reply_timeout=0 # appfe3 worker.appfe3.type=ajp13 worker.appfe3.port=8009 worker.appfe3.host=appfe3 worker.appfe3.socket_timeout=5 worker.appfe3.socket_keepalive=true worker.appfe3.prepost_timeout=5 worker.appfe3.connect_timeout=5000 worker.appfe3.retries=3 worker.appfe3.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe3.reply_timeout=0 # appfe4 worker.appfe4.type=ajp13 worker.appfe4.port=8009 worker.appfe4.host=appfe4 worker.appfe4.socket_timeout=5 worker.appfe4.socket_keepalive=true worker.appfe4.prepost_timeout=5 worker.appfe4.connect_timeout=5000 worker.appfe4.retries=3 worker.appfe4.recycle_timeout=900 # Refererence BHP Apache tuning guide before uncomment the following line. The unit of reply_timeout is millisecond. #worker.appfe4.reply_timeout=0 On Tue, Feb 24, 2009 at 4:50 PM, Rainer Jung rainer.j...@kippdata.de wrote: On 25.02.2009 00:00, Mohit Anchlia wrote: Reposting: Apache Server - 2.2 Tomcat server 6 Jboss - 4.2 We have Web Servers talking to Jboss App Servers over mod_jk. When we do our patch or upgrade of software we do it in rolling fashion so that there is 0 customer impact. But it looks like mod_jk load balancer on Web server doesn't detect it as soon as Jboss App Server goes down. Our goal is to have 0 customer impact. So my question is what can we do to overcome this problem. Web Server sees Http Error Code 503. Information from log file: [Mon Feb 23 13:39:42.146 2009] [31682:4143745888] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (appfe4) can't receive the response message from tomcat, network problems or tomcat (10.10.81.89:8009) is down (errno=104) [Mon Feb 23 13:39:42.147 2009] [31682:4143745888] [error] ajp_service::jk_ajp_common.c (2097): (appfe4) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port This means that mod_jk detected that your backend is down and thus puts it into an error state. All following requests will no longer be sent to this backend. Once a minute it will send a request there and try, but as long as it is down this test will not succeed and thus all requests will be sent to other nodes. The first request that gets sent to the backend you stopped might get an error back. If you want to prevent that from happening, use Cping/ Cpong: http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html so we will detect the broken node before actually sending a request there. More details are not possible to give without your JK
Re: mod_jk not working as expected - is there a bug??
you are right there is a mod-jk.conf. So given my workers.properties file what should I change so that mod_jk detects that app server is down before attempting to send the request. Shouldn't retries in workers.properties try to connect to some other app server instead. Here is mod-jk.conf # Where to find workers.properties JkWorkersFile conf/workers.properties # Where to put jk logs JkLogFile /var/log/apache2/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel error # Allow mod_jk worker status reports, with the URL of http://servername/JkStatus ## This is very helpful for monitoring purposes, but should be ## allowed from the local machine. Location /JkStatus Order deny,allow Deny from all Allow from localhost /Location #JkMount /JkStatus status # Below line forward all requests to application server #JkMount /* local On Wed, Feb 25, 2009 at 2:55 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 25.02.2009 02:47, Mohit Anchlia wrote: In httpd conf I just see JkMount and no other directive. I searched for Jk. There should be others as well, for instance JkWorkersFile to point to your workers.properties. The names of the directives are case insensitive, they can also be in files included to your main httpd configuration file via include directives. Here is workers.properties file: ... # appfe1 ... worker.appfe1.socket_timeout=5 I generally don't like socket_timeout. Others do :) worker.appfe1.prepost_timeout=5 5 milliseconds prepost timeout? You're kidding. I assume it should have been 5000. worker.appfe1.recycle_timeout=900 This is deprecated. Use connection_pool_timeout instead. The value is OK, you should set connectionTimeout on the Tomcat AJP connector to 90 then. Since you are using prefork MPM, you might want to set connection_pool_minsize to 0 if you want to keep the number of established connections low. And the same for the other members of the load balancer. On Tue, Feb 24, 2009 at 4:50 PM, Rainer Jungrainer.j...@kippdata.de wrote: On 25.02.2009 00:00, Mohit Anchlia wrote: Reposting: Apache Server - 2.2 Tomcat server 6 Jboss - 4.2 We have Web Servers talking to Jboss App Servers over mod_jk. When we do our patch or upgrade of software we do it in rolling fashion so that there is 0 customer impact. But it looks like mod_jk load balancer on Web server doesn't detect it as soon as Jboss App Server goes down. Our goal is to have 0 customer impact. So my question is what can we do to overcome this problem. Web Server sees Http Error Code 503. Information from log file: [Mon Feb 23 13:39:42.146 2009] [31682:4143745888] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (appfe4) can't receive the response message from tomcat, network problems or tomcat (10.10.81.89:8009) is down (errno=104) [Mon Feb 23 13:39:42.147 2009] [31682:4143745888] [error] ajp_service::jk_ajp_common.c (2097): (appfe4) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port This means that mod_jk detected that your backend is down and thus puts it into an error state. All following requests will no longer be sent to this backend. Once a minute it will send a request there and try, but as long as it is down this test will not succeed and thus all requests will be sent to other nodes. The first request that gets sent to the backend you stopped might get an error back. If you want to prevent that from happening, use Cping/Cpong: http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html so we will detect the broken node before actually sending a request there. More details are not possible to give without your JK configuration (Jk directive sin httpd configuration files, workers.properties and if used uriworkermap.properties). The line number of the above message tells me you are using mod_jk 1.2.25. Although there's nothing wrong in principal with 1.2.25, we always try to improve and you might consider switching to 1.2.27. You should also increase your JkLogLevel to info. As long as only occasional info messages are in your log file everything is fine, but once error messages show up, the additional info messages contain useful formation. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using SSL tomcat
Hello Chuck, I don't understand why i have an WARNING: A docBase D:\tomcat\webapps\mywebapp inside the host appBase has been specified In my web application mywebapp.xml i've defined a context : Context path=/mywebapp docBase=mywebapp debug=99 reloadable=true ... But, i think tomcat ignore that docBase because the application is on webapps. By the way this error doesn't seem to be a problem in http. Thanks for reply, Kings regards, Hevoila PS : Here the server.xml file ?xml version=1.0? Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=80 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / Connector port=443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=D:\myfolder\mycert.keystore keystorePass=xx / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false % HashMap map = (HashMap)session.getAttribute(map); map.put(key,value); % /Host /Engine /Service /Server - Mail Original - De: Charles R Caldarale chuck.caldar...@unisys.com À: Tomcat Users List users@tomcat.apache.org Envoyé: Mercredi 25 Février 2009 14:55:14 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: RE: Using SSL tomcat From: hevo...@free.fr [mailto:hevo...@free.fr] Subject: Using SSL tomcat I've setup in server.xml file a listen port to 80 and define a redirectPort to 443. I've also activate and setup ssl section, and adding keystoreFile=D:\myfolder\mycert.keystore keystorePass=x and changing 443 port. Post your actual server.xml file, rather than describing what you think you changed. I've also change the redirectPort in ajp section. If you're not using AJP, you should comment out the Connector, not modify it. The only error, i have is : WARNING: A docBase D:\tomcat\webapps\mywebapp inside the host appBase has been specified You should fix that; remove the docBase attribute from the offending Context element. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Using SSL tomcat
From: hevo...@free.fr [mailto:hevo...@free.fr] Subject: Re: Using SSL tomcat I don't understand why i have an WARNING: A docBase D:\tomcat\webapps\mywebapp inside the host appBase has been specified Because you have specified attributes that are not allowed in your Context element. In my web application mywebapp.xml i've defined a context : Context path=/mywebapp docBase=mywebapp debug=99 reloadable=true ... Assuming your Context element is in conf/Catalina/[host]/mywebapp.xml, then you should remove both the path and docBase attributes; they're not allowed. Connector port=443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=D:\myfolder\mycert.keystore keystorePass=xx / Are you using APR? (If you have tcnative-1.dll in the Tomcat bin directory, you are.) The SSL config is very different when APR is employed: http://tomcat.apache.org/tomcat-5.5-doc/apr.html#HTTPS If you want to stick with the pure Java SSL handling, delete or rename the .dll file. Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false % HashMap map = (HashMap)session.getAttribute(map); map.put(key,value); % /Host What is that HashMap junk doing in you server.xml file? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: not using the port number in the address???
Mihamina Rakotomandimby (R12y) wrote: David Smith wrote: Since you haven't let us know anything about your server setup, we can only suggest very general things. Port 80 is the well known port for HTTP protocol and the one your browser assumes when you don't type it in the address bar. By the way, someone playing with Tomcat should know that... that's the basis. Dont misunderstand me, I dont say he's dumb: I just wonder how could someone be in that situation (messing with web server setup and not knowing such basical theory). As Rusty said -- sometimes you just get dropped in the deep end. The OP may be an excellent IT professional that's never been asked to work with web servers before. I've worked at a couple of startups where I've been asked to work with stuff I've never seen before. Google, Wikipedia, and lists like this one are great for getting up to speed fast. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Getting PHP to work on Tomcat
I am running Tomcat (finally got it set up!) , and I would like to run some PHP software on it also. I tried Quercus and ran into some bugs, seemingly because the Quercus implementation isn't complete. Has anybody really gotten a reliable PHP going on Tomcat? Thanks!
Re: mod_jk not working as expected - is there a bug??
On 25.02.2009 16:50, János Löbb wrote: I am not sure the stickiness should be attached to the tc worker. I would rather do it for the the real workers level, that is at appfe[1234]. Consider also worker.appfe[1234].sticky_session_force = False for each appfe[1234] worker. The page http://tomcat.apache.org/connectors-doc/reference/workers.html specifies the properties. Both sticky_session and sticky_session_force are for lb workers. Setting sticky_session_force to false is the default (as is setting sticky_session to true). Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk not working as expected - is there a bug??
On 25.02.2009 17:10, Mohit Anchlia wrote: you are right there is a mod-jk.conf. So given my workers.properties file what should I change so that mod_jk detects that app server is down before attempting to send the request. Shouldn't retries in workers.properties try to connect to some other app server instead. Just a wild guess: your prepost timeout of 5 milliseconds produces the error messages you cited. First correct this timeout, then do another clean test on your test system. You can even increase JkLogLevel to trace (not in production) so we can see exactly what is going on. Do not send many requests with JkLogLevel trace, just do a minimal test that shows the problem. The early detection of a broken instance should be possible with your configuration. Here is mod-jk.conf # Where to find workers.properties JkWorkersFile conf/workers.properties # Where to put jk logs JkLogFile /var/log/apache2/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel error # Allow mod_jk worker status reports, with the URL of http://servername/JkStatus ## This is very helpful for monitoring purposes, but should be ## allowed from the local machine. Location /JkStatus Order deny,allow Deny from all Allow from localhost /Location #JkMount /JkStatus status # Below line forward all requests to application server #JkMount /* local On Wed, Feb 25, 2009 at 2:55 AM, Rainer Jungrainer.j...@kippdata.de wrote: On 25.02.2009 02:47, Mohit Anchlia wrote: In httpd conf I just see JkMount and no other directive. I searched for Jk. There should be others as well, for instance JkWorkersFile to point to your workers.properties. The names of the directives are case insensitive, they can also be in files included to your main httpd configuration file via include directives. Here is workers.properties file: ... # appfe1 ... worker.appfe1.socket_timeout=5 I generally don't like socket_timeout. Others do :) worker.appfe1.prepost_timeout=5 5 milliseconds prepost timeout? You're kidding. I assume it should have been 5000. worker.appfe1.recycle_timeout=900 This is deprecated. Use connection_pool_timeout instead. The value is OK, you should set connectionTimeout on the Tomcat AJP connector to 90 then. Since you are using prefork MPM, you might want to set connection_pool_minsize to 0 if you want to keep the number of established connections low. And the same for the other members of the load balancer. On Tue, Feb 24, 2009 at 4:50 PM, Rainer Jungrainer.j...@kippdata.de wrote: On 25.02.2009 00:00, Mohit Anchlia wrote: Reposting: Apache Server - 2.2 Tomcat server 6 Jboss - 4.2 We have Web Servers talking to Jboss App Servers over mod_jk. When we do our patch or upgrade of software we do it in rolling fashion so that there is 0 customer impact. But it looks like mod_jk load balancer on Web server doesn't detect it as soon as Jboss App Server goes down. Our goal is to have 0 customer impact. So my question is what can we do to overcome this problem. Web Server sees Http Error Code 503. Information from log file: [Mon Feb 23 13:39:42.146 2009] [31682:4143745888] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (appfe4) can't receive the response message from tomcat, network problems or tomcat (10.10.81.89:8009) is down (errno=104) [Mon Feb 23 13:39:42.147 2009] [31682:4143745888] [error] ajp_service::jk_ajp_common.c (2097): (appfe4) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port This means that mod_jk detected that your backend is down and thus puts it into an error state. All following requests will no longer be sent to this backend. Once a minute it will send a request there and try, but as long as it is down this test will not succeed and thus all requests will be sent to other nodes. The first request that gets sent to the backend you stopped might get an error back. If you want to prevent that from happening, use Cping/Cpong: http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html so we will detect the broken node before actually sending a request there. More details are not possible to give without your JK configuration (Jk directive sin httpd configuration files, workers.properties and if used uriworkermap.properties). The line number of the above message tells me you are using mod_jk 1.2.25. Although there's nothing wrong in principal with 1.2.25, we always try to improve and you might consider switching to 1.2.27. You should also increase your JkLogLevel to info. As long as only occasional info messages are in your log file everything is fine, but once error messages show up, the additional info messages contain useful formation. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Getting PHP to work on Tomcat
On Wed, Feb 25, 2009 at 1:59 PM, michel compu...@videotron.ca wrote: I am running Tomcat (finally got it set up!) , and I would like to run some PHP software on it also. I tried Quercus and ran into some bugs, seemingly because the Quercus implementation isn't complete. Has anybody really gotten a reliable PHP going on Tomcat? Thanks! Yes, I'm using tomcat with php in a Linux Debian Lenny. I have a wiki and in the same time my jsp aplications. I get the tomcat-6 from apache webpage and install the php and php-cgi package from the repositories from debian (via aptitude). Then edit the file conf/web.xml: servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param init-param param-namecgiPathPrefix/param-name param-valuephp/param-value /init-param init-param param-nameexecutable/param-name param-valuephp-cgi/param-value /init-param load-on-startup5/load-on-startup /servlet servlet-mapping servlet-namecgi/servlet-name url-pattern/dev/*/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.jsp/welcome-file welcome-fileindex.php/welcome-file /welcome-file-list You can do it this in other plataform with any CGI. Only you need one executable to convert the .php into html. Saludos! -- ItZtLi - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat restart remotely
Caldarale, Charles R wrote: From: Laura Bartolomé [mailto:la...@secways.com] Subject: Re: tomcat restart remotely My problem was I haven't thought before! :) I'm going to test it right now As far as I know, given the appropriate permissions for the account you use to do this, you can also access the services applet of another Windows machine remotely. You do not need SSH or Remote Desktop or any external utility for that. If you right-click on the My Computer icon of any Windows pc in your network, and choose action in the top menu, the first item is connect to another computer. You can then manage this other computer (if your account has these permissions, and only then), and turn services on/off on that other computer, including Tomcat. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using SSL tomcat
Done ! Thanks you very much, it's work fine now. No, i'm not using APR, that's why, it doesn't work before. You're my saviour Charles. To ending my setup. Do you know how to redirect the http client on https? Thanks again, Kings regards, Hevoila - Mail Original - De: Charles R Caldarale chuck.caldar...@unisys.com À: Tomcat Users List users@tomcat.apache.org Envoyé: Mercredi 25 Février 2009 17:39:45 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: RE: Using SSL tomcat From: hevo...@free.fr [mailto:hevo...@free.fr] Subject: Re: Using SSL tomcat I don't understand why i have an WARNING: A docBase D:\tomcat\webapps\mywebapp inside the host appBase has been specified Because you have specified attributes that are not allowed in your Context element. In my web application mywebapp.xml i've defined a context : Context path=/mywebapp docBase=mywebapp debug=99 reloadable=true ... Assuming your Context element is in conf/Catalina/[host]/mywebapp.xml, then you should remove both the path and docBase attributes; they're not allowed. Connector port=443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=D:\myfolder\mycert.keystore keystorePass=xx / Are you using APR? (If you have tcnative-1.dll in the Tomcat bin directory, you are.) The SSL config is very different when APR is employed: http://tomcat.apache.org/tomcat-5.5-doc/apr.html#HTTPS If you want to stick with the pure Java SSL handling, delete or rename the .dll file. Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false % HashMap map = (HashMap)session.getAttribute(map); map.put(key,value); % /Host What is that HashMap junk doing in you server.xml file? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very slow class loading on initial JSP/servlet request after restart
Mark Thomas wrote: Sam Hokin wrote: Mark Thomas wrote: Sam Hokin wrote: [...] My thinking is if we can reduce the scope of the problem to importing a single class, we can then separate out that class and reduce the code in it bit by bit until we have the bare minimum that causes the problem. Hopefully, there will be little enough code left that it will be obvious. Which is basically what I suggested a few posts back, after trying to summarise the problem again. My posts are not always about reindeers or chocolate. Sam, because there is quite a bit of traffic on this issue, and because the exact description seems to change a bit over time (e.g. compilation-only or not), could you remake a summary of what you are sure of so far ? Without totally excluding it for instance, I would surmise that it is unlikely to be a disk-related problem, because copying the complete webapp somewhere else does not change the issue. About the File.exists() issue and what it is checking, isn't a tool like lsof a possible way to find out ? It can show all I/O like resources used by a given process, be they sockets or files. lsof has more options than a human can easily digest, but I think it is a simple matter to just ask for the full list, for a given process-id. You'll be surprised at how many I/O thinks a process uses, but maybe something in the list will catch your eye, since you among all of us knows best what it /should/ be using. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very slow class loading on initial JSP/servlet request after restart
Tim Funk wrote: While I am late to this ... Is this an accurate summary? - Slow re-load on a server - Server is a production server - Other servers are OK so it can only be reproduced on production server - Initial looks at network seem to be no network activity - There seems to be a hint at File.exists() causing an issue - The wisdom of the crowds is pointing to disk issue Yes, Tim, that's pretty accurate. Would it be possible to copy the tomcat installation and webapp to another disk (or new directory) on the same machine and then run the copy on an alternate port? If it fails like it does on the lower port - you have a better sandbox for debugging. If not ... you have a new interesting data point in the debug process. That's a good suggestion, I'll do so. I've been a bit concerned about running a second Tomcat instance on this production server since I've been having so much trouble with it, but if a second instance is a problem, I'll just turn it off. It's probably better to leave the production instance alone, actually. I have changed JVM versions, Tomcat versions, etc. over the course of this issue, by the way. Last oddball question - even though this is a Linux server, is there any virus scanning software running? Nope. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Using SSL tomcat
From: hevo...@free.fr [mailto:hevo...@free.fr] Subject: Re: Using SSL tomcat Do you know how to redirect the http client on https? That's documented in the servlet spec, section 12.7. You need to specify a transport-guarantee of CONFIDENTIAL (case matters) for the protected resources. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very slow class loading on initial JSP/servlet request after restart
Pieter Temmerman wrote: Try this strace command: strace -f -etrace=\!futex,gettimeofday,clock_gettime -p PID_OF_TOMCAT_JAVA where PID_OF_TOMCAT_JAVA is the PID of your Tomcat, duh! :) Thanks! That certainly did the trick. The first time I ran strace against the Tomcat process, it brought Tomcat to a halt. I had to restart it. After the restart, it took an absolute eternity for the sites to respond to requests, as usual. One thing that I haven't mentioned, by the way, is that all four sites begin to respond at the SAME TIME. There appears to be something going on server-wide that finally resolves. (There are currently four Host entries in server.xml, each of which having several Context entries, by the way. Three hosts are on the same IP address, one has its own.) During the startup stall phase, I requested my simple test JSP page. strace revealed, as it did for all the other pages being requested on the server, repeated calls to stat64 and lstat64 of the SAME class files. Here are the lines from strace while test6.jsp (precompiled into test6_jsp.class) was stalled: http://www.ims.net/media/strace-test6-stall.txt After I shut off strace (being convinced that it was hindering the server from getting done with its post-startup shenanigans), and the rest of the sites were finally responding to requests, I fired up strace again and requested test6.jsp, and got this: http://www.ims.net/media/strace-test6-ok.txt along with a successful HTTP response. So: stat64; access; lstat64; stat64; read; read; read. The class probably was already loaded from the previous stalled request. During the Tomcat stall phase there are thousands and thousands of stat64, access, lstat64 calls to the same class files (and directories above those files) across pages on all four sites. My next step is to set up a new instance on another port so I (hopefully) stop beating on the production sites with these diagnostics, and then do Mark's suggestion to import, one by one, the classes in my Java package to see if there is a particular one that is causing the delay. I've tried that to some extent in the past and felt that the delay just increased linearly as I added more classes, but I can do it more methodically. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Question
Hi I will talk about the problem I have encountered in brief. I have two tomcat servers. I could deploy the new-same war on both of them. but with one server I am facing problem with two links on the website. They point to 404 pages. Can any one suggest me the solutin for that. The environment is LINUX. Thanks Satish
Re: very slow class loading on initial JSP/servlet request after restart
André Warnier wrote: Sam, because there is quite a bit of traffic on this issue, and because the exact description seems to change a bit over time (e.g. compilation-only or not), could you remake a summary of what you are sure of so far ? 1. Initial requests to ANY JSP page on a site, precompiled or not, or a compiled servlet, take an inordinate amount of time to generate a response, often several minutes, as long as 20 minutes or so after the server is restarted. 2. After a response is finally generated from a given JSP, that JSP always responds quickly to subsequent requests. 3. The four virtual hosts start serving pages at the same time, after a Tomcat restart, as long as 20 minutes after Tomcat started up. 4. jstack showed that the delay during a small JSP request was during a call to java.io.File.exists(). It is still not known what the particular file was. 5. strace reveals that thousands and thousands of stat64, access and lstat64 calls are made to JAR files and classes during the initial stall phase. I've posted a couple short examples from my test6.jar requests. Without totally excluding it for instance, I would surmise that it is unlikely to be a disk-related problem, because copying the complete webapp somewhere else does not change the issue. Yes, and I have done so several times. About the File.exists() issue and what it is checking, isn't a tool like lsof a possible way to find out ? It can show all I/O like resources used by a given process, be they sockets or files. I'm looking at lsof now. Haven't seen anything remarkable so far, but I'll keep at it a bit. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Question
Hello. Give us: 1) Tomcat versions 2) log files (catalina and localhost) 3) URLs of these links How do you run tomcat? What command do you use? -Original Message- From: koppisetty bhavani naga satish [mailto:kbnsat...@gmail.com] Sent: Wednesday, February 25, 2009 9:46 PM To: users@tomcat.apache.org Subject: Question Hi I will talk about the problem I have encountered in brief. I have two tomcat servers. I could deploy the new-same war on both of them. but with one server I am facing problem with two links on the website. They point to 404 pages. Can any one suggest me the solutin for that. The environment is LINUX. Thanks Satish - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Getting PHP to work on Tomcat
you have to feed your PHP script to Tomcat CGIServlet Not to belabor the point but you're saying you want to race your Yugo (PHPScript) at Lemans instead of a Ferrari(Tomcat).. Would you really want to run single-processing/single thread proc instead of a Object Oriented multi-language running in a multi-thread aware container ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: compu...@videotron.ca To: users@tomcat.apache.org Subject: Getting PHP to work on Tomcat Date: Wed, 25 Feb 2009 11:59:19 -0500 I am running Tomcat (finally got it set up!) , and I would like to run some PHP software on it also. I tried Quercus and ran into some bugs, seemingly because the Quercus implementation isn't complete. Has anybody really gotten a reliable PHP going on Tomcat? Thanks! _ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_022009
Re: Getting PHP to work on Tomcat
Martin, I love the analogy! But I am trying to run Dokuwiki on Tomcat. The reality is that there are a lot of PHP-writen stuff out there that I would love to be able to run on Tomcat; not because it's PHP, but because it works. This is one of those cases where works is alerady good enough. Michel - Original Message - From: Martin Gainty mgai...@hotmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, February 25, 2009 2:20 PM Subject: RE: Getting PHP to work on Tomcat you have to feed your PHP script to Tomcat CGIServlet Not to belabor the point but you're saying you want to race your Yugo (PHPScript) at Lemans instead of a Ferrari(Tomcat).. Would you really want to run single-processing/single thread proc instead of a Object Oriented multi-language running in a multi-thread aware container ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: compu...@videotron.ca To: users@tomcat.apache.org Subject: Getting PHP to work on Tomcat Date: Wed, 25 Feb 2009 11:59:19 -0500 I am running Tomcat (finally got it set up!) , and I would like to run some PHP software on it also. I tried Quercus and ran into some bugs, seemingly because the Quercus implementation isn't complete. Has anybody really gotten a reliable PHP going on Tomcat? Thanks! _ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_022009 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how
As Chuck mentioned, you should have asked your question in a smarter way :) Anyhow, coming back to your question, You can use Apache HTTP server and use mod_proxy_http or mod_proxy_ajp modules to forward all requests on port 80 on apache to port 8080 on tomcat. Specifically use the ProxyPass directive to achieve what you want. Example: ProxyPass / http://localhost:8080/your-app/ The above directive would forward all requests on the root context on port 80 to be proxied to your-app under tomcat on port 8080. Read about it in detail here: http://httpd.apache.org/docs/2.0/mod/mod_proxy.html Cheers Anurag -- Anurag Kapur Associate - Technology, Sapient Corporation India. http://www.linkedin.com/in/anuragkapur -- On Wed, Feb 25, 2009 at 2:14 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: nicumarius [mailto:nicumar...@yahoo.com] Subject: how what should I do to not use port number when writting the address of a page on the Apache server? http://www.catb.org/~esr/faqs/smart-questions.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: very slow class loading on initial JSP/servlet request afterrestart
From: Sam Hokin [mailto:s...@ims.net] Subject: Re: very slow class loading on initial JSP/servlet request afterrestart http://www.ims.net/media/strace-test6-stall.txt So what's going on during the frequent 11-second gaps? (Was Rosemary Woods here?) Might want to redo the strace with the -T option to show the time spent inside each system call. During the Tomcat stall phase there are thousands and thousands of stat64, access, lstat64 calls to the same class files (and directories above those files) across pages on all four sites. How many is thousands and thousands? 3,000 or 100,000? It's not unusual to see lots of calls to the stat derivates; they should return extremely quickly. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: not using the port number in the address???
You can use Apache HTTP server and use mod_proxy_http or mod_proxy_ajp modules to forward all requests on port 80 on apache to port 8080 on tomcat. Specifically use the ProxyPass directive to achieve what you want. Example: ProxyPass/ http://localhost:8080/your-app/ The above directive would forward all requests on the root context on port 80 to be proxied to your-app under tomcat on port 8080. Read about it in detail here: http://httpd.apache.org/docs/2.0/mod/mod_proxy.html Cheers Anurag -- Anurag Kapur Associate - Technology, Sapient Corporation India. http://www.linkedin.com/in/anuragkapur -- On Wed, Feb 25, 2009 at 2:10 PM, nicumarius nicumar...@yahoo.com wrote: what should I do to not use port number when writting the address of a page on the Apache server? -- View this message in context: http://www.nabble.com/not-using-the-port-number-in-the-addresstp22203518p22203518.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very slow class loading on initial JSP/servlet request afterrestart
Caldarale, Charles R wrote: From: Sam Hokin [mailto:s...@ims.net] Subject: Re: very slow class loading on initial JSP/servlet request afterrestart http://www.ims.net/media/strace-test6-stall.txt So what's going on during the frequent 11-second gaps? (Was Rosemary Woods here?) They are not only frequent, they are also totally regular. Looks like a regular gap of 10 s + some fraction, that looks like 10 or 11 just because of the logfile stamp resolution. Might want to redo the strace with the -T option to show the time spent inside each system call. During the Tomcat stall phase there are thousands and thousands of stat64, access, lstat64 calls to the same class files (and directories above those files) across pages on all four sites. Actually it is totally regular : stat, access, lstat, stat, then 10.xxx delay, then again stat, access, lstat, stat, 10 seconds +. What in this directory path is (are) a symlink(s) ? /home/sites/ims/jcms/webapps/ROOT/WEB-INF/classes/org/apache/jsp/test6_jsp.class and to what does it (they) point ? And how is this different from the other 2 systems that work fine ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat restart remotely
you're right but this has to be trough internet, not local... André Warnier escribió: Caldarale, Charles R wrote: From: Laura Bartolomé [mailto:la...@secways.com] Subject: Re: tomcat restart remotely My problem was I haven't thought before! :) I'm going to test it right now As far as I know, given the appropriate permissions for the account you use to do this, you can also access the services applet of another Windows machine remotely. You do not need SSH or Remote Desktop or any external utility for that. If you right-click on the My Computer icon of any Windows pc in your network, and choose action in the top menu, the first item is connect to another computer. You can then manage this other computer (if your account has these permissions, and only then), and turn services on/off on that other computer, including Tomcat. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very slow class loading on initial JSP/servlet request after restart
NEW DISCOVERY - using a wildcard package import results in a much longer response delay! I've taken Mark's suggestion that I import individual classes rather than importing all with a wildcard to see if a particular class is slowing down classloading. It turns out that it's the WILDCARD itself that is causing most of the delay! If I request the following wildcard import JSP: %@ page import=java.util.Date % %@ page import=net.ims.jcms.* % % java.util.Date endDate = new java.util.Date(); out.println(endDate.toString()); % it responds in 49 seconds, consistently, over several different tries (renaming the file each time to incur the delay). That includes on-the-fly compilation. If I request a JSP that imports EVERY class in net.ims.jcms explicitly (it's a lot of lines, so truncated below): %@ page import=java.util.Date % %@ page import=net.ims.jcms.AccessRole % %@ page import=net.ims.jcms.AccessRoleException % %@ page import=net.ims.jcms.AccessUser % %@ page import=net.ims.jcms.AccessUserException % ... a bunch more here ... %@ page import=net.ims.jcms.UtilityLink % %@ page import=net.ims.jcms.ValidationException % % java.util.Date endDate = new java.util.Date(); out.println(endDate.toString()); % it responds in 3 seconds, consistently (with renaming), which isn't as fast as it should be, but it's way faster than 49 seconds. I have no idea why a wildcard package import differs from importing explicit classes (from the same JAR), so I don't know what this is telling us, but it sure seems to be significant! I have not been able to get lsof to display any files related to these requests, I expect they open and close too quickly for me to catch it. I have run strace during a request of a wildcard import JSP (test7.jsp) on a standalone Tomcat instance so that I don't have lines from other requests. The request is made at 15:24:09, and the response came at 15:24:58. I've included the strace lines from that time range here: http://ims.net/media/strace-test-wildcard.txt You can see the read call on the HTTP GET request on the sixth line. The HTTP 200 response is in a write call near the bottom. Presumably everything that happened during the 49 seconds is recorded here. You can see that the .java file has been opened within a second, 2498 15:24:09 open(/usr/local/tomcat-2/work/Catalina/test.ims.net/_/org/apache/jsp/test7_jsp.java, O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 62 0.65 and the compiled class is opened at 15:24:58, 2498 15:24:58 open(/usr/local/tomcat-2/work/Catalina/test.ims.net/_/org/apache/jsp/test7_jsp.class, O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 62 0.64 I have no idea how to interpret all the wheel-spinning that goes on in between. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very slow class loading on initial JSP/servlet request after restart
André Warnier wrote: What in this directory path is (are) a symlink(s) ? /home/sites/ims/jcms/webapps/ROOT/WEB-INF/classes/org/apache/jsp/test6_jsp.class There are no symlinks in that path. And how is this different from the other 2 systems that work fine ? It differs in no known way, other than being different hardware. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: very slow class loading on initial JSP/servlet request afterrestart
From: Sam Hokin [mailto:s...@ims.net] Subject: Re: very slow class loading on initial JSP/servlet request afterrestart I have no idea how to interpret all the wheel-spinning that goes on in between. The key lines have a 3+ second response time: 2498 15:24:35 stat64(/net/ims/jcms/Object.class, 0x7b6b9c20) = -1 ENOENT (No such file or directory) 3.020996 Most of the calls return in much less than a millisecond, but there are a few ENOENT (not all) responses that hit this 3-second delay. All of the slow ones are looking at the /net/ims/jcms directory; what is that? Why is it in this webapp's classpath? (It might be in the jar's META-INF entries.) - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very slow class loading on initial JSP/servlet request after restart
Caldarale, Charles R wrote: The key lines have a 3+ second response time: 2498 15:24:35 stat64(/net/ims/jcms/Object.class, 0x7b6b9c20) = -1 ENOENT (No such file or directory) 3.020996 Most of the calls return in much less than a millisecond, but there are a few ENOENT (not all) responses that hit this 3-second delay. All of the slow ones are looking at the /net/ims/jcms directory; what is that? Why is it in this webapp's classpath? (It might be in the jar's META-INF entries.) Wow, good eye, Chuck, and those add up to at least 35 seconds of the delay - the bulk of it. I have absolutely no idea why it's looking there. I certainly didn't put /net/ims/jcms in the classpath, and the jar file that contains net.ims.jcms just has a stub MANIFEST.MF entry, nothing else, in META-INF. I don't have a META-INF directory under the web app ROOT. The only place classes are stored under /net/ims/jcms is within WEB-INF/lib/jcms.jar. But this is clearly where the bulk of the time is spent, and one can see how this could scale up really poorly, since Tomcat is looking for random core classes like Object.class and Throwable.class under /net/ims/jcms. For comparison, here is the strace output from a test JSP that imports all of the net.ims.jcms classes explicitly (no wildcird import), and responds in three seconds: http://ims.net/media/strace-test-explicit.txt You can see the read/GET near the top and the write HTTP 200 response near the bottom. There is only ONE attempt to find a file under /net/ims/jcms, and that only takes .025 sec. It looks like we've boiled the problem, at least in this test JSP case, down to the classloader wasting 3 seconds per try on stat-ing core Java classes in an imaginary location, /net/ims/jcms, on the server's filesystem, which actually corresponds to a path WITHIN a jar file that I wrote, and which doesn't contain any core Java classes. This sure seems like a bug to me, but why it is manifested only on this one server, and primarily when I use a %@ page import=net.ims.jcms.* % call, remains a mystery. I can see how these 3-second errant lookups can really bog down the server when it starts up, though, when a ton of classes are being loaded for page requests on several virtual hosts. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Request not forwarded to login page with security-constraint after session time-out
Up to now I had always thought I understood the security aspects of the Servlet spec quite well. Looks like I was wrong... [Problem] Upon session time-out the request is not forwarded to the login page (form based auth). Nothing happens on the UI. However, forwarding to the login page does work during the initially login into the application. [Setup] Tomcat 5.0.28, but the behavior is the same in 5.5. Application entry page at /app/app.jsp. Entry Servlet at /app/AppServlet. Login page at /public/login.jsp. web.xml looks like this: security-constraint web-resource-collection web-resource-namemyapp/web-resource-name url-pattern/app/app.jsp/url-pattern http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method http-methodDELETE/http-method /web-resource-collection web-resource-collection web-resource-namemyapp/web-resource-name url-pattern/app/AppServlet/url-pattern http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method http-methodDELETE/http-method /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/public/login.jsp/form-login-page form-error-page/public/login.jsp?retry=true/form-error-page /form-login-config /login-config security-role role-name*/role-name /security-role When I initially request /app/app.jsp Tomcat forwards to /public/ login.jsp as expected, I can login (using JDBCRealm) and will be forwarded to /app/app.jsp. [Analysis] I started Tomcat in debug mode with debug log level and set a breakpoint in FormAuthenticator.authenticate(HttpRequest, HttpResponse, LoginConfig). I see that eventually RequestDispatcher#forward() is invoked because it was detected that the request needs to be authenticated. I followed the control flow to ApplicationDispatcher.doForward(ServletRequest, ServletResponse) but nothing seems to be wrong - at least to me. The log contains the following: 23:27:55,251 DEBUG AuthenticatorBase:413 - [] Security checking request POST /app/AppServlet 23:27:55,252 DEBUG RealmBase:422 - [] Checking constraint 'SecurityConstraint[myapp, myapp]' against POST /app/AppServlet -- true 23:27:55,253 DEBUG AuthenticatorBase:484 - Calling hasUserDataPermission() 23:27:55,253 DEBUG RealmBase:752 - User data constraint has no restrictions 23:27:55,254 DEBUG AuthenticatorBase:502 - Calling authenticate() 23:28:25,246 DEBUG FormAuthenticator:208 - Save request in session '2E77E8D1AF28AA5369AE8DCD334960C5' // Why would the servletPath be empyt? Potential problem? 23:28:27,500 DEBUG ApplicationDispatcher:148 - servletPath=, pathInfo=/ public/login.jsp, queryString=null, name=null 23:29:11,136 DEBUG ApplicationDispatcher:381 - Path Based Forward 23:30:58,381 DEBUG ApplicationDispatcher:418 - Disabling the response for futher output 23:31:35,471 DEBUG AuthenticatorBase:506 - Failed authenticate() test Kind regards, Marcel -- Marcel Stör, http://www.frightanic.com Blog: http://frightanic.wordpress.com Couchsurfing: http://www.couchsurfing.com/people/marcelstoer Skype: marcelstoer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[SECURITY] CVE-2008-4308: Tomcat information disclosure vulnerability
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 CVE-2008-4308: Tomcat information disclosure vulnerability Severity: Low Vendor: The Apache Software Foundation Versions Affected: Tomcat 4.1.32 to 4.1.34 Tomcat 5.5.10 to 5.5.20 Tomcat 6.0.x is not affected The unsupported Tomcat 3.x, 4.0.x and 5.0.x versions may be also affected Note: Although this vulnerability affects relatively old versions of Apache Tomcat, it was only discovered and reported to the Apache Tomcat Security team in October 2008. Publication of this issue was then postponed until now at the request of the reporter. Description: Bug 40771 (https://issues.apache.org/bugzilla/show_bug.cgi?id=40771) may result in the disclosure of POSTed content from a previous request. For a vulnerability to exist the content read from the input stream must be disclosed, eg via writing it to the response and committing the response, before the ArrayIndexOutOfBoundsException occurs which will halt processing of the request. Mitigation: Upgrade to: 4.1.35 or later 5.5.21 or later 6.0.0 or later Example: See original bug report for example of how to create the error condition. Credit: This issue was discovered by Fujitsu and reported to the Tomcat Security Team via JPCERT. References: http://tomcat.apache.org/security.html Mark Thomas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJpdGRb7IeiTPGAkMRAkK+AKC1m5WunqOmwuFYSYEoASF/AokgDQCffmxM U3IdbfYNVtRIzCW5XTvhv2E= =rJGg -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: very slow class loading on initial JSP/servlet request afterrestart
From: Sam Hokin [mailto:s...@ims.net] Subject: Re: very slow class loading on initial JSP/servlet request afterrestart The only place classes are stored under /net/ims/jcms is within WEB-INF/lib/jcms.jar. I'll poke around in the webapp classloader to see if I can find anything interesting, but in the meantime, is there a /net directory on the problematic server? If there is and it targets a remote file system, that might explain the long delay on these stat() calls. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
jsvc degrades performance in production
I am running Tomcat 6 on a group of Linux servers behind a loadbalancer. This setup was working fine when I ran Tomcat as root. However, when I moved to jsvc, the production servers started to become unavailable within a couple of hours, serving thousands of requests. I had to restart them to be online again, only to get into the same issue in a couple of hours. When switched back to run as root, things were fine again. I could find no errors in any logs. I found that jsvc uses client JVM (the servers are server-class VMWare servers) by default. I am suspecting when I ran as root (startup.sh), Tomcat used server JVM that gave better performance, while jsvc performed worse with client JVM, causing my maxThreads (150) to exhaust, acceptCount (100) to fill up and making tomcat to deny requests. I am guessing if I make jsvc to use server JVM, my problem will go away. I appreciate if someone can validate this theory or offer other clues before I try this in production. Of course, I shall also try a stress test case. Thanks, BV Prasad
Re: Getting PHP to work on Tomcat
Ok, thanks all for all the great help! I will be taking a wack at these very helpful ideas and I hope that I can figure it out and make it work. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: very slow class loading on initial JSP/servlet request afterrestart
From: Sam Hokin [mailto:s...@ims.net] Subject: Re: very slow class loading on initial JSP/servlet request afterrestart It looks like we've boiled the problem, at least in this test JSP case, down to the classloader wasting 3 seconds per try on stat-ing core Java classes in an imaginary location, /net/ims/jcms, on the server's filesystem, which actually corresponds to a path WITHIN a jar file that I wrote, and which doesn't contain any core Java classes. Some comments on the above: 1) It's not a Tomcat or JVM classloader that's doing the lookup - it's the JDT compiler hunting for unresolved class references. 2) The Object.class, Throwable.class, etc., core class files are not known to be core until they *haven't* been found on any imported packages that include a wildcard. That's why the lookups are done with a wildcard, and not done with explicit classes. Once you have your test Tomcat set up on the problematic server, try adding this line to the conf/logging.properties file: org.apache.jasper.level = ALL That will display a *lot* of information about what's going on during JSP compilation. One thing in particular printed out during Tomcat initialization is the compiler classpath for JSPs in each webapp, which might show why the lookups are being done at the root of the file system. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org