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-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-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: Tomcat Load Balancing Not working and Apache URL is giving 500 error

2010-09-09 Thread Andrew Bruno
Hi Amol,

I am trying to do the exact same thing.  It works for two workers, but
fails as soon as I add one worker.

Can you please try these alternatives, and let me know if it works for you?

worker.loadbalancer.balanced_workers=tomcat1,tomcat2

worker.loadbalancer.balanced_workers=tomcat1,tomcat3

worker.loadbalancer.balanced_workers=tomcat2,tomcat3

For me, as long as I have two workers, it works.  It would be
interesting if its the same for you?

I also came across these links which I am reviewing.  It may help you.

http://thought-bytes.blogspot.com/2007/03/how-to-load-balance-tomcat-55-with.html
http://www.quadbase.com/eres/manual/6_4_Clustering.html
http://www.zulutown.com/blog/2009/02/16/java-ee-load-balancing-with-tomcat-and-apache/

Last question, do you have SSL enabled?

AB


On Thu, Sep 9, 2010 at 5:28 PM, Amol Puglia amolcpug...@yahoo.com wrote:
 Hello Team,

 We have installed one instance of apache and 3 instance of tomcat.

 We have compiled mod_jk module to forward request to 3 instance of tomcat.

 We have configured workers.properties and it is loaded in httpd.conf file.

 We are successfully able to redirect request to plain tomcat installation.

 We are getting 500 internal server error while accessing apache url after 
 deploying our EMATRIX application.

 Below are the details of workers.properties file and httpd.conf file.

 # lists the workers by name

 worker.list=loadbalancer

 # Tomcat1 configuration

 worker.tomcat1.port=8009

 worker.tomcat1.host=server_name

 worker.tomcat1.type=ajp13

 worker.tomcat1.lbfactor=100

 # Tomcat2 configuration

 worker.tomcat2.port=8010

 worker.tomcat2.host=server_name

 worker.tomcat2.type=ajp13

 worker.tomcat2.lbfactor=100

 # Tomcat3 configuration

 worker.tomcat3.port=8011

 worker.tomcat3.host=server_name

 worker.tomcat3.type=ajp13

 worker.tomcat3.lbfactor=100


 #Load Balance worker configuration

 worker.loadbalancer.type=lb

 worker.loadbalancer.balanced_workers=tomcat1,tomcat2,tomcat3


 Httpd.conf file details :-

 LoadModule jk_module modules/mod_jk.so

 JkWorkersFile conf/workers.properties

 JkLogFile logs/mod_jk.log

 JkLogLevel info

 JkMount /eMatrix/* loadbalancer


 Apache Version details :- 2.0.59

 Tomcat Version details :- apache-tomcat-6.0.20

 Mod_jk version details :- mod_jk-1.2.24

 We have also noticed that jk module is loading properly in apache.

 [Tue Sep 07 09:43:29 2010] [notice] Apache/2.0.59 (Unix) mod_jk/1.2.24 DAV/2 
 mod_ssl/2.0.59 OpenSSL/0.9.7d configured -- resuming normal operations


 kindly help me to acheive loadbalancing from apache to tomcat.






-
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

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 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: Procrun problems with Tomcat 6 on Windows 64-bit

2010-08-11 Thread Andrew Bruno
Hi Kevin,

Personally I do not use the w.exe gui.  I manage all tomcats via
Services, and update the service.bat file if any registry/config
settings etc need to be changed, so that we can manage changes/roll
backs via SVN.  This also makes it simpler since we have many TCs on
same OS.

So, I recommend you download the .ZIP version, and install the service
using services.bat

I also rename the tomcat6 to whatever service name I need, so that I
can install multiple tomcats on the same server OS.

Via the services.bat you can also change the logging path, jvm, set
threads size, memory, etc.

e.g. of our services.bat if this helps you out.

@echo off

if %OS% == Windows_NT setlocal
rem ---
rem $Id: service.bat 908749 2010-02-10 23:26:42Z markt $
rem ---

rem Guess CATALINA_HOME if not defined
set CURRENT_DIR=%cd%
if not %CATALINA_HOME% ==  goto gotHome
set CATALINA_HOME=%cd%
if exist %CATALINA_HOME%\bin\Secure02Web64.exe goto okHome
rem CD to the upper dir
cd ..
set CATALINA_HOME=%cd%
:gotHome
if exist %CATALINA_HOME%\bin\Secure02Web64.exe goto okHome
echo The tomcat.exe was not found...
echo The CATALINA_HOME environment variable is not defined correctly.
echo This environment variable is needed to run this program
goto end
rem Make sure prerequisite environment variables are set, we added
specific JAVA_HOME64 path
rem typically, JAVA_HOME64=C:\Program Files\Java\jdk1.6.0_17  - NOTE
WE USE the JDK so we use server mode
if not %JAVA_HOME64% ==  goto okHome
echo The JAVA_HOME64 environment variable is not defined
echo This environment variable is needed to run this program
goto end
:okHome
if not %CATALINA_BASE% ==  goto gotBase
set CATALINA_BASE=%CATALINA_HOME%
:gotBase

set EXECUTABLE=%CATALINA_HOME%\bin\Secure02Web64.exe

rem Set default Service name
set SERVICE_NAME=Secure02Web64
set PR_DISPLAYNAME=Secure02Web64

if %1 ==  goto displayUsage
if %2 ==  goto setServiceName
set SERVICE_NAME=%2
set PR_DISPLAYNAME=Secure02Web64 %2
:setServiceName
if %1 == install goto doInstall
if %1 == remove goto doRemove
if %1 == uninstall goto doRemove
echo Unknown parameter %1
:displayUsage
echo.
echo Usage: service.bat install/remove [service_name]
goto end

:doRemove
rem Remove the service
%EXECUTABLE% //DS//%SERVICE_NAME%
echo The service '%SERVICE_NAME%' has been removed
goto end

:doInstall
rem Install the service
echo Installing the service '%SERVICE_NAME%' ...
echo Using CATALINA_HOME:%CATALINA_HOME%
echo Using CATALINA_BASE:%CATALINA_BASE%
echo Using JAVA_HOME64:%JAVA_HOME64%

rem Use the environment variables as an example
rem Each command line option is prefixed with PR_

set PR_DESCRIPTION=Secure Web 02 TC 6.0.28
set PR_INSTALL=%EXECUTABLE%
set PR_LOGPATH=%CATALINA_BASE%\logs
set 
PR_CLASSPATH=%CATALINA_BASE%\bin\tomcat-juli.jar;%CATALINA_HOME%\bin\bootstrap.jar
rem Set the server jvm from JAVA_HOME64
set PR_JVM=%JAVA_HOME64%\jre\bin\server\jvm.dll
if exist %PR_JVM% goto foundJvm
rem Set the client jvm from JAVA_HOME64
set PR_JVM=%JAVA_HOME64%\jre\bin\client\jvm.dll
if exist %PR_JVM% goto foundJvm
set PR_JVM=auto
:foundJvm
echo Using JVM:  %PR_JVM%
%EXECUTABLE% //IS//%SERVICE_NAME% --StartClass
org.apache.catalina.startup.Bootstrap --StopClass
org.apache.catalina.startup.Bootstrap --StartParams start --StopParams
stop
if not errorlevel 1 goto installed
echo Failed installing '%SERVICE_NAME%' service
goto end
:installed
rem Clear the environment variables. They are not needed any more.
set PR_DISPLAYNAME=
set PR_DESCRIPTION=
set PR_INSTALL=
set PR_LOGPATH=
set PR_CLASSPATH=
set PR_JVM=
rem Set extra parameters
%EXECUTABLE% //US//%SERVICE_NAME% --JvmOptions
-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed
--StartMode jvm --StopMode jvm
rem More extra parameters
set PR_LOGPATH=%CATALINA_BASE%\logs
set PR_STDOUTPUT=auto
set PR_STDERROR=auto
%EXECUTABLE% //US//%SERVICE_NAME% ++JvmOptions
-XX:MaxPermSize=256m;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties;-D64
--JvmMs 512 --JvmMx 3072 --JvmSs 192
echo The service '%SERVICE_NAME%' has been installed.

:end
cd %CURRENT_DIR%

Cheers
Andrew


On Tue, Aug 10, 2010 at 3:21 AM, Stewart, Kevin L.
(GSFC-417.0)[CONSTELLATION SOFTWARE ENGINEERING]
kevin.l.stew...@nasa.gov wrote:
 Hi, I've been looking on the web and the Tomcat wiki and haven't found any 
 solution to this problem.

 I have a 64-bit Windows 2008 server with Java 1.6_20 (64-bit) and 64-bit 
 tomcat 6.0.26 (6.0.29 also) installed as a service.  I also have a Liferay 
 portal that I need to install.  But I am having problems with the startup.  
 (BTW, I use the tomcat6w.exe gui mostly.)  If I use startmode=jvm, the Spring 
 framework in Liferay loops until I 

No members active in cluster group

2010-07-15 Thread Andrew Bruno
Hello all,

I am having problems in getting clustering to work in a windows server
2008 environment using tomcat 6.0.20 java 1.5

I get the No members active in cluster group message on both tomcats.

The engine element on the first tomcat is:

  Engine name=Catalina defaultHost=localhost jvmRoute=1

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
channelSendOptions=4
Manager className=org.apache.catalina.ha.session.DeltaManager
name=someapp
expireSessionsOnShutdown=false
notifyListenersOnReplication=true/

Channel 
className=org.apache.catalina.tribes.group.GroupChannel 
Membership 
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.5
port=45564
frequency=500
dropTime=3000/

Receiver 
className=org.apache.catalina.tribes.transport.nio.NioReceiver
address=111.111.111.148
port=4001
autoBind=100
selectorTimeout=5000
maxThreads=12/

Sender 
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
Transport 
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
/Sender

Interceptor
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
Interceptor
className=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;.*\.xls;.*\.sdf;.*\.xml;/

!-- only with jk_mod failover--
Valve 
className=org.apache.catalina.ha.session.JvmRouteBinderValve
enabled=true sessionIdAttribute=takeoverSessionid /

!-- only with jk_mod and jvmroutebindervalve--
ClusterListener
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener/
/Cluster

  Host name=localhost
   unpackWARs=false autoDeploy=false
   xmlValidation=false xmlNamespaceAware=false

Alias111.111.111.154/Alias
Aliassomeapp.com/Alias  


Valve className=org.apache.catalina.valves.AccessLogValve
directory=E:\logs\websites\secure_app_01
prefix=default_access_log.
suffix=.txt
pattern='%h %l %u %t %r %s %b %{user-agent}i %{referer}i'
resolveHosts=true/

Logger className=org.apache.catalina.logger.FileLogger
directory=E:\logs\websites\secure_app_com_01
prefix=error_log.
suffix=.txt
timestamp=true/


Context path= reloadable=false distributable=true
docBase=E:\web_secure_01\secure_app_com_01
workDir=E:\web_secure_01\secure_work_01 
WatchedResourceWEB-INF/web.xml/WatchedResource
Logger className=org.apache.catalina.logger.SystemOutLogger
verbosity=4 timestamp=true/
/Context

  /Host

/Engine

In the second tomcat, the engine element is:

Engine name=Catalina defaultHost=localhost jvmRoute=2

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
channelSendOptions=4
Manager className=org.apache.catalina.ha.session.DeltaManager
name=someapp
expireSessionsOnShutdown=false
notifyListenersOnReplication=true/

Channel 
className=org.apache.catalina.tribes.group.GroupChannel 
Membership 
className=org.apache.catalina.tribes.membership.McastService
address=228.0.0.5
port=45564
frequency=500
dropTime=3000/

Receiver 
className=org.apache.catalina.tribes.transport.nio.NioReceiver
address=111.111.111.148
port=4002
autoBind=100
selectorTimeout=5000
maxThreads=12/

Sender 

Re: No members active in cluster group

2010-07-15 Thread Andrew Bruno
Are both instances running on the same host

Yes, both running on same host.  I will upgrade, and see how it goes.

Thanks


On Thu, Jul 15, 2010 at 8:31 PM, Rainer Jung rainer.j...@kippdata.de wrote:
 On 15.07.2010 10:08, Andrew Bruno wrote:

 Hello all,

 I am having problems in getting clustering to work in a windows server
 2008 environment using tomcat 6.0.20 java 1.5

 I get the No members active in cluster group message on both tomcats.

 The engine element on the first tomcat is:

   Engine name=Catalina defaultHost=localhost jvmRoute=1

        Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=4
                Manager
 className=org.apache.catalina.ha.session.DeltaManager
                        name=someapp
                        expireSessionsOnShutdown=false
                        notifyListenersOnReplication=true/

                Channel
 className=org.apache.catalina.tribes.group.GroupChannel
                        Membership
 className=org.apache.catalina.tribes.membership.McastService
                                address=228.0.0.5
                                port=45564
                                frequency=500
                                dropTime=3000/

                        Receiver
 className=org.apache.catalina.tribes.transport.nio.NioReceiver
                                address=111.111.111.148
                                port=4001
                                autoBind=100
                                selectorTimeout=5000
                                maxThreads=12/

                        Sender
 className=org.apache.catalina.tribes.transport.ReplicationTransmitter
                                Transport
 className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
                        /Sender

                        Interceptor

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

 className=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;.*\.xls;.*\.sdf;.*\.xml;/

                !-- only with jk_mod failover--
                Valve
 className=org.apache.catalina.ha.session.JvmRouteBinderValve
                        enabled=true
 sessionIdAttribute=takeoverSessionid /

                !-- only with jk_mod and jvmroutebindervalve--
                ClusterListener

 className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
                ClusterListener
 className=org.apache.catalina.ha.session.ClusterSessionListener/
        /Cluster

       Host name=localhost
        unpackWARs=false autoDeploy=false
        xmlValidation=false xmlNamespaceAware=false

        Alias111.111.111.154/Alias
        Aliassomeapp.com/Alias


        Valve className=org.apache.catalina.valves.AccessLogValve
                 directory=E:\logs\websites\secure_app_01
                 prefix=default_access_log.
                 suffix=.txt
                 pattern='%h %l %u %t %r %s %b %{user-agent}i
 %{referer}i'
                 resolveHosts=true/

         Logger className=org.apache.catalina.logger.FileLogger
                 directory=E:\logs\websites\secure_app_com_01
                 prefix=error_log.
                 suffix=.txt
                 timestamp=true/


        Context path= reloadable=false distributable=true
                docBase=E:\web_secure_01\secure_app_com_01
                workDir=E:\web_secure_01\secure_work_01
                WatchedResourceWEB-INF/web.xml/WatchedResource
                Logger
 className=org.apache.catalina.logger.SystemOutLogger
 verbosity=4 timestamp=true/
        /Context

       /Host

     /Engine

 In the second tomcat, the engine element is:

 Engine name=Catalina defaultHost=localhost jvmRoute=2

        Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
 channelSendOptions=4
                Manager
 className=org.apache.catalina.ha.session.DeltaManager
                        name=someapp
                        expireSessionsOnShutdown=false
                        notifyListenersOnReplication=true/

                Channel
 className=org.apache.catalina.tribes.group.GroupChannel
                        Membership
 className=org.apache.catalina.tribes.membership.McastService
                                address=228.0.0.5
                                port=45564
                                frequency=500
                                dropTime=3000/

                        Receiver
 className=org.apache.catalina.tribes.transport.nio.NioReceiver
                                address=111.111.111.148
                                port=4002

Re: Tomcat 6 64 bits, Java 6 64 bits and -Djava.library.path

2010-06-22 Thread Andrew Bruno
Everything can be set up via service.bat

You should modify this file only.  This way when you install the
service or remove the service, it works gracefully, and all libs,
memory requirements, etc. are recorded in the registry.


On Fri, Jun 18, 2010 at 12:44 AM, Katt katt@gmail.com wrote:
 Hi all,

 I have some strange issues:
 Enviroment: Windows 2003 R2 64 bits with Tomcat6 6.0.24 and Java6 1.6.0_20
 64bits.
 If I have some libraries that need to be loaded at startup so I've added in
 catalina.bat: JAVA_OPTS=%JAVA_OPTS% -Djava.library.path=C:\libs, start
 tomcat with startup.bat, everything ok.
 After that I've changed service.bat adding at the very end of file:
 %EXECUTABLE% //US//%SERVICE_NAME% ++JvmOptions
 -Djava.library.path=C:\libs;..., install widnows service: service.bat
 install and start tomcat.
 Tomcat didn't load libraries from java.library.path.
 So, it's working only if I start tomcat from startup.bat but not if I
 install it as windows service.
 Any sugestions?

 Best regards,
 Katt



 --
 Katt


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



Re: Tomcat 6 64 bits, Java 6 64 bits and -Djava.library.path

2010-06-22 Thread Andrew Bruno
Yes, that's true.  You can also use the GUI.

Personally, I like the script, because it can be committed to
repository(SVN, etc), and its easier to replicate and maintain.

AB

On Tue, Jun 22, 2010 at 11:28 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Andrew Bruno [mailto:andrew.br...@gmail.com]
 Subject: Re: Tomcat 6 64 bits, Java 6 64 bits and -Djava.library.path

 Everything can be set up via service.bat

 You should modify this file only.

 I'd strongly recommend using the tomcat6w.exe program to set any necessary 
 options and system properties, rather than modifying the script.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.



 -
 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



Re: question for sso session replication in tomcat 6.0.26

2010-06-21 Thread Andrew Bruno
Looking at the code I think this is wrong

if (!_ssoSessionId.contains(. + jvmRoute)) {
   _ssoSessionId += . + jvmRoute;
   response.addCookie(new Cookie(_SSO_SESSION_COOKIE_NAME, _ssoSessionId));
}

The original sessionId will already have the .+_any_other_jvmRoute
included, so you need to substring it, and append the new jvmRoute.

 _ssoSessionId= _ssoSessionId.substring(0, _ssoSessionId.indexOf(.))

and then add

 _ssoSessionId += . + jvmRoute;

AB

On Tue, Jun 22, 2010 at 1:03 PM, Okubo, Yasushi (TSD)
yasushi.ok...@takedasd.com wrote:
 Hi experts



 I found this old email from archive in TC 5.5.23.

 Does this problem still exist in tomcat 6.0.x or 6.0.26?



 When failover occurs, sso session id is updated with new number after
 forcing a user to relogin to the application since sso session id is not
 replicated and rewritten correctly.  Could someone explain what is
 expected in current tomcat 6.0.x cluster upon failover?  Should sso
 session id is replicated correctly in tomcat 6.0.x?



 Thanks,

 yasushi







 ROOKIE wrote:
 Hi,
 I have a problem with tomcat cluster + mod_proxy load balancer :

 We have a main app which authenticate itself to a webapp and from this
 app one
 can launch embedded apps which use the SSO cookie to access other
 webapps on
 the server (Single-Sign-On for the user).

 Things are working perfectly for the normal cookie but not for the sso
 cookie.


 The problem I have is that tomcat does not replicate SSO sessions so
 when these embedded apps route through the load balancer we get 401s on
 all the other cluster members except the one which actually generated
 the SSO cookie.

 I wanted to know if we can edit the SSO cookie generated by tomcat to
 also
 contain the jvmRoute parameter so that the load balancer directly goes
 to the
 correct cluster member.


 I tried doing this in my code by fetching the SSO cookie and appending
 to it
 the jvmRoute as follows :

        HttpServletRequest request =
 (HttpServletRequest)Security.getContext(HttpServletRequest.class);
        HttpServletResponse response =
 (HttpServletResponse)Security.getContext(HttpServletResponse.class);
        if(request != null) {
            String jvmRoute = Vinod_Cluster_1;    // as mentioned in
 server.xml
            Cookie[] cookies = request.getCookies();
            for(int nc=0; cookies != null  nc  cookies.length; nc++)
 {
                if(_SESSION_COOKIE_NAME.equals(cookies[nc].getName())) {
                    _sessionId = cookies[nc].getValue();
                }

 else if(_SSO_SESSION_COOKIE_NAME.equals(cookies[nc].getName())) {

                    _ssoSessionId = cookies[nc].getValue();
                    if (!_ssoSessionId.contains(. + jvmRoute)) {
                        _ssoSessionId += . + jvmRoute;

 response.addCookie(new Cookie(_SSO_SESSION_COOKIE_NAME, _ssoSessionId));
 }


                }


 But after this I started getting 401s from even the correct cluster
 member. My guess is addCookie doesnt update the cookie in tomcat's cache
 which is reasonable.

 Other thought was to edit tomcat's sso cookie generation code to append
 the
 jvmRoute to the sso cookie.


 Is there an better way to achieve this in my code base ?

 Thanks In Advance,
 Vinod





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



Re: question for sso session replication in tomcat 6.0.26

2010-06-21 Thread Andrew Bruno
Hi Yasushi

In your serverl.xml have you added the jvmroute to the Engine?

i.e.

 Engine name=Catalina defaultHost=localhost jvmRoute=1

Andrew

On Tue, Jun 22, 2010 at 2:50 PM, Okubo, Yasushi (TSD)
yasushi.ok...@takedasd.com wrote:
 Hi Andrew

 Thank for your post.  When I checked the session id from firefox, sso session 
 id [jsessionidsso] does not have jvmroute info, but only jsessionid has 
 jvmroute.  So, session replication upon failover is working fine, but 
 singlesionon upon failover is not working on tomcat 6.0.x (including 6.0.26).

 yasushi

 -Original Message-
 From: Andrew Bruno [mailto:andrew.br...@gmail.com]
 Sent: Monday, June 21, 2010 9:18 PM
 To: Tomcat Users List
 Subject: Re: question for sso session replication in tomcat 6.0.26

 Looking at the code I think this is wrong

 if (!_ssoSessionId.contains(. + jvmRoute)) {
   _ssoSessionId += . + jvmRoute;
   response.addCookie(new Cookie(_SSO_SESSION_COOKIE_NAME, _ssoSessionId));
 }

 The original sessionId will already have the .+_any_other_jvmRoute
 included, so you need to substring it, and append the new jvmRoute.

  _ssoSessionId= _ssoSessionId.substring(0, _ssoSessionId.indexOf(.))

 and then add

  _ssoSessionId += . + jvmRoute;

 AB

 On Tue, Jun 22, 2010 at 1:03 PM, Okubo, Yasushi (TSD)
 yasushi.ok...@takedasd.com wrote:
 Hi experts



 I found this old email from archive in TC 5.5.23.

 Does this problem still exist in tomcat 6.0.x or 6.0.26?



 When failover occurs, sso session id is updated with new number after
 forcing a user to relogin to the application since sso session id is not
 replicated and rewritten correctly.  Could someone explain what is
 expected in current tomcat 6.0.x cluster upon failover?  Should sso
 session id is replicated correctly in tomcat 6.0.x?



 Thanks,

 yasushi







 ROOKIE wrote:
 Hi,
 I have a problem with tomcat cluster + mod_proxy load balancer :

 We have a main app which authenticate itself to a webapp and from this
 app one
 can launch embedded apps which use the SSO cookie to access other
 webapps on
 the server (Single-Sign-On for the user).

 Things are working perfectly for the normal cookie but not for the sso
 cookie.


 The problem I have is that tomcat does not replicate SSO sessions so
 when these embedded apps route through the load balancer we get 401s on
 all the other cluster members except the one which actually generated
 the SSO cookie.

 I wanted to know if we can edit the SSO cookie generated by tomcat to
 also
 contain the jvmRoute parameter so that the load balancer directly goes
 to the
 correct cluster member.


 I tried doing this in my code by fetching the SSO cookie and appending
 to it
 the jvmRoute as follows :

        HttpServletRequest request =
 (HttpServletRequest)Security.getContext(HttpServletRequest.class);
        HttpServletResponse response =
 (HttpServletResponse)Security.getContext(HttpServletResponse.class);
        if(request != null) {
            String jvmRoute = Vinod_Cluster_1;    // as mentioned in
 server.xml
            Cookie[] cookies = request.getCookies();
            for(int nc=0; cookies != null  nc  cookies.length; nc++)
 {
                if(_SESSION_COOKIE_NAME.equals(cookies[nc].getName())) {
                    _sessionId = cookies[nc].getValue();
                }

 else if(_SSO_SESSION_COOKIE_NAME.equals(cookies[nc].getName())) {

                    _ssoSessionId = cookies[nc].getValue();
                    if (!_ssoSessionId.contains(. + jvmRoute)) {
                        _ssoSessionId += . + jvmRoute;

 response.addCookie(new Cookie(_SSO_SESSION_COOKIE_NAME, _ssoSessionId));
 }


                }


 But after this I started getting 401s from even the correct cluster
 member. My guess is addCookie doesnt update the cookie in tomcat's cache
 which is reasonable.

 Other thought was to edit tomcat's sso cookie generation code to append
 the
 jvmRoute to the sso cookie.


 Is there an better way to achieve this in my code base ?

 Thanks In Advance,
 Vinod





 -
 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



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



Re: question for sso session replication in tomcat 6.0.26

2010-06-21 Thread Andrew Bruno
Oh sorry, I re-read your answer.  Not sure why SSO is not working, be
interested to find out though..

AB

On Tue, Jun 22, 2010 at 3:04 PM, Andrew Bruno andrew.br...@gmail.com wrote:
 Hi Yasushi

 In your serverl.xml have you added the jvmroute to the Engine?

 i.e.

 Engine name=Catalina defaultHost=localhost jvmRoute=1

 Andrew

 On Tue, Jun 22, 2010 at 2:50 PM, Okubo, Yasushi (TSD) 
 yasushi.ok...@takedasd.com wrote:
 Hi Andrew

 Thank for your post.  When I checked the session id from firefox, sso 
 session id [jsessionidsso] does not have jvmroute info, but only jsessionid 
 has jvmroute.  So, session replication upon failover is working fine, but 
 singlesionon upon failover is not working on tomcat 6.0.x (including 6.0.26).

 yasushi

 -Original Message-
 From: Andrew Bruno [mailto:andrew.br...@gmail.com]
 Sent: Monday, June 21, 2010 9:18 PM
 To: Tomcat Users List
 Subject: Re: question for sso session replication in tomcat 6.0.26

 Looking at the code I think this is wrong

 if (!_ssoSessionId.contains(. + jvmRoute)) {
   _ssoSessionId += . + jvmRoute;
   response.addCookie(new Cookie(_SSO_SESSION_COOKIE_NAME, _ssoSessionId));
 }

 The original sessionId will already have the .+_any_other_jvmRoute
 included, so you need to substring it, and append the new jvmRoute.

  _ssoSessionId= _ssoSessionId.substring(0, _ssoSessionId.indexOf(.))

 and then add

  _ssoSessionId += . + jvmRoute;

 AB

 On Tue, Jun 22, 2010 at 1:03 PM, Okubo, Yasushi (TSD)
 yasushi.ok...@takedasd.com wrote:
 Hi experts



 I found this old email from archive in TC 5.5.23.

 Does this problem still exist in tomcat 6.0.x or 6.0.26?



 When failover occurs, sso session id is updated with new number after
 forcing a user to relogin to the application since sso session id is not
 replicated and rewritten correctly.  Could someone explain what is
 expected in current tomcat 6.0.x cluster upon failover?  Should sso
 session id is replicated correctly in tomcat 6.0.x?



 Thanks,

 yasushi







 ROOKIE wrote:
 Hi,
 I have a problem with tomcat cluster + mod_proxy load balancer :

 We have a main app which authenticate itself to a webapp and from this
 app one
 can launch embedded apps which use the SSO cookie to access other
 webapps on
 the server (Single-Sign-On for the user).

 Things are working perfectly for the normal cookie but not for the sso
 cookie.


 The problem I have is that tomcat does not replicate SSO sessions so
 when these embedded apps route through the load balancer we get 401s on
 all the other cluster members except the one which actually generated
 the SSO cookie.

 I wanted to know if we can edit the SSO cookie generated by tomcat to
 also
 contain the jvmRoute parameter so that the load balancer directly goes
 to the
 correct cluster member.


 I tried doing this in my code by fetching the SSO cookie and appending
 to it
 the jvmRoute as follows :

        HttpServletRequest request =
 (HttpServletRequest)Security.getContext(HttpServletRequest.class);
        HttpServletResponse response =
 (HttpServletResponse)Security.getContext(HttpServletResponse.class);
        if(request != null) {
            String jvmRoute = Vinod_Cluster_1;    // as mentioned in
 server.xml
            Cookie[] cookies = request.getCookies();
            for(int nc=0; cookies != null  nc  cookies.length; nc++)
 {
                if(_SESSION_COOKIE_NAME.equals(cookies[nc].getName())) {
                    _sessionId = cookies[nc].getValue();
                }

 else if(_SSO_SESSION_COOKIE_NAME.equals(cookies[nc].getName())) {

                    _ssoSessionId = cookies[nc].getValue();
                    if (!_ssoSessionId.contains(. + jvmRoute)) {
                        _ssoSessionId += . + jvmRoute;

 response.addCookie(new Cookie(_SSO_SESSION_COOKIE_NAME, _ssoSessionId));
 }


                }


 But after this I started getting 401s from even the correct cluster
 member. My guess is addCookie doesnt update the cookie in tomcat's cache
 which is reasonable.

 Other thought was to edit tomcat's sso cookie generation code to append
 the
 jvmRoute to the sso cookie.


 Is there an better way to achieve this in my code base ?

 Thanks In Advance,
 Vinod





 -
 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





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



Re: recommend a host please.

2010-06-18 Thread Andrew Bruno

I've been very happy with

http://www.rosehosting.com/virtserv.html


On 18/06/2010, at 6:08 PM, Camy personal20002...@yahoo.com wrote:



http://www.eapps.com http://www.eapps.com  is a good choice if you are
searching for Tomcat 6.

In what regards your DNS these have to be changed usually at the  
current

registrar if you want to point them to your future hosting provider.


yuccanel wrote:


Please can someone also explain process of ensuring that my dns  name
comes
with me to new host?

--
From: Ken Bowen kbo...@als.com
Sent: Wednesday, June 16, 2010 6:14 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: recommend a host please.


Previously suggested eApps.com  to you.

On Jun 16, 2010, at 12:01 PM, yucca...@live.co.za wrote:


I would like some feedback on a hosting provider for me. I have had
little choice but to cancel at dailyrazor as they failed to  
provide  me
with what I was paying for. To my horror, I asked for new tomcat   
and

was
given a tomcat 5 again as was evident again by the presence  of  
no lib

in
root and presence of common/lib and shared/lib. They  also have not
provided shell access. New host should therefore have  (in order of
importance) out the box tomcat 6 with expected tomcat 6  layout,  
shell

access and ok price.



--- 
--

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




=)=)
--
View this message in context: 
http://old.nabble.com/recommend-a-host-please.-tp28904567p28922580.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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



Re: Single Sign-On in two server

2010-06-16 Thread Andrew Bruno
Have a look at CAS http://www.jasig.org/cas


On Wed, Jun 16, 2010 at 8:17 PM, Chandana Napagoda cnapag...@gmail.com wrote:
 Hi,



  I have two tomcat instance, frist one run on https://localhost:8080  and
 secound one run on https://localhost:9090. each server i have deployed Admin
 and User web application


 I need to implement Single Sign-On for this two web application. While user
 is logging to https://localhost:8080/admin;, That user able access 
 https://localhost:9090/user; application I need to login that user without
 promoting login screen.


 is it possible to implement?

 Regards,
 Chandana


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



Re: Setting the Right Amount of Memory

2010-06-16 Thread Andrew Bruno
Hi Eric,

Just wondering, what tools do you use to manage all the instances?
Also, what do you use to look for the OutOfMemory in logs?  I am
looking at Splunk too.

Andrew


On Thu, Jun 17, 2010 at 12:42 AM, Robinson, Eric
eric.robin...@psmnv.com wrote:

 We run 150+ instances of tomcat on one server. To optimize memory
 utilization, each tomcat instance is configured with 64MB by default
 (export JAVA_OPTS=-ms64M -mx64M). We then watch for
 Java.Lang.OutOfmemory errors in the logs. If we see any of these over
 time, we allocate additional RAM in 32MB increments until that instance
 stops throwing errors. Most instances are happy with 64MB. Some need
 96MB or 128MB. We have never seen a tomcat instance that throws
 OutOfMemory errors with 256MB RAM.

 If tomcat is not throwing OutOfMemory errors and system responsiveness
 is good, is there really any reason to allocate higher amounts of RAM?

 --
 Eric Robinson


 Disclaimer - June 16, 2010
 This email and any files transmitted with it are confidential and intended 
 solely for Tomcat Users List. If you are not the named addressee you should 
 not disseminate, distribute, copy or alter this email. Any views or opinions 
 presented in this email are solely those of the author and might not 
 represent those of . Warning: Although  has taken reasonable precautions to 
 ensure no viruses are present in this email, the company cannot accept 
 responsibility for any loss or damage arising from the use of this email or 
 attachments.
 This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

 -
 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



Re: Session clustering across different contexts

2010-06-15 Thread Andrew Bruno
OK, that's cool.  Thanks for confirming.  I'll have to try via Apache
redirects/aliasing/rewrites...

/AB

On Tue, Jun 15, 2010 at 4:32 PM, Mark Thomas ma...@apache.org wrote:
 On 15/06/2010 06:21, Andrew Bruno wrote:

 I am testing this on my laptop, windows 7 64bit, tomcat 6

 If I use the same contexts, i.e.

 localhost:8181/r2 and localhost:8080/r2 the sessions are replicated
 across them no problem.

 If I use a different context, e.g. r3 but same web app deployed, the
 sessions are no replicated, and I get this warning:

 org.apache.catalina.ha.session.ClusterSessionListener messageReceived
 WARNING: Context manager doesn't exist:localhost#/r2

 Correct. What you are trying to do is not supported. Tomcat has no mechanism
 to map /r2 in one instance to /r3 in another.

 Mark



 -
 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



Re: redirect some requests to another tomcat.

2010-06-15 Thread Andrew Bruno
This is pretty much what I have been working on.

As a few hints, you'll need Apache in front, and setup AJP on tomcat.

I have set up loadbalancing, and have the two tomcats doing session
sharing, and use the jvmroute to route to respected tomcat.

You might need to change your server webapp java code so that you
know which tomcat to jvmroute to.

Basically, with the loadbalancer,it can randomly pick any tomcat.
When the user logs in, I have some business logic to detect whether
they should be on current web app.  if they are not, I save session
details, and then I redirect to url again, but append the
jsessionid=SESSIONID.worker2 to url, and Apache knows from that to
automatically use worker2.  (assuming worker2 is the tomcat web app
user is supposed to be on).

The only thing I am worried about is race conditions with session
replication.  The worst that can happen is that the user will need to
log in again, if the session hasnt replicated in time.

The other option I am looking at is to redirect to different contexts
from a generic login page... but I havent worked out how I can set
Apache up to map many different contexts to one.

Google Apps seems to do this.  See http://www.google.com/a and then
Click on Sign in here, and enter a e.g. domain, ziateresa.com It
redirects to a new context.

/AB

On Tue, Jun 15, 2010 at 5:50 PM, kiran surapaneni svkir...@gmail.com wrote:
 Hi,

   I have several applications running on my tomcat server. But due to some
 reasons i need to move some of these applications to another tomcat server.
 But most of these applications are client-sever applications and hence i
 don't have the flexibility of making changes to the url. So the client will
 continue to type in the same url but tomcat should be able to forward the
 request to the appropriate server based on the url. Is this possible? And if
 yes, any clues on how to achieve this.

 Thanks in advance,
 Venkat


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



Re: Perfomance analysis

2010-06-15 Thread Andrew Bruno

Is jmeter on same box as app?

On 15/06/2010, at 7:05 PM, Michael Oullion theaz...@hotmail.com wrote:


hello,

I'm doing some benchmark on Web service's Call and I have some  
strange results.


First of all,
My web service is on a Axis2 1.5.1  framework,
I use a Apache Tomcat 6.0.20 / JRE (server mode) 1.6.0_20-b02.
I use JMeter 2.3.4 to do my benchmark.

When I analyze my result, I have some nice (and stable ) things but  
some times I observe a huge decrease of Hit/second and a huge  
increase of response time.
For example, normal response time is (avg) 300 ms and it increase to  
1.000 ms and more, at the same time the hit/second decrease from 90  
to 40.


I watch the CPU activity to see if the bottleneck is here and I  
observe that I have the same thing.
When the response time increase, the CPU activity fall down from 40%  
to 10%.
I watch disk time access too and I don't observe a link between this  
activity and the fall of performance.


I try to attach my graph to this mail but I don't know if it's okay  
on the mailing list.

I don't understand why some time the performance fall down.
So, if you are some ideas...

Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign  
up now.


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


Re: Session clustering across different contexts

2010-06-14 Thread Andrew Bruno
I am testing this on my laptop, windows 7 64bit, tomcat 6

If I use the same contexts, i.e.

localhost:8181/r2 and localhost:8080/r2 the sessions are replicated
across them no problem.

If I use a different context, e.g. r3 but same web app deployed, the
sessions are no replicated, and I get this warning:

org.apache.catalina.ha.session.ClusterSessionListener messageReceived
WARNING: Context manager doesn't exist:localhost#/r2

/AB


On Thu, Jun 10, 2010 at 7:16 PM, Pid p...@pidster.com wrote:
 On 10/06/2010 06:13, Andrew Bruno wrote:
 Hello,

 I have managed to get session clustering working when using the same context.

 Tomcat, JVM, OS exact versions please.

 I need to get session replication working across different contexts.
 Does anyone know if this is possible?

 Depends what you mean.  If it works for one, it'll work for all of them,
 assuming your cluster members are correctly configured.

 I get these warnings at the moment.

 10/06/2010 3:08:20 PM
 org.apache.catalina.ha.session.ClusterSessionListener messageReceived
 WARNING: Context manager doesn't exist:localhost#/r2

 Does that server have that application installed?


 p

 -
 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



Support multiple apache contexts via one tomcat webapp context

2010-06-14 Thread Andrew Bruno
I am trying to setup Apache with JkMount to tomcat to dynamically
handle different contexts in Apache, but always use the same context
in Tomcat.

e.g.

http://apachefrontenddomain.com.au/a/customer-1.com - jk ajp to -
http://tomcatserver:8009/webapp
http://apachefrontenddomain.com.au/a/customer-2.com - jk ajp to -
http://tomcatserver:8009/webapp
http://apachefrontenddomain.com.au/a/customer-3.com - jk ajp to -
http://tomcatserver:8019/webapp2
http://apachefrontenddomain.com.au/a/customer-4.com - jk ajp to -
http://tomcatserver:8039/webapp4

Doe anyone know how to do this?  Do I need to use Aliasing or Rewriting?

I am using Apache 2.2 and Tomcat 6

Cheers
Andrew

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



Re: Re: how to calculate a memory tomcat

2010-06-14 Thread Andrew Bruno
Also have a look at

http://www.jmanage.org/wiki/index.php/Introduction_to_jManage


On Tue, Jun 15, 2010 at 8:42 AM, Matthew Peterson
matt.peter...@une.edu.au wrote:
 Lambda Probe is stale. It has been forked to Psi Probe which has regular 
 activity: http://code.google.com/p/psi-probe/


 -Original Message-
 From: Myk Bova [mailto:syste...@narod.ru]
 Sent: Tuesday, 15 June 2010 2:07 AM
 To: Tomcat Users List
 Subject: Re: Re: how to calculate a memory tomcat


 Lambda Probe for Apache Tomcat ?
 http://www.lambdaprobe.org/d/index.htm

 14.06.10, 19:54, Tobias Crefeld t...@cataneo.eu:

 Am Sun, 13 Jun 2010 22:27:40 +0700
  schrieb andy susanto :

   is there any tool that i can monitor my tomcat ?, because at peak hour

  You should ask your preferred search engine after JMX.

  JDK offers some applications like jconsole (old fashioned but usually
  sufficent) or jvisualvm (looks nicer, less stable) to monitor the
  JVM.

  Additional, more tomcat-specific data can be monitored by the
  tomcat-app lamdba-probe.


  Regards,
   Tobias.

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




 --
 /* ** */
 Myk Bova
 Phone: +380447131381
 Cell: +380983225480
 ICQ: 157902492
 Email: syste...@narod.ru
 Web: http://www.chantingwolf.narod.ru
 /* ** */

 -
 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



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



Session clustering across different contexts

2010-06-09 Thread Andrew Bruno
Hello,

I have managed to get session clustering working when using the same context.

I need to get session replication working across different contexts.
Does anyone know if this is possible?

I get these warnings at the moment.

10/06/2010 3:08:20 PM
org.apache.catalina.ha.session.ClusterSessionListener messageReceived
WARNING: Context manager doesn't exist:localhost#/r2

Thanks
Andrew

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



AJP java client

2010-03-31 Thread Andrew Bruno
Hello all,

I have a situation where I wish to break up my web application, but wish to
maintain the same domain as the front end URL.

All customers log in via a single domain using their email address as a
username.

The email address gives them access to their customer repository data
(lucene, etc), which is only accessible by that customer account.

I would like to split the web app up, so that the front end server has
smarts to know which backend tomcat server to redirect to.

As far as I know, Apache AJP can be configured to redirect to different
tomcat backend servers by implementing rules, ideally URL based.  But for
me, the URL is always the same.

So, I was wondering if there was a way to code an AJP client inside a front
end tomcat server, so that I could redirect to whatever backend server the
business rules decided.

1. Login Screen on front end server
2. User attempts to log in, verify against DB, and then work out which back
end tomcat server to AJP to.
3. All traffic goes via front server one to the decided backend server 2.

any other ideas are also welcome

Thanks
Andrew


Re: Hide JSP name using web.xml

2010-03-31 Thread Andrew Bruno
do you want the other names to be default?

e.g. http://domain.com/folder/soepage.jsp == http://domain.com/folder/

if so, you can add soepage.jsp to the list of default pages in web.xml

On Wed, Mar 31, 2010 at 8:16 PM, Karthik Nanjangude 
karthik.nanjang...@xius-bcgi.com wrote:

 Hi

 SPEC :
 O/s  UNIX / WIN2000 / Linux
 JDK1.5
 TOMCAT 5.0.20.0


 Question:  How to hide the name  ( other then index.jsp ) of JSP in URL
  for a web application  ?
 For a valid reason  I have 5 jsp folders.
 All 5 jsp folders Do NOT have index.jsp as primary folder but other names.

 Any ideas plz ...  .:(



 With regards
 Karthik






Re: AJP java client

2010-03-31 Thread Andrew Bruno
Thanks for the pointers to the jMeter AJP client and also the URL session 
jvm route idea.

If I used the jSession idea, I am assuiming I could filter apache on . +
jvmRoute ... right? and redirect to relevant AJP/Tomcat.


On Thu, Apr 1, 2010 at 1:11 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Andrew,

 On 3/31/2010 3:02 AM, Andrew Bruno wrote:
  I would like to split the web app up, so that the front end server has
  smarts to know which backend tomcat server to redirect to.
 
  As far as I know, Apache AJP can be configured to redirect to different
  tomcat backend servers by implementing rules, ideally URL based.  But for
  me, the URL is always the same.
 
  So, I was wondering if there was a way to code an AJP client inside a
 front
  end tomcat server, so that I could redirect to whatever backend server
 the
  business rules decided.

 You can force Apache httpd to direct a request to a particular backend
 Tomcat server by putting a specially-crafted jsessionid into the URL. If
 you don't use cookies to track the session for these requests, you
 should be able to create a URL like this:

 URL + ;jsessionid= + sessionId + . + jvmRoute + ? + queryString

 Would something like this work for you?

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

 iEYEARECAAYFAkuzV/kACgkQ9CaO5/Lv0PBfPQCgutR+7yGVAYI3MbKkMM1u5Rlp
 KzUAnjojlVj4Z6rJinYPVvQ1OV4590Ar
 =qOiH
 -END PGP SIGNATURE-

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




Re: AJP java client

2010-03-31 Thread Andrew Bruno
http://randomcoder.com/articles/jsessionid-considered-harmful


On Thu, Apr 1, 2010 at 7:39 AM, Andrew Bruno andrew.br...@gmail.com wrote:

 Thanks for the pointers to the jMeter AJP client and also the URL session 
 jvm route idea.

 If I used the jSession idea, I am assuiming I could filter apache on . +
 jvmRoute ... right? and redirect to relevant AJP/Tomcat.



 On Thu, Apr 1, 2010 at 1:11 AM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Andrew,

 On 3/31/2010 3:02 AM, Andrew Bruno wrote:
  I would like to split the web app up, so that the front end server has
  smarts to know which backend tomcat server to redirect to.
 
  As far as I know, Apache AJP can be configured to redirect to different
  tomcat backend servers by implementing rules, ideally URL based.  But
 for
  me, the URL is always the same.
 
  So, I was wondering if there was a way to code an AJP client inside a
 front
  end tomcat server, so that I could redirect to whatever backend server
 the
  business rules decided.

 You can force Apache httpd to direct a request to a particular backend
 Tomcat server by putting a specially-crafted jsessionid into the URL. If
 you don't use cookies to track the session for these requests, you
 should be able to create a URL like this:

 URL + ;jsessionid= + sessionId + . + jvmRoute + ? + queryString

 Would something like this work for you?

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

 iEYEARECAAYFAkuzV/kACgkQ9CaO5/Lv0PBfPQCgutR+7yGVAYI3MbKkMM1u5Rlp
 KzUAnjojlVj4Z6rJinYPVvQ1OV4590Ar
 =qOiH
 -END PGP SIGNATURE-

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