help with jboss + tomcat + apache + mod_jk in a load balanced config

G

Golem

Hello, I'm trying to use apache + mod_jk to load balance some
tomcat+jboss app servers.
I have one tomcat which is on the same server as apache (on server1)
and another on another box (server2)
the following configuration only works on the local app server
the other tomcat rejects the connection
with the following errors in mod_jk.log:

[Thu Nov 27 19:41:33 2003] [jk_ajp_common.c (679)]:
ajp_connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed
[Thu Nov 27 19:41:33 2003] [jk_ajp_common.c (1041)]: Error reading
reply
[Thu Nov 27 19:41:33 2003] [jk_ajp_common.c (1178)]: In
jk_endpoint_t::service, ajp_get_reply failed in send loop 0

on jboss log I get:
19:40:50,709 INFO [JkInputStream] Receiving: getting request body
chunk 392 392
19:40:50,717 INFO [STDOUT] 12 34 01 88 01 86 45 5f 64 65 74 65 63 74
43 6f | .4.?.?E_detectCo
19:40:50,719 INFO [STDOUT] 6d 70 6c 65 74 65 3d 31 26 45 5f 61 70 70
4e 61 | mplete=1&E_appNa
... extra junk
....
19:41:53,197 INFO [ChannelSocket] connection timeout reached

here is the config:




mod_jk.conf :

LoadModule jk_module libexec/mod_jk.so
JkWorkersFile /usr/local/apache/conf/workers.properties
# Where to put jk logs
JkLogFile /logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
JkRequestLogFormat "%w %V %T"
JkMount /MyJavaApp/* loadbalancer

workers.properties:

# Define 1 real worker using ajp13
worker.list=loadbalancer, worker1, worker2
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=server1
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300
##################################
worker.worker2.type=ajp13
worker.worker2.host=server2
worker.worker2.port=8009
worker.worker2.lbfactor=50
worker.worker2.cachesize=10
worker.worker2.cache_timeout=600
worker.worker2.socket_keepalive=1
worker.worker2.socket_timeout=300
##################################
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=worker1, worker2
worker.loadbalancer.sticky_session=1

__________________________________________________________________

/usr/local/jboss/server/custom/deploy/jbossweb-tomcat41.sar/META-INF/jboss-service.xml
on server2:

....
<Service name = "JBoss-Tomcat">
<Engine name="MainEngine" jvmRoute="worker2"
defaultHost="localhost">
....
<!-- A AJP 1.3 Connector on port 8009 -->
<Connector
className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="20000"
useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

.....
please help me with any hints....
the config for both app server is the same , the only difference is
jvmRoute
 

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

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,297
Latest member
EngineerD

Latest Threads

Top