提问者:小点点

Mod_Jk负载均衡


我尽了一切可能让Mod_jk工作,但没有成功。我尝试了多个Apache下载,尝试了我能找到的每一个建议,包括检查特殊字符… Apache和Tomcat都按预期工作,但仍然没有负载平衡,我一直收到这些错误消息。有什么想法吗?

[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.

我正在使用Apache 2.4.23和Mod_Jk1.2.4都适用于Windows 32位。

在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>

在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

在Tomcat-1 server. xml中:

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

在Tomcat-2 server. xml中:

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

共1个答案

匿名用户

您的workers.properties文件中有一个单字符错误:

workers.list=LoadBalancer

应该是:

worker.list=LoadBalancer

您对jk-statusworker也有同样的问题。

(很抱歉你一直在为此自杀。)

相关问题