You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jack rodriguez <to...@gmail.com> on 2005/10/21 16:20:30 UTC
~ mod_jk Random Errors
I have installed Apache 2.0.52 on a seperate machine along with mod_jk
connector 1.2.14 to connect to another machine running Tomcat 5.5.9. I have
had some success on getting mod_jk to work but during times of load mod_jk
errors saying it does not have a connection to the tomcat server. After
mod_jk retries 1-2 times the response comes back after 924 ms. I don't
understand why mod_jk works most of the time, but seems to fail randomly for
a fraction of the time. Here are the mod_jk errors:
[Thu Oct 20 17:25:59 2005] [18056:30400] [error]
ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the
response message from tomcat, network problems or tomcat is down (
192.168.4.17:8009 <http://192.168.4.17:8009>), err=-113
[Thu Oct 20 17:25:59 2005] [18056:30400] [error]
ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection.
No response has been sent to the client (yet)
[Thu Oct 20 17:25:59 2005] [18056:30400] [info] ajp_service::jk_ajp_common.c
(1721): Receiving from tomcat failed, recoverable operation attempt=0
[Thu Oct 20 17:25:59 2005] [18056:30400] [info] ajp_service::jk_ajp_common.c
(1749): Sending request to tomcat failed, recoverable operation attempt=1
Any help would be appreciated,
~Jack
Re: ~ mod_jk Random Errors
Posted by jack rodriguez <to...@gmail.com>.
OKey, I updated my configs and now I still have the same problem. The only
other thing I can think of is trying to compile mod_jk on the Apache machine
directly.
Workers.properties
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=eofapps.usitc.gov
worker.ajp13.type=ajp13
worker.ajp13.connection_pool_size=30
worker.ajp13.cache_timeout=600
worker.ajp13.socket_timeout 300
worker.ajp13.socket_buffer=8192
worker.ajp13.socket_keepalive=1
worker.ajp13.recycle_timeout=1000
worker.ajp13.connect_timeout=1000
worker.ajp13.reply_timeout=1000
worker.ajp13.prepost_timeout=100
worker.ajp13.recovery_options=0
httpd.conf
####################
# SETUP FOR TOMCAT #
####################
# Where to find workers.properties
JkWorkersFile /etc/httpd/conf/workers.properties
# Where to put jk logs
JkLogFile /var/log/httpd/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel debug
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T %U%q"
# Send everything for context /edis-efile to worker named worker1 (ajp13)
JkMount /edis-efile/app* ajp13
Server.xml
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75" />
Any other ideas?
Thanks,
~Jack
Re: ~ mod_jk Random Errors
Posted by Rainer Jung <to...@kippdata.de>.
>> Which version of mod_jk are you using?
>
> 1.2.14 Current Version
OK
> What is errno 113 on your platform?
>
> Linux Error :113 No route to host
Since that error number was shown in the log line, I assume that a system
call returned this error. Is it possible, that your network is unstable?
Maybe you should involve your network people. Also check stability of name
service, because you used a name and not an IP in workers.properties (that
should only be relevant when establishing new connections).
> Each tcp connection from apache to tomcat blocks a thread inside tomcats
>> jk connector thread pool, that exclusively services requests coming over
>> that connection. So what are your MPM settings inside apache httpd.conf,
>> your workers.properties settings and your ajp 13 connectors settings in
>> server.xml?
> httpd.conf
> ####################
> # SETUP FOR TOMCAT #
> ####################
...
What's missing is information about your apache process/thread
configuration (that's what is meant with MPM). This info usually is
located close to the beginning of httpd.conf.
>
> Workers.properties
> worker.list=ajp13
> worker.ajp13.port=8009
> worker.ajp13.host=eofapps.usitc.gov
> worker.ajp13.type=ajp13
If you use apache 2 then you should also set
worker.ajp13.connection_pool_size=NUMBER_OF_THREADS_PER_PROCESS
where NUMBER_OF_THREADS_PER_PROCESS is the number of threads per process
configured in your apache mpm (=1 for prefork, but usually much bigger
than one for worker)
You should also read documentation about the following possible attributes
(I include their default values):
- cache_timeout (0)
- socket_timeout (-1 = disabled)
- socket_buffer (8192)
- socket_keepalive (false)
- recycle_timeout (0)
- connect_timeout (0)
- reply_timeout (0)
- prepost_timeout (0)
- recovery_options (0)
> server.xml
> <!-- Define an AJP 1.3 Connector on port 8009 -->
> <Connector port="8009"
> enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
You should read documentation about attributes minSpareThreads,
maxSpareThreads and maxThreads and choose values according to your apache
mpm settings.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: ~ mod_jk Random Errors
Posted by jack rodriguez <to...@gmail.com>.
> Which version of mod_jk are you using?
1.2.14 Current Version
What is errno 113 on your platform?
Linux Error :113 No route to host
Each tcp connection from apache to tomcat blocks a thread inside tomcats
> jk connector thread pool, that exclusively services requests coming over
> that connection. So what are your MPM settings inside apache httpd.conf,
> your workers.properties settings and your ajp 13 connectors settings in
> server.xml?
httpd.conf
####################
# SETUP FOR TOMCAT #
####################
# Where to find workers.properties
JkWorkersFile /etc/httpd/conf/workers.properties
# Where to put jk logs
JkLogFile /var/log/httpd/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel debug
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T %U%q"
# Send everything for context /edis-efile to worker named worker1 (ajp13)
JkMount /edis-efile/app* ajp13
Workers.properties
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=eofapps.usitc.gov
worker.ajp13.type=ajp13
server.xml
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
Any firewalls or other network specialities between apache and tomcat?
Nope, both systems reside on the same subnet and have no firewalls between
them.
Thanks Again!
~Jack
Re: ~ mod_jk Random Errors
Posted by Rainer Jung <to...@kippdata.de>.
Which version of mod_jk are you using?
What is errno 113 on your platform?
Each tcp connection from apache to tomcat blocks a thread inside tomcats
jk connector thread pool, that exclusively services requests coming over
that connection. So what are your MPM settings inside apache httpd.conf,
your workers.properties settings and your ajp 13 connectors settings in
server.xml?
Any firewalls or other network specialities between apache and tomcat?
> I have installed Apache 2.0.52 on a seperate machine along with mod_jk
> connector 1.2.14 to connect to another machine running Tomcat 5.5.9. I
> have
> had some success on getting mod_jk to work but during times of load mod_jk
> errors saying it does not have a connection to the tomcat server. After
> mod_jk retries 1-2 times the response comes back after 924 ms. I don't
> understand why mod_jk works most of the time, but seems to fail randomly
> for
> a fraction of the time. Here are the mod_jk errors:
> [Thu Oct 20 17:25:59 2005] [18056:30400] [error]
> ajp_connection_tcp_get_message::jk_ajp_common.c (961): Can't receive the
> response message from tomcat, network problems or tomcat is down (
> 192.168.4.17:8009 <http://192.168.4.17:8009>), err=-113
> [Thu Oct 20 17:25:59 2005] [18056:30400] [error]
> ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused
> connection..
> No response has been sent to the client (yet)
> [Thu Oct 20 17:25:59 2005] [18056:30400] [info]
> ajp_service::jk_ajp_common.c
> (1721): Receiving from tomcat failed, recoverable operation attempt=0
> [Thu Oct 20 17:25:59 2005] [18056:30400] [info]
> ajp_service::jk_ajp_common.c
> (1749): Sending request to tomcat failed, recoverable operation attempt=1
> Any help would be appreciated,
> ~Jack
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org