Re: unusual mod_jk 1.2.30 log messages

2010-09-07 Thread Brett Delle Grazie
On Thu, 2010-09-02 at 18:26 +0200, Rainer Jung wrote:
 On 02.09.2010 13:39, Brett Delle Grazie wrote:
  Hi,
 
  We're having some strange errors being reported in the 1.2.30 version of
  mod_jk.  We think they might be related to the performance issues we're
  experiencing under load.
 
  OS: RHEL 5.5 (fully patched)
  Apache HTTPD: 2.2.3 (from OS vendor)
  mod_jk: 1.2.30 (downloaded from Tomcat site and compiled locally)
  Tomcat: 6.0.29 (binary distribution from apache.org)
  JVM: 1.6.0_21 (Sun, 64-bit).
 
 Thanks for the info (and for keeping most of it up-to-date) :)
 
  A sample is below. I'm mostly concerned about the 'awaited reply cpong
  recieved 3 instead' and the subsequenct close  and failure to send
  request.
 
  Has anyone seen this before?
 
  [Thu Sep 02 07:22:47.508 2010] [31759:47279871456000] [info]
  init_jk::mod_jk.c (3189): mod_jk/1.2.30 initialized
  [Thu Sep 02 07:22:47.588 2010] [31763:47279871456000] [info]
  init_jk::mod_jk.c (3189): mod_jk/1.2.30 initialized
  [Thu Sep 02 07:22:52.896 2010] [31781:1237244224] [warn]
  ajp_handle_cping_cpong::jk_ajp_common.c (906): awaited reply cpong,
  received 3 instead. Closing connection
  [Thu Sep 02 07:22:52.896 2010] [31781:1237244224] [info]
  ajp_send_request::jk_ajp_common.c (1518): (jvm2) failed sending request,
  socket -1 prepost cping/cpong failure (errno=0)
  [Thu Sep 02 07:22:59.647 2010] [31781:1258223936] [warn]
  ajp_handle_cping_cpong::jk_ajp_common.c (906): awaited reply cpong,
  received 3 instead. Closing connection
  [Thu Sep 02 07:22:59.647 2010] [31781:1258223936] [info]
  ajp_send_request::jk_ajp_common.c (1518): (jvm2) failed sending request,
  socket -1 prepost cping/cpong failure (errno=0)
  [Thu Sep 02 07:23:02.042 2010] [32082:1253792064] [warn]
  ajp_handle_cping_cpong::jk_ajp_common.c (906): awaited reply cpong,
  received 3 instead. Closing connection
  [Thu Sep 02 07:23:02.042 2010] [32082:1253792064] [info]
  ajp_send_request::jk_ajp_common.c (1518): (jvm2) failed sending request,
  socket -1 prepost cping/cpong failure (errno=0)
  [Thu Sep 02 07:23:06.142 2010] [32049:1325504832] [warn]
  ajp_handle_cping_cpong::jk_ajp_common.c (906): awaited reply cpong,
  received 3 instead. Closing connection
  [Thu Sep 02 07:23:06.142 2010] [32049:1325504832] [info]
  ajp_send_request::jk_ajp_common.c (1518): (jvm1) failed sending request,
  socket -1 prepost cping/cpong failure (errno=0)
  [Thu Sep 02 07:23:11.231 2010] [32082:1211832640] [info]
  ajp_process_callback::jk_ajp_common.c (1882): Writing to client aborted
  or client network problems
  [Thu Sep 02 07:23:11.231 2010] [32082:1211832640] [info]
  ajp_service::jk_ajp_common.c (2540): (jvm1) sending request to tomcat
  failed (unrecoverable), because of client write error (attempt=1)
  [Thu Sep 02 07:23:11.232 2010] [32082:1211832640] [info]
  service::jk_lb_worker.c (1388): service failed, worker jvm1 is in local
  error state
  [Thu Sep 02 07:23:11.232 2010] [32082:1211832640] [info]
  service::jk_lb_worker.c (1407): unrecoverable error 200, request failed.
  Client failed in the middle of request, we can't recover to another
  instance.
  [Thu Sep 02 07:23:11.232 2010] [32082:1211832640] [info]
  jk_handler::mod_jk.c (2611): Aborting connection for worker=balancer
  [Thu Sep 02 07:23:11.444 2010] [32049:1315014976] [info]
  ajp_process_callback::jk_ajp_common.c (1882): Writing to client aborted
  or client network problems
  [Thu Sep 02 07:23:11.444 2010] [32049:1315014976] [info]
  ajp_service::jk_ajp_common.c (2540): (jvm1) sending request to tomcat
  failed (unrecoverable), because of client write error (attempt=1)
  [Thu Sep 02 07:23:11.445 2010] [32049:1315014976] [info]
  service::jk_lb_worker.c (1388): service failed, worker jvm1 is in local
  error state
  [Thu Sep 02 07:23:11.445 2010] [32049:1315014976] [info]
  service::jk_lb_worker.c (1407): unrecoverable error 200, request failed.
  Client failed in the middle of request, we can't recover to another
  instance.
  [Thu Sep 02 07:23:11.445 2010] [32049:1315014976] [info]
  jk_handler::mod_jk.c (2611): Aborting connection for worker=balancer
  [Thu Sep 02 07:23:11.645 2010] [32082:1232812352] [info]
  ajp_process_callback::jk_ajp_common.c (1882): Writing to client aborted
  or client network problems
  [Thu Sep 02 07:23:11.645 2010] [32082:1232812352] [info]
  ajp_service::jk_ajp_common.c (2540): (jvm1) sending request to tomcat
  failed (unrecoverable), because of client write error (attempt=1)
  [Thu Sep 02 07:23:11.646 2010] [32082:1232812352] [info]
  service::jk_lb_worker.c (1388): service failed, worker jvm1 is in local
  error state
  [Thu Sep 02 07:23:11.646 2010] [32082:1232812352] [info]
  service::jk_lb_worker.c (1407): unrecoverable error 200, request failed.
  Client failed in the middle of request, we can't recover to another
  instance.
  [Thu Sep 02 07:23:11.646 2010] [32082:1232812352] [info]
  jk_handler::mod_jk.c (2611): Aborting connection for worker=balancer
  [Thu Sep 02 

Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread John Baker
On Tuesday 07 September 2010 06:28:33 you wrote:
 On 09/06/2010 11:59 PM, John Baker wrote:
  What's jk_maintain?
 
 
 Function that maintains the workers
 (closes excess connections inactive for a long time)
 
 Anyhow, like Rainer said, if that's the case
 you should have something like this in the log (DEBUG)
 
 ... Shutdown socket 123 and read 123 lingering bytes in 2 sec.

Is this what we're looking for?  There's a lot of it in the logs during the 
period in which I switched on 'trace'.

[Mon Sep 06 15:05:18.128 2010] [24061:1404667232] [debug] 
jk_shutdown_socket::jk_connect.c (732): Shutdown socket 158 and rea  0 
lingering bytes

If so, what does this mean and how do I solve the problem?

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



How to subscribe to ibatis mailing list

2010-09-07 Thread Kannan Jayaprakasam
Apologies for the tomcat-unrelated question, but since ibatis also belongs to 
apache, I'm posting here. I'm unable to subscribe to the ibatis mailing list. 
It fails with the below  error. I have tried from multiple different email ids 
and email clients. What is the solution to this problem?

Remote host said : 550 mail to 
user-java-subscr...@ibatis.apache.orgmailto:user-java-subscr...@ibatis.apache.org
 not accepted here

I don't know whom to ask.



Re: How to subscribe to ibatis mailing list

2010-09-07 Thread rabbit_star

 On 2010-9-7 15:22, Kannan Jayaprakasam wrote:

Apologies for the tomcat-unrelated question, but since ibatis also belongs to 
apache, I'm posting here. I'm unable to subscribe to the ibatis mailing list. 
It fails with the below  error. I have tried from multiple different email ids 
and email clients. What is the solution to this problem?

Remote host said : 550 mail to 
user-java-subscr...@ibatis.apache.orgmailto:user-java-subscr...@ibatis.apache.org
  not accepted here

I don't know whom to ask.


http://mybatis-user.963551.n3.nabble.com/user/Register.jtp?nextUrl=http://mybatis-user.963551.n3.nabble.com/ 



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



Re: Best practice for running Tomcat on port 80

2010-09-07 Thread Pid
On 07/09/2010 06:14, jan gestre wrote:
 On Tue, Sep 7, 2010 at 1:02 PM, Wesley Acheson wesley.ache...@gmail.com 
 wrote:
 On Tue, Sep 7, 2010 at 4:34 AM, jan gestre ipcopper...@gmail.com wrote:
 I'm using the latest 6.0.29 binary
 distribution, and I don't have an idea where to download jsvc, if it's
 already included I don't know the location, could someone please
 enlighten me on how to do this.

 It can be downloaded as part of this bundle
 http://commons.apache.org/daemon/download_daemon.cgi. Instructions are
 here http://commons.apache.org/daemon/jsvc.html. Dunno how to use it
 even after reading the instructions though.

Conveniently, the binary you need is included in tomcat/bin:

 commons-daemon-native.tar.gz

I'll assume Linux, as you didn't state explicitly which OS you're using.

 tar -zxvf commons-daemon-native.tar.gz
 cd commons-daemon-1.0.2-native-src
 more RELEASE-NOTES.txt

 cd unix
 more INSTALL.txt

... follow the instructions therein.


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


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: Best practice for running Tomcat on port 80

2010-09-07 Thread Pid
On 07/09/2010 03:34, jan gestre wrote:
 Hi Everyone,
 
 I've Googled a lot with respect to the subject, and I wanted to
 solicit your advice, basically I want to run Tomcat on port 80, some
 already objected to the idea of proxying it via Apache, so I'm looking
 at using jsvc or pound instead. I'm using the latest 6.0.29 binary
 distribution, and I don't have an idea where to download jsvc, if it's
 already included I don't know the location, could someone please
 enlighten me on how to do this.

Your options are, (in no particular order):

 1. A proxy server (httpd)
 2. A service wrapper (e.g. jsvc)
 3. Port forwarding (iptables)


1. HTTPD / proxy

The first isn't a bad idea, but would probably be a better choice if you
have other reasons for choosing it, e.g. PHP, load balancing.

2. JSVC

Included with the Tomcat distribution, so easy to deploy.

3. Iptables

Actually, remarkably simple to implement.  Should be properly documented
within your organisation because it might be hard to discover for less
familiar users.


There's no best practice per se, you need to understand the options and
make the most suitable choice for your organisation.


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


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


[OT] Re: How to subscribe to ibatis mailing list

2010-09-07 Thread Pid
On 07/09/2010 08:22, Kannan Jayaprakasam wrote:
 Apologies for the tomcat-unrelated question, but since ibatis also belongs to 
 apache, I'm posting here. I'm unable to subscribe to the ibatis mailing list. 
 It fails with the below  error. I have tried from multiple different email 
 ids and email clients. What is the solution to this problem?
 
 Remote host said : 550 mail to 
 user-java-subscr...@ibatis.apache.orgmailto:user-java-subscr...@ibatis.apache.org
  not accepted here
 
 I don't know whom to ask.

Have you read the iBATIS website?

From May this year:

 http://ibatis.apache.org/

2010/06/16 - apache ibatis has been retired.


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Mladen Turk

On 09/07/2010 09:05 AM, John Baker wrote:

On Tuesday 07 September 2010 06:28:33 you wrote:

On 09/06/2010 11:59 PM, John Baker wrote:

What's jk_maintain?



Function that maintains the workers
(closes excess connections inactive for a long time)

Anyhow, like Rainer said, if that's the case
you should have something like this in the log (DEBUG)

... Shutdown socket 123 and read 123 lingering bytes in 2 sec.


Is this what we're looking for?  There's a lot of it in the logs during the 
period in which I switched on 'trace'.

[Mon Sep 06 15:05:18.128 2010] [24061:1404667232] [debug] 
jk_shutdown_socket::jk_connect.c (732): Shutdown socket 158 and rea  0 
lingering bytes

If so, what does this mean and how do I solve the problem?



It means that socket shutdown failed.
Do you have firewall between mod_jk and JBoss or some non-standard
network driver (e.g running under some VM)?
This can cause network FIN packet not getting transmitted over it
since we issued socket shutdown, but the other side didn't react on
that message.

What kind of connector is on the JBoss side. Java or APR?


Regards
--
^TM

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



Re: how to deploy a external file on tomcat

2010-09-07 Thread Pid
On 07/09/2010 04:49, Subrat Kumar Pattnaik wrote:
 I want to deploy a directory which is available on another drive. But I
 don't want to put that folder into the tomcat/webapps. So can you tell me
 the path for that

 http://catb.org/esr/faqs/smart-questions.html#beprecise


p


 On Tue, Sep 7, 2010 at 1:50 AM, Pid p...@pidster.com wrote:
 
 On 06/09/2010 18:21, Subrat Kumar Pattnaik wrote:
 How can I manually deploy a file to my Tomcat 7 server

 I tried like this

 file:///path:/file_name

 Is this correct path for deploying a file in Tomcat or any other way

 Unfortunately, your question is extremely hard to understand.  Please
 rephrase, supply more detail, put the detail in a suitable context, then
 try again.


 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: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Rainer Jung

On 07.09.2010 09:05, John Baker wrote:

On Tuesday 07 September 2010 06:28:33 you wrote:

On 09/06/2010 11:59 PM, John Baker wrote:

What's jk_maintain?



Function that maintains the workers
(closes excess connections inactive for a long time)

Anyhow, like Rainer said, if that's the case
you should have something like this in the log (DEBUG)

... Shutdown socket 123 and read 123 lingering bytes in 2 sec.


Is this what we're looking for?  There's a lot of it in the logs during the 
period in which I switched on 'trace'.

[Mon Sep 06 15:05:18.128 2010] [24061:1404667232] [debug] 
jk_shutdown_socket::jk_connect.c (732): Shutdown socket 158 and rea  0 
lingering bytes

If so, what does this mean and how do I solve the problem?


You gave us the following log lines:

[Mon Sep 06 15:05:14.128 2010] [24061:1404667232] [debug]
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration
[Mon Sep 06 15:05:14.241 2010] [23945:1404667232] [debug]
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration
[Mon Sep 06 15:05:16.644 2010] [23944:1404667232] [debug]
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration
[Mon Sep 06 15:05:18.131 2010] [24061:1404667232] [debug]
init_ws_service::mod_jk.c (977): Service protocol=HTTP/1.1 method=GET
ssl=false host=(null) addr=10.117.112.1 name=xxx port=80 auth=(null)
user=(null) laddr=10.117.112.1 raddr=10.117.112.1 uri=/index.jsp
[Mon Sep 06 15:05:18.131 2010] [24061:1404667232] [debug]
get_most_suitable_worker::jk_lb_worker.c (997): found best worker
jboss51-integration2 (jboss51-integration2) using method 'Request'

Those are written by three different processes and threads (see the IDS 
[PID:TID] behind the timestamp) and thus three different requests. 
Sorting by request:


[Mon Sep 06 15:05:14.128 2010] [24061:1404667232] [debug]
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration
[Mon Sep 06 15:05:18.131 2010] [24061:1404667232] [debug]
init_ws_service::mod_jk.c (977): Service protocol=HTTP/1.1 method=GET
ssl=false host=(null) addr=10.117.112.1 name=xxx port=80 auth=(null)
user=(null) laddr=10.117.112.1 raddr=10.117.112.1 uri=/index.jsp
[Mon Sep 06 15:05:18.131 2010] [24061:1404667232] [debug]
get_most_suitable_worker::jk_lb_worker.c (997): found best worker
jboss51-integration2 (jboss51-integration2) using method 'Request'

[Mon Sep 06 15:05:14.241 2010] [23945:1404667232] [debug]
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration

[Mon Sep 06 15:05:16.644 2010] [23944:1404667232] [debug]
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration

So the first block shows something, the other two blocks only consist of 
one line, so we can not make any statements about durations.


In the first block, there is a 4 seconds gap between the start of the 
worker maintenance and the start of the service. This is the gap you are 
referring to?


The log message Mladen cited is written in line 813 (mod_jk version 
1.2.30) of jk_connect.c with level DEBUG: Shutdown socket ... and read 
... lingering bytes in ... sec. Before the socket closing, there should 
also be messages like About to shutdown socket  If those are not 
present, then the reason for the time gap is something else. Note that 
version 1.2.30 also ncludes the duration of the socket shutdown 
procedure, so it's better to use that version.


If you can reproduce with trace log level (very high log volume!), then 
one log block from Maintaining until Service protocol= would be helpful.


Regards,

Rainer

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



Re: Tomcat Web App - Strange issue. Requires 2 restart for SSO mode to work

2010-09-07 Thread Pid
On 02/09/2010 05:08, AVSUNIL wrote:
 
 Hi,
 
 I have a small web application deployed on Tomcat server and is is working
 pretty fine, except in one mode. The web application is available through 2
 modes of links - one is regular and other is Single Sign On based.
 
 Here is the sample directory structure:
 Tomcat
   webapps
   MyApp
   WEB-INF
   web.xml
   jsp
   myapp.jsp
   MyApp.war
   bin
   logs
   conf
   web.xml 
 
 Deployment Procedure: 
 Stop the server
 Copy the new war to webapps replacing the old one
 remove the complete diretcory of MyApp recursively (rm -rf MyApp)
 start the server
 
 Issue:
 We try both the links of application. The normal one works just fine first
 time itself. The SSO link shows up the directory listings page of webapps
 directory showing the MyApp.war and MyApp directory link.
 Now all we need to workaround this is just stop the server again and then
 start it. Surprisingly both SSO mode link and normal works totally fine.
 This is recurring problem. Is there a proper permanent fix to this?
 
 Please note the web.xml in Tomcat/conf directory has below 
 servlet
 servlet-namedefault/servlet-name
 init-param
 param-namelistings/param-name
 param-valuetrue/param-value
 /init-param
 /servlet
 welcome-file-list
 welcome-fileindex.html/welcome-file
 welcome-fileindex.htm/welcome-file
 welcome-fileindex.jsp/welcome-file
 /welcome-file-list
 
 Please note the web.xml in Tomcat/webapps/MyApp/WEB-INF directory has below
 welcome-file-list
 welcome-filemyapp.jsp/welcome-file
 /welcome-file-list

This welcome-file won't be discovered in myapp/WEB-INF/jsp, it must be
myapp/myapp.jsp.

 The application has only myapp.jsp and none of index.* files

It would probably be best just to call it 'index.jsp', no?

 myapp.jsp is as below

 htmlheadMETA
 URL=%=request.getContextPath()%/who.do/headbody//html

That looks like an incorrect attempt at a 'meta refresh' tag and largely
a waste of a file.

Is there a reason why you didn't just make the 'who.do' URL a welcome-file?


p


 Somehow first time when new war is deployed, old exploded diretcory is
 deleted and server is started, the Tomcat might not be finding xcard.jsp or
 the application specific web.xml and hence it is listings the directory
 based on settings in Tomcat/conf/web.xml
 Second time however it finds the web.xml and xcard.jsp and hence works.
 
 We even tried changing deployment procedure not to delete the exploded
 directory and rest of steps same. But it does not help either. If we drop
 the new war while the server is running, it does not take the changes in new
 war.












0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Best practice for running Tomcat on port 80

2010-09-07 Thread Rainer Jung

On 07.09.2010 09:40, Pid wrote:

On 07/09/2010 06:14, jan gestre wrote:

On Tue, Sep 7, 2010 at 1:02 PM, Wesley Achesonwesley.ache...@gmail.com  wrote:

On Tue, Sep 7, 2010 at 4:34 AM, jan gestreipcopper...@gmail.com  wrote:

I'm using the latest 6.0.29 binary
distribution, and I don't have an idea where to download jsvc, if it's
already included I don't know the location, could someone please
enlighten me on how to do this.


It can be downloaded as part of this bundle
http://commons.apache.org/daemon/download_daemon.cgi. Instructions are
here http://commons.apache.org/daemon/jsvc.html. Dunno how to use it
even after reading the instructions though.


Conveniently, the binary you need is included in tomcat/bin:


binary - source for the binary


  commons-daemon-native.tar.gz

I'll assume Linux, as you didn't state explicitly which OS you're using.

  tar -zxvf commons-daemon-native.tar.gz
  cd commons-daemon-1.0.2-native-src
  more RELEASE-NOTES.txt

  cd unix
  more INSTALL.txt

... follow the instructions therein.


Addition: Unfortunately the release of commons-daemon bundled with TC 
6.0.29 contains some garbage that disturbs the build procedure. See


https://issues.apache.org/bugzilla/show_bug.cgi?id=49674

and

https://issues.apache.org/jira/browse/DAEMON-154

So in addition to the documented build procedure the solution is to run 
make clean before make.


Since in the meantime the next version of commons-daemon has been 
released and will be used by the next TC version, this time because of 
the broken tarball it might make more sense to directly download and 
build commons-daemon 1.0.3:


http://commons.apache.org/daemon/download_daemon.cgi

Regards,

Rainer


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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread John Baker
On Tuesday 07 September 2010 08:59:27 you wrote:
 It means that socket shutdown failed.
 Do you have firewall between mod_jk and JBoss or some non-standard
 network driver (e.g running under some VM)?

We are using VMs but there should be no firewall.  I should probably re-iterate 
that the problem is occassional.

 This can cause network FIN packet not getting transmitted over it
 since we issued socket shutdown, but the other side didn't react on
 that message.
 
 What kind of connector is on the JBoss side. Java or APR?

APR?  It's a standard JBoss 5.1.2 installation.


-
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



tomcat 7 reloadable

2010-09-07 Thread Mohammad M. AbuZer
Hi All!

is their any listener I can add to tomcat, so I can know when tomcat does
reload certain web-app


*
Best Regards
*
*

Mohammad M. AbuZer*
Junior Java Developer
Mobile: +962-78-5416416


Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Mladen Turk

On 09/07/2010 10:11 AM, John Baker wrote:

On Tuesday 07 September 2010 08:59:27 you wrote:

It means that socket shutdown failed.
Do you have firewall between mod_jk and JBoss or some non-standard
network driver (e.g running under some VM)?


We are using VMs but there should be no firewall.  I should probably re-iterate 
that the problem is occassional.



See Rainer's comment on howto provide a useful log section.
Hard to tell what's actually going underneath.

If you have enough resources, try to disable
connectionTimeout on AJP connector and see weather
the same will happen again.
Shooting blanks here cause transient errors are pretty
hard to debug. It might be that the AJP connection is
closed by JBoss side by connectionTimeout just at the
time when maintain is about to do the same on the
mod_jk side. Eliminating connectionTimeout would
share some more light.


Regards
--
^TM

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



Re: tomcat 7 reloadable

2010-09-07 Thread Pid
On 07/09/2010 09:21, Mohammad M. AbuZer wrote:
 Hi All!
 
 is their any listener I can add to tomcat, so I can know when tomcat does
 reload certain web-app

How about a ServletContextListener?


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: tomcat 7 reloadable

2010-09-07 Thread Mohammad M. AbuZer
sounds perfect,,, thanks,,

On Tue, Sep 7, 2010 at 11:48 AM, Pid p...@pidster.com wrote:

 On 07/09/2010 09:21, Mohammad M. AbuZer wrote:
  Hi All!
 
  is their any listener I can add to tomcat, so I can know when tomcat does
  reload certain web-app

 How about a ServletContextListener?


 p




-- 
*
Best Regards

Mohammad M. AbuZer*


Unable to acheive load balcing using mod_jk

2010-09-07 Thread Amol Puglia
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.

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

# lists the workers by name

worker.list=tomcat1, tomcat2, tomcat3, 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 /* 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.



  

Re: Best practice for running Tomcat on port 80

2010-09-07 Thread Ognjen Blagojevic

On 7.9.2010 9:51, Pid wrote:

3. Iptables

Actually, remarkably simple to implement.  Should be properly documented
within your organisation because it might be hard to discover for less
familiar users.


If you are talking about NAT, like in this example:

=
*nat
:OUTPUT ACCEPT [93:16135]
:POSTROUTING ACCEPT [93:16135]
:PREROUTING ACCEPT [2:759]
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
-A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
COMMIT
-

I would add that it have two drawbacks:

1. NAT is not supported in ip6tables (IPv6 version of iptables), and 
probably never will be

2. Virtual hosts with https might serve wrong certificates

JSVC, on the other hand, worked fine for me.

Regards,
Ognjen

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



Re: Unable to acheive load balcing using mod_jk

2010-09-07 Thread Mladen Turk

On 09/07/2010 11:02 AM, Amol Puglia wrote:

Hello Team,

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

# lists the workers by name

worker.list=tomcat1, tomcat2, tomcat3, loadbalancer



This should be
worker.list=loadbalancer

Note that workers that constitute load balancer must
not appear in the worker.list


Regards
--
^TM

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



Re: Unable to acheive load balcing using mod_jk

2010-09-07 Thread Rainer Jung

On 07.09.2010 11:15, Mladen Turk wrote:

On 09/07/2010 11:02 AM, Amol Puglia wrote:

Hello Team,

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

# lists the workers by name

worker.list=tomcat1, tomcat2, tomcat3, loadbalancer



This should be
worker.list=loadbalancer

Note that workers that constitute load balancer must
not appear in the worker.list


In addition:

if you start a fresh install, use recent versions:

Tomcat 6.0.29
mod_jk 1.2.30
Apache 2.2.16 or 2.0.63

I don't know, what your actual problem is, but if it is session 
stickyness, then read on.


In order to make sticky session work, you need two ingredients.

1) You need to set the attribute jvmRoute in server.xml of each Tomcat 
instance to a unique value, something like your logical instance name. 
An example for setting jvmRoute is contained as a comment in the 
default server.xml file. The file is contained in the conf directory of 
Tomcat.


2) Configure a worker of type lb (load balancer), with one member 
worker per Tomcat instance. The member workers of the load balancer 
worker need to have the same names as the jvmRoute of the Tomcat to 
which they connect. In your above configuration those names are 
tomcat1, tomcat2, ..., so either you choose tomcat1, tomcat2, 
... as the jvmRoute values, or you change the names of the workers above 
to the jvmRoute values you have already chosen. By default lb workers 
handle session sticky (unless you turn that off by sticky_session=0, 
something you don't want to). Now map your URLs to the lb worker using 
JkMount.


How does it work?

a) Tomcat automatically appends its own jvmRoute at the end of the 
session id, separated with a dot. The session id is send to the client 
either via the JSESSIONID cookie, or via URL encoding 
(...;jsessionid=...).


b) mod_jk knows about that, extracts the value of the JSESSIONID cookie 
presented by the browser respectively extracts the id encoded in the 
URL, looks for the separating dot and extracts the jvmRoute from the id. 
The load balancing worker then searches for a member worker with the 
same name and uses that one for stickyness.


c) Any request without session id is balanced nonsticky depending on 
configuration and load.


Regards,

Rainer

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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread John Baker
Rainer,  

Is this acceptable?  I am using a tail and an egrep to match the various 
statements you wish to see.  if it's missing anything, plesae let me know what 
to add to the grep.

[Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
'/*=lb-jboss51-integration' source 'JkMount'
[Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
find_match::jk_uri_worker_map.c (863): Found a wildchar match 
'/*=lb-jboss51-integration'
[Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
jk_handler::mod_jk.c (2462): Into handler jakarta-servlet 
worker=lb-jboss51-integration r-proxyreq=0
[Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
wc_get_worker_for_name::jk_worker.c (116): found a worker lb-jboss51-integration
[Tue Sep 07 10:20:20.618 2010] [18806:46962404156768] [debug] 
jk_shutdown_socket::jk_connect.c (722): About to shutdown socket 154
[Tue Sep 07 10:20:22.619 2010] [18806:46962404156768] [debug] 
jk_shutdown_socket::jk_connect.c (813): Shutdown socket 154 and read 0 
lingering bytes in 2 sec.
[Tue Sep 07 10:20:22.625 2010] [18806:46962404156768] [debug] 
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration
[Tue Sep 07 10:20:22.628 2010] [18806:46962404156768] [debug] 
get_most_suitable_worker::jk_lb_worker.c (1001): found best worker 
jboss51-integration1 (jboss51-integration1) using method 'Request'
[Tue Sep 07 10:20:22.628 2010] [18806:46962404156768] [debug] 
service::jk_lb_worker.c (1161): service worker=jboss51-integration1 
route=jboss51-integration1
[Tue Sep 07 10:20:22.628 2010] [18806:46962404156768] [debug] 
ajp_service::jk_ajp_common.c (2376): processing jboss51-integration1 with 1 
retries
[Tue Sep 07 10:20:22.628 2010] [18806:46962404156768] [debug] 
ajp_send_request::jk_ajp_common.c (1579): (jboss51-integration1) all endpoints 
are disconnected.
[Tue Sep 07 10:20:22.631 2010] [18806:46962404156768] [debug] 
ajp_send_request::jk_ajp_common.c (1639): (jboss51-integration1) request body 
to send 0 - request body to resend 0
[Tue Sep 07 10:20:22.637 2010] [18806:46962404156768] [debug] 
ajp_connection_tcp_get_message::jk_ajp_common.c (1336): 00305F 2E 6A 62 6F 
73 73 35 31 2D 69 6E 74 65 67 72  - _.jboss51-integr
[Tue Sep 07 10:20:22.638 2010] [18806:46962404156768] [debug] 
ajp_unmarshal_response::jk_ajp_common.c (723): Header[0] [Set-Cookie] = 
[JSESSIONID=cM2w+W7dIfDERfQpzO6BDw__.jboss51-integration1; Path=/xx]
[Tue Sep 07 10:20:22.640 2010] [18806:46962404156768] [debug] 
ajp_connection_tcp_get_message::jk_ajp_common.c (1336): 01605F 2E 6A 62 6F 
73 73 35 31 2D 69 6E 74 65 67 72  - _.jboss51-integr
..
[Tue Sep 07 10:20:22.651 2010] [18806:46962404156768] [debug] 
ajp_reset_endpoint::jk_ajp_common.c (757): (jboss51-integration1) resetting 
endpoint with sd = 154
[Tue Sep 07 10:20:22.651 2010] [18806:46962404156768] [debug] 
ajp_done::jk_ajp_common.c (3010): recycling connection pool slot=0 for worker 
jboss51-integration1
[Tue Sep 07 10:20:22.651 2010] [18806:46962404156768] [debug] 
jk_handler::mod_jk.c (2602): Service finished with status=200 for 
worker=lb-jboss51-integration

To confirm the settings:

worker.basic.connection_pool_timeout=90
worker.basic.connection_pool_size=1
worker.basic.socket_keepalive=1
worker.basic.socket_timeout=90
worker.basic.connect_timeout=1000
worker.basic.prepost_timeout=1000
worker.basic.reply_timeout=9
# Stop recoery attempts when JBoss instances do not respond.
worker.basic.retries=1
worker.basic.recovery_options=27

worker.jboss51-integration1.reference=worker.basic
worker.jboss51-integration1.host=xx
worker.jboss51-integration1.port=13802
worker.jboss51-integration1.type=ajp13
worker.jboss51-integration1.lbfactor=1
worker.jboss51-integration2.reference=worker.basic
worker.jboss51-integration2.host=yy
worker.jboss51-integration2.port=13802
worker.jboss51-integration2.type=ajp13
worker.jboss51-integration2.lbfactor=1
worker.lb-jboss51-integration.type=lb
worker.lb-jboss51-integration.balance_workers=jboss51-integration1,jboss51-integration2
worker.lb-jboss51-integration.sticky_session=0
worker.list=lb-jboss51-integration

Also, I've tried setting:

worker.basic.lock=0

but that does not solve the problem.

Thanks 


John

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



Re: [OT] Re: How to subscribe to ibatis mailing list

2010-09-07 Thread Konstantin Kolinko
2010/9/7 Pid p...@pidster.com:
 On 07/09/2010 08:22, Kannan Jayaprakasam wrote:
 Apologies for the tomcat-unrelated question, but since ibatis also belongs 
 to apache, I'm posting here. I'm unable to subscribe to the ibatis mailing 
 list. It fails with the below  error. I have tried from multiple different 
 email ids and email clients. What is the solution to this problem?

 Remote host said : 550 mail to 
 user-java-subscr...@ibatis.apache.orgmailto:user-java-subscr...@ibatis.apache.org
  not accepted here

 I don't know whom to ask.

 Have you read the iBATIS website?

 From May this year:

  http://ibatis.apache.org/

 2010/06/16 - apache ibatis has been retired.


++1
They are now here:
http://www.mybatis.org/
http://groups.google.com/group/mybatis-user?pli=1


Best regards,
Konstantin Kolinko

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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread John Baker
TM,

On Tuesday 07 September 2010 09:47:17 you wrote:
 If you have enough resources, try to disable
 connectionTimeout on AJP connector and see weather
 the same will happen again.

I've removed the connectionTimeout attribute and the problem persists - I can 
see the lingering bytes in 2 sec messages as before.


John

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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Rainer Jung

On 07.09.2010 11:36, John Baker wrote:

Rainer,

Is this acceptable?  I am using a tail and an egrep to match the various 
statements you wish to see.  if it's missing anything, plesae let me know what 
to add to the grep.


Yes, that's better!


[Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
'/*=lb-jboss51-integration' source 'JkMount'
[Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
find_match::jk_uri_worker_map.c (863): Found a wildchar match 
'/*=lb-jboss51-integration'
[Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] jk_handler::mod_jk.c 
(2462): Into handler jakarta-servlet worker=lb-jboss51-integration r-proxyreq=0
[Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
wc_get_worker_for_name::jk_worker.c (116): found a worker lb-jboss51-integration
[Tue Sep 07 10:20:20.618 2010] [18806:46962404156768] [debug] 
jk_shutdown_socket::jk_connect.c (722): About to shutdown socket 154
[Tue Sep 07 10:20:22.619 2010] [18806:46962404156768] [debug] 
jk_shutdown_socket::jk_connect.c (813): Shutdown socket 154 and read 0 
lingering bytes in 2 sec.


Hmmm, that's strange. Why is there a connection close between 
wc_get_worker_for_name() and wc_maintain()? The first call doing 
something with the connections would be wc_maintain(). And if it decides 
to close sockets, it would log addiional statements. Nevertheless we can 
see, that closing the socket really took 2 seconds (which is in fact a 
builtin mod_jk timeout).


Are we sure, that those log lines are correct? This was generated by 
mod_jk 1.2.30 without any code changes, right?


Log level trace would show us more precisely, how we came to close the 
socket, but it blows up log volume a lot.



[Tue Sep 07 10:20:22.625 2010] [18806:46962404156768] [debug] 
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration
[Tue Sep 07 10:20:22.628 2010] [18806:46962404156768] [debug] 
get_most_suitable_worker::jk_lb_worker.c (1001): found best worker 
jboss51-integration1 (jboss51-integration1) using method 'Request'
[Tue Sep 07 10:20:22.628 2010] [18806:46962404156768] [debug] 
service::jk_lb_worker.c (1161): service worker=jboss51-integration1 
route=jboss51-integration1
[Tue Sep 07 10:20:22.628 2010] [18806:46962404156768] [debug] 
ajp_service::jk_ajp_common.c (2376): processing jboss51-integration1 with 1 
retries
[Tue Sep 07 10:20:22.628 2010] [18806:46962404156768] [debug] 
ajp_send_request::jk_ajp_common.c (1579): (jboss51-integration1) all endpoints 
are disconnected.
[Tue Sep 07 10:20:22.631 2010] [18806:46962404156768] [debug] 
ajp_send_request::jk_ajp_common.c (1639): (jboss51-integration1) request body 
to send 0 - request body to resend 0
[Tue Sep 07 10:20:22.637 2010] [18806:46962404156768] [debug] 
ajp_connection_tcp_get_message::jk_ajp_common.c (1336): 00305F 2E 6A 62 6F 
73 73 35 31 2D 69 6E 74 65 67 72  - _.jboss51-integr
[Tue Sep 07 10:20:22.638 2010] [18806:46962404156768] [debug] 
ajp_unmarshal_response::jk_ajp_common.c (723): Header[0] [Set-Cookie] = 
[JSESSIONID=cM2w+W7dIfDERfQpzO6BDw__.jboss51-integration1; Path=/xx]
[Tue Sep 07 10:20:22.640 2010] [18806:46962404156768] [debug] 
ajp_connection_tcp_get_message::jk_ajp_common.c (1336): 01605F 2E 6A 62 6F 
73 73 35 31 2D 69 6E 74 65 67 72  - _.jboss51-integr
..
[Tue Sep 07 10:20:22.651 2010] [18806:46962404156768] [debug] 
ajp_reset_endpoint::jk_ajp_common.c (757): (jboss51-integration1) resetting 
endpoint with sd = 154
[Tue Sep 07 10:20:22.651 2010] [18806:46962404156768] [debug] 
ajp_done::jk_ajp_common.c (3010): recycling connection pool slot=0 for worker 
jboss51-integration1
[Tue Sep 07 10:20:22.651 2010] [18806:46962404156768] [debug] 
jk_handler::mod_jk.c (2602): Service finished with status=200 for 
worker=lb-jboss51-integration

To confirm the settings:

worker.basic.connection_pool_timeout=90


You don't usually want to set a pool_size. 1 would be appropriate when 
using the prefork Apache MPM, but in that case mod_jk automatically sets 
it to 1.



worker.basic.connection_pool_size=1
worker.basic.socket_keepalive=1


I don't like socket_timeout ...


worker.basic.socket_timeout=90


but I would like socket_connect_timeout.

The next two are possibly a bit short, because if the backend e.g. does 
a Java Garbage Collection which miht take longer than 1 second, tose 
timeouts will fire and take the  node out of load balancing.



worker.basic.connect_timeout=1000
worker.basic.prepost_timeout=1000


You might want to add max_reply_timeouts, otherwise one single reply 
timeout can take a node out of load balancing.



worker.basic.reply_timeout=9
# Stop recoery attempts when JBoss instances do not respond.
worker.basic.retries=1
worker.basic.recovery_options=27

worker.jboss51-integration1.reference=worker.basic
worker.jboss51-integration1.host=xx
worker.jboss51-integration1.port=13802
worker.jboss51-integration1.type=ajp13

Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Mladen Turk

On 09/07/2010 11:53 AM, John Baker wrote:

TM,

On Tuesday 07 September 2010 09:47:17 you wrote:

If you have enough resources, try to disable
connectionTimeout on AJP connector and see weather
the same will happen again.


I've removed the connectionTimeout attribute and the problem persists - I can see the 
lingering bytes in 2 sec messages as before.



OK. The next one would be the tcpdump during that
interval to see actually the status of the sockets
both on mod_jk and JBoss boxes.

It's obvious that

shutdown(socket, SHUT_WR)
poll(socket, 2 seconds)
close(socket)

caused poll call to time out, meaning that
the JBoss side didn't respond to the
shutdown(socket, SHUT_WR) call by
closing it's side of the connection.

BTW, do you have lingering bytes in 0 sec messages
in your log or lower then 2 sec?



Regards
--
^TM

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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread John Baker
Rainer,

On Tuesday 07 September 2010 11:09:46 you wrote:
  [Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
  find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
  '/*=lb-jboss51-integration' source 'JkMount'
  [Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
  find_match::jk_uri_worker_map.c (863): Found a wildchar match 
  '/*=lb-jboss51-integration'
  [Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
  jk_handler::mod_jk.c (2462): Into handler jakarta-servlet 
  worker=lb-jboss51-integration r-proxyreq=0
  [Tue Sep 07 10:20:20.617 2010] [18806:46962404156768] [debug] 
  wc_get_worker_for_name::jk_worker.c (116): found a worker 
  lb-jboss51-integration
  [Tue Sep 07 10:20:20.618 2010] [18806:46962404156768] [debug] 
  jk_shutdown_socket::jk_connect.c (722): About to shutdown socket 154
  [Tue Sep 07 10:20:22.619 2010] [18806:46962404156768] [debug] 
  jk_shutdown_socket::jk_connect.c (813): Shutdown socket 154 and read 0 
  lingering bytes in 2 sec.
 
 Hmmm, that's strange. Why is there a connection close between 
 wc_get_worker_for_name() and wc_maintain()? The first call doing 
 something with the connections would be wc_maintain(). And if it decides 
 to close sockets, it would log addiional statements. Nevertheless we can 
 see, that closing the socket really took 2 seconds (which is in fact a 
 builtin mod_jk timeout).

That's interesting, because I thought this bug:

https://issues.apache.org/bugzilla/show_bug.cgi?id=48169

Was addressed in 1.2.30 and this discusses a 2 second problem.

 Are we sure, that those log lines are correct? This was generated by 
 mod_jk 1.2.30 without any code changes, right?

I compiled it fresh from source without any change:

[Tue Sep 07 10:07:56.683 2010] [17424:46962404156768] [info] init_jk::mod_jk.c 
(3189): mod_jk/1.2.30 initialized

 Log level trace would show us more precisely, how we came to close the 
 socket, but it blows up log volume a lot.

I'm using trace and greping for whatever you need to see.  if you want to see 
more debug, tell me what keyword to grep (ideally, so I don't catch the 
hundreds of other lines of debug being generated by other worker threads).

  To confirm the settings:
 
  worker.basic.connection_pool_timeout=90
 
 You don't usually want to set a pool_size. 1 would be appropriate when 
 using the prefork Apache MPM, but in that case mod_jk automatically sets 
 it to 1.

I can remove it if you want - I only set it to 1 to ensure it was set (yes, I 
am using prefork).
 
  worker.basic.connection_pool_size=1
  worker.basic.socket_keepalive=1
 
 I don't like socket_timeout ...

Why?

  worker.basic.socket_timeout=90
 
 but I would like socket_connect_timeout.

I can change it.

 The next two are possibly a bit short, because if the backend e.g. does 
 a Java Garbage Collection which miht take longer than 1 second, tose 
 timeouts will fire and take the  node out of load balancing.
 
  worker.basic.connect_timeout=1000
  worker.basic.prepost_timeout=1000
 
 You might want to add max_reply_timeouts, otherwise one single reply 
 timeout can take a node out of load balancing.
 
  worker.basic.reply_timeout=9
  # Stop recoery attempts when JBoss instances do not respond.
  worker.basic.retries=1
  worker.basic.recovery_options=27
 Don't want sticky sessions?

Nope.  The app clusters.  Although it's set for other workers.


John

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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread John Baker


On Tuesday 07 September 2010 11:13:07 you wrote:
 It's obvious that
 
 shutdown(socket, SHUT_WR)
 poll(socket, 2 seconds)
 close(socket)
 
 caused poll call to time out, meaning that
 the JBoss side didn't respond to the
 shutdown(socket, SHUT_WR) call by
 closing it's side of the connection.
 
 BTW, do you have lingering bytes in 0 sec messages
 in your log or lower then 2 sec?

Yes.  There's plenty of lingering 0 sec.

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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Mladen Turk

On 09/07/2010 12:09 PM, Rainer Jung wrote:


Are we sure, that those log lines are correct? This was generated by mod_jk 
1.2.30 without any code changes, right?



The other option would be to set JkWatchdogInterval 60
In that case wc_maintain would happen in separate thread
without observable request delay.
However the JK_LOCK would still block the connection.
Think we should fix that by just invalidating the
sockets, and then closing them in the watchdog thread. WDYT?



Regards
--
^TM

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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread John Baker
Rainer,

On Tuesday 07 September 2010 11:09:46 you wrote:
 I don't like socket_timeout ...
 
  worker.basic.socket_timeout=90
 
 but I would like socket_connect_timeout.
 
 The next two are possibly a bit short, because if the backend e.g. does 
 a Java Garbage Collection which miht take longer than 1 second, tose 
 timeouts will fire and take the  node out of load balancing.
 
  worker.basic.connect_timeout=1000
  worker.basic.prepost_timeout=1000

I've change socket_timeout=90 to socket_connect_timeout=9000, and 
connect_timeout/prepost_timeout to 5000, and the problem persists:

[Tue Sep 07 11:29:22.863 2010] [364:47921619424608] [debug] 
jk_shutdown_socket::jk_connect.c (722): About to shutdown socket 152
[Tue Sep 07 11:29:24.863 2010] [364:47921619424608] [debug] 
jk_shutdown_socket::jk_connect.c (813): Shutdown socket 152 and read 0 
lingering bytes in 2 sec.
[Tue Sep 07 11:29:24.868 2010] [364:47921619424608] [debug] 
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration


John

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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Rainer Jung

On 07.09.2010 12:29, Mladen Turk wrote:

On 09/07/2010 12:09 PM, Rainer Jung wrote:


Are we sure, that those log lines are correct? This was generated by
mod_jk 1.2.30 without any code changes, right?



The other option would be to set JkWatchdogInterval 60
In that case wc_maintain would happen in separate thread
without observable request delay.
However the JK_LOCK would still block the connection.
Think we should fix that by just invalidating the
sockets, and then closing them in the watchdog thread. WDYT?


I'm going to answer his other mail. Since he has trace log, I'm still 
interested to understand, why the socket close was logged *before* the 
maintain. After this is understood, moving the whole thing to the 
maintain could be a good solution (and not holding the lock while 
shutting down the socket).


Regards,

Rainer

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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Mladen Turk

On 09/07/2010 12:20 PM, John Baker wrote:



On Tuesday 07 September 2010 11:13:07 you wrote:

It's obvious that

shutdown(socket, SHUT_WR)
poll(socket, 2 seconds)
close(socket)

caused poll call to time out, meaning that
the JBoss side didn't respond to the
shutdown(socket, SHUT_WR) call by
closing it's side of the connection.

BTW, do you have lingering bytes in 0 sec messages
in your log or lower then 2 sec?


Yes.  There's plenty of lingering 0 sec.



Nice, it means that for most of the times the maintain
works as it should. JBoss closes the socket and
poll returns immediately cause of closed socket.

You can use Wireshark and see what's actually going
on in those cases.


Regards
--
^TM

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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Rainer Jung

On 07.09.2010 12:32, John Baker wrote:

Rainer,

On Tuesday 07 September 2010 11:09:46 you wrote:

I don't like socket_timeout ...


worker.basic.socket_timeout=90


but I would like socket_connect_timeout.

The next two are possibly a bit short, because if the backend e.g. does
a Java Garbage Collection which miht take longer than 1 second, tose
timeouts will fire and take the  node out of load balancing.


worker.basic.connect_timeout=1000
worker.basic.prepost_timeout=1000


I've change socket_timeout=90 to socket_connect_timeout=9000, and 
connect_timeout/prepost_timeout to 5000, and the problem persists:

[Tue Sep 07 11:29:22.863 2010] [364:47921619424608] [debug] 
jk_shutdown_socket::jk_connect.c (722): About to shutdown socket 152
[Tue Sep 07 11:29:24.863 2010] [364:47921619424608] [debug] 
jk_shutdown_socket::jk_connect.c (813): Shutdown socket 152 and read 0 
lingering bytes in 2 sec.
[Tue Sep 07 11:29:24.868 2010] [364:47921619424608] [debug] 
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration


OK, so it would be helpful to see a more complete log, e.g.

grep 364:47921619424608 LOGFILE | egrep -e '11:29:2[012345]'

If there's data in it which is not meant for public posting, you can 
also send it to me va direct mail.


Regards,

Rainer

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



Re: Unable to acheive load balcing using mod_jk

2010-09-07 Thread Amol Puglia
Hello Team,

After making changes to worker list as mentioned in the below mail.

worker.list=loadbalancer.

We are noticing following messages in the log files and we are getting 500 
error messages while accessing URL.

[Tue Sep 07 12:34:52.904 2010] [15711:27] [info] jk_handler::mod_jk.c (2254): 
No body with status=500 for worker=loadbalancer
[Tue Sep 07 12:34:58.630 2010] [15712:27] [info] jk_handler::mod_jk.c (2254): 
No body with status=500 for worker=loadbalancer
[Tue Sep 07 12:39:48.018 2010] [15711:27] [info] jk_handler::mod_jk.c (2254): 
No body with status=500 for worker=loadbalancer



--- On Tue, 9/7/10, Rainer Jung rainer.j...@kippdata.de wrote:

From: Rainer Jung rainer.j...@kippdata.de
Subject: Re: Unable to acheive load balcing using mod_jk
To: Tomcat Users List users@tomcat.apache.org
Date: Tuesday, September 7, 2010, 3:02 PM

On 07.09.2010 11:15, Mladen Turk wrote:
 On 09/07/2010 11:02 AM, Amol Puglia wrote:
 Hello Team,
 
 Below are the details of workers.properties file and httpd.conf file.
 
 # lists the workers by name
 
 worker.list=tomcat1, tomcat2, tomcat3, loadbalancer
 
 
 This should be
 worker.list=loadbalancer
 
 Note that workers that constitute load balancer must
 not appear in the worker.list

In addition:

if you start a fresh install, use recent versions:

Tomcat 6.0.29
mod_jk 1.2.30
Apache 2.2.16 or 2.0.63

I don't know, what your actual problem is, but if it is session stickyness, 
then read on.

In order to make sticky session work, you need two ingredients.

1) You need to set the attribute jvmRoute in server.xml of each Tomcat instance 
to a unique value, something like your logical instance name. An example for 
setting jvmRoute is contained as a comment in the default server.xml file. The 
file is contained in the conf directory of Tomcat.

2) Configure a worker of type lb (load balancer), with one member worker per 
Tomcat instance. The member workers of the load balancer worker need to have 
the same names as the jvmRoute of the Tomcat to which they connect. In your 
above configuration those names are tomcat1, tomcat2, ..., so either you 
choose tomcat1, tomcat2, ... as the jvmRoute values, or you change the 
names of the workers above to the jvmRoute values you have already chosen. By 
default lb workers handle session sticky (unless you turn that off by 
sticky_session=0, something you don't want to). Now map your URLs to the lb 
worker using JkMount.

How does it work?

a) Tomcat automatically appends its own jvmRoute at the end of the session id, 
separated with a dot. The session id is send to the client either via the 
JSESSIONID cookie, or via URL encoding (...;jsessionid=...).

b) mod_jk knows about that, extracts the value of the JSESSIONID cookie 
presented by the browser respectively extracts the id encoded in the URL, looks 
for the separating dot and extracts the jvmRoute from the id. The load 
balancing worker then searches for a member worker with the same name and uses 
that one for stickyness.

c) Any request without session id is balanced nonsticky depending on 
configuration and load.

Regards,

Rainer

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




  

Re: Unable to acheive load balcing using mod_jk

2010-09-07 Thread Rainer Jung

On 07.09.2010 12:40, Amol Puglia wrote:

Hello Team,

After making changes to worker list as mentioned in the below mail.

worker.list=loadbalancer.

We are noticing following messages in the log files and we are getting 500 
error messages while accessing URL.

[Tue Sep 07 12:34:52.904 2010] [15711:27] [info] jk_handler::mod_jk.c (2254): 
No body with status=500 for worker=loadbalancer
[Tue Sep 07 12:34:58.630 2010] [15712:27] [info] jk_handler::mod_jk.c (2254): 
No body with status=500 for worker=loadbalancer
[Tue Sep 07 12:39:48.018 2010] [15711:27] [info] jk_handler::mod_jk.c (2254): 
No body with status=500 for worker=loadbalancer


Looks like your Tomcat sends responses with HTTP Status 500 (internal 
server error) and no response body.


Doesn't look like a mod_jk problem. Look ate your application and Tomcat 
logs.


Regards,

Rainer


--- On Tue, 9/7/10, Rainer Jungrainer.j...@kippdata.de  wrote:

From: Rainer Jungrainer.j...@kippdata.de
Subject: Re: Unable to acheive load balcing using mod_jk
To: Tomcat Users Listusers@tomcat.apache.org
Date: Tuesday, September 7, 2010, 3:02 PM

On 07.09.2010 11:15, Mladen Turk wrote:

On 09/07/2010 11:02 AM, Amol Puglia wrote:

Hello Team,

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

# lists the workers by name

worker.list=tomcat1, tomcat2, tomcat3, loadbalancer



This should be
worker.list=loadbalancer

Note that workers that constitute load balancer must
not appear in the worker.list


In addition:

if you start a fresh install, use recent versions:

Tomcat 6.0.29
mod_jk 1.2.30
Apache 2.2.16 or 2.0.63

I don't know, what your actual problem is, but if it is session stickyness, 
then read on.

In order to make sticky session work, you need two ingredients.

1) You need to set the attribute jvmRoute in server.xml of each Tomcat instance 
to a unique value, something like your logical instance name. An example for 
setting jvmRoute is contained as a comment in the default server.xml file. The 
file is contained in the conf directory of Tomcat.

2) Configure a worker of type lb (load balancer), with one member worker per Tomcat instance. The member workers of 
the load balancer worker need to have the same names as the jvmRoute of the Tomcat to which they connect. In your above 
configuration those names are tomcat1, tomcat2, ..., so either you choose tomcat1, 
tomcat2, ... as the jvmRoute values, or you change the names of the workers above to the jvmRoute values you have 
already chosen. By default lb workers handle session sticky (unless you turn that off by sticky_session=0, something you don't 
want to). Now map your URLs to the lb worker using JkMount.

How does it work?

a) Tomcat automatically appends its own jvmRoute at the end of the session id, separated 
with a dot. The session id is send to the client either via the JSESSIONID cookie, or via 
URL encoding (...;jsessionid=...).

b) mod_jk knows about that, extracts the value of the JSESSIONID cookie 
presented by the browser respectively extracts the id encoded in the URL, looks 
for the separating dot and extracts the jvmRoute from the id. The load 
balancing worker then searches for a member worker with the same name and uses 
that one for stickyness.

c) Any request without session id is balanced nonsticky depending on 
configuration and load.

Regards,

Rainer


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



Setting up Multiple Servlet's to handle 1 file type

2010-09-07 Thread David Long
I have an Apache Tomcat 7.0.2 development environment setup on my Ubuntu
10.04 laptop.  I currently have some servlet's setup in the global web.xml
file to handle .cfm files.  The servlet uses one version of a ColdFusion
server, but I recently started a project that requires a different
ColdFusion server.  So I setup a new host and installed the ColdFusion
server on the host.  I setup the proper web.xml file with all the new
servlets and mappings (using different servlet names than what was in the
global web.xml.
I am now noticing some really strange behavior when I try to navigate to my
host:
1) The global servlet sets up a virtual directory (/railo-context/) and when
I try to navigate to a file there (/railo-context/admin.cfm) the file gets
served by my private CF Servlet.
2) When I try to navigate to the welcome file (/index.cfm) I get the global
servlet.

Here are my servlet setups:

Global web.xml:
servlet
servlet-nameGlobalCFMLServlet/servlet-name
descriptionCFML runtime Engine/description
servlet-classrailo.loader.servlet.CFMLServlet/servlet-class
init-param
param-nameconfiguration/param-name
param-value/WEB-INF/railo//param-value
descriptionConfiguraton directory/description
/init-param
!-- init-param
param-namerailo-server-root/param-name
param-value./param-value
descriptiondirectory where railo root directory is stored/description
/init-param --
load-on-startup1/load-on-startup
/servlet
servlet
servlet-nameGlobalAMFServlet/servlet-name
descriptionAMF Servlet for flash remoting/description
servlet-classrailo.loader.servlet.AMFServlet/servlet-class
load-on-startup1/load-on-startup
/servlet
servlet
servlet-nameGlobalFileServlet/servlet-name
descriptionFile Servlet for simple files/description
servlet-classrailo.loader.servlet.FileServlet/servlet-class
load-on-startup2/load-on-startup
/servlet
servlet-mapping
servlet-nameGlobalCFMLServlet/servlet-name
url-pattern*.cfm/url-pattern
/servlet-mapping
servlet-mapping
servlet-nameGlobalCFMLServlet/servlet-name
url-pattern/index.cfm/*/url-pattern
/servlet-mapping
servlet-mapping
servlet-nameGlobalCFMLServlet/servlet-name
url-pattern*.cfml/url-pattern
/servlet-mapping
servlet-mapping
servlet-nameGlobalCFMLServlet/servlet-name
url-pattern*.cfc/url-pattern
/servlet-mapping
servlet-mapping
servlet-nameGlobalAMFServlet/servlet-name
url-pattern/flashservices/gateway/*/url-pattern
/servlet-mapping
!--servlet-mapping
servlet-nameGlobalFileServlet/servlet-name
url-pattern//url-pattern
/servlet-mapping--

Private web.xml:
servlet id=coldfusion_servlet_3
servlet-nameCfmServlet/servlet-name
display-nameCFML Template Processor/display-name
descriptionCompiles and executes CFML pages and tags/description
servlet-classcoldfusion.bootstrap.BootstrapServlet/servlet-class
init-param id=InitParam_1034013110656ert
param-nameservlet.class/param-name
param-valuecoldfusion.CfmServlet/param-value
/init-param
load-on-startup4/load-on-startup
/servlet
servlet id=coldfusion_servlet_4
servlet-nameGraphServlet/servlet-name
display-nameGraphServlet/display-name
descriptionServes up graph data/description
servlet-classcoldfusion.bootstrap.BootstrapServlet/servlet-class
init-param id=InitParam_1034013110657xx
param-nameservlet.class/param-name
param-valuecoldfusion.graph.GraphServlet/param-value
/init-param
/servlet
servlet id=coldfusion_servlet_5
servlet-nameCFCServlet/servlet-name
display-nameCFC Processor/display-name
descriptionCompiles and executes CF web components/description
servlet-classcoldfusion.bootstrap.BootstrapServlet/servlet-class
init-param id=InitParam_1034013110657ax
param-nameservlet.class/param-name
param-valuecoldfusion.xml.rpc.CFCServlet/param-value
/init-param
load-on-startup10/load-on-startup
/servlet
servlet-mapping id=coldfusion_mapping_3
servlet-nameCfmServlet/servlet-name
url-pattern*.cfm/url-pattern
/servlet-mapping
servlet-mapping id=coldfusion_mapping_4
servlet-nameCFCServlet/servlet-name
url-pattern*.cfc/url-pattern
/servlet-mapping
servlet-mapping id=coldfusion_mapping_5
servlet-nameCfmServlet/servlet-name
url-pattern*.cfml/url-pattern
/servlet-mapping

-- 
From a brother in Christ,
David Long
203.427.1016
david.lon...@gmail.com


Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Rainer Jung

On 07.09.2010 12:40, Rainer Jung wrote:

On 07.09.2010 12:32, John Baker wrote:

Rainer,

On Tuesday 07 September 2010 11:09:46 you wrote:

I don't like socket_timeout ...


worker.basic.socket_timeout=90


but I would like socket_connect_timeout.

The next two are possibly a bit short, because if the backend e.g. does
a Java Garbage Collection which miht take longer than 1 second, tose
timeouts will fire and take the node out of load balancing.


worker.basic.connect_timeout=1000
worker.basic.prepost_timeout=1000


I've change socket_timeout=90 to socket_connect_timeout=9000, and
connect_timeout/prepost_timeout to 5000, and the problem persists:

[Tue Sep 07 11:29:22.863 2010] [364:47921619424608] [debug]
jk_shutdown_socket::jk_connect.c (722): About to shutdown socket 152
[Tue Sep 07 11:29:24.863 2010] [364:47921619424608] [debug]
jk_shutdown_socket::jk_connect.c (813): Shutdown socket 152 and read 0
lingering bytes in 2 sec.
[Tue Sep 07 11:29:24.868 2010] [364:47921619424608] [debug]
wc_maintain::jk_worker.c (339): Maintaining worker lb-jboss51-integration


OK, so it would be helpful to see a more complete log, e.g.

grep 364:47921619424608 LOGFILE | egrep -e '11:29:2[012345]'

If there's data in it which is not meant for public posting, you can
also send it to me va direct mail.


Thanks for the log snippets. I can now see:

- the socket close *does* happen during maintain
- this wasn't obvious from the previous log snippert, because more 
Maintain lines for other workers were left out


Some relevant lines are:

[Tue Sep 07 11:29:22.863 2010] [364:47921619424608] [debug] 
wc_maintain::jk_worker.c (339): Maintaining worker lb-...

...
[Tue Sep 07 11:29:22.863 2010] [364:47921619424608] [debug] 
ajp_reset_endpoint::jk_ajp_common.c (757): (worker1) resetting endpoint 
with sd = 152 (socket shutdown)

...
[Tue Sep 07 11:29:22.863 2010] [364:47921619424608] [debug] 
jk_shutdown_socket::jk_connect.c (722): About to shutdown socket 152

...
[Tue Sep 07 11:29:24.863 2010] [364:47921619424608] [debug] 
jk_shutdown_socket::jk_connect.c (813): Shutdown socket 152 and read 0 
lingering bytes in 2 sec.

...
[Tue Sep 07 11:29:24.863 2010] [364:47921619424608] [debug] 
ajp_maintain::jk_ajp_common.c (3190): cleaning pool slot=0 elapsed 185 in 2
[Tue Sep 07 11:29:24.863 2010] [364:47921619424608] [debug] 
ajp_maintain::jk_ajp_common.c (3197): reached pool min size 1 from 1 
cache slots
[Tue Sep 07 11:29:24.863 2010] [364:47921619424608] [debug] 
ajp_maintain::jk_ajp_common.c (3237): recycled 1 sockets in 2 seconds 
from 1 pool slots

...

So now we can discuss, how to fix this.

- Can we detect more reliably, whether we want to drain before closing 
or not


- As a workaround: using a JkWatchdog moves the maintain into a separate 
thread. But during the socket closing a lock is held, which blocks other 
threads from accessing the same worker.


We would need to rewrite the logic in ajp_maintain() to only hold the 
lock (critical section) while pulling sockets out of the ep_cache or 
entering them back, not while actually using the sockets.


I still don't know, *why* the socket close blocks, i.e. why the backend 
doesn't respond to us wanting to close the socket. Here a network sniff 
like indicated by Mladen would help.


Regards,

Rainer

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



How to Throttle Tomcat request

2010-09-07 Thread satish.mane
Hi,

I have tomcat-6.0.26 running on OS-WinXP-Version 2000-Sp2.

My question is How to configure Tomcat server to throttle API request to 
prevent potential DoS attacks?

Regards
Satish




Re: Unable to acheive load balcing using mod_jk

2010-09-07 Thread Brett Delle Grazie
On Tue, 2010-09-07 at 11:15 +0200, Mladen Turk wrote:
 On 09/07/2010 11:02 AM, Amol Puglia wrote:
  Hello Team,
 
  Below are the details of workers.properties file and httpd.conf file.
 
  # lists the workers by name
 
  worker.list=tomcat1, tomcat2, tomcat3, loadbalancer
 
 
 This should be
 worker.list=loadbalancer
 
 Note that workers that constitute load balancer must
 not appear in the worker.list

May I ask what might happen if they were?

For example, I have two separate vhosts, one which uses the balancer and
one (for jk-manager access) which does not, both use sticky sessions -
would this cause problems with the balancer code?

 
 
 Regards

Thanks

-- 
Best Regards,

Brett Delle Grazie

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



Re: Unable to acheive load balcing using mod_jk

2010-09-07 Thread Rainer Jung

On 07.09.2010 17:04, Brett Delle Grazie wrote:

On Tue, 2010-09-07 at 11:15 +0200, Mladen Turk wrote:

On 09/07/2010 11:02 AM, Amol Puglia wrote:

Hello Team,

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

# lists the workers by name

worker.list=tomcat1, tomcat2, tomcat3, loadbalancer



This should be
worker.list=loadbalancer

Note that workers that constitute load balancer must
not appear in the worker.list


May I ask what might happen if they were?

For example, I have two separate vhosts, one which uses the balancer and
one (for jk-manager access) which does not, both use sticky sessions -
would this cause problems with the balancer code?


No. It might only confuse people reading the config wondering which of 
it is used. As long as you get your JkMount right, mod_jk uses the 
worker you expect.


No idea, what your vhosts have to do with putting the above mentioned 
ajp workers (tomcat1 etc.) into worker.list though. A vhost for 
jk-manager access only needs to use one worker, namely a worker of type 
status. That one needs to be put into the worker.list.


BTW: version 1.2.30 contains a nice default configuration in its source 
download tarball. It shows using load balancer and status worker fer 
example.


Regards,

Rainer


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



Tomcat service only starts if

2010-09-07 Thread Jeff Hubbs
 Tomcat 5.5.23, sun-jdk 1.5.0_11, CentOS 4.8.  Tomcat was 
built/installed from upstream. Tomcat service starts and runs normally 
if user tomcat's entry in /etc/passwd has /home/tomcat:/bin/bash but 
not if it has /dev/null:/sbin/nologin.  Would rather have it work set 
to the latter, which seems to be the industrially correct thing to do.


I discovered this when I was trying to fix the Tomcat service failing to 
start and I changed the tomcat user account to look like a normal user's 
so I could execute catalina.sh manually via su.  I had to chmod +x some 
.sh files that the install script did not set and then executing 
catalina.sh could start and stop the instance, but now I can only start 
the service with the tomcat user account left like that.


Thanks,
- Jeff

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



Tomcat http connectors

2010-09-07 Thread Tom Jones
Hello,
I'm trying to figure out which http connector is best suited for my needs. I 
was looking around for some info on anything that compares them all but I 
really did no find much.

Out of the three connectors listed can someone please help me understand which 
I should be using. I'm running Tomcat 6.0.26 on Mac OS X 10.5.8 64bit with Java 
1.6.x. I'm using SSL directly to Tomcat. I read that it was faster than using 
Apache as the front-end. Oh yea, almost all of my content is dynamic, almost no 
static content at all.

Http11Protocol
Http11AprProtocol
Http11NioProtocol 

Maybe I should also ask, should I even be messing around with changing the 
connector type?

Thanks,
tom

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



Re: Tomcat http connectors

2010-09-07 Thread Mark Thomas
On 07/09/2010 16:49, Tom Jones wrote:
 Hello,
 I'm trying to figure out which http connector is best suited for my needs. I 
 was looking around for some info on anything that compares them all but I 
 really did no find much.
 
 Out of the three connectors listed can someone please help me understand 
 which I should be using. I'm running Tomcat 6.0.26 on Mac OS X 10.5.8 64bit 
 with Java 1.6.x. I'm using SSL directly to Tomcat. I read that it was faster 
 than using Apache as the front-end. Oh yea, almost all of my content is 
 dynamic, almost no static content at all.
 
 Http11Protocol
 Http11AprProtocol
 Http11NioProtocol 
 
 Maybe I should also ask, should I even be messing around with changing the 
 connector type?

If you are using SSL, then the APR/native connector is your best choice.

Mark

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



tomcat 5.5.29 how to change tcpv6 on tcpv4

2010-09-07 Thread and)

hello all
i have added in catalina.bat Djava.net.preferIPv4Stack parameter

set JAVA_OPTS=%JAVA_OPTS%
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties
-Djava.net.preferIPv4Stack=true

bun my tomcat still listerning by TCPv6

windows 7, java 5/6

any ideas, please
-- 
View this message in context: 
http://old.nabble.com/tomcat-5.5.29-how-to-change-tcpv6-on-tcpv4-tp29641598p29641598.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



Re: tomcat 5.5.29 how to change tcpv6 on tcpv4

2010-09-07 Thread Pid
On 07/09/2010 17:26, and) wrote:
 
 hello all
 i have added in catalina.bat Djava.net.preferIPv4Stack parameter
 
 set JAVA_OPTS=%JAVA_OPTS%
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties
 -Djava.net.preferIPv4Stack=true
 
 bun my tomcat still listerning by TCPv6
 
 windows 7, java 5/6
 
 any ideas, please

Specify 0.0.0.0 in the address field of the connector.


p



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: How to Throttle Tomcat request

2010-09-07 Thread Pid
On 07/09/2010 14:48, satish.m...@bt.com wrote:
 Hi,
 
 I have tomcat-6.0.26 running on OS-WinXP-Version 2000-Sp2.
 
 My question is How to configure Tomcat server to throttle API request to 
 prevent potential DoS attacks?

Tomcat doesn't have any specific configuration which will enable you to
do this, beyond specifying the number of threads per connector/executor
and adjusting the backlog.

Furthermore, the operating system supplies the network service so the OS
will still suffer from the attack, even if you limit the number of
connections in Tomcat.

It's better to defend this type of attack before the server, not on it.


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: tomcat 5.5.29 how to change tcpv6 on tcpv4

2010-09-07 Thread André Warnier

Pid wrote:

On 07/09/2010 17:26, and) wrote:

hello all
i have added in catalina.bat Djava.net.preferIPv4Stack parameter

set JAVA_OPTS=%JAVA_OPTS%
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties
-Djava.net.preferIPv4Stack=true

bun my tomcat still listerning by TCPv6

windows 7, java 5/6

any ideas, please


Specify 0.0.0.0 in the address field of the connector.


Or else, if you are running tomcat as a Service, you should use the GUI program 
bin/tomcat7w.exe to set the run-time parameters.  I don't think that catalina.bat is 
used in that case.



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



Re: Setting up Multiple Servlet's to handle 1 file type

2010-09-07 Thread Pid
On 07/09/2010 13:37, David Long wrote:
 I have an Apache Tomcat 7.0.2 development environment setup on my Ubuntu
 10.04 laptop.  I currently have some servlet's setup in the global web.xml
 file to handle .cfm files.  

Hmm.  This is the standard practice for ColdFusion?

 The servlet uses one version of a ColdFusion
 server, but I recently started a project that requires a different
 ColdFusion server.  So I setup a new host and installed the ColdFusion
 server on the host.  I setup the proper web.xml file with all the new
 servlets and mappings (using different servlet names than what was in the
 global web.xml.

 I am now noticing some really strange behavior when I try to navigate to my
 host:

 1) The global servlet sets up a virtual directory (/railo-context/) and when
 I try to navigate to a file there (/railo-context/admin.cfm) the file gets
 served by my private CF Servlet.

How many apps do you have deployed and which are relying on the default
web.xml and which the 'private' one with CF defined therein?

Is the file admin.cfm present, or is it virtual?

 2) When I try to navigate to the welcome file (/index.cfm) I get the global
 servlet.

Is the file index.cfm present, or is it virtual?


p

 Here are my servlet setups:
 
 Global web.xml:
 servlet
 servlet-nameGlobalCFMLServlet/servlet-name
 descriptionCFML runtime Engine/description
 servlet-classrailo.loader.servlet.CFMLServlet/servlet-class
 init-param
 param-nameconfiguration/param-name
 param-value/WEB-INF/railo//param-value
 descriptionConfiguraton directory/description
 /init-param
 !-- init-param
 param-namerailo-server-root/param-name
 param-value./param-value
 descriptiondirectory where railo root directory is stored/description
 /init-param --
 load-on-startup1/load-on-startup
 /servlet

 servlet
 servlet-nameGlobalAMFServlet/servlet-name
 descriptionAMF Servlet for flash remoting/description
 servlet-classrailo.loader.servlet.AMFServlet/servlet-class
 load-on-startup1/load-on-startup
 /servlet

 servlet
 servlet-nameGlobalFileServlet/servlet-name
 descriptionFile Servlet for simple files/description
 servlet-classrailo.loader.servlet.FileServlet/servlet-class
 load-on-startup2/load-on-startup
 /servlet

 servlet-mapping
 servlet-nameGlobalCFMLServlet/servlet-name
 url-pattern*.cfm/url-pattern
 /servlet-mapping

 servlet-mapping
 servlet-nameGlobalCFMLServlet/servlet-name
 url-pattern/index.cfm/*/url-pattern
 /servlet-mapping

 servlet-mapping
 servlet-nameGlobalCFMLServlet/servlet-name
 url-pattern*.cfml/url-pattern
 /servlet-mapping

 servlet-mapping
 servlet-nameGlobalCFMLServlet/servlet-name
 url-pattern*.cfc/url-pattern
 /servlet-mapping

 servlet-mapping
 servlet-nameGlobalAMFServlet/servlet-name
 url-pattern/flashservices/gateway/*/url-pattern
 /servlet-mapping

 !--servlet-mapping
 servlet-nameGlobalFileServlet/servlet-name
 url-pattern//url-pattern
 /servlet-mapping--


 Private web.xml:
 servlet id=coldfusion_servlet_3
 servlet-nameCfmServlet/servlet-name
 display-nameCFML Template Processor/display-name
 descriptionCompiles and executes CFML pages and tags/description
 servlet-classcoldfusion.bootstrap.BootstrapServlet/servlet-class
 init-param id=InitParam_1034013110656ert
 param-nameservlet.class/param-name
 param-valuecoldfusion.CfmServlet/param-value
 /init-param
 load-on-startup4/load-on-startup
 /servlet
 servlet id=coldfusion_servlet_4
 servlet-nameGraphServlet/servlet-name
 display-nameGraphServlet/display-name
 descriptionServes up graph data/description
 servlet-classcoldfusion.bootstrap.BootstrapServlet/servlet-class
 init-param id=InitParam_1034013110657xx
 param-nameservlet.class/param-name
 param-valuecoldfusion.graph.GraphServlet/param-value
 /init-param
 /servlet

 servlet id=coldfusion_servlet_5
 servlet-nameCFCServlet/servlet-name
 display-nameCFC Processor/display-name
 descriptionCompiles and executes CF web components/description
 servlet-classcoldfusion.bootstrap.BootstrapServlet/servlet-class
 init-param id=InitParam_1034013110657ax
 param-nameservlet.class/param-name
 param-valuecoldfusion.xml.rpc.CFCServlet/param-value
 /init-param
 load-on-startup10/load-on-startup
 /servlet

 servlet-mapping id=coldfusion_mapping_3
 servlet-nameCfmServlet/servlet-name
 url-pattern*.cfm/url-pattern
 /servlet-mapping

 servlet-mapping id=coldfusion_mapping_4
 servlet-nameCFCServlet/servlet-name
 url-pattern*.cfc/url-pattern
 /servlet-mapping

 servlet-mapping id=coldfusion_mapping_5
 servlet-nameCfmServlet/servlet-name
 url-pattern*.cfml/url-pattern
 /servlet-mapping
 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Tomcat Connectors - Dynamic reloading of workers

2010-09-07 Thread Ruslan Gainutdinov
Thanks, JkShmSize helps.

However this solution does not seems to be flexible enough. No way to
tell how much memory needed beforehand.
Is there any way to reinit shared memory?
Seems to be a lot of such code on apache22 connector side...

Haven`t looked into solution to reserve space by adding disabled workers.
I believe it will be complicated, because it is not known whether
actual workers will be simple nodes or lbcluster.

I`ve made another patch.
Added JkWorkersFileReload apache setting, by default disabled.
It works if using JkWatchdogInterval only.

Adding a call to wc_reload to jk_status.c (just like mount file reloading)
sometimes crashes apache process.

http://huksley.sdot.ru/wp-content/uploads/2010/09/mod_jk-1.2.30-reload-workers-patch2.zip

With kindest personal regards,
Ruslan Gainutdinov
rusla...@gmail.com

On Tue, Sep 7, 2010 at 1:54 AM, Rainer Jung rainer.j...@kippdata.de wrote:
 On 06.09.2010 22:04, Ruslan Gainutdinov wrote:

 Thanks for info, I`ll check it out tomorrow.
 AFAIK, on windows, it is not shared memory but some sort of pool.
 Isn`t it dynamically grows when needed?

 No. Until version 1.2.26 you had to configure a fixed max size, from which
 the needed memory was allocated, but we didn't give you any indication about
 how much you would need.

 Starting with 1.2.27 we check how many load balancer and ajp workers are
 configured and allocate shared memory (or plain memory on Windows) of
 exactly the needed size.

 As Mladen says: you can still set a size explicitely using JkShmSize, which
 should disable the automatic calculation. You will get a warning though,
 that you don't need to set JkShmSize (that's true for the current
 functionality in mod_jk).

 Regards,

 Rainer

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



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



Re: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread John Baker
Where can I find documentation on JkWatchdog?


On Tuesday 07 September 2010 13:51:23 you wrote:
 - As a workaround: using a JkWatchdog moves the maintain into a separate 
 thread. But during the socket closing a lock is held, which blocks other 
 threads from accessing the same worker.

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



Re: Setting up Multiple Servlet's to handle 1 file type

2010-09-07 Thread David Long
On Tue, Sep 7, 2010 at 12:56 PM, Pid p...@pidster.com wrote:

 On 07/09/2010 13:37, David Long wrote:
  I have an Apache Tomcat 7.0.2 development environment setup on my Ubuntu
  10.04 laptop.  I currently have some servlet's setup in the global
 web.xml
  file to handle .cfm files.

 Hmm.  This is the standard practice for ColdFusion?

Not entirely sure what you mean (having a development tomcat or setting up
global servlets).
It is a fairly popular to use Tomcat for development as it can handle
multiple versions of ColdFusion.  It is also fairly popular to have a
default installation globally so as to not setup a new one for each host.


  The servlet uses one version of a ColdFusion
  server, but I recently started a project that requires a different
  ColdFusion server.  So I setup a new host and installed the ColdFusion
  server on the host.  I setup the proper web.xml file with all the new
  servlets and mappings (using different servlet names than what was in the
  global web.xml.

  I am now noticing some really strange behavior when I try to navigate to
 my
  host:

  1) The global servlet sets up a virtual directory (/railo-context/) and
 when
  I try to navigate to a file there (/railo-context/admin.cfm) the file
 gets
  served by my private CF Servlet.

 How many apps do you have deployed and which are relying on the default
 web.xml and which the 'private' one with CF defined therein?

I have about 5 apps deployed using the global handler.  Not sure what your
second question means.


 Is the file admin.cfm present, or is it virtual?

The railo-context directory is virtual.


  2) When I try to navigate to the welcome file (/index.cfm) I get the
 global
  servlet.

 Is the file index.cfm present, or is it virtual?

index.cfm is present.


 p

  Here are my servlet setups:
 
  Global web.xml:
  servlet
  servlet-nameGlobalCFMLServlet/servlet-name
  descriptionCFML runtime Engine/description
  servlet-classrailo.loader.servlet.CFMLServlet/servlet-class
  init-param
  param-nameconfiguration/param-name
  param-value/WEB-INF/railo//param-value
  descriptionConfiguraton directory/description
  /init-param
  !-- init-param
  param-namerailo-server-root/param-name
  param-value./param-value
  descriptiondirectory where railo root directory is stored/description
  /init-param --
  load-on-startup1/load-on-startup
  /servlet

  servlet
  servlet-nameGlobalAMFServlet/servlet-name
  descriptionAMF Servlet for flash remoting/description
  servlet-classrailo.loader.servlet.AMFServlet/servlet-class
  load-on-startup1/load-on-startup
  /servlet

  servlet
  servlet-nameGlobalFileServlet/servlet-name
  descriptionFile Servlet for simple files/description
  servlet-classrailo.loader.servlet.FileServlet/servlet-class
  load-on-startup2/load-on-startup
  /servlet

  servlet-mapping
  servlet-nameGlobalCFMLServlet/servlet-name
  url-pattern*.cfm/url-pattern
  /servlet-mapping

  servlet-mapping
  servlet-nameGlobalCFMLServlet/servlet-name
  url-pattern/index.cfm/*/url-pattern
  /servlet-mapping

  servlet-mapping
  servlet-nameGlobalCFMLServlet/servlet-name
  url-pattern*.cfml/url-pattern
  /servlet-mapping

  servlet-mapping
  servlet-nameGlobalCFMLServlet/servlet-name
  url-pattern*.cfc/url-pattern
  /servlet-mapping

  servlet-mapping
  servlet-nameGlobalAMFServlet/servlet-name
  url-pattern/flashservices/gateway/*/url-pattern
  /servlet-mapping

  !--servlet-mapping
  servlet-nameGlobalFileServlet/servlet-name
  url-pattern//url-pattern
  /servlet-mapping--


  Private web.xml:
  servlet id=coldfusion_servlet_3
  servlet-nameCfmServlet/servlet-name
  display-nameCFML Template Processor/display-name
  descriptionCompiles and executes CFML pages and
 tags/description
 
 servlet-classcoldfusion.bootstrap.BootstrapServlet/servlet-class
  init-param id=InitParam_1034013110656ert
  param-nameservlet.class/param-name
  param-valuecoldfusion.CfmServlet/param-value
  /init-param
  load-on-startup4/load-on-startup
  /servlet
  servlet id=coldfusion_servlet_4
  servlet-nameGraphServlet/servlet-name
  display-nameGraphServlet/display-name
  descriptionServes up graph data/description
 
 servlet-classcoldfusion.bootstrap.BootstrapServlet/servlet-class
  init-param id=InitParam_1034013110657xx
  param-nameservlet.class/param-name
  param-valuecoldfusion.graph.GraphServlet/param-value
  /init-param
  /servlet

  servlet id=coldfusion_servlet_5
  servlet-nameCFCServlet/servlet-name
  display-nameCFC Processor/display-name
  descriptionCompiles and executes CF web
 components/description
 
 servlet-classcoldfusion.bootstrap.BootstrapServlet/servlet-class
  init-param id=InitParam_1034013110657ax
  param-nameservlet.class/param-name
  param-valuecoldfusion.xml.rpc.CFCServlet/param-value
  /init-param
  

Re: Tomcat Connectors - Dynamic reloading of workers

2010-09-07 Thread Rainer Jung
Can you please add an enhancement issue in bugzilla and attach the 
patch. That way it doesn't get lost and we can easily find it.


Thanks!

Rainer

On 07.09.2010 19:36, Ruslan Gainutdinov wrote:

Thanks, JkShmSize helps.

However this solution does not seems to be flexible enough. No way to
tell how much memory needed beforehand.
Is there any way to reinit shared memory?
Seems to be a lot of such code on apache22 connector side...

Haven`t looked into solution to reserve space by adding disabled workers.
I believe it will be complicated, because it is not known whether
actual workers will be simple nodes or lbcluster.

I`ve made another patch.
Added JkWorkersFileReload apache setting, by default disabled.
It works if using JkWatchdogInterval only.

Adding a call to wc_reload to jk_status.c (just like mount file reloading)
sometimes crashes apache process.

http://huksley.sdot.ru/wp-content/uploads/2010/09/mod_jk-1.2.30-reload-workers-patch2.zip

With kindest personal regards,
Ruslan Gainutdinov
rusla...@gmail.com

On Tue, Sep 7, 2010 at 1:54 AM, Rainer Jungrainer.j...@kippdata.de  wrote:

On 06.09.2010 22:04, Ruslan Gainutdinov wrote:


Thanks for info, I`ll check it out tomorrow.
AFAIK, on windows, it is not shared memory but some sort of pool.
Isn`t it dynamically grows when needed?


No. Until version 1.2.26 you had to configure a fixed max size, from which
the needed memory was allocated, but we didn't give you any indication about
how much you would need.

Starting with 1.2.27 we check how many load balancer and ajp workers are
configured and allocate shared memory (or plain memory on Windows) of
exactly the needed size.

As Mladen says: you can still set a size explicitely using JkShmSize, which
should disable the automatic calculation. You will get a warning though,
that you don't need to set JkShmSize (that's true for the current
functionality in mod_jk).

Regards,

Rainer


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



Re: Unable to acheive load balcing using mod_jk

2010-09-07 Thread Brett Delle Grazie
On Tue, 2010-09-07 at 17:11 +0200, Rainer Jung wrote:
 On 07.09.2010 17:04, Brett Delle Grazie wrote:
  On Tue, 2010-09-07 at 11:15 +0200, Mladen Turk wrote:
  On 09/07/2010 11:02 AM, Amol Puglia wrote:
  Hello Team,
 
  Below are the details of workers.properties file and httpd.conf file.
 
  # lists the workers by name
 
  worker.list=tomcat1, tomcat2, tomcat3, loadbalancer
 
 
  This should be
  worker.list=loadbalancer
 
  Note that workers that constitute load balancer must
  not appear in the worker.list
 
  May I ask what might happen if they were?
 
  For example, I have two separate vhosts, one which uses the balancer and
  one (for jk-manager access) which does not, both use sticky sessions -
  would this cause problems with the balancer code?
 
 No. It might only confuse people reading the config wondering which of 
 it is used. As long as you get your JkMount right, mod_jk uses the 
 worker you expect.

Thanks - I thought that this might be related to my other cpong issue.

 
 No idea, what your vhosts have to do with putting the above mentioned 
 ajp workers (tomcat1 etc.) into worker.list though. A vhost for 
 jk-manager access only needs to use one worker, namely a worker of type 
 status. That one needs to be put into the worker.list.

Its actually because of a monitoring tool within the real webapp. We use
different vhosts (and ACL rules) to ensure the outside world can't get
access to the monitoring part.

 BTW: version 1.2.30 contains a nice default configuration in its source 
 download tarball. It shows using load balancer and status worker fer 
 example.

And that is the one I have used :)

 
 Regards,
 
 Rainer
 
 
Thanks again.

-- 
Best Regards,

Brett Delle Grazie

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

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



Re: Tomcat service only starts if

2010-09-07 Thread Jorge Medina
How do you start tomcat? What script gets executed?
Probably your bash profile script for the  tomcat account was
setting the PATH and/or LD_LIBRARY_PATH for you.
Review your startup script.

On Tue, Sep 7, 2010 at 11:32 AM, Jeff Hubbs jhubbsl...@att.net wrote:
  Tomcat 5.5.23, sun-jdk 1.5.0_11, CentOS 4.8.  Tomcat was built/installed
 from upstream. Tomcat service starts and runs normally if user tomcat's
 entry in /etc/passwd has /home/tomcat:/bin/bash but not if it has
 /dev/null:/sbin/nologin.  Would rather have it work set to the latter,
 which seems to be the industrially correct thing to do.

 I discovered this when I was trying to fix the Tomcat service failing to
 start and I changed the tomcat user account to look like a normal user's so
 I could execute catalina.sh manually via su.  I had to chmod +x some .sh
 files that the install script did not set and then executing catalina.sh
 could start and stop the instance, but now I can only start the service with
 the tomcat user account left like that.

 Thanks,
 - Jeff

 -
 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: 2 second delays in mod_jk while maintaining workers

2010-09-07 Thread Rainer Jung

On 07.09.2010 19:46, John Baker wrote:

Where can I find documentation on JkWatchdog?


General documntation on mod_jk:

http://tomcat.apache.org/connectors-doc/

JK directives: http://tomcat.apache.org/connectors-doc/reference/apache.html

workers.properties: 
http://tomcat.apache.org/connectors-doc/reference/workers.html


Timeouts: 
http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html


Regards,

Rainer

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



Re: Tomcat service only starts if

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

Jeff,

On 9/7/2010 11:32 AM, Jeff Hubbs wrote:
 Tomcat 5.5.23, sun-jdk 1.5.0_11, CentOS 4.8.  Tomcat was
 built/installed from upstream. Tomcat service starts and runs normally
 if user tomcat's entry in /etc/passwd has /home/tomcat:/bin/bash but
 not if it has /dev/null:/sbin/nologin.  Would rather have it work set
 to the latter, which seems to be the industrially correct thing to do.

Apache doesn't supply any service scripts, so you should talk to
CentOS about how to do this. One obvious solution would be to edit the
service script and put a cd in there.

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

iEYEARECAAYFAkyGojgACgkQ9CaO5/Lv0PAthwCeKlDMFis8CMYht0AtHnz1VHA9
uHIAnRm/IA3ATnzcchRl8hF2zIKgz3hz
=z8Ef
-END PGP SIGNATURE-

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



Re: How to Throttle Tomcat request

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

Satish,

On 9/7/2010 9:48 AM, satish.m...@bt.com wrote:
 My question is How to configure Tomcat server to throttle API request
 to prevent potential DoS attacks?

So, your strategy to prevent denial of service is to deny service?
Sounds counter intuitive.

Are you really asking for traffic shaping? As Pid points out, this is
best done at the network infrastructure level.

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

iEYEARECAAYFAkyGo9kACgkQ9CaO5/Lv0PBkigCgqfFCucko3HwkvqBz/NnlWzyV
5bwAnjAFXTDo69oSsaTU/HEYl6PmRC8o
=op/D
-END PGP SIGNATURE-

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



Tomcat Warning about existing attribute for Host

2010-09-07 Thread Mohammad M. AbuZer
Hi All,,,
I get these in tomcat console:

Sep 7, 2010 11:56:26 PM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property
'xmlNamespaceAware' to 'false' did not find a matching property.
Sep 7, 2010 11:56:26 PM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property
'xmlValidation' to 'false' did not find a matching property.

so I checked server.xml and host was like following:

Host appBase=webapps autoDeploy=true name=localhost
unpackWARs=true

xmlNamespaceAware=false xmlValidation=false

it doesn't make sense, how to solve it?

*
Best Regards
*
*

Mohammad M. AbuZer*
Junior Java Developer
Mobile: +962-78-5416416


Tomcat Warning about existing attribute for Host

2010-09-07 Thread Mohammad M. AbuZer
I'm using tomcat 7.0.2 BETA

-- Forwarded message --
From: Mohammad M. AbuZer m.abuze...@gmail.com
Date: Wed, Sep 8, 2010 at 3:51 AM
Subject: Tomcat Warning about existing attribute for Host
To: Tomcat Users List users@tomcat.apache.org


Hi All,,,
I get these in tomcat console:

Sep 7, 2010 11:56:26 PM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property
'xmlNamespaceAware' to 'false' did not find a matching property.
Sep 7, 2010 11:56:26 PM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property
'xmlValidation' to 'false' did not find a matching property.

so I checked server.xml and host was like following:

Host appBase=webapps autoDeploy=true name=localhost
unpackWARs=true

xmlNamespaceAware=false xmlValidation=false

it doesn't make sense, how to solve it?

*
Best Regards
*
*

Mohammad M. AbuZer*
Junior Java Developer
Mobile: +962-78-5416416




-- 
*
Best Regards

Mohammad M. AbuZer*
Junior Java Developer
Mobile: +962-78-5416416


RE: Tomcat Warning about existing attribute for Host

2010-09-07 Thread Anthony J. Biacco
I think those flags are only valid in the Context blocks now.

-Tony


-Original Message-
From: Mohammad M. AbuZer m.abuze...@gmail.com
Sent: Tuesday, September 07, 2010 6:53 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Tomcat Warning about existing attribute for Host

I'm using tomcat 7.0.2 BETA

-- Forwarded message --
From: Mohammad M. AbuZer m.abuze...@gmail.com
Date: Wed, Sep 8, 2010 at 3:51 AM
Subject: Tomcat Warning about existing attribute for Host
To: Tomcat Users List users@tomcat.apache.org


Hi All,,,
I get these in tomcat console:

Sep 7, 2010 11:56:26 PM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property
'xmlNamespaceAware' to 'false' did not find a matching property.
Sep 7, 2010 11:56:26 PM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property
'xmlValidation' to 'false' did not find a matching property.

so I checked server.xml and host was like following:

Host appBase=webapps autoDeploy=true name=localhost
unpackWARs=true

xmlNamespaceAware=false xmlValidation=false

it doesn't make sense, how to solve it?

*
Best Regards
*
*

Mohammad M. AbuZer*
Junior Java Developer
Mobile: +962-78-5416416




-- 
*
Best Regards

Mohammad M. AbuZer*
Junior Java Developer
Mobile: +962-78-5416416

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



RE: Tomcat Warning about existing attribute for Host

2010-09-07 Thread Caldarale, Charles R
From: Anthony J. Biacco [mailto:abia...@formatdynamics.com] 
Subject: RE: Tomcat Warning about existing attribute for Host

I think those flags are only valid in the Context blocks now.

There are getters and setters in the 7.0 catalina.startup.HostConfig class for 
the xmlNamespaceAware and xmlValidation attributes (along with everything else 
in Host), but that class is only used by the host-manager webapp for 
dynamically created hosts, not statically defined ones.  The OP should just 
remove the attributes.

 - 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