Re: How to Map domain to a context using Mod_jk
On 6 Oct 2009, at 05:56, gpike gop...@gmail.com wrote: I have Virtual Hosts defined in Apache for each domain. I want to map the domain to a context in Tomcat. For instance I would like mysite.com to map to /mysite_com in Tomcat. Would it be something like: VirtualHost *:80 ServerName mysite.com RewriteRule ^/(.*)$ /mysite_com/$1 [PT] JkMount /mysite_com/* worker1 /VirtualHost Is there a better way? You mean is there a way to achieve the above with Tomcat? Yes: define a default or ROOT context for each host. Tomcat docs site has plenty of info on virtual hosts and setting up web application contexts. p Thanks Gordon -- View this message in context: http://www.nabble.com/How-to-Map-domain-to-a-context-using-Mod_jk-tp25762921p25762921.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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Re: Alias URL
[Very off-topic] 2009/10/5 Caldarale, Charles R chuck.caldar...@unisys.com: From: André Warnier [mailto:a...@ice-sa.com] I was going to say Evil Geniuses (O'Reilly). But I don't know who was first. The book is just a collection of the User Friendly strips; excellent reference manual. It's a good stage prop, too. One of my friends was going for a pre-sales job, and part of the interview was a 10-minute presentation. On anything. He chose How to be an Evil Genius and took my copy of Evil Geniuses in a Nutshell with him to hand out as the textbook on the subject. He managed to keep a straight face throughout the presentation, unlike the audience. He got the job, by the way. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: InvocationTargetException results OutOfMemory issue as codecache is full in tomcat 5.5
Hi, Thaks for your replies. My server OS is : Windows 2003 server (by mistake above it is given as XP). JVM is 1.6.0 Both are 64 Bit We are not using JSP's . We are using orbeon3.7 (www.orbeon.com) xslt for web forms. In which using oxf:processor where our Java classes are build dynamically. Using probe we observered code cache is reaching it's maximum size. -- View this message in context: http://www.nabble.com/InvocationTargetException-results-OutOfMemory-issue-as-codecache-is-full-in-tomcat-5.5-tp25745877p25764679.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
how to integrate tomcat with IDE tools like eclipse,Netbeans?
hi friends does anybody know how to integrate tomcat with tomcat with eclipse thanks in advance -- View this message in context: http://www.nabble.com/how-to-integrate-tomcat-with-IDE-tools-like-eclipse%2CNetbeans--tp25764753p25764753.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: [OT] Alias URL
David Kerber wrote: Pid Ster wrote: YDHTVO ??? Haven't seen that one before. D Neither have I. You Don't Have To ... ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Alias URL
Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Alias URL (stop Tomcat first) Step 1 : you will need 2 Host .. sections in Tomcat's configuration file server.xml. Currently, there is only one. Actually, the one will suffice, if the OP is willing to eliminate Tomcat's existing ROOT webapp (no big loss). Eh no. Prodded, he said he wanted this : .. What you would like is that : - when a user enters the URL http://imsden.mms; (or http://imsden.mms:8080;), he continues to get the standard Tomcat homepage - when a user enters the URL http://webtop; (or http://webtop:8080;), he gets immediately the first page of the webtop application Is that correct ? This is correct - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Alias URL
Johnson, Rob E wrote: Andre thanks for all your help that worked. I can use the alias, and I can still hit the other webapps. Also thanks to Martin Gainty and his help. No thanks required, we live to help. Martin and I, the winning team... :-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: InvocationTargetException results OutOfMemory issue as codecache is full in tomcat 5.5
Thanks to all for your reply. Today also we have received same issue. After Continuously monitoring probe found that codecache reached 48MB and after that 3 users faced issue. Is there any setting in JAVA_OPTS to refresh the codecache once it reaches to maximum? -- View this message in context: http://www.nabble.com/InvocationTargetException-results-OutOfMemory-issue-as-codecache-is-full-in-tomcat-5.5-tp25745877p25767299.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: java.lang.OutOfMemoryError: Java heap space
On 05.10.2009 22:04, André Warnier wrote: André Warnier wrote: ... and still wants to add something : - a new KeepAlive connection is made from the browser to Apache (httpd). - then a request comes in on that connection, and it happens to be one that gets forwarded to Tomcat. So a mod_jk connection is made to Tomcat, Tomcat allocates a thread for it. - I would imagine that mod_jk must pass on to Tomcat the fact that this is a KeepAlive connection, so that Tomcat would know that its thread for that connection, should also wait for subsequent requests. - so now the webapp/thread generates the response to the first request, and waits on the connection for more requests. - however, the browser does send more requests to Apache, but these are not ones that get forwarded to Tomcat (for example, they are for items that Apache serves locally) ... So now I wonder about how Apache + mod_jk + Tomcat react in such a situation. Do the mod_jk connection +Tomcat thread keep waiting anyway, and how long ? No in general. mod_jk only kicks in after a new request arrived over such a connection. mod_jk is agnotic about whether the rquests came over the same connection or not, even whether they belong to the same user or not. But: in case you are using a prefork MPM, each connection gets assigned to one process having one thread. This process has a connection pool of size 1 to each backend and the backend ties a dedicated thread to that connection (unless using tcnative). So in this case, it is a yes. Between two Keep Alive requests, there's no way of letting the Apache process handle other requests and thus the backend connection and backend thread are blocked waiting for the next request. That's why e.g. NTLM has a chance to work via mod_jk in combination with prefork. So here's a use case for the worker MPM, because then one client connection still blocks one Apache thread. But multiple connections are concurrently handled by the same Apache process, so mod_jk can efficiently reuse its backend connections for requests from other connections handled by the same process. The total used connection pool size might then be much smaller than with the prefork MPM. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.OutOfMemoryError: Java heap space
On 05.10.2009 18:58, Joe Hansen wrote: Thank you so much for your tips, Rainer! The websites went down yet again. Increasing the java heap size took care of the OutOfMemoryError, but the number of httpd processes keep increasing until the websites crash. I haven't added any new code in the past few months, hence I am surprised why the requests are getting stuck. Here's a link to the tomcat thread dumps: http://pastebin.com/m17eea139 Just tried to look at it, but pastebin replies with: Down for maintenance - 6th Oct 2009 Pastebin.com is getting an unprecedented amount of traffic due to a news story in which some leaked Hotmail passwords have been pasted on this site ... Let's see, when they will be up again. They're running Apache 1.3.33 ... Please let me know if you cannot view it and I will email the relevant portion of the catalina.out file to you. Is there an easy way to find out what code is causing the requests to get stuck? Thank you! Joe On Sun, Oct 4, 2009 at 2:36 PM, Rainer Jung rainer.j...@kippdata.de wrote: Hi Joe, On 04.10.2009 21:45, Joe Hansen wrote: Rainer, Thank you so much for your kind reply! I have increased the java heap size to 512MB (-Xms512m -Xmx512m). I am hoping that would fix the issue. I had configured our webserver to use Jasig's Central Authentication System (CAS). Recently I increased the session timeout from 30 minutes to 4 hours. I am guessing that must have had an impact on the number of tickets that the CAS could store in the Java's memory space. I did run the kill -QUIT command against the tomcat process. It did generate a huge output in the catalina.out file. I am unable to decipher it. I do not want to post it to the mailing list because its very long. Would you be able to please tell me what should I be looking for within this long thread dump? Can you put it somewhere on the web, so we can look at it, or are you afraid there is something private in there? You could use pastebin or something similar in case you do not have a public web server yourself. If you don't want to post in public, you can also mail it to me, I will post the result, in case I find something relevant. Regards, Rainer On Sat, Oct 3, 2009 at 12:24 PM, Rainer Jung rainer.j...@kippdata.de wrote: On 03.10.2009 20:07, Joe Hansen wrote: Hey All, I get this error (java.lang.OutOfMemoryError: Java heap space) after my Apache 2.0/Tomcat 5.5/mod_jk installation has been up and running for a few hours. This problem started just since two days. Never had this issue before! I have also noticed that as soon as I startup the server, 9 httpd processes start. Number of httpd processes keep on increasing until I get the OutOfMemoryError. $ps -aef | grep httpd root 31984 1 0 11:23 ?00:00:00 /usr/sbin/httpd apache 31987 31984 0 11:23 ?00:00:00 /usr/sbin/httpd apache 31988 31984 0 11:23 ?00:00:00 /usr/sbin/httpd apache 31989 31984 0 11:23 ?00:00:00 /usr/sbin/httpd apache 31990 31984 0 11:23 ?00:00:00 /usr/sbin/httpd apache 31991 31984 0 11:23 ?00:00:00 /usr/sbin/httpd apache 31992 31984 0 11:23 ?00:00:00 /usr/sbin/httpd apache 31993 31984 0 11:23 ?00:00:00 /usr/sbin/httpd apache 31994 31984 0 11:23 ?00:00:00 /usr/sbin/httpd Sounds like requests get stuck or responses are only returned very slowly. I would take thread dumps during the time requests pile up (e.g. httpd process count increases). Thread dumps are generated by kil -QUIT against the Tomcat process. Result is written to catalina.out. Always take afew thread dumps shortly after each other, e.g. 3 dumps each 3 seconds apart from the previous one, so that you can find out, if a status in a dump is pure coincidence or lasts for somewhat longer. $ps -aef | grep tomcat root 31949 1 43 11:23 pts/000:00:58 /usr/java/jdk/bin/java -Djava.u il.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.co fig.file=/usr/lib/apache-tomcat/conf/logging.properties -Djava.endorsed.dirs=/u r/lib/apache-tomcat/common/endorsed -classpath :/usr/lib/apache-tomcat/bin/boot trap.jar:/usr/lib/apache-tomcat/bin/commons-logging-api.jar -Dcatalina.base=/us /lib/apache-tomcat -Dcatalina.home=/usr/lib/apache-tomcat -Djava.io.tmpdir=/usr lib/apache-tomcat/temp org.apache.catalina.startup.Bootstrap start There is no Java memory configuration included above (i.e. al defaults). It might well be, that you have to explicitely set heap size, perm size and if you like also eden and semi spaces. Can someone on this list please help me resolve this issue. Thanks you, Joe Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: InvocationTargetException results OutOfMemory issue ascodecache is full in tomcat 5.5
From: subrahmanyam [mailto:venkata.ad...@genpact.com] Subject: RE: InvocationTargetException results OutOfMemory issue ascodecache is full in tomcat 5.5 Is there any setting in JAVA_OPTS to refresh the codecache once it reaches to maximum? No, but you can raise the maximum via the -XX:ReservedCodeCacheSize=??? parameter. The default is indeed 48m for -server mode. I've never seen the CodeCache generate an OOME before, so I'm not fully convinced this is the problem, but it's worth a try. - 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: Cannot set remote address in valve (Tomcat 5.5)
I know I'm late in this discussion. Besides the very good mentioning of mod_remoteip, RemoteIpValve and XForwardedFilter I guess there's a way of doing it in case you are using mod_jk. mod_jk (and mod_proxy_ajp) use the AJP protocol between the web server and the backend, e.g. Tomcat. This protocol transports the original communication information from the web server to the backend, and when remote IP etc., it doesn't get the backend data (e.g. the client of the backend is the web server, not very intersting), but instead the data forwarded by the web server. Since few versions of mod_jk we allow this data to be influenced by the admin of the web server. Most of the data can be taken from mod_jk out of so-called environment variables of Apache httpd, and those variables can be manipulated by mod_rewrite. With a little config magic you could e.g. - Let mod_rewrite check, whether the X-Forwarded-For header was set - Let mod_rewrite check, whether there's more than on IP in it, if yes extract the first one, if no take the whole header - Put the result into the magic env var and now mod_jk will forward this result as the remote IP address instead of the one retrieved from the TCP connection. For details see: http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html and http://tomcat.apache.org/connectors-doc/reference/apache.html Warning: you very likely would need to use Apache httpd 2.2, because before mod_rewrite might not have been powerful enough. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to integrate tomcat with IDE tools like eclipse,Netbeans?
Follow this tutorial, http://www.coreservlets.com/Apache-Tomcat-Tutorial/ -Deepa 2009/10/6 srinivas2828 srinivas2...@gmail.com hi friends does anybody know how to integrate tomcat with tomcat with eclipse thanks in advance -- View this message in context: http://www.nabble.com/how-to-integrate-tomcat-with-IDE-tools-like-eclipse%2CNetbeans--tp25764753p25764753.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: How to Map domain to a context using Mod_jk
On 06.10.2009 06:56, gpike wrote: I have Virtual Hosts defined in Apache for each domain. I want to map the domain to a context in Tomcat. For instance I would like mysite.com to map to /mysite_com in Tomcat. Would it be something like: VirtualHost *:80 ServerName mysite.com RewriteRule ^/(.*)$ /mysite_com/$1 [PT] JkMount /mysite_com/* worker1 /VirtualHost Is there a better way? Thanks Gordon If you already have contexts like mysite_com and you have reasons for adding httpd and mod_jk, then yes, that would be the way to go. The RewriteRule is a bit underspecified though, it would also apply to URLs, which already start with /mysite_com/. You can use RewriteCond with a ! to check against not starting with /mysite_com/. You miht run into trouble with cookies and redirects. Have a look at http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html#URL Rewriting concerning more info about those. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to integrate tomcat with IDE tools like eclipse,Netbeans?
Thanks for your Help and I will go through the material and I will let you know what happen... again thanks a lot Deepa Annamalai wrote: Follow this tutorial, http://www.coreservlets.com/Apache-Tomcat-Tutorial/ -Deepa 2009/10/6 srinivas2828 srinivas2...@gmail.com hi friends does anybody know how to integrate tomcat with tomcat with eclipse thanks in advance -- View this message in context: http://www.nabble.com/how-to-integrate-tomcat-with-IDE-tools-like-eclipse%2CNetbeans--tp25764753p25764753.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 -- View this message in context: http://www.nabble.com/how-to-integrate-tomcat-with-IDE-tools-like-eclipse%2CNetbeans--tp25764753p25768500.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: java.lang.OutOfMemoryError: Java heap space
On 05.10.2009 18:58, Joe Hansen wrote: Thank you so much for your tips, Rainer! The websites went down yet again. Increasing the java heap size took care of the OutOfMemoryError, but the number of httpd processes keep increasing until the websites crash. I haven't added any new code in the past few months, hence I am surprised why the requests are getting stuck. Here's a link to the tomcat thread dumps: http://pastebin.com/m17eea139 Please let me know if you cannot view it and I will email the relevant portion of the catalina.out file to you. Is there an easy way to find out what code is causing the requests to get stuck? The dump file contains three thread dumps. The things all dumps have in common: - 60 threads for the quartz scheduler, all idle - 13 threads in the AJP connection pool, connected to Apache, but idle waiting for the next request to be send (the same threads in all three dumps) - 6 store plus 6 expiry threads of the EHCache, seems idle - 1 AJP + 1 HTTP(S) thread (port 8443) waiting to accept the next new connection to come in - 2 AJP + 3 HTTP(S) threads (port 8443) sitting idle the pool, waiting for work - a couple of other normal threads not directly related to request handling So the time you took the three dumps, this Tomcat was completely idle and did not have a single request to handle. If you are completely sure, you took the dumps while there was a storm of requests and your system couldn't cope the load, something has prevented the requests to ever reach Tomcat. I don't have your Tomcat version at hand at the moment, but for some time very special OutOfMemory errors (could not create native thread) lead to a situation, where Tomcat simply wouldn't accept any new connections. Although you report OutOfMemory errors, I'm not directly suggesting that that is your problem here. There might still be a relation though. Are you sure, that you took the dumps for the right Tomcat at the right time? Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat training at ApacheCon
In addition to the Tomcat Track, http://us.apachecon.com/c/acus2009/schedule#tomcat , we are also putting on a 2 day Tomcat training, http://us.apachecon.com/c/acus2009/sessions/452 , It's a great track for both administrators and developers and goes above and beyond just the configuration files. If you have any questions, feel free to contact me directly. A recent feathercast about the Tomcat training. http://feathercast.org/?p=86 best Filip - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to Map domain to a context using Mod_jk
I want to be able to add new domains without restarting Tomcat. In tomcat adding a VirtualHost would require a restart. I believe I can add a VirtualHost in Apache without a restart. If I could redirect that to a webapp context in Tomcat I think I can add those without a restart. Is that the way to accomplish that? Pid Ster wrote: On 6 Oct 2009, at 05:56, gpike gop...@gmail.com wrote: I have Virtual Hosts defined in Apache for each domain. I want to map the domain to a context in Tomcat. For instance I would like mysite.com to map to /mysite_com in Tomcat. Would it be something like: VirtualHost *:80 ServerName mysite.com RewriteRule ^/(.*)$ /mysite_com/$1 [PT] JkMount /mysite_com/* worker1 /VirtualHost Is there a better way? You mean is there a way to achieve the above with Tomcat? Yes: define a default or ROOT context for each host. Tomcat docs site has plenty of info on virtual hosts and setting up web application contexts. p Thanks Gordon -- View this message in context: http://www.nabble.com/How-to-Map-domain-to-a-context-using-Mod_jk-tp25762921p25762921.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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/How-to-Map-domain-to-a-context-using-Mod_jk-tp25762921p25768966.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
alias problem in tomcat5.0 + apache1.3
Hi, we have tomcat5.0 and apache1.3. my aim is instead of http://localhost:8085/DOMAIN, how can i call http://partha16/DOMAIN. for that i have mdified server.xml and httpd.conf file. but it says page not found. i have attached the httpd.conf file. first i tried with virtual host , but it has not worked. so i commented the virtualhost tag. Can some one help me in this configuration peoble? == In apache: httpd.conf, i have following line: httpd.conf Directory D:/software/Tomcat 5.0/DOMAIN/DOMAIN Order allow,deny Allow from all /Directory DocumentRoot D:/software/Tomcat 5.0/DOMAIN/DOMAIN Alias /partha16 D:/software/Tomcat 5.0/DOMAIN/DOMAIN/ Location /partha16 Order allow,deny Allow from all # DirectoryIndex portal.htm /Location == following lines has been added in server.xml server.xml Host name=partha16 debug=1 appBase=DOMAIN unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=DOMAIN_com. suffix=.log timestamp=true/ Context path= docBase=DOMAIN debug=0 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=DOMAIN. suffix=.log timestamp=true / Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuelocalhost/value /parameter /ResourceParams /Context /Host http://www.nabble.com/file/p25769060/httpd.conf httpd.conf -- View this message in context: http://www.nabble.com/alias-problem-in-tomcat5.0-%2B-apache1.3-tp25769060p25769060.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: How to Map domain to a context using Mod_jk
From: gpike [mailto:gop...@gmail.com] Subject: Re: How to Map domain to a context using Mod_jk In tomcat adding a VirtualHost would require a restart. Not true; use the supplied host-manager (not manager) webapp to manipulate Host entries on the fly. The only caveat is that it does not update server.xml, so you would need to do that separately, or always use host-manager to create the virtual hosts after a restart. - 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: Sharing webapps folder in tomcat cluster
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paolo, On 10/5/2009 10:04 AM, Paolo Santarsiero wrote: Load balancing works fine, but when I shutdown a tomcat with a open session, replication sessions doesn't works. What do you think? You should post another question so folks on the list with replication experience can respond. Remember to provide as much information as you can about your environment and what you can observe. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrLV+UACgkQ9CaO5/Lv0PDgkgCgwkaY65GouVew2OuLVjLeDDpA BboAoJhOgenXuKSsjDwSIGIuth60JUse =3JAp -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to Map domain to a context using Mod_jk
Really great. So just so I understand, I want to host users sites where they have their own domain. I want to be able to deploy their webapp, for their domain in my server without the restarting the Tomcat server. I also want to automate the process. I thought a restart was needed because VirtualHost config is in the server.xml. So are you saying using host-manager I could add the new VirtualHost, but I would also need to add it to server.xml because the host-manager changes would be lost at restart? If so that would make everything simpler. Thanks. Caldarale, Charles R wrote: From: gpike [mailto:gop...@gmail.com] Subject: Re: How to Map domain to a context using Mod_jk In tomcat adding a VirtualHost would require a restart. Not true; use the supplied host-manager (not manager) webapp to manipulate Host entries on the fly. The only caveat is that it does not update server.xml, so you would need to do that separately, or always use host-manager to create the virtual hosts after a restart. - 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 -- View this message in context: http://www.nabble.com/How-to-Map-domain-to-a-context-using-Mod_jk-tp25762921p25770177.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
Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP professional. I have a problem that occurs during startup deploying a WAR file. Tomcat deploys the WAR file but then there is a delay of minutes before it tries to start the application. During the delay, there is no CPU usage and there is no abnormal activity that I can detect. When Tomcat decides to start the application, it fires right up. It almost seems like Tomcat is blocked waiting for a reply from some request. My typical workflow consists of the following: Open a command shell. Edit code Build WAR Remove ${CATALINA_HOME}/webapps/* Remove ${CATALINA_HOME}/work/Catalina/localhost Remove ${CATALINA_HOME}/logs/* Copy the WAR file to ${CATALINA_HOME}/webapps From the command shell: startup Test application From the command shell: shutdown repeat I set the log level for Tomcat to debug and this is the output, early on: 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.HostConfig - Watching WatchedResource 'D:\apache-tomcat-6.0.18\conf\web.xml' 2009-10-04 16:04:23,327 INFO main org.apache.catalina.startup.HostConfig - Deploying web application archive Spc.war 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.core.ContainerBase - Add child StandardContext[/Spc] StandardEngine[Catalina].StandardHost[localhost] 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.ContextConfig - ContextConfig: Initializing 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.ContextConfig - Processing context [/Spc] configuration file D:\apache-tomcat-6.0.18 conf/context.xml 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.ContextConfig - Processing context [/Spc] configuration file D:\apache-tomcat-6.0.18\conf Catalina/localhost/context.xml.default [ This is almost a 4 minute delay ] 2009-10-04 16:08:19,481 DEBUG main org.apache.catalina.core.StandardContext - Starting /Spc 2009-10-04 16:08:19,481 DEBUG main org.apache.catalina.core.StandardContext - Registering j2eeType=WebModule,name=//localhost/Spc,J2EEApplication=none,J2EEServe r=none for null I'm at a loss since I startup and shutdown Tomcat during each iteration. There is no context file in conf or conf/Catalina/localhost. I don't delete to the RecycleBin. If anyone can tell me what I'm doing wrong or what may be causing the delay, I'd appreciate it.
Re: shutdown.sh and graceful shutdown
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marcoi, On 10/5/2009 8:07 AM, Marcoi wrote: I have a servlet with the following code: for (int i = 0; i 50; i++) { System.out.println(waiting + i); Thread.currentThread().sleep(500); } PrintWriter writer = aResponse.getWriter(); writer.write(duh); writer.flush(); and this is the output when I issue a request and then run ./shutdown.sh [snip: evidence that the servlet doesn't survive the OP's expected 25 second lifespan] Take a look at the unload() method in http://svn.apache.org/repos/asf/tomcat/tc6.0.x/tags/TOMCAT_6_0_20/java/org/apache/catalina/core/StandardWrapper.java You can see that Tomcat is rigged to wait a reasonable amount of time for a servlet to complete before it is destroyed. There is an unloadDelay member in that class that is apparently inherited from the parent Container object (which is a Context) but defaults to 2 seconds. As you can see it only waited for 3 seconds before taking down the server instead to let the request end is there a way to configure how long to wait? If you look at the documentation for Context, you'll see that unloadDelay is a configurable attribute of your webapp's Context element: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html Set this value to something longer than 2 seconds to allow your servlet code more time to complete before the threads are killed. Note that there does not seem to be a value to use for wait forever to ensure that a request has been completed before shutting down. You'll just have to set this value high enough to meet your needs. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrLXCgACgkQ9CaO5/Lv0PAXHQCgrqbTbg8AdYPIgCeUSGIlv5V8 Uw0AnRg3/n9RiahyRid884rl0GYKrJMU =3g7C -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Is ready the cluster deployer object?
Hi, I need to deploy many applications on a Tomcat's cluster, so I'm looking for an easy solution to do it. I had read about deployer element in cluster; the idea here is that if you have a cluster of Tomcat nodes that are communicating together, the administrator may deploy distributable webapps to one of the nodes in the cluster, and it will replicate the webapp across the cluster to all of the other participating nodes so that each of them will deploy the webapp. But at this time the element is broken, and tomcat's team is working to fix it. Does someone know when it will going out? Or are there actually other solutions to my problem? Thanks.
RE: alias problem in tomcat5.0 + apache1.3
i did'nt see where port 8085 specified in your connector setting? i also would suggest specifying protocol in this case HTTP/1.1 Connector port=8085 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / the configuration for webapps appears incorrect i would suggest change D:/software/Tomcat 5.0/DOMAIN/DOMAIN to D:/software/Tomcat 5.0/webapps //reflect the new appBase of webapps change Host name=partha16 debug=1 appBase=DOMAIN unpackWARs=true autoDeploy=true to Host name=partha16 debug=1 appBase=webapps unpackWARs=true autoDeploy=true namaste Martin Gainty __ Please do not alter/modify or disrupt this transmission. Thank You Date: Tue, 6 Oct 2009 06:48:35 -0700 From: partha_samanta...@rediffmail.com To: users@tomcat.apache.org Subject: alias problem in tomcat5.0 + apache1.3 Hi, we have tomcat5.0 and apache1.3. my aim is instead of http://localhost:8085/DOMAIN, how can i call http://partha16/DOMAIN. for that i have mdified server.xml and httpd.conf file. but it says page not found. i have attached the httpd.conf file. first i tried with virtual host , but it has not worked. so i commented the virtualhost tag. Can some one help me in this configuration peoble? == In apache: httpd.conf, i have following line: httpd.conf Directory D:/software/Tomcat 5.0/DOMAIN/DOMAIN Order allow,deny Allow from all /Directory DocumentRoot D:/software/Tomcat 5.0/DOMAIN/DOMAIN Alias /partha16 D:/software/Tomcat 5.0/DOMAIN/DOMAIN/ Location /partha16 Order allow,deny Allow from all # DirectoryIndex portal.htm /Location == following lines has been added in server.xml server.xml Host name=partha16 debug=1 appBase=DOMAIN unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=DOMAIN_com. suffix=.log timestamp=true/ Context path= docBase=DOMAIN debug=0 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=DOMAIN. suffix=.log timestamp=true / Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuelocalhost/value /parameter /ResourceParams /Context /Host http://www.nabble.com/file/p25769060/httpd.conf httpd.conf -- View this message in context: http://www.nabble.com/alias-problem-in-tomcat5.0-%2B-apache1.3-tp25769060p25769060.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 _ Hotmail: Powerful Free email with security by Microsoft. http://clk.atdmt.com/GBL/go/171222986/direct/01/
RE: How to Map domain to a context using Mod_jk
From: gpike [mailto:gop...@gmail.com] Subject: RE: How to Map domain to a context using Mod_jk I thought a restart was needed because VirtualHost config is in the server.xml. Tomcat has APIs for pretty much everything, and these are used by the parser for server.xml to create the internal objects, including those for each Host. The host-manager webapp does the same. So are you saying using host-manager I could add the new VirtualHost, but I would also need to add it to server.xml because the host-manager changes would be lost at restart? Adding it to server.xml is one way; you could also keep track of the additional hosts separately and just call the host-manager webapp with the necessary data to add each one at Tomcat startup. - 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 hangs for minutes between ContextConfig and StandardContext (Starting the app)
From: Law, Christopher [mailto:chris@snapon.com] Subject: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) It almost seems like Tomcat is blocked waiting for a reply from some request. Quite possible. Could be DNS resolution, or references in .xml files to external DTDs, among others. You might want to run Wireshark while Tomcat is starting and just see what requests are being made. Also, try taking a thread dump or three during the delay and see what's going on inside Tomcat. There is no context file in conf or conf/Catalina/localhost. So you removed the standard conf/context.xml file that's distributed with Tomcat? Are there any remote (CIFS/SMB) file references involved? - 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 hangs for minutes between ContextConfig and StandardContext (Starting the app)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Christopher, On 10/6/2009 10:50 AM, Law, Christopher wrote: Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP professional. I have a problem that occurs during startup deploying a WAR file. Tomcat deploys the WAR file but then there is a delay of minutes before it tries to start the application. During the delay, there is no CPU usage and there is no abnormal activity that I can detect. When Tomcat decides to start the application, it fires right up. It almost seems like Tomcat is blocked waiting for a reply from some request. It might be. Can you take a thread dump during this delay to see what is happening? http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F My guess is that you are using XML validation and you have a firewall that is preventing the JVM from contacting a remote server to fetch a DTD. Another possibility is that SecureRandom is taking forever to initialize: if your JVM is configured to use a blocking source of entropy, that may be the problem. This often happens in *NIX environments, but it appears that you are running on Microsoft Windows, so that's unlikely to be the problem. Any more information you can provide will certainly be helpful. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrLZSQACgkQ9CaO5/Lv0PBTXgCfeVocP4clX5dBblkIKaBwrHkG rHAAn1klDppfjMEU+vA4wDQQqLsNryJP =Sfu+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: shutdown.sh and graceful shutdown
Chris, Christopher Schultz-2 wrote: If you look at the documentation for Context, you'll see that unloadDelay is a configurable attribute of your webapp's Context element: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html Exactly what I was looking for. Thanks. Marco -- View this message in context: http://www.nabble.com/shutdown.sh-and-graceful-shutdown-tp25749596p25771598.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: ssl_error_internal_error_alert in firefox only, dependent on jdk version (tomcat 5.5.26)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nada, On 10/1/2009 4:36 PM, Nada O'Neal wrote: I'm stuck on Tomcat 5.5.26 to support a specific application. This is a Solaris 9 server with no Apache - tomcat is handling its own webserving. We're hoping to upgrade the JDK. I can use JDK-1.5.0_21 successfully. When I start tomcat with JDK-1.6.0_16, I get one specific issue... Firefox, but not Safari or IE, will report on https connections: Secure Connection Error An error occurred during a connection to mysite.com:8443. Peer reports it experienced an internal error. (Error code: ssl_error_internal_error_alert) What kind of certificate is it? Self-Signed? Signed by a real CA? One of those new-fangled EV certs? If it's an EV cert, then you need not one but /two/ intermediate certs to be installed in your keystore and provided to the client during the SSL handshake. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrLbhMACgkQ9CaO5/Lv0PAGswCgu5JjYsBl4nDiUK6oabPW+RhC FHQAnRP5vVxBX/Oe2o9DAgfhx9AdUejn =RR+0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Repsonse question...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tony, On 10/4/2009 10:13 PM, Tony Anecito wrote: What class method for Tomcat would show the response time? I am using the jvirtualvm to profile the code (simplest and easy to use) but I need to know the name/method that would be closest to the socket to get an idea how fast the container/app is. Look at the AccessLogValve that comes with Tomcat. That's the most user-servicable component that can get you what you need. If you want to instrument Tomcat itself, you'll probably have to look at modifying whatever Connector you are using (HTTP, AJP, etc.). If you want to go bare-metal, you can always attach a packet sniffer to the TCP port and time everything. For that, you'll want Wireshark or even libpcap if you don't really care about navigating the packets in a convenient way. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrLbyoACgkQ9CaO5/Lv0PCfVgCguD7vWRm9NMS/xBAQIihOoqg1 8doAni7anMwGEMtB3GOvo9oNz5sPWS3V =X5vg -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.OutOfMemoryError: Java heap space
Rainer, Thanks for looking at those long thread dumps for me!! I am sorry. I did NOT take these dumps at the right time (i.e. when Tomcat was inundated with requests and couldn't cope with the load). After I increased the heap size to 512MB (from 64MB default), I am not getting the OutOfMemoryError(s) anymore. After I set KeepAlive On (Thanks Andre!), the number httpd processes isn't increasing either. The number of httpd processes increased from 8 to 21 and stayed there for more than 16 hours now. If the number of httpd processes gets out of control again, I will definitely take thread dumps once again. However, I doubt the issue is fixed because I should have seen this issue long time ago (since I haven't changed any code nor the traffic to our websites increased in a long while). Should I just wait and see or are there any tests that I can do? Your contribution to this forum is amazing, Rainer. I am grateful to you and Andre for your efforts. Thank you! Regards, Joe On Tue, Oct 6, 2009 at 7:25 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 05.10.2009 18:58, Joe Hansen wrote: Thank you so much for your tips, Rainer! The websites went down yet again. Increasing the java heap size took care of the OutOfMemoryError, but the number of httpd processes keep increasing until the websites crash. I haven't added any new code in the past few months, hence I am surprised why the requests are getting stuck. Here's a link to the tomcat thread dumps: http://pastebin.com/m17eea139 Please let me know if you cannot view it and I will email the relevant portion of the catalina.out file to you. Is there an easy way to find out what code is causing the requests to get stuck? The dump file contains three thread dumps. The things all dumps have in common: - 60 threads for the quartz scheduler, all idle - 13 threads in the AJP connection pool, connected to Apache, but idle waiting for the next request to be send (the same threads in all three dumps) - 6 store plus 6 expiry threads of the EHCache, seems idle - 1 AJP + 1 HTTP(S) thread (port 8443) waiting to accept the next new connection to come in - 2 AJP + 3 HTTP(S) threads (port 8443) sitting idle the pool, waiting for work - a couple of other normal threads not directly related to request handling So the time you took the three dumps, this Tomcat was completely idle and did not have a single request to handle. If you are completely sure, you took the dumps while there was a storm of requests and your system couldn't cope the load, something has prevented the requests to ever reach Tomcat. I don't have your Tomcat version at hand at the moment, but for some time very special OutOfMemory errors (could not create native thread) lead to a situation, where Tomcat simply wouldn't accept any new connections. Although you report OutOfMemory errors, I'm not directly suggesting that that is your problem here. There might still be a relation though. Are you sure, that you took the dumps for the right Tomcat at the right time? 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: Tomcat training at ApacheCon
sounds great..any sessions for chicago,ny,boston or dc? thanks, Martin Gainty __ Date: Tue, 6 Oct 2009 07:30:20 -0600 From: devli...@hanik.com To: users@tomcat.apache.org Subject: Tomcat training at ApacheCon In addition to the Tomcat Track, http://us.apachecon.com/c/acus2009/schedule#tomcat , we are also putting on a 2 day Tomcat training, http://us.apachecon.com/c/acus2009/sessions/452 , It's a great track for both administrators and developers and goes above and beyond just the configuration files. If you have any questions, feel free to contact me directly. A recent feathercast about the Tomcat training. http://feathercast.org/?p=86 best Filip - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Hotmail: Powerful Free email with security by Microsoft. http://clk.atdmt.com/GBL/go/171222986/direct/01/
Expiration date on static content?
Hello, I do have a tomcat working for several years on my production servers, and I am trying to optimize a thing or two. I already use the gzip compression, and this works very well. However, I noticed that all my static content is served with no expiration date at all. This doesn't tell browsers when to revalidate the static content and let them decide of the caching policy for my site. Is there a place to configure something like this on a Tomcat 6.0.20 install? Is this in the server.xml or by webapp in a context.xml file? web.xml? I couldn't figure out a way to do this... Thanks for your help
RE: Expiration date on static content?
http://onjava.com/pub/a/onjava/2004/03/03/filters.html -Original Message- From: pieroxy [mailto:pier...@gmail.com] Sent: Tuesday, October 06, 2009 12:03 PM To: Tomcat Users List Subject: Expiration date on static content? Hello, I do have a tomcat working for several years on my production servers, and I am trying to optimize a thing or two. I already use the gzip compression, and this works very well. However, I noticed that all my static content is served with no expiration date at all. This doesn't tell browsers when to revalidate the static content and let them decide of the caching policy for my site. Is there a place to configure something like this on a Tomcat 6.0.20 install? Is this in the server.xml or by webapp in a context.xml file? web.xml? I couldn't figure out a way to do this... Thanks for your help *** NOTICE * This message is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply or by telephone (call us collect at 512-343-9100) and immediately delete this message and all its attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
Does the app perform normally when it does start up? I recently experienced this when I inadvertently placed the same jar in two places - the app displayed other errors when it finally loaded. p -- On 6 Oct 2009, at 15:52, Law, Christopher chris@snapon.com wrote: Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP professional. I have a problem that occurs during startup deploying a WAR file. Tomcat deploys the WAR file but then there is a delay of minutes before it tries to start the application. During the delay, there is no CPU usage and there is no abnormal activity that I can detect. When Tomcat decides to start the application, it fires right up. It almost seems like Tomcat is blocked waiting for a reply from some request. My typical workflow consists of the following: Open a command shell. Edit code Build WAR Remove ${CATALINA_HOME}/webapps/* Remove ${CATALINA_HOME}/work/Catalina/localhost Remove ${CATALINA_HOME}/logs/* Copy the WAR file to ${CATALINA_HOME}/webapps From the command shell: startup Test application From the command shell: shutdown repeat I set the log level for Tomcat to debug and this is the output, early on: 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.HostConfig - Watching WatchedResource 'D:\apache-tomcat-6.0.18\conf\web.xml' 2009-10-04 16:04:23,327 INFO main org.apache.catalina.startup.HostConfig - Deploying web application archive Spc.war 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.core.ContainerBase - Add child StandardContext[/Spc] StandardEngine[Catalina].StandardHost [localhost] 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.ContextConfig - ContextConfig: Initializing 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.ContextConfig - Processing context [/Spc] configuration file D:\apache-tomcat-6.0.18 conf/context.xml 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.ContextConfig - Processing context [/Spc] configuration file D:\apache-tomcat-6.0.18\conf Catalina/localhost/context.xml.default [ This is almost a 4 minute delay ] 2009-10-04 16:08:19,481 DEBUG main org.apache.catalina.core.StandardContext - Starting /Spc 2009-10-04 16:08:19,481 DEBUG main org.apache.catalina.core.StandardContext - Registering j2eeType=WebModule,name=//localhost/ Spc,J2EEApplication=none,J2EEServe r=none for null I'm at a loss since I startup and shutdown Tomcat during each iteration. There is no context file in conf or conf/Catalina/localhost. I don't delete to the RecycleBin. If anyone can tell me what I'm doing wrong or what may be causing the delay, I'd appreciate it. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Repsonse question...
Thnaks Chritopher. I am running JBoss and Apache on the same box so not sure if the TCP/IP stack is bypassed in that case. What I am trying to do is find out where my bottlenecks are. In my code I instrument the response time for my web service and I am below 1msec and if visualvm is right more like 20microseconds response time for the method exposed for my web service. At my Thick client over the lan I am seeing 3-5msec response time using JBoss 4.2.2. So trying to go from tier to tier to see how fast the tiers are and if there is anything else I can tune. I just updated to JBoss 5.1.0 and am seeing 1msec slower or 4-5msec but have not tuned it yet except for jvm settings. I am using ajp for the connector. I plan to upgrade my Apache web server soon to the latest version hoping for performance improvement for the ajp connector. I will look into what you mentioned. Best Regards, -Tony --- On Tue, 10/6/09, Christopher Schultz ch...@christopherschultz.net wrote: From: Christopher Schultz ch...@christopherschultz.net Subject: Re: Tomcat Repsonse question... To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, October 6, 2009, 10:24 AM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tony, On 10/4/2009 10:13 PM, Tony Anecito wrote: What class method for Tomcat would show the response time? I am using the jvirtualvm to profile the code (simplest and easy to use) but I need to know the name/method that would be closest to the socket to get an idea how fast the container/app is. Look at the AccessLogValve that comes with Tomcat. That's the most user-servicable component that can get you what you need. If you want to instrument Tomcat itself, you'll probably have to look at modifying whatever Connector you are using (HTTP, AJP, etc.). If you want to go bare-metal, you can always attach a packet sniffer to the TCP port and time everything. For that, you'll want Wireshark or even libpcap if you don't really care about navigating the packets in a convenient way. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrLbyoACgkQ9CaO5/Lv0PCfVgCguD7vWRm9NMS/xBAQIihOoqg1 8doAni7anMwGEMtB3GOvo9oNz5sPWS3V =X5vg -END PGP SIGNATURE- - 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: alias problem in tomcat5.0 + apache1.3
On 6 Oct 2009, at 14:49, partha_ctc partha_samanta...@rediffmail.com wrote: Hi, we have tomcat5.0 and apache1.3. my aim is instead of http://localhost:8085/DOMAIN, how can i call http://partha16/DOMAIN. for that i have mdified server.xml and httpd.conf file. but it says page not found. i have attached the httpd.conf file. first i tried with virtual host , but it has not worked. so i commented the virtualhost tag. Can some one help me in this configuration peoble? A thorough reading of the documentation would probably help. You seem to have confusing arrangement there. Http://tomcat.apache.org/ Look for virtual hosts, under configuration. 5.0 is no longer supported - you should use a more recent version if possible. p == In apache: httpd.conf, i have following line: httpd.conf Directory D:/software/Tomcat 5.0/DOMAIN/DOMAIN Order allow,deny Allow from all /Directory DocumentRoot D:/software/Tomcat 5.0/DOMAIN/DOMAIN Alias /partha16 D:/software/Tomcat 5.0/DOMAIN/DOMAIN/ Location /partha16 Order allow,deny Allow from all # DirectoryIndex portal.htm /Location == following lines has been added in server.xml server.xml Host name=partha16 debug=1 appBase=DOMAIN unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=DOMAIN_com. suffix=.log timestamp=true/ Context path= docBase=DOMAIN debug=0 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=DOMAIN. suffix=.log timestamp=true / Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuelocalhost/value /parameter /ResourceParams /Context /Host http://www.nabble.com/file/p25769060/httpd.conf httpd.conf -- View this message in context: http://www.nabble.com/alias-problem-in-tomcat5.0-%2B-apache1.3-tp25769060p25769060.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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.OutOfMemoryError: Java heap space
Rainer, I spoke to soon! As I suspected, the problem isn't fixed yet and the websites crashed again. This time I took three thread dumps at the time tomcat was down. Here they are: http://pastebin.com/m2a7e1198 I will learn from your previous analysis of the thread dumps and I try to understand what's happening. Thanks, Joe On Tue, Oct 6, 2009 at 10:23 AM, Joe Hansen joe.hansen...@gmail.com wrote: Rainer, Thanks for looking at those long thread dumps for me!! I am sorry. I did NOT take these dumps at the right time (i.e. when Tomcat was inundated with requests and couldn't cope with the load). After I increased the heap size to 512MB (from 64MB default), I am not getting the OutOfMemoryError(s) anymore. After I set KeepAlive On (Thanks Andre!), the number httpd processes isn't increasing either. The number of httpd processes increased from 8 to 21 and stayed there for more than 16 hours now. If the number of httpd processes gets out of control again, I will definitely take thread dumps once again. However, I doubt the issue is fixed because I should have seen this issue long time ago (since I haven't changed any code nor the traffic to our websites increased in a long while). Should I just wait and see or are there any tests that I can do? Your contribution to this forum is amazing, Rainer. I am grateful to you and Andre for your efforts. Thank you! Regards, Joe On Tue, Oct 6, 2009 at 7:25 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 05.10.2009 18:58, Joe Hansen wrote: Thank you so much for your tips, Rainer! The websites went down yet again. Increasing the java heap size took care of the OutOfMemoryError, but the number of httpd processes keep increasing until the websites crash. I haven't added any new code in the past few months, hence I am surprised why the requests are getting stuck. Here's a link to the tomcat thread dumps: http://pastebin.com/m17eea139 Please let me know if you cannot view it and I will email the relevant portion of the catalina.out file to you. Is there an easy way to find out what code is causing the requests to get stuck? The dump file contains three thread dumps. The things all dumps have in common: - 60 threads for the quartz scheduler, all idle - 13 threads in the AJP connection pool, connected to Apache, but idle waiting for the next request to be send (the same threads in all three dumps) - 6 store plus 6 expiry threads of the EHCache, seems idle - 1 AJP + 1 HTTP(S) thread (port 8443) waiting to accept the next new connection to come in - 2 AJP + 3 HTTP(S) threads (port 8443) sitting idle the pool, waiting for work - a couple of other normal threads not directly related to request handling So the time you took the three dumps, this Tomcat was completely idle and did not have a single request to handle. If you are completely sure, you took the dumps while there was a storm of requests and your system couldn't cope the load, something has prevented the requests to ever reach Tomcat. I don't have your Tomcat version at hand at the moment, but for some time very special OutOfMemory errors (could not create native thread) lead to a situation, where Tomcat simply wouldn't accept any new connections. Although you report OutOfMemory errors, I'm not directly suggesting that that is your problem here. There might still be a relation though. Are you sure, that you took the dumps for the right Tomcat at the right time? 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: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
On 06.10.2009 17:41, Christopher Schultz wrote: Christopher, On 10/6/2009 10:50 AM, Law, Christopher wrote: Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP professional. I have a problem that occurs during startup deploying a WAR file. Tomcat deploys the WAR file but then there is a delay of minutes before it tries to start the application. During the delay, there is no CPU usage and there is no abnormal activity that I can detect. When Tomcat decides to start the application, it fires right up. It almost seems like Tomcat is blocked waiting for a reply from some request. It might be. Can you take a thread dump during this delay to see what is happening? http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F +1 My guess is that you are using XML validation and you have a firewall that is preventing the JVM from contacting a remote server to fetch a DTD. You can also google for xml entity resolution. Another possibility is that SecureRandom is taking forever to initialize: if your JVM is configured to use a blocking source of entropy, that may be the problem. This often happens in *NIX environments, but it appears that you are running on Microsoft Windows, so that's unlikely to be the problem. ... and should only be a problem if SSL is involved. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.OutOfMemoryError: Java heap space
There were 29 httpd processes running when the websites crashed. One thing that was clear from the thread dumps was there were lots of entries for org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner: Starting cleaning of expired tickets from ticket registry at ... Does that indicate that there is something wrong with my CAS configuration? Here's the thread count from the first thread dump: DefaultQuartzScheduler_QuartzSchedulerThread 4 sleeping + 2 waiting on condition = 6 Total DefaultQuartzScheduler_Worker 60 waiting = 60 Total Store ticketCache Expiry Thread (ehcache) 6 waiting on condition = 6 Total Store ticketCache Spool Thread (ehcache) 6 waiting on condition = 6 Total TP-ProcessorXY daemon runnable 20 runnable (mod_jk?) + 3 waiting = 23 Total Java2D Disposer daemon 1 waiting = 1 Total http-8443-Monitor 1 waiting = 1 Total http-8443-Processor 3 waiting + 1 runnable = 4 Total ContainerBackgroundProcessor 1 waiting on condition = 1 Total Low Memory Detector 1 runnable = 1 Total CompilerThread 2 waiting on condition = 2 Total AdapterThread 1 waiting on condition = 1 Total Signal Dispatcher 1 runnable = 1 Total Finalizer 1 waiting = 1 Total Reference Handler 1 waiting = 1 Total org.apache.catalina.startup.Bootstrap.main 1 runnable = 1 Total VM Thread 1 runnable = 1 Total GC task thread 1 runnable = 1 Total VM Periodic Task Thread 1 waiting on condition = 1 Total Thanks, Joe On Tue, Oct 6, 2009 at 11:44 AM, Joe Hansen joe.hansen...@gmail.com wrote: Rainer, I spoke to soon! As I suspected, the problem isn't fixed yet and the websites crashed again. This time I took three thread dumps at the time tomcat was down. Here they are: http://pastebin.com/m2a7e1198 I will learn from your previous analysis of the thread dumps and I try to understand what's happening. Thanks, Joe On Tue, Oct 6, 2009 at 10:23 AM, Joe Hansen joe.hansen...@gmail.com wrote: Rainer, Thanks for looking at those long thread dumps for me!! I am sorry. I did NOT take these dumps at the right time (i.e. when Tomcat was inundated with requests and couldn't cope with the load). After I increased the heap size to 512MB (from 64MB default), I am not getting the OutOfMemoryError(s) anymore. After I set KeepAlive On (Thanks Andre!), the number httpd processes isn't increasing either. The number of httpd processes increased from 8 to 21 and stayed there for more than 16 hours now. If the number of httpd processes gets out of control again, I will definitely take thread dumps once again. However, I doubt the issue is fixed because I should have seen this issue long time ago (since I haven't changed any code nor the traffic to our websites increased in a long while). Should I just wait and see or are there any tests that I can do? Your contribution to this forum is amazing, Rainer. I am grateful to you and Andre for your efforts. Thank you! Regards, Joe On Tue, Oct 6, 2009 at 7:25 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 05.10.2009 18:58, Joe Hansen wrote: Thank you so much for your tips, Rainer! The websites went down yet again. Increasing the java heap size took care of the OutOfMemoryError, but the number of httpd processes keep increasing until the websites crash. I haven't added any new code in the past few months, hence I am surprised why the requests are getting stuck. Here's a link to the tomcat thread dumps: http://pastebin.com/m17eea139 Please let me know if you cannot view it and I will email the relevant portion of the catalina.out file to you. Is there an easy way to find out what code is causing the requests to get stuck? The dump file contains three thread dumps. The things all dumps have in common: - 60 threads for the quartz scheduler, all idle - 13 threads in the AJP connection pool, connected to Apache, but idle waiting for the next request to be send (the same threads in all three dumps) - 6 store plus 6 expiry threads of the EHCache, seems idle - 1 AJP + 1 HTTP(S) thread (port 8443) waiting to accept the next new connection to come in - 2 AJP + 3 HTTP(S) threads (port 8443) sitting idle the pool, waiting for work - a couple of other normal threads not directly related to request handling So the time you took the three dumps, this Tomcat was completely idle and did not have a single request to handle. If you are completely sure, you took the dumps while there was a storm of requests and your system couldn't cope the load, something has prevented the requests to ever reach Tomcat. I don't have your Tomcat version at hand at the moment, but for some time very special OutOfMemory errors (could not create native thread) lead to a situation, where Tomcat simply wouldn't accept any new connections. Although you report OutOfMemory errors, I'm not directly suggesting that that is your problem here. There might still be a relation though. Are you sure, that you took the dumps for the right Tomcat at the right
RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
Thanks for the reply. A little more information: 1. The app always works after it starts up (assuming I didn't introduce any errors). 2. If, after the app starts up (whether I exercise it or not), I shutdown Tomcat, remove the exact same stuff from Tomcat (WAR, exploded WAR, work/Catalina/localhost and logs), copy the WAR to webapps and startup Tomcat, there is NO (appreciable) delay, the app starts right up and runs. 3. The delay only occurs when the WAR file has changed. 4. If I reboot my machine, the first time I deploy a WAR, there is a minor delay (~15 seconds) between the deploy and the startup. Thanks for the tips on the thread dump. I will try to gather some info and post it. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, October 06, 2009 11:41 AM To: Tomcat Users List Subject: Re: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Christopher, On 10/6/2009 10:50 AM, Law, Christopher wrote: Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP professional. I have a problem that occurs during startup deploying a WAR file. Tomcat deploys the WAR file but then there is a delay of minutes before it tries to start the application. During the delay, there is no CPU usage and there is no abnormal activity that I can detect. When Tomcat decides to start the application, it fires right up. It almost seems like Tomcat is blocked waiting for a reply from some request. It might be. Can you take a thread dump during this delay to see what is happening? http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_ running_webapp_.3F My guess is that you are using XML validation and you have a firewall that is preventing the JVM from contacting a remote server to fetch a DTD. Another possibility is that SecureRandom is taking forever to initialize: if your JVM is configured to use a blocking source of entropy, that may be the problem. This often happens in *NIX environments, but it appears that you are running on Microsoft Windows, so that's unlikely to be the problem. Any more information you can provide will certainly be helpful. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrLZSQACgkQ9CaO5/Lv0PBTXgCfeVocP4clX5dBblkIKaBwrHkG rHAAn1klDppfjMEU+vA4wDQQqLsNryJP =Sfu+ -END PGP SIGNATURE- - 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: java.lang.OutOfMemoryError: Java heap space
On 06.10.2009 19:44, Joe Hansen wrote: I will only comment the threads for the AJP pool. Everything else seems not relevant: Dump 1: 20 threads connected to Apache, waiting for the next request 3 threads idle in the pool 1 thread waiting for the next connection 0 threads working on requests Dump 2: 12 threads connected to Apache, waiting for the next request 5 threads idle in the pool 1 thread waiting for the next connection 14 threads working on requests Dump 3: 11 threads connected to Apache, waiting for the next request 5 threads idle in the pool 1 thread waiting for the next connection 15 threads working on requests Dump 4: 11 threads connected to Apache, waiting for the next request 5 threads idle in the pool 1 thread waiting for the next connection 15 threads working on requests Those busy threads in dump 2, 3 and 4 are the same except for one, which started only in dump 3. Most of them are busy working on data. They are *not* waiting for some other system, like database or similar. Out of the 14+15+15 thread stacks, that are interesting, 42 work on some DAOs. Those are the DAO methods they work on: 18 tw.beans.TWFotoSetDAO.getFotosetFotos 11 tw.beans.TWEmailUpdateListDAO.getEmailUpdateList 3 tw.beans.TWFotoSetListDAO.getAllFotosets 3 tw.beans.TWFotoSetDAO.getFotosetFotosQuery2 3 tw.beans.TWFotoSetDAO.getFotosetFotosQuery 3 tw.beans.TWEmailUpdateDAO.getEmailUpdate 1 tw.beans.TWEmailUpdateListDAO.getEmailUpdateListQuery It seems your application is CPU heavy. Either the data objects handled are to heavy weight (maybe some user having huge Fotoset or Email list) or the request rate is simply to large. Is the CPU saturated during the problems? I would activate a good access log and try to find out from that and your webapp logs what maybe special about these web requests or users. Regards, Rainer I will learn from your previous analysis of the thread dumps and I try to understand what's happening. Thanks, Joe On Tue, Oct 6, 2009 at 10:23 AM, Joe Hansen joe.hansen...@gmail.com wrote: Rainer, Thanks for looking at those long thread dumps for me!! I am sorry. I did NOT take these dumps at the right time (i.e. when Tomcat was inundated with requests and couldn't cope with the load). After I increased the heap size to 512MB (from 64MB default), I am not getting the OutOfMemoryError(s) anymore. After I set KeepAlive On (Thanks Andre!), the number httpd processes isn't increasing either. The number of httpd processes increased from 8 to 21 and stayed there for more than 16 hours now. If the number of httpd processes gets out of control again, I will definitely take thread dumps once again. However, I doubt the issue is fixed because I should have seen this issue long time ago (since I haven't changed any code nor the traffic to our websites increased in a long while). Should I just wait and see or are there any tests that I can do? Your contribution to this forum is amazing, Rainer. I am grateful to you and Andre for your efforts. Thank you! Regards, Joe On Tue, Oct 6, 2009 at 7:25 AM, Rainer Jung rainer.j...@kippdata.de wrote: On 05.10.2009 18:58, Joe Hansen wrote: Thank you so much for your tips, Rainer! The websites went down yet again. Increasing the java heap size took care of the OutOfMemoryError, but the number of httpd processes keep increasing until the websites crash. I haven't added any new code in the past few months, hence I am surprised why the requests are getting stuck. Here's a link to the tomcat thread dumps: http://pastebin.com/m17eea139 Please let me know if you cannot view it and I will email the relevant portion of the catalina.out file to you. Is there an easy way to find out what code is causing the requests to get stuck? The dump file contains three thread dumps. The things all dumps have in common: - 60 threads for the quartz scheduler, all idle - 13 threads in the AJP connection pool, connected to Apache, but idle waiting for the next request to be send (the same threads in all three dumps) - 6 store plus 6 expiry threads of the EHCache, seems idle - 1 AJP + 1 HTTP(S) thread (port 8443) waiting to accept the next new connection to come in - 2 AJP + 3 HTTP(S) threads (port 8443) sitting idle the pool, waiting for work - a couple of other normal threads not directly related to request handling So the time you took the three dumps, this Tomcat was completely idle and did not have a single request to handle. If you are completely sure, you took the dumps while there was a storm of requests and your system couldn't cope the load, something has prevented the requests to ever reach Tomcat. I don't have your Tomcat version at hand at the moment, but for some time very special OutOfMemory errors (could not create native thread) lead to a situation, where Tomcat simply wouldn't accept any new connections. Although you report OutOfMemory errors, I'm not directly
Re: java.lang.OutOfMemoryError: Java heap space
Thanks for your feedback, Rainer. The DAO objects/methods that you've mentioned are used for almost every page on our website. So I am not surprised to find them in the thread dumps. However, as you pointed out, the parameters to these methods change depending on the page they are on and if the user is logged in or not. I did not check the CPU usage when the issue happened. I just checked the web application logs and found that first there was an OutOfMemoryError, followed by MySQL errors when TWFotoSetListDAO.getAllFotosets tried to get a database connection. I am *guessing* : I changed the session timeout to 4 hours for the Jasig CAS Single-Signon web application. This stores a ton of tickets in memory. During a 4 hour period when there are more http requests, the 512MB of Java Heap space is not sufficient to store all these tickets. During that time OutOfMemoryError happens and all hell breaks loose subsequently. I probably should decrease the session-timeout to 1 hour or so and see if that changes things. Would you agree, Rainer? Thanks, Joe 2009 Oct 06 / 10:48:43 ERROR - [org.apache.catalina.core.ContainerBase] : Exception invoking periodic operation: java.lang.OutOfMemoryError: Java heap space 2009 Oct 06 / 10:48:43 FATAL - [tw.conn.TWConnectionManager] : com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.io.EOFException STACKTRACE: java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1905) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2351) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2862) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:771) at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3649) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1176) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2558) at com.mysql.jdbc.Connection.init(Connection.java:1485) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266) at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37) at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290) at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771) at org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:74) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at tw.conn.TWConnectionManager.getConnection(Unknown Source) at tw.beans.TWFotoSetListDAO.getAllFotosets(Unknown Source) at tw.beans.TWViewBean.getAllFotosets(Unknown Source) at tw.servlet.TWQueryServlet.doPost(Unknown Source) at tw.servlet.TWQueryServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.jsp.groupby_005fitems_jsp._jspService(groupby_005fitems_jsp.java:152) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at
Re: Tomcat training at ApacheCon
On 10/06/2009 10:55 AM, Martin Gainty wrote: sounds great..any sessions for chicago,ny,boston or dc? for ApacheCon? none planned that I know of. thanks, Martin Gainty __ Date: Tue, 6 Oct 2009 07:30:20 -0600 From: devli...@hanik.com To: users@tomcat.apache.org Subject: Tomcat training at ApacheCon In addition to the Tomcat Track, http://us.apachecon.com/c/acus2009/schedule#tomcat , we are also putting on a 2 day Tomcat training, http://us.apachecon.com/c/acus2009/sessions/452 , It's a great track for both administrators and developers and goes above and beyond just the configuration files. If you have any questions, feel free to contact me directly. A recent feathercast about the Tomcat training. http://feathercast.org/?p=86 best Filip - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Hotmail: Powerful Free email with security by Microsoft. http://clk.atdmt.com/GBL/go/171222986/direct/01/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat training at ApacheCon
bit of a stretch for folks on the east coast or midwest thanks filip, Martin Gainty __ Please do not alter/modify or disrupt this transmission. Thank You Date: Tue, 6 Oct 2009 13:45:53 -0600 From: devli...@hanik.com To: users@tomcat.apache.org Subject: Re: Tomcat training at ApacheCon On 10/06/2009 10:55 AM, Martin Gainty wrote: sounds great..any sessions for chicago,ny,boston or dc? for ApacheCon? none planned that I know of. thanks, Martin Gainty __ Date: Tue, 6 Oct 2009 07:30:20 -0600 From: devli...@hanik.com To: users@tomcat.apache.org Subject: Tomcat training at ApacheCon In addition to the Tomcat Track, http://us.apachecon.com/c/acus2009/schedule#tomcat , we are also putting on a 2 day Tomcat training, http://us.apachecon.com/c/acus2009/sessions/452 , It's a great track for both administrators and developers and goes above and beyond just the configuration files. If you have any questions, feel free to contact me directly. A recent feathercast about the Tomcat training. http://feathercast.org/?p=86 best Filip - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Hotmail: Powerful Free email with security by Microsoft. http://clk.atdmt.com/GBL/go/171222986/direct/01/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Hotmail: Trusted email with powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141665/direct/01/
Re: ssl_error_internal_error_alert in firefox only, dependent on jdk version (tomcat 5.5.26)
Hi Chris, Thanks for responding to my question! I don't have an EV cert, it's just a standard cert signed by Equifax. I have similar certs working on other servers. Again, it's the upgrade from one java to another that seems to cause the problem - running java 1.5, I don't have this issue. But, this may be a case of me getting away with something under 1.5 that I wouldn't be able to get away with under 1.6. The two keys in the keystore currently look like: $ keytool -list -keystore /path/to/keystore Enter keystore password: Keystore type: JKS Keystore provider: SUN Your keystore contains 2 entries root, Sep 29, 2009, trustedCertEntry, Certificate fingerprint (MD5): [...] tomcat, Sep 29, 2009, PrivateKeyEntry, Certificate fingerprint (MD5): [...] ... is this wrong? Thanks again for writing back, I really appreciate it. Christopher Schultz ch...@christopherschultz.net wrote: Firefox, but not Safari or IE, will report on https connections: Secure Connection Error An error occurred during a connection to mysite.com:8443. Peer reports it experienced an internal error. (Error code: ssl_error_internal_error_alert) What kind of certificate is it? Self-Signed? Signed by a real CA? One of those new-fangled EV certs? If it's an EV cert, then you need not one but /two/ intermediate certs to be installed in your keystore and provided to the client during the SSL handshake. my original message was: Hey everyone - I'm stuck on Tomcat 5.5.26 to support a specific application. This is a Solaris 9 server with no Apache - tomcat is handling its own webserving. We're hoping to upgrade the JDK. I can use JDK-1.5.0_21 successfully. When I start tomcat with JDK-1.6.0_16, I get one specific issue... Firefox, but not Safari or IE, will report on https connections: Secure Connection Error An error occurred during a connection to mysite.com:8443. Peer reports it experienced an internal error. (Error code: ssl_error_internal_error_alert) Weirdly, there is no error in any error log when this happens. I think this might be a configuration error on my part. Here's our SSL conf stanza: Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=/path/to/my/keystore keystorePass=somePass / ... I notice that in other people's configs, they have a specific reference to a TrustStore. I have the CA certs imported into the keystore, though, and I'm using this config on other servers, with other versions of tomcat, other versions of the JDK, etc. (However, those are all linux servers.) I'm especially suspicious about this possibility because lately there have been other Firefox https bugs (like the Flash uploader bug) that ultimately have to do with verifying the certificate authority. Adding in a truststore doesn't seem to help, but maybe i r doin it wrong. Thanks for any references or wild speculation you can provide. - Nada (p.s. if you're curious about the Flash uploader bug, see e.g.: http://bugs.adobe.com/jira/browse/FP-201 http://bugs.adobe.com/jira/browse/FP-226 https://bugs.adobe.com/jira/browse/SDK-13196 http://swfupload.org/forum/generaldiscussion/347 ) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.OutOfMemoryError: Java heap space
Rainer Jung wrote: On 06.10.2009 21:44, Joe Hansen wrote: ... It seems your application is CPU heavy. Either the data objects handled are to heavy weight (maybe some user having huge Fotoset or Email list) or the request rate is simply to large. Is the CPU saturated during the problems? I would activate a good access log and try to find out from that and your webapp logs what maybe special about these web requests or users. ... The original post was so long ago in relative terms, that I don't remember the details of your system. But, just in case, you may want to also have a look at the *total* memory usage on your system during those events. If the load has increased (even slightly) recently, it might have reached the point where there is sometimes no longer sufficient physical memory available to process all simultaneous tasks, and the system is starting to swap tasks to virtual memory (on disk). That would cause a dramatic slowdown in request processing, which may have something to do with your problems. If you are under Unix/Linux, the first lines displayed by top would already provide some information in that respect. Or else, just plug in an additional memory bar in your server, and see if it changes anything. They are rather cheap right now. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.OutOfMemoryError: Java heap space
I changed the session-timeout for the CAS webapp to 1 hour and restarted Apache/Tomcat to see if that changes anything. If the issue manifests again, I will surely check the memory and cpu usage using the top command. Rainer, I somewhat doubt that getAllFotosets() is causing the problem. Because I have an administrator account on the website and I can view more photosets than any other user. And when I login and view the photosets nothing alarming seems to be happening. I am not ruling out the possibility altogether though. Andre, you are right. Memory is cheap. However, the machine has 8GB of memory already. I am thinking that it should be sufficient. Here's the output of the free command: [r...@csiweb bin]# free -m totalused free Mem: 8113 7557 555 -/+ buffers/cache:861 7252 Swap:9012 33 8979 Its amazing how you and Andre are able to identify issues with others' Tomcat installations just by looking at their logs and settings. It speaks volumes of your experience with Tomcat. Thank you, Joe On Tue, Oct 6, 2009 at 2:00 PM, Rainer Jung rainer.j...@kippdata.de wrote: On 06.10.2009 21:44, Joe Hansen wrote: Thanks for your feedback, Rainer. The DAO objects/methods that you've mentioned are used for almost every page on our website. So I am not surprised to find them in the thread dumps. However, as you pointed out, the parameters to these methods change depending on the page they are on and if the user is logged in or not. I did not check the CPU usage when the issue happened. I just checked the web application logs and found that first there was an OutOfMemoryError, followed by MySQL errors when TWFotoSetListDAO.getAllFotosets tried to get a database connection. I am *guessing* : I changed the session timeout to 4 hours for the Jasig CAS Single-Signon web application. This stores a ton of tickets in memory. During a 4 hour period when there are more http requests, the 512MB of Java Heap space is not sufficient to store all these tickets. During that time OutOfMemoryError happens and all hell breaks loose subsequently. I probably should decrease the session-timeout to 1 hour or so and see if that changes things. Would you agree, Rainer? Could be. But it could also be, that getAllFotosets() is able to slurp in huge amounts of data to memory and that this is the reason for the OOME. Once you run into an OOME on heap, there's no good relief than restarting the whole JVM. After an OOME you can't prove the correctness of your app any more. Random objects might be missing, resulting in largely undefined behaviour in your webapp or even Tomcat. I'm a bit insisting on the getAllFotosets(), because I once was involved in troubleshooting for a social website and part of their problem was special users having extremely large social data. So once they hit the server it went OOME. Thanks, Joe Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java.lang.OutOfMemoryError: Java heap space
2009/10/6 Joe Hansen joe.hansen...@gmail.com: Andre, you are right. Memory is cheap. However, the machine has 8GB of memory already. I am thinking that it should be sufficient. You might wish to dedicate more of that 8 Gbyte to Java, though. It depends on the performance characteristics of your application - looks to me like MySQL is grabbing a load of your RAM for its cache. top (or similar) would confirm that overall usage, and I assume MySQL has some performance monitoring available that'll tell you the effectiveness of its caches. If you're *just* tipping into using swap, it's almost certainly the case that MySQL is grabbing memory that would otherwise be called free. This may well be the best use for the RAM, but there's a possibility that more RAM dedicated to Java would improve your performance overall. I'm not willing to make that guess without data on the effectiveness of MySQL's cache, though :-). - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Re:Tomcat6.0.16 is too easily to be OutOfMemory compared with Tomcat5.5
Hi All, I am also having the same issue. Does any one have solution for this issue? Thanks, Kalpana kana-s wrote: Thank you for replying. -Xms and -Xmx were 256MB. I changed 512MB but the result was same. As session in implicit object in JSP , if I don't set % session.invalidate();%, sessions will create. The jsp which I used the test isn't set % session.invalidate();%. So I thought sessions were created. Is my thought wrong? I did the same test as Tomcat5.5 with that jsp. The test was completed finished atTomcat5.5 but Tomcat 6.0.16 iwasn't. So I thougft it is strange . Instead of Apache Bench, Next I tried the Performance Center.(one of the load test tool) That added 1 virtual user per 10 secs. Only 30 virtual users, OutOfMemory was occured at Tomcat6.0.16, but Tomcat 5.5.26 was 270 virtual users! I want to know this behavior is defaut in Tomcat6.0 or I had a mistake configurations. Chuck I put the file path to appBase and deleted errorReportValveClass. Thanks. -- Kanako Shimizu kan...@jb4.so-net.ne.jp - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat6.0.16-is-too-easily-to-be-OutOfMemory-compared-with-Tomcat5.5-tp16921744p25779235.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: Re:Tomcat6.0.16 is too easily to be OutOfMemory compared withTomcat5.5
From: kalpanab [mailto:kalpanab_2...@yahoo.com] Subject: Re: Re:Tomcat6.0.16 is too easily to be OutOfMemory compared withTomcat5.5 I am also having the same issue. Does any one have solution for this issue? You resurrected a thread that was nearly 18 months old... and since the OP did not provide any further information, I would have to assume that based on Chris' comments, he actually didn't have a problem. If you are having OOME problems in an environment other than the completely artificial one the OP had, please start a new thread providing more information, including the exact Tomcat version, JVM level (and 32/64 bit mode), platform you're running on, and any JVM command-line parameters you have set. - 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: how to integrate tomcat with IDE tools like eclipse,Netbeans?
Hi Deepa I integrated tomcat with eclipse(I downloaded Eclipse-Galelio) then i got and I am facing one problem that when I start Tomcat server it came with one error message which says Starting Tomcatv6.0 Server at localhost has encoutered a problem, Port 80 required by Tomcat v6.0 server at localhost already in use. the server may already running in another process, or a system process may be using the port,To start this server you will need to stop the other process or change the port number(s) any idea srinivas2828 wrote: Thanks for your Help and I will go through the material and I will let you know what happen... again thanks a lot Deepa Annamalai wrote: Follow this tutorial, http://www.coreservlets.com/Apache-Tomcat-Tutorial/ -Deepa 2009/10/6 srinivas2828 srinivas2...@gmail.com hi friends does anybody know how to integrate tomcat with tomcat with eclipse thanks in advance -- View this message in context: http://www.nabble.com/how-to-integrate-tomcat-with-IDE-tools-like-eclipse%2CNetbeans--tp25764753p25764753.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 -- View this message in context: http://www.nabble.com/how-to-integrate-tomcat-with-IDE-tools-like-eclipse%2CNetbeans--tp25764753p25780191.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: alias problem in tomcat6.0 + apache1.3
Pid Ster wrote: On 6 Oct 2009, at 14:49, partha_ctc partha_samanta...@rediffmail.com wrote: Hi, we have tomcat5.0 and apache1.3. my aim is instead of http://localhost:8085/DOMAIN, how can i call http://partha16/DOMAIN. for that i have mdified server.xml and httpd.conf file. but it says page not found. i have attached the httpd.conf file. first i tried with virtual host , but it has not worked. so i commented the virtualhost tag. Can some one help me in this configuration peoble? A thorough reading of the documentation would probably help. You seem to have confusing arrangement there. Http://tomcat.apache.org/ Look for virtual hosts, under configuration. 5.0 is no longer supported - you should use a more recent version if possible. p == In apache: httpd.conf, i have following line: httpd.conf Directory D:/software/Tomcat 5.0/DOMAIN/DOMAIN Order allow,deny Allow from all /Directory DocumentRoot D:/software/Tomcat 5.0/DOMAIN/DOMAIN Alias /partha16 D:/software/Tomcat 5.0/DOMAIN/DOMAIN/ Location /partha16 Order allow,deny Allow from all # DirectoryIndex portal.htm /Location == following lines has been added in server.xml server.xml Host name=partha16 debug=1 appBase=DOMAIN unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=DOMAIN_com. suffix=.log timestamp=true/ Context path= docBase=DOMAIN debug=0 reloadable=true Logger className=org.apache.catalina.logger.FileLogger prefix=DOMAIN. suffix=.log timestamp=true / Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuelocalhost/value /parameter /ResourceParams /Context /Host http://www.nabble.com/file/p25769060/httpd.conf httpd.conf -- View this message in context: http://www.nabble.com/alias-problem-in-tomcat5.0-%2B-apache1.3-tp25769060p25769060.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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Hi pid, Now i have tomcat 6.0.14 and apache 1.3.12. i have uncommented the virtualhost in httd.conf file. i have attached the server.xml, http://www.nabble.com/file/p25780775/server.xml server.xml and find latest httpd.conf file, http://www.nabble.com/file/p25780775/httpd.conf httpd.conf but stll the page is not found. waiting for the response. Regards, Partha -- View this message in context: http://www.nabble.com/alias-problem-in-tomcat5.0-%2B-apache1.3-tp25769060p25780775.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
JspServlet Issue
Hi there, I did write some code to create dynamic compiler for JSP pages, because our application sets development options parameter to be false for JspServlet. In order to fulfill the requirement, I viewed the correlative code of Japser engine. At first, I implemented the Options , JspRuntimeContext , and created a new Servlet to interpret and compile the JSP page,it works fine, and the class file was created in work directory, but JspServletWrapper does not reload it,I checked the source of JspServletWrapper, and found the field reload is false ,thus , did not reload it. It's correct. However, I tried one way to find the JspServlet instance in tomcat, and register a Servlet Filter to map all *.jsp and *.jspx. I know the singleton instance of JspServlet (it works) services for all *.jsp and *.jspx in one container, the FilterChain implemention class(org.apache.catalina.core.ApplicationFilterChain) can be taken advantage of retrieving this JspServlet instance, Luckly, I successfully retrieved that one, and than I'd like to set the reload is true by invocation JspServletWrapper#setReload(true) method. Although the reload is true,unfortunately , The JasperLoader can't find the class file,for instance, the class file that is placed in ${CATALINA_HOME}/work/localhost/catalina/_/org/apache/jsp/test/_2_jsp.class is a new created class by my code sucessfully,the JasperLoader#loadClass(String name) can't load it, another JSP pages that are created by application work fine in the same directory, is it caused by ClassLoader? In fact , my compiler invokes the JspServletWrapper#service(request,response,true), it was loaded once,so I'm confused. :-( The version of My tomcat is Apache Tomcat/6.0.18 under jdk1.6.0_16, IDE is Eclipse 3.4 JEE Thank you in advanced. :-) Kind regards, Mercy
Tomcat gets hanged and sessions not releasing
Hi, In our web application we have a design of allowing one user to login from one instance at any point of time. In case his earlier session is active while he tries to login from another instance the earlier instance gets forcefully logged off. But it so happens that if due to some problem on the user machine or the browser the console session gets hanged or the browser gets crashed then the same user cannot login back to the application again and gets an internal exception message which we handle. Actually the tomcat session kind of gets hanged and the session for the troubled user does not get released and the force full log off feature does not work. Restarting the Tomcat solves the problem. Any inputs on this. Thanks, Sudip From cricket scores to your friends. Try the Yahoo! India Homepage! http://in.yahoo.com/trynew