From users-return-170302-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Thu Oct 04 10:46:16 2007 Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 1282 invoked from network); 4 Oct 2007 10:46:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Oct 2007 10:46:16 -0000 Received: (qmail 38154 invoked by uid 500); 4 Oct 2007 10:45:53 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 38132 invoked by uid 500); 4 Oct 2007 10:45:53 -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 38121 invoked by uid 99); 4 Oct 2007 10:45:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2007 03:45:53 -0700 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.227.30.246] (HELO datura.kippdata.de) (195.227.30.246) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2007 10:45:54 +0000 Received: from [195.227.30.148] (larix [195.227.30.148]) by datura.kippdata.de (8.13.5/8.13.5) with ESMTP id l94Ac2Ve013538 for ; Thu, 4 Oct 2007 12:38:03 +0200 (CEST) Message-ID: <4704C28A.1090508@kippdata.de> Date: Thu, 04 Oct 2007 12:38:02 +0200 From: Rainer Jung User-Agent: Thunderbird 2.0.0.6 (X11/20070802) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Apache2 / Tomcat5 / mod_jk - Problem with load balancer References: <6220514b0710040303u1690d55at24556b14a0a91963@mail.gmail.com> In-Reply-To: <6220514b0710040303u1690d55at24556b14a0a91963@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org In addition to Felix Schumachers correct comments: Nuno Branco wrote: > very successfull. The HOWTOs I found in the net must be outdated since I'm > not really acomplishing anything usefull, also because apache is complaining > about some options (as I will post below) that the HOWTO told me to put in > the worker.properties file indicating that these options are deprectated. Have a look at http://tomcat.apache.org/connectors-doc/ > So here is my setup: > Apache 2.2.6 > Tomcat 5.5.26 > mod_jk 1.2.25 (was the name of the .tgz I downloaded) fine. > My workers.properties looks like this: > > workers.tomcat_home=/usr/local/tomcat/ > workers.java_home=/usr/local/sdk/jdk > > ps=/ Remove the above. They are useless. > worker.list=worker1, worker2 As already reported, replace value with "loadbalancer" > worker.worker1.port=20009 > worker.worker1.host=rh01 > worker.worker1.type=ajp13 > worker.worker1.lbfactor=1 > > worker.worker2.port=8009 > worker.worker2.host=rh02 > worker.worker2.type=ajp13 > worker.worker2.lbfactor=1 > > worker.loadbalancer.type=lb > worker.loadbalancer.balance_workers=worker1, worker2 OK until here > worker.inprocess.type=jni > worker.inprocess.class_path=$(workers.tomcat_home > )$(ps)lib$(ps)tomcat.jar > worker.inprocess.cmd_line=start > worker.inprocess.jvm_lib=$(workers.java_home > )$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(ps)libjvm.so > worker.inprocess.stdout=$(workers.tomcat_home > )$(ps)logs$(ps)inprocess.stdout > worker.inprocess.stderr=$(workers.tomcat_home > )$(ps)logs$(ps)inprocess.stderr Remove above, again useless. > I then start the tomcat servers and the apache server, this comes from the > mod_jk.log: > [Thu Oct 04 09:17:39 2007] [27191:3086042816] [warn] > jk_map_validate_property::jk_map.c (412): The attribute ' > worker.inprocess.class_path' is deprecated - please check the documentation > for the correct replacement. > [Thu Oct 04 09:17:39 2007] [27191:3086042816] [warn] > jk_map_validate_property::jk_map.c (412): The attribute ' > worker.inprocess.cmd_line' is deprecated - please check the documentation > for the correct replacement. > [Thu Oct 04 09:17:39 2007] [27191:3086042816] [warn] > jk_map_validate_property::jk_map.c (412): The attribute ' > worker.inprocess.jvm_lib' is deprecated - please check the documentation for > the correct replacement. > [Thu Oct 04 09:17:39 2007] [27191:3086042816] [warn] > jk_map_validate_property::jk_map.c (412): The attribute ' > worker.inprocess.stdout' is deprecated - please check the documentation for > the correct replacement. > [Thu Oct 04 09:17:39 2007] [27191:3086042816] [warn] > jk_map_validate_property::jk_map.c (412): The attribute ' > worker.inprocess.stderr' is deprecated - please check the documentation for > the correct replacement. > [Thu Oct 04 09:17:39 2007] [27191:3086042816] [info] init_jk::mod_jk.c > (2775): mod_jk/1.2.25 initialized > > The server works fine and apache is giving me static content and the tomcat > standing at rh01 host is giving me dynamic content. For testing purposes I > do a shutdown to the tomcat server at rh01 and the mod_jk.log reports: > [Thu Oct 04 10:06:36 2007] [27308:3086042816] [info] > jk_open_socket::jk_connect.c (473): connect to 127.0.0.1:20009 failed > (errno=111) > [Thu Oct 04 10:06:36 2007] [27308:3086042816] [info] > ajp_connect_to_endpoint::jk_ajp_common.c (891): Failed opening socket to ( > 127.0.0.1:20009) (errno=111) > [Thu Oct 04 10:06:36 2007] [27308:3086042816] [info] > ajp_send_request::jk_ajp_common.c (1311): (worker1) error connecting to the > backend server (errno=111) > [Thu Oct 04 10:06:36 2007] [27308:3086042816] [info] > ajp_service::jk_ajp_common.c (2085): (worker1) sending request to tomcat > failed, recoverable operation attempt=1 > [Thu Oct 04 10:06:36 2007] [27308:3086042816] [info] > jk_open_socket::jk_connect.c (473): connect to 127.0.0.1:20009 failed > (errno=111) > [Thu Oct 04 10:06:36 2007] [27308:3086042816] [info] > ajp_connect_to_endpoint::jk_ajp_common.c (891): Failed opening socket to ( > 127.0.0.1:20009) (errno=111) > [Thu Oct 04 10:06:36 2007] [27308:3086042816] [info] > ajp_send_request::jk_ajp_common.c (1311): (worker1) error connecting to the > backend server (errno=111) > [Thu Oct 04 10:06:36 2007] [27308:3086042816] [info] > ajp_service::jk_ajp_common.c (2085): (worker1) sending request to tomcat > failed, recoverable operation attempt=2 > [Thu Oct 04 10:06:36 2007] [27308:3086042816] [error] > ajp_service::jk_ajp_common.c (2097): (worker1) Connecting to tomcat failed. > Tomcat is probably not started or is listening on the wrong port > [Thu Oct 04 10:06:36 2007] worker1 rh01 0.002234 > [Thu Oct 04 10:06:36 2007] [27308:3086042816] [info] jk_handler::mod_jk.c > (2277): Service error=0 for worker=worker1 > > It seems not to even try to go to rh02, just gives up when it is unable to > reach rh01. On the browser I get a typical 503 error. > > So if anyone has this setup running I would love to ear possible solutions > to work around this. I didn't see you JkMount entries? regards, Rainer --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org