PDA

View Full Version : Issue in Tomcat 6.0 and Apache 2.0 mod_jk


WWWDev
07-09-2011, 08:15
Dear All,

We are having some issue in one of our production system.

We have Tomcat 6.0 and Apache 2.0 using mod_jk 1.3 with oracle as database on windows server 2008 (64bit).
This server is used for producing business reports and runs long running query along with export to CSV/XML functionality.

Some times the server dose not response due to some reason (we are unable to find it, as issue cannot be replicated)
Find below some of the mod_jk logs which we found (there is no log found in tomcat logs).

ERROR: Receiving from tomcat failed, recoverable operation. err=0
ERROR: can't receive the response message from tomcat, network problems or tomcat is down. err=-1
sending request to tomcat failed in send loop. err=0
[jk_ajp_common.c (1137)]: Error reading reply from tomcat. Tomcat is down or network problems.

Kindly let me know if any more information required on this query, your help on this will be appreciated.

Best Regards,
WWWDev

kjkoster
07-09-2011, 08:50
Dear WWWDev,

Maybe now is not the time to experiment, but I switched to using mod_proxy_http, which is a lot simpler than mod_jk. I have yet to have any issue between Apache and Tomcat since that switch.

Also, what do you need Apache for? Tomcat is a good web server all by itself. You can try to reproduce the problems by connecting directly on Tomcat's HTTP port (8080, by default). That way you can see if this is a Tomcat or an Apache issue.

When the system does not respond, is it Tomcat or Apache that does not respond? Anything in the Tomcat logs?

Kees Jan

WWWDev
07-09-2011, 09:34
Dear kjkoster,

Thank you for considering my problem, please find below details of points mentioned.

1) We are using Apache 2.0 for serving static contents of the application.
2) We have tried reproducing the issue with and without apache but no help (not able to reproduce).
3) As such even we are not in position to say if its an Tomcat issue or Apache (only log found in apache mod_jk)
4) Only Tomcat dose not respond during this period and after restart everything works fine.

Best Regards,
WWWDev

kjkoster
07-09-2011, 10:01
Dear WWWDev,

In that case I would first try to diagnose Tomcat not responding. Try taking thread dumps before you restart Tomcat to resolve the hangs. Here (http://java-monitor.com/forum/showthread.php?t=1170) and here are articles on how to diagnose thread dumps (http://java-monitor.com/forum/showthread.php?t=616).

Also, try to locate the Tomcat log files. They should exist in ${tomcat}/logs/catalina.out

Kees Jan

WWWDev
07-09-2011, 10:28
Dear kjkoster,

Thank you for suggestion and providing link for how to diagnose Tomcat.

We will try this on our server get back to you with some more details.

Best Regards,
WWWDev