logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_jk - tomcat randomly no response
Author
Qmpeltaty



Joined: 06 Feb 2008
Posts: 182
Location: Poland

PostPosted: Wed 19 Oct '11 11:50    Post subject: mod_jk - tomcat randomly no response Reply with quote

Hello

I'm experiencing random communication problems between Apache module mod_jk and Tomcat 6.0 bundled with JBoss application server.

Problem occurs only due heavy traffic but i belive that this machine can handle x100 more requests and the power of machine is not a problem - see below.
I'm also experiencing increasing response time in mod_jk logs for this time - from <1s to 4-10sec. for processed requests, where others are not processed at all.

mod_jk log :

Code:

[00:48:35]loadbalancer 2.012404
[00:48:35][10716:19332] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.028004
[00:48:35]loadbalancer 2.043604
[00:48:35][10716:4016] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.028004
[00:48:35][10716:20800] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.028004
[00:48:35][10716:3696] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35][10716:17020] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.043604
[00:48:35]loadbalancer 2.012403
[00:48:35][10716:16372] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.028003
[00:48:35][10716:3836] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35][10716:1752] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35][10716:17828] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.043603
[00:48:35]loadbalancer 2.028003
[00:48:35]loadbalancer 2.028003
[00:48:35][10716:15000] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.012403
[00:48:35][10716:2724] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35][10716:14144] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35][10716:5396] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35][10716:5332] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.028003
[00:48:35]loadbalancer 2.090404
[00:48:35][10716:6180] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.028003
[00:48:35][10716:3344] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35][10716:20596] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.012403
[00:48:35][10716:20668] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.028003
[00:48:35]loadbalancer 2.012403
[00:48:35]loadbalancer 2.012403
[00:48:35]loadbalancer 2.028003
[00:48:35][10716:4132] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35][10716:14968] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.028003
[00:48:35][10716:12200] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35][10716:12572] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.028003
[00:48:35][10716:2904] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35][10716:5380] [error] jk_ajp_common.c (2097): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
[00:48:35]loadbalancer 2.012403
[00:48:35]loadbalancer 2.028003
[00:48:35]loadbalancer 2.012403
[00:48:35]loadbalancer 2.028003
[00:48:35]loadbalancer 6.739212
[00:48:35]loadbalancer 7.191612


As there is no further problems registered in logs on JBoss side i suspect that only communication problem exist (as Tomcat is responsible for communication on behalf of JBoss). I suspect that it could be misconfiguration problem as well - config details listed below.

mod_jk.conf

Code:


# Define list of workers that will be used
# for mapping requests
# The configuration directives are valid
# for the mod_jk version 1.2.18 and later
#
worker.list=loadbalancer,status

# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=127.0.0.1
worker.node1.type=ajp13
worker.node1.max_packet_size=65536
worker.node1.lbfactor=1

#The next three properties allow mod_jk to efficiently determine if a connection is in error or not responding fast enough due to whatever reason.
worker.node1.connect_timeout=15000
worker.node1.socket_timeout=60
#This value must equal server.xml's connectionTimeout of 1 minutes
worker.node1.connection_pool_timeout=60
worker.node1.socket_keepalive=True
# worker.node1.connection_pool_size=10 (1)

# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1
worker.loadbalancer.sticky_session=1

# Status worker for managing load balancer
worker.status.type=status



server.xml (8009 connnector)

Code:

<!-- A AJP 1.3 Connector on port 8009 -->
         <Connector port="8009" maxPostSize="6291456" address="${jboss.bind.address}" connectionTimeout="60000" protocol="AJP/1.3"
         emptySessionPath="true" enableLookups="false" maxThreads="2500" redirectPort="8443" packetSize="65536" />



Both services works on the same machine - IBM with 8 x Xeon E7-4870 (80 cores in total), 64GB RAM, RAID 10.
Machine handle Apache 2.2.21 with mod_jk 1.2.25 , JBoss 6.0 and PostgreSQL 9.0.4 on Win2k8 x64 R2 Enterprise.

How to solve it ??
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Tue 25 Oct '11 11:19    Post subject: Reply with quote

Sometimes clustering jboss even on the same machine makes sence and than putting apache as reverse balancer before it. So you might run 2 or 3 instances on the same server or on different servers.

If you still have a question please ask again.
Back to top


Reply to topic   Topic: mod_jk - tomcat randomly no response View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules