tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rastislav Vasil" <Rastislav.Va...@svk.sas.com>
Subject RE: Tomcat 4 load balancing
Date Wed, 19 Mar 2003 15:09:58 GMT
Hi,

I' sorry, my mystake - 
lb is a type of the worker, while it's name is loadbalancer,
I changed following:

default.worker=lb 	--> default.worker=loadbalancer
worker.list=lb		-->  worker.list=loadbalancer

Now it works, but I have a question for one of my next steps:

For some operations that write to a file I used to use a SYNCHRONIZED block of code to be
sure to have only one user writing to the file.
Probably that won't work when using 2 Tomcat instances to write to the same file - am I right?
What is the solution/practise here?
Thanks,

Rasto


-----Original Message-----
From: Rastislav Vasil 
Sent: Wednesday, March 19, 2003 3:58 PM
To: 'tomcat-user@jakarta.apache.org'
Subject: Tomcat 4 load balancing


Hi all,

I'm trying to configure 2 Tomcat (4.1.12) instances on different hosts to serve under single
IIS 5 web server.
I defined 2 workers 

uriworkermap.properties:
###########
default.worker=lb
/examples=$(default.worker)
/examples/*=$(default.worker)


workers.properties:
#########################
workers.tomcat_home=C:\Tomcat4.1
workers.java_home=C:\jdk1.3.0_01

worker.list=lb

worker.w1.port=8009
worker.w1.host=localhost
worker.w1.type=ajp13

worker.w2.port=8009
worker.w2.host=host2
worker.w2.type=ajp13

worker.w1.lbfactor=1
worker.w2.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=w1, w2
###############################

I get The page cannot be displayed for http://localhost/examples  I get following in isapi.log
file:

[Wed Mar 19 15:47:10 2003]  [jk_connect.c (143)]: jk_open_socket, connect() failed errno =
61
[Wed Mar 19 15:47:10 2003]  [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd
= -1
[Wed Mar 19 15:47:10 2003]  [jk_isapi_plugin.c (716)]: HttpExtensionProc error, service()
failed

What I'm trying to do is to have 2 Tomcats servering Java part of a single application.
What I'm not sure is how to map balanced workers to a single url mapping in uriworkermap.
props.

According docs (http://localhost:8080/tomcat-docs/jk2/jk/workershowto.html)
"balanced_workers is a comma separated list of workers that the load balancer need to manage.
These workers should not appear in the worker.list property." - ... I don't have then there...-
so if I'm balancing workers, should workers.list contain only the name of the load-balancing
worker?
To what worker(s) should the url mapping be set to?


Thanks in advance.

Rasto



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message