When I have Apache trying to map to tomcat I have the following worker.properties file:
workers.java_home="C:/Program Files/Java/jdk1.6.0_13"
workers.list=ajp13
workers.ajp13.port=8509
workers.ajp13.host=localhost
workers.ajp13.type=ajp13
However when it runs apache adds localhost:8009 as a worker as well (see log entry below) - and then when I try and connect to the mapped tomcat instance, it dies. How can I stop it from adding localhost:8009 (and where is it getting it from?)
In the mod_jk.log file I get:
...
> [Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (491): Adding property 'workers.java_home' with value '"C:/Program Files/Java/jdk1.6.0_13"' to map.
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (491): Adding property 'workers.list' with value 'ajp13' to map.
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (491): Adding property 'workers.ajp13.port' with value '8509' to map.
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (491): Adding property 'workers.ajp13.host' with value 'localhost' to map.
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (491): Adding property 'workers.ajp13.type' with value 'ajp13' to map.
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (589): Dump of map: 'ServerRoot' -> 'C:/T2/Software/Apache'
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (589): Dump of map: 'workers.java_home' -> '"C:/Program Files/Java/jdk1.6.0_13"'
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (589): Dump of map: 'workers.list' -> 'ajp13'
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (589): Dump of map: 'workers.ajp13.port' -> '8509'
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (589): Dump of map: 'workers.ajp13.host' -> 'localhost'
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_map.c (589): Dump of map: 'workers.ajp13.type' -> 'ajp13'
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_worker.c (242): creating worker ajp13
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_worker.c (146): about to create instance ajp13 of ajp13
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_worker.c (159): about to validate and init ajp13
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2512): worker ajp13 contact is 'localhost:8009'
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2699): setting endpoint options:
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2702): keepalive: 0
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2706): socket timeout: 0
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2710): socket connect timeout: 0
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2714): buffer size: 0
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2718): pool timeout: 0
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2722): ping timeout: 10000
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2726): connect timeout: 0
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2730): reply timeout: 0
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2734): prepost timeout: 0
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2738): recovery options: 0
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2742): retries: 2
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2746): max packet size: 8192
[Mon Jun 08 09:00:39 2009] [5696:4596] [debug] jk_ajp_common.c (2750): retry interval: 100
How can I stop it from trying to connect to localhost:8009? Thanks.
I think you've used workers where you should have used worker in your config file:
note: java_home is workers. Everything else is worker.
As a result it's using a default AJP connector called AJP on localhost:8009.