The Artima Developer Community
Sponsored Link

News & Ideas Forum (Closed for new topic posts)
Tomcat and Apache Living Together, Mass Hysteria

16 replies on 2 pages. Most recent reply: Nov 13, 2002 4:41 PM by Bill Venners

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 16 replies on 2 pages [ « | 1 2 ]
cafesoft

Posts: 5
Nickname: cafesoft
Registered: Nov, 2002

Re: Tomcat and Apache Living Together, Mass Hysteria Posted: Nov 13, 2002 11:32 AM
Reply to this message Reply
Advertisement
We're running with Apache 1.3.23 on Redhat 7.3, using mod_jk to connect to Tomcat. Tomcat is running via the mod_jk connector on a WinNT box with JDK 1.4. The Tomcat webapps are making use of mysql and the mm.mysql-2.0.14-bin.jar driver. To date, this configuration has been reliable, but our volume is just picking up with the release of our security software, Cams.

By the way, we switched to WinNT for Tomcat when we were experiencing some issues early on under Redhat 7.3. I believe that we ultimately found the issues were not tied to the OS. However, our perception is that Tomcat and JDK 1.4 is zippier starting up and running on NT than on Redhat 7.3. I have no benchmarks to prove this, this is just a perception.

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: Tomcat and Apache Living Together, Mass Hysteria Posted: Nov 13, 2002 4:41 PM
Reply to this message Reply
Occasionally when Tomcat crashes, Apache seems to get confused and forget it is supposed to pass JSP requests onto the now non-existant Tomcat. Usually, when Tomcat goes away, Apache returns a "Server Error" page on JSP requests. But occasionally, it returns the raw JSP page code.

One of the system administrators of my service provider suggested that most likely this is not caused by Apache being restarted with the wrong config file, but that the Apache process running when Tomcat crashes is probably just getting screwed up, which causes it to start serving up raw JSP source.

What I am planning to do to address this issue is put a JSP comment with some random text string in the home page, and create a script to run as a cron job every 5 minutes or so. The script will check to make sure the home page can be retrieved via http. If not, it will attempt to restart things. If so, it will check the page returned for the JSP comment. If it finds it, that means Apache is serving up raw JSP code again, and it will also attempt to restart things. I'll probably also have the script send emails to the sys admins, so they can check and make sure all looks well.

Or, I could just change my attitude and advertise this as a feature. Artima.com could be a site where not only can you read interesting articles and exchange ideas with other developers, but from time to time, you can see examples of real JSP code. Very educational.

Flat View: This topic has 16 replies on 2 pages [ « | 1  2 ]
Topic: Teaching Java the Extreme Way Previous Topic   Next Topic Topic: Centralized Security Server for Apache/Tomcat

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use