apacheload-balancinghttpd.confmod-jk

Apache Loadbalancing not working viya mod_jk


Trying to config a load balancing with apache 2.4 via xampp on Windows 10.

My workers.proprties

worker.list=balancer,stat

worker.instance01.type=ajp13
worker.instance01.host=localhost
worker.instance01.port=8111
worker.instance01.lbfactor=10

worker.instance02.type=ajp13
worker.instance02.host=localhost
worker.instance02.port=8112
worker.instance02.lbfactor=10

worker.instance03.type=ajp13
worker.instance03.host=localhost
worker.instance03.port=8113
worker.instance03.lbfactor=10

worker.balancer.type=lb
worker.balancer.balancer_workers=instance01,instance02,instance03

worker.stat.type=status

my httpd.conf

[...]
    AcceptFilter http none
    AcceptFilter https none
    # AJP13 Proxy
    #<IfModule mod_proxy.c>
    #<IfModule mod_proxy_ajp.c>
    #Include "conf/extra/httpd-ajp.conf"
    #</IfModule>
    #</IfModule>
    
        LoadModule jk_module modules/mod_jk.so
        
        JkWorkersFile conf/workers.properties
        
        JkLogFile logs/mod_jk.log
        JkLogLevel emerg
        JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
        JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
        JkRequestLogFormat "%w %V %T"
        
        JkMount / balancer
        JkMount /status stat

apache error.log

    [Sat Aug 08 23:46:06.681796 2020] [jk:emerg] [pid 17136:tid 600] Error in reading worker properties from 'C:/xampp/apache/conf/workers.properties'
AH00016: Configuration Failed

no entries in mod_jk.log

The module mod_jk.so is located modules, as it should.

Can anyone help me please?


Solution

  • You need to change below line.

    From:

    worker.balancer.balancer_workers=instance01,instance02,instance03
    

    to:

    worker.balancer.balance_workers=instance01,instance02,instance03