Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
-none-

-none-

2007-10-04       - By Felix Schumacher

 Back
Hi Nuno,

I would think you have configured mod_jk to use worker1 as the only worker
in apache. You should use the loadbalancer worker in mod_jk.conf like

JkMount /myapp/* loadbalancer

and change your worker.properties to inlude the loadbalancer worker in the
worker.list property like

worker.list=loadbalancer,worker1,worker2

And I believe that you can remove worker1 and worker2 from that list if
your are not accessing them directly from any JkMount directive.

HTH
Felix
Am Do, 4.10.2007, 12:03, schrieb Nuno Branco:
> Hello list,
>
> This is my first post so treat me gently :)
>
> I'm trying to configure Apache + Tomcat with load balancing capabilities
> and
> I'm planning to use mod_jk to accomplish this, unfortunately I have not
> been
> 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.
>
> 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)
>
> My workers.properties looks like this:
>
>     workers.tomcat_home=/usr/local/tomcat/
>     workers.java_home=/usr/local/sdk/jdk
>
>     ps=/
>
>     worker.list=worker1, worker2
>
>     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
>
>     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
>
> 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.
>
> Thank you,
> Nuno
>



-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)