Re: Problem with mod_jk and multiple workers.
It might not be the reason for your problems, but you should not start this with an apache version that old. If you want to use mod_jk, consider first updating to apache 2.0.58 or something close to it. Is your JkWorkersFile readable for the apache user? I never noticed such behaviour, so no other clue than these obvious ones. Rainer Jim Riordan schrieb: > Good afternoon, > > I am trying to configure apache to send requests to multiple instances > of tomcat using mod_jk. I am using > Redhat 9 > Apache/2.0.40 > Tomcat-5.5.17 > > and have tried > > jakarta-tomcat-connectors-jk-1.2.6 > jakarta-tomcat-connectors-1.2.14.1 > jakarta-tomcat-connectors-1.2.15 > > I can get httpd to send requests to tomcat through mod_jk fine, but only > if tomcat is listening on port 8009. It doesn't seem to matter what I > put in my workers.properties file, mod_jk doesn't seem to be reading it. > > --- > Snippet from httpd.conf: > --- > LoadModule jk_module /usr/lib/httpd/modules/mod_jk.so > JkWorkersFile "/home/httpd/conf/my_workers.properties" > JkLogFile "/var/log/httpd/my_mod_jk.log" > JkLogLevel debug > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " > JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories > JkRequestLogFormat "%w %V %T" > --- > > --- > Contents of my_workers.properties > --- > worker.list=worker1,worker2,worker3 > # Set properties for worker1 > worker.worker1.type=ajp13 > worker.worker1.host=localhost > worker.worker1.port=8009 > # Set properties for worker2 > worker.worker2.type=ajp13 > worker.worker2.host=localhost > worker.worker2.port=8109 > # Set properties for worker3 > worker.worker3.type=ajp13 > worker.worker3.host=localhost > worker.worker3.port=8209 > > > > Output in my_mod_jk.log (running with 1.2.14.1) > > [Tue Jul 11 16:00:52 2006] [5589:16384] [debug] > jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup > [Tue Jul 11 16:00:52 2006] [5590:16384] [debug] > jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup > [Tue Jul 11 16:00:52 2006] [5591:16384] [debug] > jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup > [Tue Jul 11 16:00:52 2006] [5592:16384] [debug] > jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup > [Tue Jul 11 16:00:52 2006] [5593:16384] [debug] > jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup > [Tue Jul 11 16:00:52 2006] [5594:16384] [debug] > jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup > [Tue Jul 11 16:00:52 2006] [5595:16384] [debug] > jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup > [Tue Jul 11 16:00:52 2006] [5596:16384] [debug] > jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup > [Tue Jul 11 16:00:52 2006] [5582:16384] [debug] > jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] do_shm_open::jk_shm.c > (240): Truncated shared memory to 66560 > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] do_shm_open::jk_shm.c > (272): Initialized shared memory size=66560 free=65536 addr=0x40ff4000 > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > do_shm_open_lock::jk_shm.c (182): Opened shared memory lock > /etc/httpd/logs/jk-runtime-status.lock > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] init_jk::mod_jk.c > (2350): Initialized shm:/etc/httpd/logs/jk-runtime-status > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > uri_worker_map_open::jk_uri_worker_map.c (323): rule map size is 0 > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > build_worker_map::jk_worker.c (236): creating worker ajp13 > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > wc_create_worker::jk_worker.c (141): about to create instance ajp13 of > ajp13 > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > wc_create_worker::jk_worker.c (154): about to validate and init ajp13 > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > ajp_validate::jk_ajp_common.c (1806): worker ajp13 contact is > 'localhost:8009' > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > ajp_init::jk_ajp_common.c (1895): setting socket keepalive to 0 > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > ajp_init::jk_ajp_common.c (1934): setting socket timeout to -1 > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > ajp_init::jk_ajp_common.c (1938): setting socket buffer size to 0 > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > ajp_init::jk_ajp_common.c (1942): setting connection recycle timeout to > 0 > [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] > ajp_init::jk_ajp_common.c (1946): setting cache timeout to 0 > [Tue Jul 11 16:00:54 2006] [5582:16384] [d
Problem with mod_jk and multiple workers.
Good afternoon, I am trying to configure apache to send requests to multiple instances of tomcat using mod_jk. I am using Redhat 9 Apache/2.0.40 Tomcat-5.5.17 and have tried jakarta-tomcat-connectors-jk-1.2.6 jakarta-tomcat-connectors-1.2.14.1 jakarta-tomcat-connectors-1.2.15 I can get httpd to send requests to tomcat through mod_jk fine, but only if tomcat is listening on port 8009. It doesn't seem to matter what I put in my workers.properties file, mod_jk doesn't seem to be reading it. --- Snippet from httpd.conf: --- LoadModule jk_module /usr/lib/httpd/modules/mod_jk.so JkWorkersFile "/home/httpd/conf/my_workers.properties" JkLogFile "/var/log/httpd/my_mod_jk.log" JkLogLevel debug JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat "%w %V %T" --- --- Contents of my_workers.properties --- worker.list=worker1,worker2,worker3 # Set properties for worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 # Set properties for worker2 worker.worker2.type=ajp13 worker.worker2.host=localhost worker.worker2.port=8109 # Set properties for worker3 worker.worker3.type=ajp13 worker.worker3.host=localhost worker.worker3.port=8209 Output in my_mod_jk.log (running with 1.2.14.1) [Tue Jul 11 16:00:52 2006] [5589:16384] [debug] jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup [Tue Jul 11 16:00:52 2006] [5590:16384] [debug] jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup [Tue Jul 11 16:00:52 2006] [5591:16384] [debug] jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup [Tue Jul 11 16:00:52 2006] [5592:16384] [debug] jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup [Tue Jul 11 16:00:52 2006] [5593:16384] [debug] jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup [Tue Jul 11 16:00:52 2006] [5594:16384] [debug] jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup [Tue Jul 11 16:00:52 2006] [5595:16384] [debug] jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup [Tue Jul 11 16:00:52 2006] [5596:16384] [debug] jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup [Tue Jul 11 16:00:52 2006] [5582:16384] [debug] jk_cleanup_shmem::mod_jk.c (1747): Shmem cleanup [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] do_shm_open::jk_shm.c (240): Truncated shared memory to 66560 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] do_shm_open::jk_shm.c (272): Initialized shared memory size=66560 free=65536 addr=0x40ff4000 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] do_shm_open_lock::jk_shm.c (182): Opened shared memory lock /etc/httpd/logs/jk-runtime-status.lock [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] init_jk::mod_jk.c (2350): Initialized shm:/etc/httpd/logs/jk-runtime-status [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] uri_worker_map_open::jk_uri_worker_map.c (323): rule map size is 0 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] build_worker_map::jk_worker.c (236): creating worker ajp13 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] wc_create_worker::jk_worker.c (141): about to create instance ajp13 of ajp13 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] wc_create_worker::jk_worker.c (154): about to validate and init ajp13 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_validate::jk_ajp_common.c (1806): worker ajp13 contact is 'localhost:8009' [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_init::jk_ajp_common.c (1895): setting socket keepalive to 0 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_init::jk_ajp_common.c (1934): setting socket timeout to -1 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_init::jk_ajp_common.c (1938): setting socket buffer size to 0 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_init::jk_ajp_common.c (1942): setting connection recycle timeout to 0 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_init::jk_ajp_common.c (1946): setting cache timeout to 0 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_init::jk_ajp_common.c (1950): setting connect timeout to 0 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_init::jk_ajp_common.c (1954): setting reply timeout to 0 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_init::jk_ajp_common.c (1958): setting prepost timeout to 0 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_init::jk_ajp_common.c (1962): setting recovery opts to 0 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_init::jk_ajp_common.c (1966): setting number of retries to 3 [Tue Jul 11 16:00:54 2006] [5582:16384] [debug] ajp_