JoeThomas JoeThomas - 3 months ago 31
Apache Configuration Question

Mod_Jk Load balancing

I tried everything possible to make Mod_jk work with no success. I tried multiple Apache downloads, tried every recommendation I could find including checking for special characters... both Apache and Tomcat are working as anticipated but still no load balancing and I keep getting these error messages. Any idea?

[1640:3636] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.40 initialized
[1640:3636] [error] extension_fix::jk_uri_worker_map.c (578): Could not find worker with name 'LoadBalancer' in uri map post processing.
[1640:3636] [error] extension_fix::jk_uri_worker_map.c (578): Could not find worker with name 'jk-status' in uri map post processing.


I am using Apache 2.4.23 and Mod_Jk 1.2.4 both for Windows 32 bit.

in Httpd.conf:

Listen 10.x.x.x:80
LoadModule jk_module modules/mod_jk.so
<IfModule jk_module>
JkWorkersFile conf/workers.properties

JkShmFile logs/mod_jk.shm
JkLogFile logs/mod_jk.log
JkLogLevel info

JkWatchdogInterval 60

<Location /jk-status>
JkMount jk-status
Order deny,allow
Deny from all
Allow from 10.4.81.62
</Location>

<Location /jk-manager>
JkMount jk-manager
Order deny,allow
Deny from all
Allow from 10.4.81.62
</Location>


# Configure applications
JkMount /Geoserver/* LoadBalancer

</IfModule>


in workers.properties:

workers.list=jk-status
worker.jk-status.type=status

worker.list=jk-manager
worker.jk-manager.type=status

workers.list=LoadBalancer
worker.LoadBalancer.type=lb
worker.balancer.error_escalation_time=0
worker.balancer.max_reply_timeouts=10

worker.worker1.type=ajp13
worker.worker1.host=10.x.x.x
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.worker1.activation=A
worker.worker1.socket_connect_timeout=5000
worker.worker1.socket_keepalive=true

worker.worker2.type=ajp13
worker.worker2.host=10.x.x.x
worker.worker2.port=8010
worker.worker2.lbfactor=1
worker.worker2.activation=A
worker.worker2.socket_connect_timeout=5000
worker.worker2.socket_keepalive=true

worker.LoadBalancer.balance_workers=worker1,worker2


in Tomcat-1 server.xml:

<Engine name="Catalina" defaultHost="10.x.x.x" jvmRoute="worker1">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>


in Tomcat-2 server.xml:

<Engine name="Catalina" defaultHost="10.x.x.x" jvmRoute="worker2">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

Answer

You have a single-character error in your workers.properties file:

workers.list=LoadBalancer

should be:

worker.list=LoadBalancer

You have the same problem with the jk-status worker.

(Sorry you've been killing yourself over this.)

Comments