Re: Apache AJP to 4 TCs

2010-09-13 Thread Andrew Bruno
I did a fresh install, and it all worked.  Steps documented @

http://bruniglobal.blogspot.com/2010/09/load-balancing-4-tomcats-with-apache-22.html

I then went back to my old install, and noticed that I didnt specific
ServerName domain:80

I did that and it all worked.. weird.

Anyway, thank you all for your help on this, I really liked Mark's
worker.template approach :) and Chris' questions  info.

If there is anything I can improve in the process, as documented, please let
me know.

Cheers
Andrew


On Fri, Sep 10, 2010 at 11:38 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Andrew,

 On 9/10/2010 2:52 AM, Andrew Bruno wrote:
  Thank you for the responses.  I have gone about and installed a fresh
 Apache
  (on a seperate box), and have documented my steps in
 
 
 http://bruniglobal.blogspot.com/2010/09/load-balancing-4-tomcats-with-apache-22.html
 
  So far so good.  I can load balance across all 4 tomcats, BUT I HAVE NOT
  ENABLED/ADDED SSL yet.
 
  Could the the ssl config be causing me grief?

 Almost certainly not. If you are using Apache httpd to terminate SSL,
 mod_jk doesn't even know about it (except that it will know the SSL
 state and pass that along the wire to Tomcat so it knows the connection
 is secure).

  JkMount  /* loadbalancer
 
  JkOptions +ForwardSSLCertChain

 Presumably, you have more Jk* directives. Can you post those?

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkyKNL8ACgkQ9CaO5/Lv0PCeogCfS6AMtaI5scFUsw6Yaoxl6ptC
 YuQAniV/ZgCDcLxItD2cPO/2in+OxpZ8
 =xa0R
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Apache AJP to 4 TCs

2010-09-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew,

On 9/13/2010 3:09 AM, Andrew Bruno wrote:
 If there is anything I can improve in the process, as documented, please let
 me know.

Upgrade from Tomcat 4.x to Tomcat 6.x? ;)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyOMbkACgkQ9CaO5/Lv0PDpIwCglFp5PAEfMaByWfeZQF1xQD84
gzEAoJ0UDapygQaQHtuypy+09IoGOOTl
=pdoT
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache AJP to 4 TCs

2010-09-13 Thread Mark Eggers
Thanks, but credit where credit is due.

The basis for my configuration was taken from the examples in the source code. 
There are a lot of notes in the original source code configurations. Even if 
you 
don't compile it yourself (I do, since I'm mostly on Linux), the files are 
worth 
the read.

Download the connector source 
from http://tomcat.apache.org/download-connectors.cgi, unzip the file, and take 
a look in the tomcat-connectors-1.2.30-src/conf directory. There are a lot of 
nice explanations tucked into the example configuration files.

. . . . just my two cents.

/mde/


- Original Message 
From: Andrew Bruno andrew.br...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Mon, September 13, 2010 12:09:30 AM
Subject: Re: Apache AJP to 4 TCs

I did a fresh install, and it all worked.  Steps documented @

http://bruniglobal.blogspot.com/2010/09/load-balancing-4-tomcats-with-apache-22.html


I then went back to my old install, and noticed that I didnt specific
ServerName domain:80

I did that and it all worked.. weird.

Anyway, thank you all for your help on this, I really liked Mark's
worker.template approach :) and Chris' questions  info.

If there is anything I can improve in the process, as documented, please let
me know.

Cheers
Andrew


  


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache AJP to 4 TCs

2010-09-10 Thread Andrew Bruno
Hi Mark  Chris,

Thank you for the responses.  I have gone about and installed a fresh Apache
(on a seperate box), and have documented my steps in

http://bruniglobal.blogspot.com/2010/09/load-balancing-4-tomcats-with-apache-22.html

So far so good.  I can load balance across all 4 tomcats, BUT I HAVE NOT
ENABLED/ADDED SSL yet.

Could the the ssl config be causing me grief?

Listen 172.16.29.148:443

AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl.crl

SSLPassPhraseDialog  builtin

SSLSessionCache
dbm:E:/products/thirdparty/apache-2.2.15-01/logs/ssl_scache
SSLSessionCacheTimeout  300

SSLMutex default

VirtualHost _default_:443

DocumentRoot E:/products/thirdparty/apache-2.2.15-01/htdocs
ServerAdmin supp...@blabla.com
LogLevel error
ErrorLog E:/products/thirdparty/apache-2.2.15-01/logs/ssl_error.log
TransferLog E:/products/thirdparty/apache-2.2.15-01/logs/ssl_access.log

JkMount  /* loadbalancer

JkOptions +ForwardSSLCertChain

SSLEngine on

SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile
E:/synetek/products/thirdparty/apache-2.2.15-01/conf/ssl/wildcard-zia.com.crt
SSLCertificateKeyFile
E:/synetek/products/thirdparty/apache-2.2.15-01/conf/ssl/zia.com.key


FilesMatch \.(cgi|shtml|phtml|php)$
SSLOptions +StdEnvVars
/FilesMatch

Directory E:/synetek/products/thirdparty/apache-2.2.15-01/cgi-bin
SSLOptions +StdEnvVars
/Directory

BrowserMatch .*MSIE.* \
 nokeepalive ssl-unclean-shutdown \
 downgrade-1.0 force-response-1.0

CustomLog
E:/synetek/products/thirdparty/apache-2.2.15-01/logs/ssl_request.log \
  %t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \%r\ %b

/VirtualHost


Re: Apache AJP to 4 TCs

2010-09-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew,

On 9/10/2010 2:52 AM, Andrew Bruno wrote:
 Thank you for the responses.  I have gone about and installed a fresh Apache
 (on a seperate box), and have documented my steps in
 
 http://bruniglobal.blogspot.com/2010/09/load-balancing-4-tomcats-with-apache-22.html
 
 So far so good.  I can load balance across all 4 tomcats, BUT I HAVE NOT
 ENABLED/ADDED SSL yet.
 
 Could the the ssl config be causing me grief?

Almost certainly not. If you are using Apache httpd to terminate SSL,
mod_jk doesn't even know about it (except that it will know the SSL
state and pass that along the wire to Tomcat so it knows the connection
is secure).

 JkMount  /* loadbalancer
 
 JkOptions +ForwardSSLCertChain

Presumably, you have more Jk* directives. Can you post those?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyKNL8ACgkQ9CaO5/Lv0PCeogCfS6AMtaI5scFUsw6Yaoxl6ptC
YuQAniV/ZgCDcLxItD2cPO/2in+OxpZ8
=xa0R
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache AJP to 4 TCs

2010-09-09 Thread Andrew Bruno
Here is the mod_jk log requested

[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_util.c (459):
Pre-processed log time stamp format is '[%a %b %d %H:%M:%S %Y] '
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(770): rule map size is 1
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(720): wildchar rule '/*=loadbalancer' source 'JkMount' was added
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(171): uri map dump after map open: index=0 file='(null)'
reject_unsafe=0 reload=60 modified=0 checked=0
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(176): generation 0: size=0 nosize=0 capacity=0
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(176): generation 1: size=1 nosize=0 capacity=4
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(186): NEXT (1) map #0: uri=/* worker=loadbalancer context=/*
source=JkMount type=Wildchar len=2
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_util.c (459):
Pre-processed log time stamp format is '[%a %b %d %H:%M:%S %Y] '
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(770): rule map size is 1
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(720): wildchar rule '/*=loadbalancer' source 'JkMount' was added
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(171): uri map dump after map open: index=0 file='(null)'
reject_unsafe=0 reload=60 modified=0 checked=0
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(176): generation 0: size=0 nosize=0 capacity=0
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(176): generation 1: size=1 nosize=0 capacity=4
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_uri_worker_map.c
(186): NEXT (1) map #0: uri=/* worker=loadbalancer context=/*
source=JkMount type=Wildchar len=2
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] mod_jk.c (3116): Not
using locking.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] mod_jk.c (3128):
Setting default connection pool max size to 64
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.list' with value '1,2,3,loadbalancer' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.1.host' with value '176.16.29.148' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.1.port' with value '8019' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.1.type' with value 'ajp13' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.1.lbfactor' with value '4' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.2.host' with value '176.16.29.148' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.2.port' with value '8029' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.2.type' with value 'ajp13' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.2.lbfactor' with value '5' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.3.host' with value '176.16.29.158' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.3.port' with value '8039' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.3.type' with value 'ajp13' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.3.lbfactor' with value '1' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.4.host' with value '176.16.29.158' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.4.port' with value '8049' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.4.type' with value 'ajp13' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.4.lbfactor' with value '2' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.loadbalancer.type' with value 'lb' to map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (491): Adding
property 'worker.loadbalancer.balance_workers' with value '1,2,3' to
map.
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_map.c (774):
Checking for references with prefix worker. with wildcard (recursion
1)
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_shm.c (125): worker
loadbalancer of type lb has 3 members
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_shm.c (132): shared
memory will contain 3 ajp workers of size 320 and 1 lb workers of size
320 with 3 members of size 384+320
[Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_shm.c (244):
Resetting the shared memory for child 4
[Wed Sep 08 

Re: Apache AJP to 4 TCs

2010-09-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew,

On 9/9/2010 2:00 AM, Andrew Bruno wrote:
 [Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_worker.c (242):
 creating worker loadbalancer
 [Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_worker.c (146):
 about to create instance loadbalancer of lb
 [Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_worker.c (159):
 about to validate and init loadbalancer
 [Wed Sep 08 22:57:36 2010] [6912:6336] [error] jk_lb_worker.c (1536):
 allocating lb sub worker record from shared memory
 [Wed Sep 08 22:57:36 2010] [6912:6336] [error] jk_worker.c (163):
 validate failed for loadbalancer
 [Wed Sep 08 22:57:36 2010] [6912:6336] [error] jk_worker.c (262):
 failed to create worker loadbalancer

D'oh. In your original post, did you include your entire
workers.properties file? Also, can you post all your Jk* directives you
have active in your httpd configuration?

The code that performs validation of the worker is found in
native/common/jk_lb_worker.c:

static int JK_METHOD validate(jk_worker_t *pThis,
  jk_map_t *props,
  jk_worker_env_t *we, jk_logger_t *l)


 [Wed Sep 08 22:57:36 2010] [6912:6336] [error] jk_lb_worker.c (1536):
 allocating lb sub worker record from shared memory

This occurs on line 1536 (in mod_jk 1.2.30), in this neighborhood:

1533 for (i = 0; i  num_of_workers; i++) {
1534 p-lb_workers[i].s = 
 jk_shm_alloc_lb_sub_worker(p-p);
1535 if (p-lb_workers[i].s == NULL) {
1536 jk_log(l, JK_LOG_ERROR,
1537allocating lb sub worker record from 
 shared memory);
1538 JK_TRACE_EXIT(l);
1539 return JK_FALSE;
1540 }
1541 }

This looks like it might be a shared memory allocation error. Once you
get into the jk_shm and jk_pool code, there's no debug logging of any
kind :(

You might have to hack-in some debug logging if Rainer or Mladen can't
comment further. Are you comfortable compiling your own mod_jk? It looks
like compiling with DEBUG #defined to something will at least get you
jk_dump_pool calls when shared memory fails to be allocated.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyJJDIACgkQ9CaO5/Lv0PC5qgCgrC95f3fzfE/pVG1doE/IewW1
j8cAoKEwnNKI5Rs8RsYb6yISFiuY5P9L
=kWGg
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache AJP to 4 TCs

2010-09-09 Thread Mark Eggers
=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/

Interceptor
   
className=org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor/

  /Channel
  Valve className=org.apache.catalina.ha.tcp.ReplicationValve
 
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/
  Deployer className=org.apache.catalina.ha.deploy.FarmWarDeployer
tempDir=${catalina.base}/temp-dir/
deployDir=${catalina.base}/webapps/
watchDir=${catalina.base}/watch-dir/
processDeployFrequency=4
watchEnabled=true/
  ClusterListener
   
 className=org.apache.catalina.ha.session.ClusterSessionListener/
/Cluster
Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs
   prefix=localhost_access_log. suffix=.txt pattern=common 
   resolveHosts=false/
  /Host
/Engine
  /Service
/Server

It's all pretty generic. This particular instance happens to be the one that 
provides the other three with the web application, so I have 
watcheEnabled=true for the Deployer. In general here's what you have to watch 
out for when running all of this on one machine.

1. Change ports for everything
   shutdown port
   HTTP port (if used - I use it for management)
   HTTPS port (if used)
   AJP port
   Receiver port in cluster (not strictly necessary since Tomcat will figure 
this out)
2. Match jvmroute with names used in workers.properties
3. Match the AJP ports between server.xml and workers.properties

I run this using $CATALINA_HOME and $CATALINA_BASE (%CATALINA_HOME% and 
%CATALINA_BASE% on Windows) plus cluster-startup.sh and a cluster-shutdown.sh 
scripts.

I haven't tried this on Windows yet, so the issue may be with shared memory 
allocation.

Take a close look at your workers.properties files and compare it to the one 
above (which is based on the stock one provided with the tomcat-connectors 
source package).

Hope this helps.

. . . . just my two cents.

/mde/

- Original Message 
From: Christopher Schultz ch...@christopherschultz.net
To: Tomcat Users List users@tomcat.apache.org
Sent: Thu, September 9, 2010 11:15:14 AM
Subject: Re: Apache AJP to 4 TCs

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew,

On 9/9/2010 2:00 AM, Andrew Bruno wrote:
 [Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_worker.c (242):
 creating worker loadbalancer
 [Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_worker.c (146):
 about to create instance loadbalancer of lb
 [Wed Sep 08 22:57:36 2010] [6912:6336] [debug] jk_worker.c (159):
 about to validate and init loadbalancer
 [Wed Sep 08 22:57:36 2010] [6912:6336] [error] jk_lb_worker.c (1536):
 allocating lb sub worker record from shared memory
 [Wed Sep 08 22:57:36 2010] [6912:6336] [error] jk_worker.c (163):
 validate failed for loadbalancer
 [Wed Sep 08 22:57:36 2010] [6912:6336] [error] jk_worker.c (262):
 failed to create worker loadbalancer

D'oh. In your original post, did you include your entire
workers.properties file? Also, can you post all your Jk* directives you
have active in your httpd configuration?

The code that performs validation of the worker is found in
native/common/jk_lb_worker.c:

static int JK_METHOD validate(jk_worker_t *pThis,
  jk_map_t *props,
  jk_worker_env_t *we, jk_logger_t *l)


 [Wed Sep 08 22:57:36 2010] [6912:6336] [error] jk_lb_worker.c (1536):
 allocating lb sub worker record from shared memory

This occurs on line 1536 (in mod_jk 1.2.30), in this neighborhood:

1533 for (i = 0; i  num_of_workers; i++) {
1534 p-lb_workers[i].s = 
jk_shm_alloc_lb_sub_worker(p-p);
1535 if (p-lb_workers[i].s == NULL) {
1536 jk_log(l, JK_LOG_ERROR,
1537allocating lb sub worker record from 
 shared 
memory);
1538 JK_TRACE_EXIT(l);
1539 return JK_FALSE;
1540 }
1541 }

This looks like it might be a shared memory allocation error. Once you
get into the jk_shm and jk_pool code, there's no debug logging of any
kind :(

You might have to hack-in some debug logging if Rainer or Mladen can't
comment further. Are you comfortable compiling your own mod_jk? It looks
like compiling with DEBUG #defined to something will at least get you
jk_dump_pool calls when shared memory fails to be allocated.

- -chris


  


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache AJP to 4 TCs

2010-09-08 Thread Andrew Bruno
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, Pidp...@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):
 

Re: Apache AJP to 4 TCs

2010-09-08 Thread Andrew Bruno
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
JkLogLevelerror
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, Pidp...@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 

Re: Apache AJP to 4 TCs

2010-09-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew,

On 9/8/2010 9:10 AM, Andrew Bruno wrote:
 And here is my JK info

Thanks.

 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
 JkLogLevelerror

Try setting the above JkLogLevel to debug and sending the new
(complete) mod_jk.log file that covers httpd startup.

 JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
 JkMount  /* loadbalancer

Since you're using httpd for load balancing, you might consider using it
to serve static content rather than doing a (potentially) needless proxy
operation for those files. Just a thought.

 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?

Yes.

 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

Good.

Please send an updated log file, and we'll take a look.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyHlX4ACgkQ9CaO5/Lv0PCQZwCcClTydhrc7vwozVrsrYfd0D9d
5u4AoKCOYPpaX0CoCxEI4vHK3SgEh/n9
=9R0Z
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Apache AJP to 4 TCs

2010-09-07 Thread Andrew Bruno
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

# 
# 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


# --
# Load Balancer worker
# --
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=1,2,3,4

BUT WHEN I change to:


worker.list=1,2,3,4,loadbalancer

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

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
[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?

Thanks
Andrew

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache AJP to 4 TCs

2010-09-07 Thread Pid
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
 
 # 
 # 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
 
 
 # --
 # Load Balancer worker
 # --
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=1,2,3,4
 
 BUT WHEN I change to:
 
 
 worker.list=1,2,3,4,loadbalancer
 
 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
 
 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
 [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?


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Apache AJP to 4 TCs

2010-09-07 Thread Andrew Bruno
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

 # 
 # 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


 # --
 # Load Balancer worker
 # --
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=1,2,3,4

 BUT WHEN I change to:


 worker.list=1,2,3,4,loadbalancer

 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

 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
 [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?


 p


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache AJP to 4 TCs

2010-09-07 Thread Pid
On 07/09/2010 09: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

So the most recent version of mod_jk has some sample config files in the
distribution which, notably, use the 'template' method.

You might consider reviewing those and starting over.

Also, I'm not sure whether you can use a single number for a worker name
- but I'd consider it more sensible to use a string based, longer name
to avoid confusion when configuring the jvmRoute attribute in server.xml.


p

 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

 # 
 # 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


 # --
 # Load Balancer worker
 # --
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=1,2,3,4

 BUT WHEN I change to:


 worker.list=1,2,3,4,loadbalancer

 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

 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
 [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?


 p

 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Apache AJP to 4 TCs

2010-09-07 Thread Rainer Jung

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, Pidp...@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