And here is my JK info JkWorkersFile E:/products/thirdparty/apache-2.2.15-01/conf/workers.properties JkShmFile E:/products/thirdparty/apache-2.2.15-01/logs/mod_jk.shm JkLogFile E:/products/thirdparty/apache-2.2.15-01/logs/mod_jk.log JkLogLevel error JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " JkMount /* loadbalancer
AB On Wed, Sep 8, 2010 at 11:06 PM, Andrew Bruno <andrew.br...@gmail.com> wrote: > With 2 workers, the system has been working well for months. > > I now wanted to add an extra two workers, i.e. a total of 4 tomcats, > and load balance across all 4. Is this possible? > > With respect to the worker names, a number works well. I have set the > jvmRoute to be numbers too, and my app directs users to the respective > worker using the MITM jsession followed by a dot followed by worker > name discussed in forum a few months ago. i.e. > https://app.somedomain.com/login.do;jsessionid=w.2 -> forces it to > use tomcat jvmRoute=2 > > e.g. > > <Service name="Catalina"> > <Connector > port="8019" > protocol="AJP/1.3" > redirectPort="443" > address="206.188.29.148" /> > > <!-- You should set jvmRoute to support load-balancing & redirect > via AJP --> > <Engine name="Catalina" defaultHost="localhost" jvmRoute="1"> > > <Host name="localhost" > unpackWARs="false" autoDeploy="false" > xmlValidation="false" xmlNamespaceAware="false"> > > Also, what do mean by "This can't work, since the loadbalancer has no > idea what you mean by worker 3 and 4 .." > > worker.loadbalancer.balance_workers=1,2,3,4 > > 1,2 works. 2,4 work, but if I add one more, e.g.1,2,4 apache fails to start. > > I defined all 4 workers. > > Does anyone have any hints or links, samples on how I can get Apache > talking to more than 2 tomcat workers? It is possible, right? > > Regards > Andrew > > On Tue, Sep 7, 2010 at 6:15 PM, Rainer Jung <rainer.j...@kippdata.de> wrote: >> See remarks inline. >> >> On 07.09.2010 10:01, Andrew Bruno wrote: >>> >>> Fair enough Pid, here it is: >>> >>> Windows 2008 R2 64 Bit >>> Java(TM) SE Runtime Environment (build 1.6.0_17-b04) / Java >>> HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode) >>> Tomcat 6.0.28 >>> Apache 2.2.15 >>> mod_jk-1.2.30-httpd-2.2.3.so >>> >>> AB >>> >>> >>> On Tue, Sep 7, 2010 at 5:52 PM, Pid<p...@pidster.com> wrote: >>>> >>>> On 07/09/2010 08:44, Andrew Bruno wrote: >>>>> >>>>> Hello, >>>>> >>>>> I am trying to add two extra workers, totaling 4 workers, but Apache >>>>> fails to restart. >>>>> >>>>> This worker file works: >>>>> >>>>> # List the workers name >>>>> worker.list=1,2,loadbalancer >> >> If you only want to use workers 1 and 2 via the loadbalancer, you can remove >> them from worker.list and only keep the loadbalancer there. >> >>>>> # ---------------- >>>>> # First worker >>>>> # ---------------- >>>>> worker.1.host=206.xx.xxx.xxx >>>>> worker.1.port=8019 >>>>> worker.1.type=ajp13 >>>>> worker.1.lbfactor=4 >>>>> >>>>> # ---------------- >>>>> # Second worker >>>>> # ---------------- >>>>> worker.2.host=206.xx.xxx.xxx >>>>> worker.2.port=8029 >>>>> worker.2.type=ajp13 >>>>> worker.2.lbfactor=5 >>>>> >> >> Strange lbfactors ... >> >>>>> # ---------------------- >>>>> # Load Balancer worker >>>>> # ---------------------- >>>>> worker.loadbalancer.type=lb >>>>> worker.loadbalancer.balance_workers=1,2,3,4 >> >> This can't work, since the loadbalancer has no idea what you mean by worker >> 3 and 4 ... >> >>>>> BUT WHEN I change to: >>>>> >>>>> >>>>> worker.list=1,2,3,4,loadbalancer >> >> Same comment as above concerning worker.list >> >>>>> worker.1.host=206.xx..xx.xx >>>>> worker.1.port=8019 >>>>> worker.1.type=ajp13 >>>>> worker.1.lbfactor=4 >>>>> >>>>> worker.2.host=206.xx..xx.xx >>>>> worker.2.port=8029 >>>>> worker.2.type=ajp13 >>>>> worker.2.lbfactor=5 >>>>> >>>>> worker.3.host=206.xx..xx.xx >>>>> worker.3.port=8039 >>>>> worker.3.type=ajp13 >>>>> worker.3.lbfactor=1 >>>>> >>>>> worker.4.host=206.xx.xx.xx >>>>> worker.4.port=8049 >>>>> worker.4.type=ajp13 >>>>> worker.4.lbfactor=2 >> >> And there are connectors in the Tomcat configuration listening on those >> ports 8019, ..., 8049, right? >> >>>>> worker.loadbalancer.type=lb >>>>> worker.loadbalancer.balance_workers=1,2,3,4 >>>>> >>>>> I get these kind of errors, and Apache fails to start >>>>> >>>>> [Tue Sep 07 00:36:37 2010] [18324:16360] [error] jk_lb_worker.c >>>>> (1536): allocating lb sub worker record from shared memory >> >> There's a problem creating the workers when trying to access shared memory. >> Could you please show us your complete mod_jk configuration, especially the >> "Jk*" directives for Apache? Do you have an JkShmSize set? >> >> Are there any info, warn or error messages during startup and before this >> failure? >> >>>>> [Tue Sep 07 00:36:37 2010] [18324:16360] [error] jk_worker.c (163): >>>>> validate failed for loadbalancer >>>>> [Tue Sep 07 00:36:37 2010] [18324:16360] [error] jk_worker.c (262): >>>>> failed to create worker loadbalancer >>>>> [Tue Sep 07 00:38:03 2010] [16864:7456] [error] jk_ajp_common.c >>>>> (2929): allocating ajp worker record from shared memory >>>>> [Tue Sep 07 00:38:03 2010] [16864:7456] [error] jk_worker.c (151): >>>>> factory for ajp13 failed for 2 >>>>> [Tue Sep 07 00:38:03 2010] [16864:7456] [error] jk_lb_worker.c (1603): >>>>> Failed creating worker 2 >>>>> [Tue Sep 07 00:38:03 2010] [16864:7456] [error] jk_lb_worker.c (1651): >>>>> NULL parameters >>>>> [Tue Sep 07 00:38:03 2010] [16864:7456] [error] jk_worker.c (163): >>>>> validate failed for loadbalancer >>>>> [Tue Sep 07 00:38:03 2010] [16864:7456] [error] jk_worker.c (262): >>>>> failed to create worker loadbalancer >>>>> [Tue Sep 07 00:38:39 2010] [7272:16728] [error] jk_ajp_common.c >>>>> (2929): allocating ajp worker record from shared memory >>>>> [Tue Sep 07 00:38:39 2010] [7272:16728] [error] jk_worker.c (151): >>>>> factory for ajp13 failed for 1 >>>>> [Tue Sep 07 00:38:39 2010] [7272:16728] [error] jk_lb_worker.c (1603): >>>>> Failed creating worker 1 >>>>> [Tue Sep 07 00:38:39 2010] [7272:16728] [error] jk_lb_worker.c (1651): >>>>> NULL parameters >>>>> [Tue Sep 07 00:38:39 2010] [7272:16728] [error] jk_worker.c (163): >>>>> validate failed for loadbalancer >>>>> [Tue Sep 07 00:38:39 2010] [7272:16728] [error] jk_worker.c (262): >>>>> failed to create worker loadbalancer >>>>> >>>>> How do I allow Apache to communicate to 4 tomcats? >>>> >>>> Exact HTTPD, Tomcat, mod_jk versions? >> >> Regards, >> >> Rainer >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org