Hello, I am using the jk1.2.15 connector to connect the apache 2.0.55 webserver to tomcat 5.5.15 on a windows 2003 server. However, I am not getting any luck with the connector. I googled for hours on the internet, but nothing that matches.
I even found contradictory information. In the docs it states that the workers should not be defined in the workers.list when you are using load balancing, but in the examples I found on the internet, they were defined in the workers.list (and yes I tried it but it just gives another error message). I keep on getting the message: Could not find a worker for worker name=tomcat1. -------------------------------------------------- In my workers.properties, I have defined: -------------------------------------------------- workers.tomcat_home=d:/java/apache-tomcat-5.5.15 workers.java_home=C:/Program Files/Java/jdk1.5.0_06 ps=/ # define special the workers load balancer and jkstatus worker worker.list=wlb,jkstatus # Defining a worker named tomcat1 and of type ajp13 worker.tomcat1.type=ajp13 worker.tomcat1.host=ntbrawebdv11.braine.ucb worker.tomcat1.port=8009 # The higher lbfactor, the more priority to do work. worker.tomcat1.lbfactor=2 # # Defining a load balancer # worker.wlb.type=lb # A list of all the workers that are load balanced. worker.wlb.balance_workers=tomcat1 # use sticky sessions worker.wlb.sticky_session=True # Give an error if a worker is in error state. The connection will not be switched to the other workers. worker.wlb.sticky_session_force=True # Use the number of requests to perform the load balancing. worker.wlb.method=Request # # Define status worker # worker.jkstatus.type=status ---------------------------------------------------------------------------- - In my tomcat.conf file which I include at the bottom of the httpd.conf file I have: ---------------------------------------------------------------------------- - # Block any access to WEB-INF directories <Location "/*/WEB-INF/*"> AllowOverride None deny from all </Location> # Load mod_jk module LoadModule jk_module modules/mod_jk.so # Declare the module for <IfModule directive> (remove this line on Apache 2.0.x) #AddModule mod_jk.c # Where to find workers.properties JkWorkersFile d:/java/apache-tomcat-5.5.15/conf/workers.properties # Where to put jk logs JkLogFile d:/apache2.0.55/Apache2/logs/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize -ForwardURICompat +ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" # Send servlet for context .do to worker named worker1 JkMount /*.do tomcat1 # Send servlet for context .dox to worker named worker1 JkMount /*.dox tomcat1 # Send JSP for context .jsp to worker named worker1 JkMount /*.jsp tomcat1 # Send JSPx for context .jsp to worker named worker1 JkMount /*.jspx tomcat1 # Any viewdocument servlet JkMount /*/viewdocument tomcat1 # Any dqlbatch servlet JkMount /*/dqlbatch tomcat1 # Any folderlisting servlet JkMount /*/folderlisting tomcat1 ---------------------------------------------------------------------------- - And in the server.xml file of my tomcat, I have defined the http connector: ---------------------------------------------------------------------------- - <Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /> and on the engine tag I have defined the jvmRoute attribute: <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1"> When I put the jk connector in debug mode, I get something like this: [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_shm.c (134): Initialized shared memory size=67584 free=65536 addr=0x5c7760 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] mod_jk.c (2364): Initialized shm:memory [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_uri_worker_map.c (323): rule map size is 7 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_uri_worker_map.c (260): wildchar rule /*.do=tomcat1 was added [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_uri_worker_map.c (260): wildchar rule /*.dox=tomcat1 was added [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_uri_worker_map.c (260): wildchar rule /*.jsp=tomcat1 was added [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_uri_worker_map.c (260): wildchar rule /*.jspx=tomcat1 was added [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_uri_worker_map.c (260): wildchar rule /*/viewdocument=tomcat1 was added [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_uri_worker_map.c (260): wildchar rule /*/dqlbatch=tomcat1 was added [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_uri_worker_map.c (260): wildchar rule /*/folderlisting=tomcat1 was added [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_uri_worker_map.c (340): there are 7 rules [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_worker.c (236): creating worker wlb [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_worker.c (141): about to create instance wlb of lb [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_worker.c (154): about to validate and init wlb [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_worker.c (141): about to create instance tomcat1 of ajp13 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_worker.c (154): about to validate and init tomcat1 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1806): worker tomcat1 contact is 'ntbrawebdv11.braine.ucb:8009' [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1895): setting socket keepalive to 0 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1934): setting socket timeout to -1 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1938): setting socket buffer size to 0 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1942): setting connection recycle timeout to 0 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1946): setting cache timeout to 0 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1950): setting connect timeout to 0 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1954): setting reply timeout to 0 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1958): setting prepost timeout to 0 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1962): setting recovery opts to 0 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1966): setting number of retries to 3 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_ajp_common.c (1843): setting connection cache size to 250 [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_lb_worker.c (869): Balanced worker 0 has name tomcat1 in domain [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_worker.c (248): removing old wlb worker [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_worker.c (236): creating worker jkstatus [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_worker.c (141): about to create instance jkstatus of status [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_worker.c (154): about to validate and init jkstatus [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_worker.c (248): removing old jkstatus worker [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] mod_jk.c (1761): Shmem cleanup [Thu Jan 26 09:17:32 2006] [1472:2916] [debug] jk_shm.c (134): Initialized shared memory size=67584 free=65536 addr=0x5c7760 ---------------------------------------------------------------------------- but this gets repeated 3 times (I don't know why) in the log file. When I try to access a jsp page, I get the following: ---------------------------------------------------------------------------- [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (449): Attempting to map URI '/cms/' from 7 maps [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/folderlisting' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/viewdocument' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/dqlbatch' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.jspx' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.jsp' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.dox' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.do' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (449): Attempting to map URI '/cms/' from 7 maps [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/folderlisting' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/viewdocument' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/dqlbatch' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.jspx' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.jsp' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.dox' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.do' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (449): Attempting to map URI '/cms/index.html' from 7 maps [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/folderlisting' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/viewdocument' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/dqlbatch' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.jspx' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.jsp' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.dox' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.do' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (449): Attempting to map URI '/cms/index.html' from 7 maps [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/folderlisting' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/viewdocument' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/dqlbatch' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.jspx' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.jsp' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.dox' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.do' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (449): Attempting to map URI '/cms/jsp/index.jsp' from 7 maps [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/folderlisting' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/viewdocument' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*/dqlbatch' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.jspx' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (461): Attempting to map context URI '/*.jsp' [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_uri_worker_map.c (475): Found a wildchar match tomcat1 -> /*.jsp [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] mod_jk.c (1839): Into handler jakarta-servlet worker=tomcat1 r->proxyreq=0 [Thu Jan 26 09:17:50 2006] [1156:2920] [debug] jk_worker.c (111): did not find a worker tomcat1 [Thu Jan 26 09:17:50 2006] [1156:2920] [info] mod_jk.c (1993): Could not find a worker for worker name=tomcat1 [Thu Jan 26 09:17:59 2006] [1156:1332] [debug] mod_jk.c (1761): Shmem cleanup [Thu Jan 26 09:17:59 2006] [1156:1332] [debug] mod_jk.c (1761): Shmem cleanup [Thu Jan 26 09:17:59 2006] [1472:2916] [debug] mod_jk.c (1761): Shmem cleanup ---------------------------------------------------------------------------- -- If I change the config, and add the worker in the workers.list, then it just tells me that it can not initialize the tomcat1 worker. Can anyone help me one this, since I'm out of ideas. I tried to telenet to port 8009, and something was acctually listening, so the jk connector should be there. The good old jk2 (which is no longer supported) works, but I'd really like to use the supported version that comes with tomcat. Luc --------------------------------------------------------- Legal Notice: This electronic mail and its attachments are intended solely for the person(s) to whom they are addressed and contain information which is confidential or otherwise protected from disclosure, except for the purpose for which they are intended. Dissemination, distribution, or reproduction by anyone other than the intended recipients is prohibited and may be illegal. If you are not an intended recipient, please immediately inform the sender and return the electronic mail and its attachments and destroy any copies which may be in your possession. UCB screens electronic mails for viruses but does not warrant that this electronic mail is free of any viruses. UCB accepts no liability for any damage caused by any virus transmitted by this electronic mail. ---------------------------------------------------------