Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 25906 invoked from network); 27 Sep 2006 22:23:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Sep 2006 22:23:28 -0000 Received: (qmail 37846 invoked by uid 500); 27 Sep 2006 22:23:16 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 37630 invoked by uid 500); 27 Sep 2006 22:23:15 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 37619 invoked by uid 99); 27 Sep 2006 22:23:15 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Sep 2006 15:23:15 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=Rick.Fisk@authoria.com; spf=pass X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=HTML_MESSAGE Received-SPF: pass (idunn.apache.osuosl.org: domain authoria.com designates 12.5.151.86 as permitted sender) Received: from [12.5.151.86] ([12.5.151.86:15021] helo=ausmail01.corp.authoria.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 5B/40-03124-0D9FA154 for ; Wed, 27 Sep 2006 15:23:12 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6E283.830EAEE6" Subject: [Solution] mod_jk: Could not find a worker for worker name=worker1 Date: Wed, 27 Sep 2006 17:23:08 -0500 Message-ID: <792DEA40067A81458E52B78B6BD5B918059A9F34@ausmail01.corp.authoria.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Solution] mod_jk: Could not find a worker for worker name=worker1 Thread-Index: Acbighbp936MDEG2QSGYHJM+a31bGw== From: "Rick Fisk" To: X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C6E283.830EAEE6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I was having a bit of trouble with mod_jk1.2.19 and virtual host configuration in apache 2.=20 =20 I hope I can shed some light on what I discovered and put this question to rest. The error message in the subject can be found all over the net with no helpful responses.I know, I was having this problem and every post about this problem led to a dead end. In re-stating the problem and attempting to provide more clues, I found a solution but have no insight into why this "fixes" the problem. =20 The goal is to hook up apache with tomcat via mod_jk such that I can have separate domains pointing at distinct deployments in the webapps directory.=20 =20 Thus pounding on http://it7.blah.com would connect via mod_jk to the tomcat app in ${tomcat.home}/webapps/it7 and http://it8.blah.com to ${tomcat.home}/webapps/it8 =20 I had successfully configured Tomcat (5.5.16) and mod_jk as evidenced by my working apps and the mod_jk.conf file that is generated under ${tomcat.home}/conf/auto/ =20 The problem arose when configuring apache. My worker.properties file is located in /etc/httpd/conf/worker.properties and tomcat references it and apparently understands it well enough to create a mod_jk.conf file which has a (visually) correct virtual host for every container app in tomcat. This isn't exactly what I want however, so I am not using it other than as evidence that parts of this configuration are working properly. =20 With my configuration( See below), after restarting apache, the following appears in the mod_jk.log file. =20 [Wed Sep 27 16:01:18 2006] [2867:63648] [debug] jk_map_resolve_references::jk_map.c (638): Checking for references with prefix worker. with wildcard (recursion1) [Wed Sep 27 16:01:18 2006] [2867:63648] [debug] build_worker_map::jk_worker.c (236): creating worker worker1 [Wed Sep 27 16:01:18 2006] [2867:63648] [debug] wc_create_worker::jk_worker.c (141): about to create instance worker1 of ajp13 =20 [......] =20 [Wed Sep 27 16:01:18 2006] [2867:63648] [debug] build_worker_map::jk_worker.c (236): creating worker inprocess [Wed Sep 27 16:01:18 2006] [2867:63648] [error] wc_create_worker::jk_worker.c (134): Unknown worker type jni for worker inprocess --- Huh? [Wed Sep 27 16:01:18 2006] [2867:63648] [error] build_worker_map::jk_worker.c (256): failed to create worker inprocess [Wed Sep 27 16:01:18 2006] [2867:63648] [debug] close_workers::jk_worker.c (212): close_workers will destroy worker worker1 <------------------------------- my worker is getting destroyed [Wed Sep 27 16:01:18 2006] [2867:63648] [debug] ajp_destroy::jk_ajp_common.c (2131): up to 10 endpoints to close [Wed Sep 27 16:01:19 2006] [3052:63648] [debug] do_shm_open::jk_shm.c (252): Shared memory is already open =20 [....] =20 [Wed Sep 27 16:01:19 2006] [3052:63648] [debug] jk_handler::mod_jk.c (1920): Into handler jakarta-servlet worker=3Dworker1 r->proxyreq=3D0 [Wed Sep 27 16:01:19 2006] [3052:63648] [debug] wc_get_worker_for_name::jk_worker.c (111): did not find a worker worker1 [Wed Sep 27 16:01:19 2006] [3052:63648] [info] jk_handler::mod_jk.c (2071): Could not find a worker for worker name=3Dworker1 =20 This message was originally to be a plea for help and in reviewing the data and configuration, I discovered that the inprocess worker is in the worker.properties sample file by default.=20 =20 worker.list=3Dworker1,inprocess=20 =20 worker1 is ajp13 in the sample. The problem appears to be that "inprocess" shouldn't be in the worker.list. When I remove the inprocess worker from the list, I get the results I was after. It all appears to work properly now. =20 =20 =20 Specific (broken) configuration is below.=20 =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >From httpd.conf: =20 JkWorkersFile /etc/httpd/conf/workers.properties # Where to put the JK logs JkLogFile /var/log/httpd/mod_jk.log # jk log level 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" =20 =20 In the Virtualhost container: =20 =20 alias / "/usr/local/tomcat/webapps/it7/" =20 Options Indexes FollowSymLinks DirectoryIndex index.jsp =20 AllowOverride None deny from all =20 AllowOverride None deny from all =20 JkMount /*.jsp worker1 JkMount /*.action worker1 JkMount /*.vm worker1 JkMount /service/* worker1 =20 =20 =20 worker.list=3Dworker1,inprocess =20 worker.worker1.port=3D8009 worker.worker1.host=3Dqe-app1.itn.hire.com worker.worker1.type=3Dajp13 worker.worker1.lbfactor=3D1 worker.worker1.connection_pool_size=3D10 worker.worker1.connection_pool_timeout=3D600 worker.worker1.socket_keepalive=3D1 =20 worker.loadbalancer.type=3Dlb worker.loadbalancer.balance_workers=3Dlbworker =20 worker.inprocess.type=3Djni =20 ------_=_NextPart_001_01C6E283.830EAEE6--