Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Tomcat running under apache/mod-jk hangs after calling HelloWorld servlet exactly 9 times

Reply
Thread Tools

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

 
 
Guest
Posts: n/a
 
      01-18-2004

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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
str.Template 4 times slower than calling replace multiple times Jack Steven Python 2 03-09-2009 05:38 AM
Calling a Web Service using Axis, from within an Axis Web Service running under Tomcat hocho888 Java 1 04-29-2005 08:26 PM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Clear hangs up - & hangs up - & hangs up Sue Bilstein NZ Computing 26 03-07-2004 01:33 AM
Cannot run 'HelloWorld' servlet in Tomcat environment the_JAVA_Rookie Java 5 08-19-2003 12:19 PM



Advertisments