Tomcat running under apache/mod-jk hangs after calling HelloWorld servlet exactly 9 times

G

Guest

Hallo,

I am preparing the apache/mod-jk/tomcat installation on RedHat 9.
I use very simple HelloWorld servlet (see later) for testing purposes .
But I am getting very curious problem: when I call this HelloWorld or even
some other servlet exactly 9th times (!) the whole tomcat starts to hang
and it does not return anything after 9th call and it also does not answer
next requests any more. If I restart tomcat then I have 9 more trials.
There are no obvious error messages in logs except of mod_jk.log, but
these errors are probably caused by the hang-up itself. I could supply some
additional information but I do not know where to look for this error
exactly.
May be some load balancing issues but I am not sure.
Thanks for each helpfull idea.
Jan Kopinec

Versions:
---------
RedHat 9 with almost latest patches installed
Sun JSDK 1.4.2_03-b02
httpd 2.0.40
tomcat 4.1.29

HelloWorld.java:
-----------------

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.*;

public class HelloWorld extends HttpServlet
{

public HelloWorld()
{
}

public void doGet(HttpServletRequest httpservletrequest,
HttpServletResponse httpservletresponse)
throws IOException, ServletException
{
httpservletresponse.setContentType("text/html");
PrintWriter printwriter = httpservletresponse.getWriter();
printwriter.println("Hello World");
}
}

web.xml:
---------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/servlet/HelloWorld</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Process</servlet-name>
<servlet-class>Process</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Process</servlet-name>
<url-pattern>/servlet/process</url-pattern>
</servlet-mapping>
</web-app>

workers.properties:
--------------------
workers.tomcat_home=/usr/local/jakarta-tomcat
..java_home=/usr/java/j2sdk1.4.2_03
ps=/
worker.list=ajp12, ajp13
worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
worker.ajp12.lbfactor=1
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp12, ajp13
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)s
erver$(ps)libjvm.so
worker.inprocess.stdout=/home/tomcat/logs/stdout_jk.log
worker.inprocess.stderr=/home/tomcat/logs/stderr_jk.log

mod_jk.log:
------------
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (1026)]: Error sending request
try another pooled connection
[Sun Jan 18 14:39:30 2004] [jk_connect.c (233)]: jk_open_socket, connect()
failed errno = 111
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (757)]: Error connecting to
tomcat. Tomcat is probably not started or is listenning on the wrong port.
Failed errno = 111
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (1053)]: Error connecting to the
Tomcat process.
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (1420)]: sending request to
tomcat failed in send loop. err=0
[Sun Jan 18 14:39:30 2004] [jk_connect.c (233)]: jk_open_socket, connect()
failed errno = 111
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (757)]: Error connecting to
tomcat. Tomcat is probably not started or is listenning on the wrong port.
Failed errno = 111
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (1053)]: Error connecting to the
Tomcat process.
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (1420)]: sending request to
tomcat failed in send loop. err=1
[Sun Jan 18 14:39:30 2004] [jk_connect.c (233)]: jk_open_socket, connect()
failed errno = 111
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (757)]: Error connecting to
tomcat. Tomcat is probably not started or is listenning on the wrong port.
Failed errno = 111
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (1053)]: Error connecting to the
Tomcat process.
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (1420)]: sending request to
tomcat failed in send loop. err=2
[Sun Jan 18 14:39:30 2004] [jk_ajp_common.c (1429)]: Error connecting to
tomcat. Tomcat is probably not started or is listening on the wrong port.
worker=ajp13 failed errno = 111
[Sun Jan 18 14:40:35 2004] [jk_ajp_common.c (1026)]: Error sending request
try another pooled connection
[Sun Jan 18 14:40:38 2004] [jk_ajp_common.c (1026)]: Error sending request
try another pooled connection
[Sun Jan 18 14:40:40 2004] [jk_ajp_common.c (1026)]: Error sending request
try another pooled connection
[Sun Jan 18 14:40:41 2004] [jk_ajp_common.c (1026)]: Error sending request
try another pooled connection
[Sun Jan 18 14:40:42 2004] [jk_ajp_common.c (1026)]: Error sending request
try another pooled connection
[Sun Jan 18 14:40:44 2004] [jk_ajp_common.c (1026)]: Error sending request
try another pooled connection
[Sun Jan 18 14:40:46 2004] [jk_ajp_common.c (1026)]: Error sending request
try another pooled connection
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top