RE: Cluster Logging

2010-08-10 Thread Oscar Segarra Rey
Hi, 

Another question related to this issue... is there any level known as NONE (or 
something similar)  in order to disable cluster logging ?

Thanks a lot.

Oscar Segarra Rey
Àrea de tecnologies de la informació i les comunicacions
Departament de la Presidència
C/ Sant Honorat 1-3 - 08002 Barcelona
934024834


-Mensaje original-
De: Mark Eggers [mailto:its_toas...@yahoo.com] 
Enviado el: dilluns, 9 / agost / 2010 19:39
Para: Tomcat Users List
Asunto: Re: Cluster Logging

Let me try that again since my copy/paste failed.

#
# add an extra handler to direct to a different file
#
handlers = 1catalina.org.apache.juli.FileHandler, \
2localhost.org.apache.juli.FileHandler, \
3manager.org.apache.juli.FileHandler, \
4host-manager.org.apache.juli.FileHandler, \
java.util.logging.ConsoleHandler, \
5cluster.org.apache.juli.FileHandler

#
# define the base level and where the file should go
#
handlers = 1catalina.org.apache.juli.FileHandler, 
2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 
4host-manager.org.apache.juli.FileHandler, 
java.util.logging.ConsoleHandler,5cluster.org.apache.juli.FileHandler

#
# now the actual levels - adjust accordingly
#
org.apache.catalina.tribes.MESSAGES.level = INFO
org.apache.catalina.tribes.MESSAGES.handlers = 
5cluster.org.apache.juli.FileHandler

org.apache.catalina.tribes.level = INFO
org.apache.catalina.tribes.handlers = 5cluster.org.apache.juli.FileHandler

org.apache.catalina.ha.level = INFO
org.apache.catalina.ha.handlers = 5cluster.org.apache.juli.FileHander

/mde/


- Original Message 
From: Oscar Segarra Rey osega...@gencat.cat
To: Tomcat Users List users@tomcat.apache.org
Sent: Mon, August 9, 2010 2:44:35 AM
Subject: Cluster Logging

Hi,

I would like to monitor cluster  as it was in tomcat 5.5 with the clause 
doClusterLog in tomcat 6.0.24.

I have added the following lines in logging.properties:

org.apache.catalina.tribes.MESSAGES.level = FINE
org.apache.catalina.tribes.level = FINE
org.apache.catalina.ha.level = FINE

And messages are written into catalina.out file.

I would like to write cluster messages in a cluster.out file but in the 
official 

web I could not find how to.

http://tomcat.apache.org/tomcat-6.0-doc/logging.html

How can I achieve this objective ?

Thanks in advance.

Oscar Segarra Rey
Àrea de tecnologies de la informació i les comunicacions
Departament de la Presidència
C/ Sant Honorat 1-3 - 08002 Barcelona
934024834





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


  


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


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



2 POST requests to underlying Server

2010-08-10 Thread Karthik Nanjangude
Hi

Spec
Java 1.5
O/s : Linux
APP Server:  JBOSS4.2.1 (Tomcat built with)
HTTP Server  :  apache_2.2.11 [ With out SSL ]
Mod library:  mod_jk-1.2.28-httpd-2.2.X.so
LB  1 Apache :  1 JBOSS:Port of application


Question :  Some times We have observed that  on WEB Application  ( click on  
button in jsp )
 Apache is sending 2 POST requests to underlying JBOSS ( Tomcat 
server ).

Note: We even put a Java script filter to disable multiple Clicks for the page,


How we Observed :  Via TCP Thread dump using commandtcpdump -i bond0 -s 
1500 -w / tmp / test.pcap 


Can this configuration worker.node1.socket_timeout=10 got any thing to do 
with this multiple request activity?



with regards
N.S.Karthik




Tomcat starts slow

2010-08-10 Thread Maxim Kuleshov
Hi!

Tomcat on my ubuntu 8.04 (x64) server starts too slow.

I tried both bundled ubuntu version (tomcat 5.5.25) and newer tomcat
6.0.29.
The start time does not depend on application installed - even empty
tomcat distribution starts slow.

I googled that problem is somehow related to random generator - but I
disabled all SSL - and nothing changed.

The most of the time consumes Catalina initialization. It lasts
more than three minutes. The following lines from catalina.out log near
time gap (turned on finest log level)

[catalina.out]

10.08.2010 11:27:00 org.apache.catalina.core.ContainerBase addChildInternal
FINE: Add child StandardHost[localhost] StandardEngine[Catalina]
10.08.2010 11:27:00 org.apache.catalina.connector.Connector initialize
FINE: Creating name for connect
Catalina:type=Connector,port=7080
10.08.2010 11:30:09 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-7080
10.08.2010 11:30:09 org.apache.catalina.connector.Connector initialize
FINE: Creating name for connector Catalina:type=Connector,port=7009
10.08.2010 11:30:09 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 189344 ms


Sending QUIT to java does not produces dump of hanging thread - even
after that soft 'killing' - tomcat continue to start.


Re: 2 POST requests to underlying Server

2010-08-10 Thread André Warnier

Karthik Nanjangude wrote:

Hi

Spec
Java 1.5
O/s : Linux
APP Server:  JBOSS4.2.1 (Tomcat built with)
HTTP Server  :  apache_2.2.11 [ With out SSL ]
Mod library:  mod_jk-1.2.28-httpd-2.2.X.so
LB  1 Apache :  1 JBOSS:Port of application


Question :  Some times We have observed that  on WEB Application  ( click on  
button in jsp )
 Apache is sending 2 POST requests to underlying JBOSS ( Tomcat 
server ).

Note: We even put a Java script filter to disable multiple Clicks for the page,


How we Observed :  Via TCP Thread dump using commandtcpdump -i bond0 -s 1500 -w 
/ tmp / test.pcap 


Can this configuration worker.node1.socket_timeout=10 got any thing to do 
with this multiple request activity?


Unlikely, but :

1) simple test : remove this setting, and see if the issue still appears  (*)
(By removing the setting, you make the timeout infinite)

2) use the mod_jk logging level TRACE, to see exactly what mod_jk is sending to 
Tomcat

3) It is unlikely that any Apache or mod_jk or Tomcat component would repeat a POST 
request, because that kind of violates the HTTP RFC.  So chances are, that the double POST 
request is /still/ coming from the browser.



(*) do you have any particular reason to use this setting, instead of the default ? Or is 
it just something you copied from some blog page ?



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



Re: 64 bit version for linux

2010-08-10 Thread Angelo Chen

Hi Tobias,

I use this:

JAVA_OPTS=$JAVA_OPTS -d64 -Xms512m -Xmx4096m

but can not find -d64 in the command line passed to java, looks like -d64 is
not needed.

in the tomcat manager, it does show JVM memory as:

Free memory: 325.24 MB Total memory: 490.68 MB Max memory: 3640.93 MB

Am I really in the 64bit mode JVM? 

Thanks


Tobias Crefeld-2 wrote:
 
 Am Mon, 9 Aug 2010 04:52:55 -0700 (PDT)
 schrieb Angelo Chen angelochen...@yahoo.com.hk:
 
 
 the standard tomcat(apache-tomcat-6.0.20.tar.gz) is running in a 64
 bit version of Centos. so can my app use memory bigger than 4G? I
 
 Which JVM-version does your Tomcat use? IIRC there are different
 defaults for different versions of CentOS. Maybe 
  yum list installed |grep ^java
 or 
  yum list installed |grep ^jdk
 helps.
  
 I would download last JDK for Linux/x64 at
 http://java.sun.com/javase/downloads/index.jsp, install it and set the
 correct path, for example: JAVA_HOME=/usr/jdk/latest;export JAVA_HOME
 before starting Tomcat.
 
 Maybe defaults of JVM have changed but AFAIK you have to set some
 additional JAVA_OPTS-parameters to use 64bit and more RAM. We are using
 a scriptlet like the following on our larger machines as part of the
 catalina.sh or start-stop-wrapper for catalina.sh:
 
 schnipp
 JAVA_OPTS=$JAVA_OPTS -server
 JAVA_OPTS=$JAVA_OPTS -d64
 # Speicherlimit nur bei Aufruf von run, debug oder start auf 3 GB oder
 mehr hochsetzen
 case $1 in
 start|run|debug)
  # Fuer 32-Bit-Betrieb die naechsten beiden Zeilen auf 3072k aendern
  JAVA_OPTS=$JAVA_OPTS -Xms6000m
  JAVA_OPTS=$JAVA_OPTS -Xmx11000m
 ;;
 stop)
  JAVA_OPTS=$JAVA_OPTS -Xms600m
  JAVA_OPTS=$JAVA_OPTS -Xmx600m
 ;;
 esac
 schnipp
 
 
 
 believe the 2G is the limit for 32 bit version of Linux.
 
 3GB is a possible limit for 32bit.
 
 
 Regards,
  Tobias.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/64-bit-version-for-linux-tp29386189p29396387.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: 2 POST requests to underlying Server

2010-08-10 Thread Karthik Nanjangude

Hi

(*) do you have any particular reason to use this setting, instead of the 
default ? Or is
it just something you copied from some blog page ?


1) I have not copied the same from  any Blog , it is as defined
   configuration  as is from the N/w team

2) Where can I fine the default settings for the same ?


3) As I have already said We have put a Java script filter to disable
   multiple Clicks for dual request from the Browser ( IE 7+ / FF 3+ )





With regards
karthik



-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Tuesday, August 10, 2010 4:10 PM
To: Tomcat Users List
Subject: Re: 2 POST requests to underlying Server

Karthik Nanjangude wrote:
 Hi

 Spec
 Java 1.5
 O/s : Linux
 APP Server:  JBOSS4.2.1 (Tomcat built with)
 HTTP Server  :  apache_2.2.11 [ With out SSL ]
 Mod library:  mod_jk-1.2.28-httpd-2.2.X.so
 LB  1 Apache :  1 JBOSS:Port of application


 Question :  Some times We have observed that  on WEB Application  ( click on  
 button in jsp )
  Apache is sending 2 POST requests to underlying JBOSS ( 
 Tomcat server ).

 Note: We even put a Java script filter to disable multiple Clicks for the 
 page,


 How we Observed :  Via TCP Thread dump using commandtcpdump -i bond0 -s 
 1500 -w / tmp / test.pcap 


 Can this configuration worker.node1.socket_timeout=10 got any thing to do 
 with this multiple request activity?

Unlikely, but :

1) simple test : remove this setting, and see if the issue still appears  (*)
(By removing the setting, you make the timeout infinite)

2) use the mod_jk logging level TRACE, to see exactly what mod_jk is sending to 
Tomcat

3) It is unlikely that any Apache or mod_jk or Tomcat component would repeat a 
POST
request, because that kind of violates the HTTP RFC.  So chances are, that the 
double POST
request is /still/ coming from the browser.


(*) do you have any particular reason to use this setting, instead of the 
default ? Or is
it just something you copied from some blog page ?


-
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 POST requests to underlying Server

2010-08-10 Thread André Warnier

Karthik Nanjangude wrote:

Hi


(*) do you have any particular reason to use this setting, instead of the 
default ? Or is

it just something you copied from some blog page ?


1) I have not copied the same from  any Blog , it is as defined
   configuration  as is from the N/w team

2) Where can I fine the default settings for the same ?


In the on-line documentation, at
http://tomcat.apache.org/connectors-doc/reference/workers.html




3) As I have already said We have put a Java script filter to disable
   multiple Clicks for dual request from the Browser ( IE 7+ / FF 3+ )



Well, maybe it is not working.  Have you really traced the browser - server side to see 
if the duplicate POST request originates there ?


Plus, in your original message, you do not define very clearly what these 2 POST requests 
are.  Are they really the same, from the same client, with the same content ? how close to 
one another do they arrive ?


If it was mod_jk resending the same request after the socket_timeout of 10 s, then the 2 
POST requests should be separated by at least 10 s.  Are they ?


As someone once said : Extraordinary claims require extraordinary proof.

In other words : you seem to claim that Apache or mod_jk or Tomcat duplicates a POST 
request.  This is not the behaviour experienced by the vast majority of Apache + mod_jk + 
Tomcat installations.  So you need data a bit more solid than what you have supplied so 
far, before someone will believe that there is another reason than the user clicking twice.









With regards
karthik



-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Tuesday, August 10, 2010 4:10 PM
To: Tomcat Users List
Subject: Re: 2 POST requests to underlying Server

Karthik Nanjangude wrote:

Hi

Spec
Java 1.5
O/s : Linux
APP Server:  JBOSS4.2.1 (Tomcat built with)
HTTP Server  :  apache_2.2.11 [ With out SSL ]
Mod library:  mod_jk-1.2.28-httpd-2.2.X.so
LB  1 Apache :  1 JBOSS:Port of application


Question :  Some times We have observed that  on WEB Application  ( click on  
button in jsp )
 Apache is sending 2 POST requests to underlying JBOSS ( Tomcat 
server ).

Note: We even put a Java script filter to disable multiple Clicks for the page,


How we Observed :  Via TCP Thread dump using commandtcpdump -i bond0 -s 1500 -w 
/ tmp / test.pcap 


Can this configuration worker.node1.socket_timeout=10 got any thing to do 
with this multiple request activity?


Unlikely, but :

1) simple test : remove this setting, and see if the issue still appears  (*)
(By removing the setting, you make the timeout infinite)

2) use the mod_jk logging level TRACE, to see exactly what mod_jk is sending to 
Tomcat

3) It is unlikely that any Apache or mod_jk or Tomcat component would repeat a 
POST
request, because that kind of violates the HTTP RFC.  So chances are, that the 
double POST
request is /still/ coming from the browser.


(*) do you have any particular reason to use this setting, instead of the 
default ? Or is
it just something you copied from some blog page ?


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


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





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



RE: 2 POST requests to underlying Server

2010-08-10 Thread Karthik Nanjangude
Hi

 Have you really traced the browser - server side to see if the duplicate 
 POST request

As I have already said by using the TCP Thread dump using command
  tcpdump -i bond0 -s 1500 -w / tmp / test.pcap 

We are clearly able to see the IP Address of Apache written 2 times  POST for 
the JBOSS ( Tomcat built in) being called with in 12 seconds apart.

We also made sure there is no traffic /users using the web application during 
the tcp dump taken.


 Are they really the same, from the same client, with the same content

For simple test case we used 1 simple transaction Page  to do the activity
For insertion, but the since 2 request to web server ,we see 2 rows inserted in 
DB

This has happened in spite of blocking multiple button clicks on jsp page using 
jscript filter.


 claim that Apache or mod_jk or Tomcat duplicates a POST

My Observation as per TCP dump command, we clearly see multiple request being 
sent from Apache to web server.




With regards
KArthik



-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Tuesday, August 10, 2010 4:48 PM
To: Tomcat Users List
Subject: Re: 2 POST requests to underlying Server

Karthik Nanjangude wrote:
 Hi

 (*) do you have any particular reason to use this setting, instead of the 
 default ? Or is
 it just something you copied from some blog page ?


 1) I have not copied the same from  any Blog , it is as defined
configuration  as is from the N/w team

 2) Where can I fine the default settings for the same ?

In the on-line documentation, at
http://tomcat.apache.org/connectors-doc/reference/workers.html



 3) As I have already said We have put a Java script filter to disable
multiple Clicks for dual request from the Browser ( IE 7+ / FF 3+ )


Well, maybe it is not working.  Have you really traced the browser - server 
side to see
if the duplicate POST request originates there ?

Plus, in your original message, you do not define very clearly what these 2 
POST requests
are.  Are they really the same, from the same client, with the same content ? 
how close to
one another do they arrive ?

If it was mod_jk resending the same request after the socket_timeout of 10 s, 
then the 2
POST requests should be separated by at least 10 s.  Are they ?

As someone once said : Extraordinary claims require extraordinary proof.

In other words : you seem to claim that Apache or mod_jk or Tomcat duplicates a 
POST
request.  This is not the behaviour experienced by the vast majority of Apache 
+ mod_jk +
Tomcat installations.  So you need data a bit more solid than what you have 
supplied so
far, before someone will believe that there is another reason than the user 
clicking twice.







 With regards
 karthik



 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com]
 Sent: Tuesday, August 10, 2010 4:10 PM
 To: Tomcat Users List
 Subject: Re: 2 POST requests to underlying Server

 Karthik Nanjangude wrote:
 Hi

 Spec
 Java 1.5
 O/s : Linux
 APP Server:  JBOSS4.2.1 (Tomcat built with)
 HTTP Server  :  apache_2.2.11 [ With out SSL ]
 Mod library:  mod_jk-1.2.28-httpd-2.2.X.so
 LB  1 Apache :  1 JBOSS:Port of application


 Question :  Some times We have observed that  on WEB Application  ( click on 
  button in jsp )
  Apache is sending 2 POST requests to underlying JBOSS ( 
 Tomcat server ).

 Note: We even put a Java script filter to disable multiple Clicks for the 
 page,


 How we Observed :  Via TCP Thread dump using commandtcpdump -i bond0 -s 
 1500 -w / tmp / test.pcap 


 Can this configuration worker.node1.socket_timeout=10 got any thing to do 
 with this multiple request activity?

 Unlikely, but :

 1) simple test : remove this setting, and see if the issue still appears  (*)
 (By removing the setting, you make the timeout infinite)

 2) use the mod_jk logging level TRACE, to see exactly what mod_jk is sending 
 to Tomcat

 3) It is unlikely that any Apache or mod_jk or Tomcat component would repeat 
 a POST
 request, because that kind of violates the HTTP RFC.  So chances are, that 
 the double POST
 request is /still/ coming from the browser.


 (*) do you have any particular reason to use this setting, instead of the 
 default ? Or is
 it just something you copied from some blog page ?


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


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




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


-
To unsubscribe, e-mail: 

Re: 2 POST requests to underlying Server

2010-08-10 Thread André Warnier

Karthik Nanjangude wrote:

Hi


Have you really traced the browser - server side to see if the duplicate POST 
request


As I have already said by using the TCP Thread dump using command
  tcpdump -i bond0 -s 1500 -w / tmp / test.pcap 

We are clearly able to see the IP Address of Apache written 2 times  POST for 
the JBOSS ( Tomcat built in) being called with in 12 seconds apart.

We also made sure there is no traffic /users using the web application during 
the tcp dump taken.



Are they really the same, from the same client, with the same content


For simple test case we used 1 simple transaction Page  to do the activity
For insertion, but the since 2 request to web server ,we see 2 rows inserted in 
DB

This has happened in spite of blocking multiple button clicks on jsp page using 
jscript filter.



claim that Apache or mod_jk or Tomcat duplicates a POST


My Observation as per TCP dump command, we clearly see multiple request being 
sent from Apache to web server.



Ok then, suppose that I believe you.
Then look at the following page :
http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html
section : Logging

Use these mod_jk configuration instructions in Apache to set the mod_jk log level to 
debug and retry your test.
Then look at the mod_jk logfile, find the section(s) relevant to the two consecutive POST 
requests, and see if you find a reason why mod_jk would send these two requests.

If it is as a result of an error, there should be error messages.
If you do not see the error, copy the the relevant lines here.
(really paste it, do not add it as attachment. This list generally strips them).



















With regards
KArthik



-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Tuesday, August 10, 2010 4:48 PM
To: Tomcat Users List
Subject: Re: 2 POST requests to underlying Server

Karthik Nanjangude wrote:

Hi


(*) do you have any particular reason to use this setting, instead of the 
default ? Or is

it just something you copied from some blog page ?


1) I have not copied the same from  any Blog , it is as defined
   configuration  as is from the N/w team

2) Where can I fine the default settings for the same ?


In the on-line documentation, at
http://tomcat.apache.org/connectors-doc/reference/workers.html



3) As I have already said We have put a Java script filter to disable
   multiple Clicks for dual request from the Browser ( IE 7+ / FF 3+ )



Well, maybe it is not working.  Have you really traced the browser - server 
side to see
if the duplicate POST request originates there ?

Plus, in your original message, you do not define very clearly what these 2 
POST requests
are.  Are they really the same, from the same client, with the same content ? 
how close to
one another do they arrive ?

If it was mod_jk resending the same request after the socket_timeout of 10 s, 
then the 2
POST requests should be separated by at least 10 s.  Are they ?

As someone once said : Extraordinary claims require extraordinary proof.

In other words : you seem to claim that Apache or mod_jk or Tomcat duplicates a 
POST
request.  This is not the behaviour experienced by the vast majority of Apache 
+ mod_jk +
Tomcat installations.  So you need data a bit more solid than what you have 
supplied so
far, before someone will believe that there is another reason than the user 
clicking twice.







With regards
karthik



-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Tuesday, August 10, 2010 4:10 PM
To: Tomcat Users List
Subject: Re: 2 POST requests to underlying Server

Karthik Nanjangude wrote:

Hi

Spec
Java 1.5
O/s : Linux
APP Server:  JBOSS4.2.1 (Tomcat built with)
HTTP Server  :  apache_2.2.11 [ With out SSL ]
Mod library:  mod_jk-1.2.28-httpd-2.2.X.so
LB  1 Apache :  1 JBOSS:Port of application


Question :  Some times We have observed that  on WEB Application  ( click on  
button in jsp )
 Apache is sending 2 POST requests to underlying JBOSS ( Tomcat 
server ).

Note: We even put a Java script filter to disable multiple Clicks for the page,


How we Observed :  Via TCP Thread dump using commandtcpdump -i bond0 -s 1500 -w 
/ tmp / test.pcap 


Can this configuration worker.node1.socket_timeout=10 got any thing to do 
with this multiple request activity?


Unlikely, but :

1) simple test : remove this setting, and see if the issue still appears  (*)
(By removing the setting, you make the timeout infinite)

2) use the mod_jk logging level TRACE, to see exactly what mod_jk is sending to 
Tomcat

3) It is unlikely that any Apache or mod_jk or Tomcat component would repeat a 
POST
request, because that kind of violates the HTTP RFC.  So chances are, that the 
double POST
request is /still/ coming from the browser.


(*) do you have any particular reason to use this setting, instead of the 
default ? Or is
it just something you copied from some blog page ?



Installing Bugzilla on the Apache Tomcat 6

2010-08-10 Thread Petr Dvořák

Hi folks,
 
I have written a short how-to on installing Bugzilla on Tomcat - I thought I 
could share it with the community, since there is not much written about this 
subject on the Internet (usually, people answer it is not possible):
 
http://blog.inmite.eu/2010/08/installing-bugzilla-on-the-apache-tomcat-6/
 
I will be grateful for any comments and suggestions!
 
With best regards,
 
Petr Dvorak

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



Re: 2 POST requests to underlying Server

2010-08-10 Thread Hassan Schroeder
On Tue, Aug 10, 2010 at 5:16 AM, Karthik Nanjangude
karthik.nanjang...@xius-bcgi.com wrote:

 Have you really traced the browser - server side to see if the duplicate 
 POST request

 As I have already said by using the TCP Thread dump using command
  tcpdump -i bond0 -s 1500 -w / tmp / test.pcap 

 We are clearly able to see the IP Address of Apache written 2 times  POST for 
 the JBOSS ( Tomcat built in) being called with in 12 seconds apart.

So you're looking at the traffic between the httpd and Tomcat -- what about the
traffic on the outside of the httpd?

 We also made sure there is no traffic /users using the web application during 
 the tcp dump taken.

If that were true, you wouldn't have *any* requests. Unless you think
your httpd is simply generating them on its own, in which case I'd be
headed for the door, or dialing the nearest exorcist...

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



Re: Tomcat starts slow

2010-08-10 Thread Maxim Kuleshov


 Tomcat on my ubuntu 8.04 (x64) server starts too slow.



I resolved this problem. I strace'd tomcat's start and figured out it
stucks in 'connect' method to ipv6 loopback (::1). Than I tcpdump'ed
loopback and noticed many connect fails.

The problem was IPv6 policy set to drop and no any additional rules
added, even loopback pass-through (though, IPv4 configured to accept all
lo-lo traffic).

But for some reason tomcat wants IPv6 connection and while time
(retries * timeout) passed - it hangs at start.

And I even don't know - what subsystem use such kind of interconnection
(via IPv6 loopback).


RE: Tomcat 6.0.18/ IIS 6.0 /SSL

2010-08-10 Thread Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00
Significant would mean that I notice how slow the page loads (painfully - 10
to 20 times longer) compared to hitting the web application on 8080.

I had ServletExec AS running on our server and did not experience these
issues. We are required to use Single Sign On when accessing web
applications from our secure web server. Has anyone successfully configured
Tomcat-IIS that is using a secure web server?

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Monday, August 09, 2010 6:30 PM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.18/ IIS 6.0 /SSL

Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00 wrote:
 Chuck,
 I was able to get everything working on my end. There is a 
 *significant* performance decrease when running my application through 
 IIS and Tomcat using the isapi_redirect.dll, as opposed to port 8080.
 
No way to know what you mean by significant, but from the tone of it I guess
you mean humanly perceptible.  In that case, it is not normal.  The
overhead introduced by isapi_redirect itself may be in the order of the
millisecond.

Are you sure that the extra delay is not due to something happening in IIS,
like the user authentication e.g. ?


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



smime.p7s
Description: S/MIME cryptographic signature


RE: 64 bit version for linux

2010-08-10 Thread Caldarale, Charles R
 From: Angelo Chen [mailto:angelochen...@yahoo.com.hk]
 Subject: Re: 64 bit version for linux
 
 JAVA_OPTS=$JAVA_OPTS -d64 -Xms512m -Xmx4096m

Odd; -d64 is not valid on any JVM I have installed.

 Am I really in the 64bit mode JVM?

Look at the somewhat mislabeled OS Architecture cell on the Server Status 
page of the manager webapp.  If it says x86, you're running in 32-bit mode.  
For 64-bit mode, it should say AMD64 or equivalent.

 - 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



RE: 2 POST requests to underlying Server

2010-08-10 Thread Karthik Nanjangude
Hi

 dialing the nearest exorcist...

HAHA Very Funny

Problem exists ,Proof given


 If that were true, you wouldn't have *any* requests.


 For simple test case we used 1 simple transaction Page  to do the
 activity For insertion, but the since 2 request to web server ,we see
 2 rows inserted in DB

Please  see this part for the simulation caused




With regards
karthik


-Original Message-
From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com]
Sent: Tuesday, August 10, 2010 6:17 PM
To: Tomcat Users List
Subject: Re: 2 POST requests to underlying Server

On Tue, Aug 10, 2010 at 5:16 AM, Karthik Nanjangude
karthik.nanjang...@xius-bcgi.com wrote:

 Have you really traced the browser - server side to see if the duplicate 
 POST request

 As I have already said by using the TCP Thread dump using command
  tcpdump -i bond0 -s 1500 -w / tmp / test.pcap 

 We are clearly able to see the IP Address of Apache written 2 times  POST for 
 the JBOSS ( Tomcat built in) being called with in 12 seconds apart.

So you're looking at the traffic between the httpd and Tomcat -- what about the
traffic on the outside of the httpd?

 We also made sure there is no traffic /users using the web application during 
 the tcp dump taken.

If that were true, you wouldn't have *any* requests. Unless you think
your httpd is simply generating them on its own, in which case I'd be
headed for the door, or dialing the nearest exorcist...

--
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
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 POST requests to underlying Server

2010-08-10 Thread Hassan Schroeder
On Tue, Aug 10, 2010 at 6:08 AM, Karthik Nanjangude
karthik.nanjang...@xius-bcgi.com wrote:

 Problem exists ,Proof given

Sorry, if you're not monitoring all parts of the request path, you've
proved nothing.

 If that were true, you wouldn't have *any* requests.

  For simple test case we used 1 simple transaction Page

Why not use something with demonstrably fewer moving parts, like
`wget`?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



Tomcat 7 authentication error only with IE8 or IE7

2010-08-10 Thread Eli Chernos
Hi all,

I have migrated a Tom Cat 6.0.14 server running on Windows 2003 server to a
Windows 2008 server running Tom Cat 7.0.0.
Every thing is running great except for when I try to access a restricted
folder(password protected) configured with (POST method).
When I try to access a restricted folder the login page is displayed like it
should and when I enter the correct user name and password I'm forwarded to
the requested page.

The issue is that once I do this with ie8 or ie7 I receive a:

HTTP Status 408 - The time allowed for the login process has been exceeded.
If you wish to continue you must either click back twice and re-click the
link you requested or close and re-open your browser


and on the address bar the /j_security_check is displayed after the
requested URL.

I should note that it's definitely not a timeout issue, the setting is
default (30) I believe.
I copied the tomcat-users.xml and web.xml exactly as they where on the old
machine, in addition when I try to access the same page with FireFox or
Chrome or any other browser there is no problem at all

The only clue I was able to find was in the logs, saying:

Line 86: INFO: WARNING: Security role name * used in an
auth-constraint without being defined in a security-role



Any ideas guys?
Any help would be really appreciated as I have no clue what might be the
cause of this .

-- 
Thanks  Regards
Eli C


Re: Tomcat starts slow

2010-08-10 Thread Tobias Crefeld
Am Tue, 10 Aug 2010 16:58:45 +0400
schrieb Maxim Kuleshov maxim.kules...@gmail.com:

 But for some reason tomcat wants IPv6 connection and while time
 (retries * timeout) passed - it hangs at start.
 
 And I even don't know - what subsystem use such kind of
 interconnection (via IPv6 loopback).

Just an idea: Tomcat is trying to establish a listener at
localhost:8005 for shutdown-requests during start. 

AFAIK you can change the port number but not the host address. Maybe
you have an /etc/hosts- or a DNS-entry that translates localhost to an
IPv6-address. 


Regards,
 Tobias.

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



Re: Tomcat 7 authentication error only with IE8 or IE7

2010-08-10 Thread Konstantin Kolinko
2010/8/10 Eli Chernos e...@treepodia.com:
 Hi all,

 I have migrated a Tom Cat 6.0.14 server running on Windows 2003 server to a
 Windows 2008 server running Tom Cat 7.0.0.
 Every thing is running great except for when I try to access a restricted
 folder(password protected) configured with (POST method).
 When I try to access a restricted folder the login page is displayed like it
 should and when I enter the correct user name and password I'm forwarded to
 the requested page.

 The issue is that once I do this with ie8 or ie7 I receive a:

 HTTP Status 408 - The time allowed for the login process has been exceeded.
 If you wish to continue you must either click back twice and re-click the
 link you requested or close and re-open your browser


 and on the address bar the /j_security_check is displayed after the
 requested URL.

 I should note that it's definitely not a timeout issue, the setting is
 default (30) I believe.
 I copied the tomcat-users.xml and web.xml exactly as they where on the old
 machine, in addition when I try to access the same page with FireFox or
 Chrome or any other browser there is no problem at all

 The only clue I was able to find was in the logs, saying:

 Line 86: INFO: WARNING: Security role name * used in an
 auth-constraint without being defined in a security-role

 Any ideas guys?
 Any help would be really appreciated as I have no clue what might be the
 cause of this .

 --
 Thanks  Regards
 Eli C


No clue as well yet either, though

1. You may try with 7.0.2.

See [VOTE] Release Apache Tomcat 7.0.2 thread on dev@ for a download link.

There was a bug with handling of a session cookie (49598) that is
already fixed. I think that it can cause such behaviour.


2. The product name is Tomcat or Apache Tomcat.

Please spell it properly.
http://tomcat.apache.org/legal.html

3. The HTTP Status 408 page is displayed by Tomcat? Is Tomcat
running standalone, or behind another web server?

4.
 Line 86: INFO: WARNING: Security role name * used in an
 auth-constraint without being defined in a security-role

You can fix the mentioned error, don't you?


Best regards,
Konstantin Kolinko

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



RE: Cluster Logging

2010-08-10 Thread Petrov, Petar
Hi, 

You can set the log level to OFF.

Regards,
Petar

-Original Message-
From: Oscar Segarra Rey [mailto:osega...@gencat.cat] 
Sent: Tuesday, August 10, 2010 9:39 AM
To: Tomcat Users List
Subject: RE: Cluster Logging

Hi, 

Another question related to this issue... is there any level known as NONE (or 
something similar)  in order to disable cluster logging ?

Thanks a lot.

Oscar Segarra Rey
Àrea de tecnologies de la informació i les comunicacions
Departament de la Presidència
C/ Sant Honorat 1-3 - 08002 Barcelona
934024834


-Mensaje original-
De: Mark Eggers [mailto:its_toas...@yahoo.com] 
Enviado el: dilluns, 9 / agost / 2010 19:39
Para: Tomcat Users List
Asunto: Re: Cluster Logging

Let me try that again since my copy/paste failed.

#
# add an extra handler to direct to a different file
#
handlers = 1catalina.org.apache.juli.FileHandler, \
2localhost.org.apache.juli.FileHandler, \
3manager.org.apache.juli.FileHandler, \
4host-manager.org.apache.juli.FileHandler, \
java.util.logging.ConsoleHandler, \
5cluster.org.apache.juli.FileHandler

#
# define the base level and where the file should go
#
handlers = 1catalina.org.apache.juli.FileHandler, 
2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 
4host-manager.org.apache.juli.FileHandler, 
java.util.logging.ConsoleHandler,5cluster.org.apache.juli.FileHandler

#
# now the actual levels - adjust accordingly
#
org.apache.catalina.tribes.MESSAGES.level = INFO
org.apache.catalina.tribes.MESSAGES.handlers = 
5cluster.org.apache.juli.FileHandler

org.apache.catalina.tribes.level = INFO
org.apache.catalina.tribes.handlers = 5cluster.org.apache.juli.FileHandler

org.apache.catalina.ha.level = INFO
org.apache.catalina.ha.handlers = 5cluster.org.apache.juli.FileHander

/mde/


- Original Message 
From: Oscar Segarra Rey osega...@gencat.cat
To: Tomcat Users List users@tomcat.apache.org
Sent: Mon, August 9, 2010 2:44:35 AM
Subject: Cluster Logging

Hi,

I would like to monitor cluster  as it was in tomcat 5.5 with the clause 
doClusterLog in tomcat 6.0.24.

I have added the following lines in logging.properties:

org.apache.catalina.tribes.MESSAGES.level = FINE
org.apache.catalina.tribes.level = FINE
org.apache.catalina.ha.level = FINE

And messages are written into catalina.out file.

I would like to write cluster messages in a cluster.out file but in the 
official 

web I could not find how to.

http://tomcat.apache.org/tomcat-6.0-doc/logging.html

How can I achieve this objective ?

Thanks in advance.

Oscar Segarra Rey
Àrea de tecnologies de la informació i les comunicacions
Departament de la Presidència
C/ Sant Honorat 1-3 - 08002 Barcelona
934024834





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


  


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


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


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



Re: 64 bit version for linux

2010-08-10 Thread Tobias Crefeld
Am Tue, 10 Aug 2010 08:07:06 -0500
schrieb Caldarale, Charles R chuck.caldar...@unisys.com:

  JAVA_OPTS=$JAVA_OPTS -d64 -Xms512m -Xmx4096m  
 
 Odd; -d64 is not valid on any JVM I have installed.


Interesting! I never tested leaving out this parameter on a 64bit-JVM
under Linux but after a short test it looks as if we don't need -d64 on
JVM/Linux.


We ran Tomcat on JVM/Solaris in the past and had to use it there.
( http://download.oracle.com/javase/6/docs/technotes/tools/solaris/java.html )
During migration to JVM/Linux we simply took over most Java-Options.
Only on some old systems (with Linux on Sparc) we had to leave out the
-d64 because there is no 64-bit-version of Sun-JDK for this platform
- only 32bit-OpenJDK.

Thanks for the hint!


Regards,
 Tobias.

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



Re: 2 POST requests to underlying Server

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

Karthik,

On 8/10/2010 9:08 AM, Karthik Nanjangude wrote:
 Problem exists ,Proof given

No: Problem is observed, very little in the way of proof has been given.

You've made assertions about the circumstances and observed results.

You have actually provided no data at all. Instead, you've merely stated
that you've read the logs and they prove something is wrong.

Since apparently nobody believes that you are interpreting the logs
correctly, why not simply post the logs themselves. You'll need to
provide the following:

1. An httpd log file showing the incoming request(s) from the client/browser

2. A mod_jk log file showing the communication between httpd and Tomcat

3. A tcpdump log file, if you really wish to include it

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

iEYEARECAAYFAkxhfnMACgkQ9CaO5/Lv0PAXKACfZMSU3dhcRaJYD66BSXsodw3Q
jGEAoI/M+o22p2m76vk+jZb+B4VMeTvE
=AHZ2
-END PGP SIGNATURE-

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



Re: Installing Bugzilla on the Apache Tomcat 6

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

Petr,

On 8/10/2010 8:46 AM, Petr Dvořák wrote:
 I have written a short how-to on installing Bugzilla on Tomcat - I thought I 
 could share it with the community, since there is not much written about this 
 subject on the Internet (usually, people answer it is not possible):
  
 http://blog.inmite.eu/2010/08/installing-bugzilla-on-the-apache-tomcat-6/
  
 I will be grateful for any comments and suggestions!

I have a few:


Note: To make the steps educative, we will start with fresh Apache
Tomcat installation installed in folder in our home. For production
deployment, this is not recommended – you should install and set up
Tomcat properly.


Why not simply tell your readers how to set it up properly? You don't
indicate what parts of your setup are not proper.


$ echo   WEB-INF/web.xml


That's weird. Why not just tell the reader to create WEB-INF/web.xml and
put the following text into it?


   welcome-fileindex.jsp/welcome-file
   welcome-fileindex.html/welcome-file


I don't think you need these, do you?


Finally, the ~/demo/apache-tomcat/conf/context.xml file needs to be
modified so that is contains

Context reloadable=“true“ privileged=“true“ instead of just Context.


This is a bad idea: have the user modify the context.xml file for the
Bugzilla wrapper webapp, instead of editing the site-wide context
defaults (i.e. use META-INF/context.xml instead).

Everything else is bugzilla-specific, so I don't comment.

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

iEYEARECAAYFAkxhf+4ACgkQ9CaO5/Lv0PDwfgCeNpt9oTNK3RmszY6UaY9DGq/4
vEIAnit7Q7gVO0144eeZ6Lk4fX4Q3d3r
=H2Ty
-END PGP SIGNATURE-

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



Re: Tomcat starts slow

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

Maxim,

On 8/10/2010 8:58 AM, Maxim Kuleshov wrote:
 Tomcat on my ubuntu 8.04 (x64) server starts too slow.

 I resolved this problem. I strace'd tomcat's start and figured out it
 stucks in 'connect' method to ipv6 loopback (::1). Than I tcpdump'ed
 loopback and noticed many connect fails.

It could be that Tomcat is attempting to resolve the SYSTEM URL for
certain XML files it uses to configure itself. Could you re-enable the
DROP and take a thread dump during the long wait? That will help
nail-down the problem. Perhaps Tomcat can be modified so that it does
not perform this look-up.

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

iEYEARECAAYFAkxhgJoACgkQ9CaO5/Lv0PDzTQCgpjjK7H1jXJ44PGn5y/NyGjN3
rMoAnA8dMC4j5J4V9ENqP7YbEbH+uAW5
=izOO
-END PGP SIGNATURE-

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



Re: [OT] Tomcat unexpectedly shuts down

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

André,

On 8/9/2010 6:20 PM, André Warnier wrote:
 I must say that your 3000 MB of Heap kind of makes my head spin.  What
 kind of application are you running that you would think you need as much ?

Are you saying that ___ of memory ought to be enough for anyone? ;)

Obviously, /someone/ must need that kind of memory sometimes, otherwise
there would be no reason to have machines that can have that amount of
memory.

Seriously, though, there are a lot of reasons you might want to have a
relatively large heap for a webapp:

1. Session data can really pile up, especially if you have a /lot/ of
   concurren users or large amounts of session data (or both). 3000
   simultaneous users (not requests) isn't that crazy. If they all have
   1MiB of session data... there you go. Obviously, you can squeeze the
   balloon at either end and the other side grows.

2. Caches. This may be something that is often not considered for a Perl
   hacker such as yourself, where webapps tend to be scripts that run
   once and then terminate. Since the servlet context is always
   available and is (relatively) persistent, the opportunity for caching
   is quite high. If you can cache static data in the application
   instead of, say, reading from the database every time, you can
   improve performance dramatically.

   Even user-data caches can help quite a bit, whether they go into
   the session (see above) or the application scope.

3. Per-request data requirements might be high. For instance, if XML
   documents (notorious memory killers) must be parsed in totum
   (say, using a DOM parser or the like, rather than streaming, such
   as with a SAX parser) during the request, the amount of memory
   needed at any particular moment might be quite large, even though
   the memory might be freed immediately after the request has been
   processed. Since one never wants to suffer an OOME, you need to
   plan for peak service: that is, all 3000 of your users requesting
   an XML document operation all at once.

I'm sure there are other reasons, but those were the ones that
immediately came to my mind.

In our primary production application, we were running with a 64MiB
fixed-size heap for about 5 years. One day, we got an OOME and I freaked
out. Subsequent analysis showed that we simply needed a bigger heap to
support the growing number of users we were serving (always a positive
thing!). We grew to 192MiB, just in case ;)

The point is that some webapps, or some webapps in some environments,
just need massive amounts of heap space. The data's got to live
somewhere, right?

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

iEYEARECAAYFAkxhg0MACgkQ9CaO5/Lv0PAjzQCgh9+v/0bgJZsIIjl39xEFZWO5
c08AoIqw4icImUllbstvEMMExDQOk8gL
=hx4b
-END PGP SIGNATURE-

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



Re: Installing Bugzilla on the Apache Tomcat 6

2010-08-10 Thread Petr Dvořák

Hi Chris,

thank you for the feedback - I appreciate it! Seriously, I believe I am the 
first person on the Internet to write some consistent post (maybe you'll prove 
me wrong), so it's better be perfect! ;-)

To make one thing clear - the post was based on the large script I prepare for 
my master thesis (automatic deployment of the lightweight project hosting). 
This is the reason why some parts contain weird things (empty echo - there 
used to be output to the file, .html/.jsp welcome files - I need them in my 
situation).

While I understand the first note is a bit strange, I didn't want to include 
steps How to install tomcat. The improper thing is installing the server in 
the demo dir in the home dir and not paying any attention to any 
configuration. Anyway, I assume users already have the Tomcat installation (if 
not, they should definitely use classic Apache server for BZ), so I will fix 
the post in this direction and I will use $CATALINA_HOME to reference Tomcat 
location in the text.

About the context.xml file - yep, you are right, I will fix it...

WIth best regards,

Petr Dvorak

__
 Od: Christopher Schultz ch...@christopherschultz.net
 Komu: Tomcat Users List users@tomcat.apache.org
 Datum: 10.08.2010 18:36
 Předmět: Re: Installing Bugzilla on the Apache Tomcat 6

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Petr,

On 8/10/2010 8:46 AM, Petr Dvořák wrote:
 I have written a short how-to on installing Bugzilla on Tomcat - I thought I 
 could share it with the community, since there is not much written about 
 this subject on the Internet (usually, people answer it is not possible):
  
 http://blog.inmite.eu/2010/08/installing-bugzilla-on-the-apache-tomcat-6/
  
 I will be grateful for any comments and suggestions!

I have a few:


Note: To make the steps educative, we will start with fresh Apache
Tomcat installation installed in folder in our home. For production
deployment, this is not recommended – you should install and set up
Tomcat properly.


Why not simply tell your readers how to set it up properly? You don't
indicate what parts of your setup are not proper.


$ echo   WEB-INF/web.xml


That's weird. Why not just tell the reader to create WEB-INF/web.xml and
put the following text into it?


   welcome-fileindex.jsp/welcome-file
   welcome-fileindex.html/welcome-file


I don't think you need these, do you?


Finally, the ~/demo/apache-tomcat/conf/context.xml file needs to be
modified so that is contains

Context reloadable=“true“ privileged=“true“ instead of just Context.


This is a bad idea: have the user modify the context.xml file for the
Bugzilla wrapper webapp, instead of editing the site-wide context
defaults (i.e. use META-INF/context.xml instead).

Everything else is bugzilla-specific, so I don't comment.

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

iEYEARECAAYFAkxhf+4ACgkQ9CaO5/Lv0PDwfgCeNpt9oTNK3RmszY6UaY9DGq/4
vEIAnit7Q7gVO0144eeZ6Lk4fX4Q3d3r
=H2Ty
-END PGP SIGNATURE-

-
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



Anyone using Tomcat 6 Comet with Apache mod_proxy?

2010-08-10 Thread Nabble User
I have a CometProcessor servlet similar to the one in the sample here:
http://tomcat.apache.org/tomcat-6.0-doc/aio.html#Example_code

One difference is that we close the writer after sending the message in the
MessageSender thread.  It all works fine hitting Tomcat directly.  However,
I'd like to proxy the requests through Apache (for various reasons).  So, I
setup a ProxyPass like this:

ProxyPass /comet http://localhost:8081/CometApp/
ProxyPassReverse /comet http://localhost:8081/CometApp/

This seems to work sometimes but other times I get a 502 response and see
the following in the Apache log:

[Tue Aug 10 16:00:45 2010] [error] [client xx.xx.xx.xx] (104)Connection
reset by peer: proxy: error reading status line from remote server localhost
[Tue Aug 10 16:00:45 2010] [error] [client xx.xx.xx.xx] proxy: Error reading
from remote server returned by /comet/wait

On my local Windows box I added the following line to the apache config to
diable keepalives and the problem went away in that environment:
SetEnv proxy-nokeepalive 1

I figured this was an OK workaround until I have time to come back and
figure out the real issue.


I just released the app to a Centos 5.4 server and started seeing the 502s
again.  So, I disabled keepalives in the apache config there as well.
However, in that environment with the keepalives disabled, the response to
the client is not closed until the Comet Request timeout is exceeded (30
seconds).  So, that hack won't fly (even temporarily).

Now I am back to trying to figure out why this fails with keepalives on.  It
seems like on some requests Apache thinks the connection is still valid but
Tomcat thinks otherwise.  On Centos I can easily duplicate but hitting the
url 8 times.  One the 9th time I get the 502.  I will then get 8 x 502
responses then 8 good responses and so on.  I can see 8 connections open
(netstat) after the first 8 hits and I I get the 502s I see the connections
terminated one by one.

I tried messing with various timeouts, etc to no avail.

I also notice that if I do something like the following in the servlet
(instead of queuing up the connections and sending a result later) I can hit
the url all day long with no problem:

if (event.getEventType() == CometEvent.EventType.BEGIN) {

PrintWriter writer = response.getWriter();
writer.println(!doctype html public \-//w3c//dtd html 4.0
transitional//en\);
writer.println(headtitleJSP Chat/title/headbody
bgcolor=\#FF\);
writer.println(Message Sent: + sentCount);
writer.flush();

event.close();
}

So, it seems to only be an issue when sending the message and closing the
response writer from the queue connections.


Here are the Centos 5.4 environment details:

Apache 2.2.3
Tomcat 6.0.26
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

Anyone have any ideas what might be going on here?  Anyone have a
configuration like this actually working?

Thanks in advance!


Configuring Tomcat 6.0.28 with SSL

2010-08-10 Thread Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00
 
I am abandoning the IIS/isapi_redirect.dll method of authenticating via SSL
into our web application due to the authentication process taking a while,
causing the web app to run abnormally slow.

I am wanting to use our server certificate (PKCS12) as the keystore. I've
been doing a lot of research and it seems that I need to import the root
certificates into the keystore using OpenSSL. What I am not too clear on is
how to edit the server.xml file to accommodate these configurations. Here is
what I have thus far, however, SSL does not seem to be working.

Copied from Notepad:

!-- Define a SSL HTTP/1.1 Connector on port 8443
 This connector uses the JSSE configuration, when using APR, the 
 connector should be using the OpenSSL style configuration
 described in the APR documentation --

Connector port=443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   keystoreFile=C:\Program Files\Apache Software
Foundation\Tomcat 6.0\con\geo.pfx
keystorePass=password keystoreType=pkcs12
   clientAuth=false sslProtocol=TLS /







smime.p7s
Description: S/MIME cryptographic signature


Re: Configuring Tomcat 6.0.28 with SSL

2010-08-10 Thread Jorge Medina
There are two ways to add SSL support to Tomcat

a) Pure java support
b) Using OpenSSL through the APR library

For (b) you need to compile (or use a distribution with) the Tomcat
Native Library.

Configuring SSL using (a) is different than when using (b).

You may now if your server is running the APR by looking at the logs,
at startup you may find a line similar to:

INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:

After you have determined if you have the APR, look at how to configure SSL at
http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

-Jorge


On Tue, Aug 10, 2010 at 3:41 PM, Hansel, Jason T CTR
SPAWARSYSCEN-ATLANTIC, 55E00 jason.t.hansel@navy.mil wrote:

 I am abandoning the IIS/isapi_redirect.dll method of authenticating via SSL
 into our web application due to the authentication process taking a while,
 causing the web app to run abnormally slow.

 I am wanting to use our server certificate (PKCS12) as the keystore. I've
 been doing a lot of research and it seems that I need to import the root
 certificates into the keystore using OpenSSL. What I am not too clear on is
 how to edit the server.xml file to accommodate these configurations. Here is
 what I have thus far, however, SSL does not seem to be working.

 Copied from Notepad:

 !-- Define a SSL HTTP/1.1 Connector on port 8443
 This connector uses the JSSE configuration, when using APR, the
 connector should be using the OpenSSL style configuration
 described in the APR documentation --

Connector port=443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   keystoreFile=C:\Program Files\Apache Software
 Foundation\Tomcat 6.0\con\geo.pfx
 keystorePass=password keystoreType=pkcs12
   clientAuth=false sslProtocol=TLS /







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



Re: Configuring Tomcat 6.0.28 with SSL

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

Jason,

On 8/10/2010 3:41 PM, Hansel, Jason T CTR SPAWARSYSCEN-ATLANTIC, 55E00
wrote:
 I am abandoning the IIS/isapi_redirect.dll method of authenticating via SSL
 into our web application due to the authentication process taking a while,
 causing the web app to run abnormally slow.
 
 I am wanting to use our server certificate (PKCS12) as the keystore. I've
 been doing a lot of research and it seems that I need to import the root
 certificates into the keystore using OpenSSL. What I am not too clear on is
 how to edit the server.xml file to accommodate these configurations. Here is
 what I have thus far, however, SSL does not seem to be working.
 
 Copied from Notepad:
 
 !-- Define a SSL HTTP/1.1 Connector on port 8443
  This connector uses the JSSE configuration, when using APR, the 
  connector should be using the OpenSSL style configuration
  described in the APR documentation --
 
 Connector port=443 protocol=HTTP/1.1 SSLEnabled=true
maxThreads=150 scheme=https secure=true
keystoreFile=C:\Program Files\Apache Software
 Foundation\Tomcat 6.0\con\geo.pfx
 keystorePass=password keystoreType=pkcs12
clientAuth=false sslProtocol=TLS /

Wait, are you trying to do CLIENT-CERT authentication?

If so, you'll want to do clientAuth=want (if you want a cert, but
don't want to fail otherwise, which I think is usually what one wants to
do) and set the truststore* attributes on the Connector.

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

iEYEARECAAYFAkxhvGQACgkQ9CaO5/Lv0PA7xQCdGdGEwXko++Jm0t8/lJR1eAQb
el0An3FjqgDbTP54DX3oSX9wscDMaqLk
=jLqM
-END PGP SIGNATURE-

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



Re: 2 separate clusters, crosstalk?

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


On 8/6/2010 12:35 PM, cnnfntop wrote:
 Below are the configs, one from one of the prod servers, the other from one 
 of 
 the stage servers (note that the member/receiver settings are correct for 
 each 
 pair in each cluster, they reference each other correctly)

 PROD SETUP (stage below)
 ---

 Membership className=org.apache.catalina.cluster.mcast.McastService
 mcastAddr=228.0.0.9
 mcastPort=45564

 ...

 Receiver address=10.xx.xx.me

 ...
 Member
 className=org.apache.catalina.tribes.membership.StaticMember
 port=4000 securePort=-1
 host=10.xx.xx.othernode  domain=PROD-domain
 uniqueId={0,0,0,0,0,0,0,0,0,191} /

...

 [STAGING] SETUP
 
 Membership className=org.apache.catalina.cluster.mcast.McastService
   mcastAddr=228.0.0.10
   mcastPort=45564

 ...

 Receiver address=10.xx.xx.211

 ...

 Member
 className=org.apache.catalina.tribes.membership.StaticMember
 port=4000 securePort=-1
 host=10.xx.xx.212 domain=lfstg-domain
 uniqueId={0,0,0,0,0,0,0,0,0,99} /

- From a quick glance at these settings, they all seem reasonable. I'm not
expert on Tomcat clustering, though. If you don't hear anything for a
day or two, try bumping the topic to see if someone else can comment.

You don't have any weird multicast configuration on the NIC do you? Are
you sure that all your network infrastructure is capable of doing
multicast in the way you expect? It's possible that you have a stupid
router or switch that just broadcasts multicast messages instead of
properly sending them.

 Prod/stage report this in the their logs as members come up (across both 
 prod/stage, hence evidence of crosstalk)
 
 Aug 6, 2010 4:02:26 PM org.apache.catalina.ha.tcp.SimpleTcpCluster memberAdded
 INFO: Replication member 
 added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 6, -94, 
 -45}:4000,{10, 6, -94, -45},4000, alive=1018,id={-98 14 -16 65 -45 -70 77 
 -112 
 -91 -67 124 -106 -44 99 -46 122 }, payload={}, command={}, domain={}, ]

I'm not sure what the above is supposed to prove... neither the IP
addresses nor the id from that log message matches what you have in
your staging configuration. How do you know there's crosstalk?

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

iEYEARECAAYFAkxhvwcACgkQ9CaO5/Lv0PASvwCgpMvOWcNs8P0xskho//QJQYY/
i8kAoJwRVq2NPAlwzjEQwB4LWYuWejyH
=R8wq
-END PGP SIGNATURE-

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



Re: 2 POST requests to underlying Server

2010-08-10 Thread Ðavîd Låndïs
3) As I have already said We have put a Java script filter to disable
  multiple Clicks for dual request from the Browser ( IE 7+ / FF 3+ )

I had a similar issue once due to jQuery. If you attach the same click
listener twice to the same button, it'll submit 2 POST's or GET's for
one mouse click (in the latest version of jQuery). There may be other
ways to accomplish that as well with other libraries, etc -- the point
is your JavaScript filter to disable multiple Clicks may not be as
fool proof as you think.

On Tue, Aug 10, 2010 at 12:29 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Karthik,

 On 8/10/2010 9:08 AM, Karthik Nanjangude wrote:
 Problem exists ,Proof given

 No: Problem is observed, very little in the way of proof has been given.

 You've made assertions about the circumstances and observed results.

 You have actually provided no data at all. Instead, you've merely stated
 that you've read the logs and they prove something is wrong.

 Since apparently nobody believes that you are interpreting the logs
 correctly, why not simply post the logs themselves. You'll need to
 provide the following:

 1. An httpd log file showing the incoming request(s) from the client/browser

 2. A mod_jk log file showing the communication between httpd and Tomcat

 3. A tcpdump log file, if you really wish to include it

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

 iEYEARECAAYFAkxhfnMACgkQ9CaO5/Lv0PAXKACfZMSU3dhcRaJYD66BSXsodw3Q
 jGEAoI/M+o22p2m76vk+jZb+B4VMeTvE
 =AHZ2
 -END PGP SIGNATURE-

 -
 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: [OT] Tomcat unexpectedly shuts down

2010-08-10 Thread André Warnier

Christopher,

I have no fundamental contest with anything you say below (except one, see in 
text).
It is just that 3000 MB is *a lot* of bytes (3,145,728,000 of them).
It is, for example, the number of letters contained in 3,000 books, each of 500 
pages.
So even if you had 3,000 users, it would mean that the session data of each user would be 
about 1,000,000 bytes (as you indicate yourself below). Which means that each time one of 
 these users hits the system, Tomcat would need to read and load 1 MB of data just to 
retrieve this user's previous session data, without even having done anything yet for this 
user and his present request.  One may wonder how fast this server is expected to be, if 
it handles 3,000 user sessions simultaneously ?


So let's say that I am just curious as to what the application is.

Where I do object :

Christopher Schultz wrote:
...


2. Caches. This may be something that is often not considered for a Perl
   hacker such as yourself, where webapps tend to be scripts that run
   once and then terminate. 


Wrong.  I am also a mod_perl hacker. In a mod_perl environment, scripts (or handlers) do 
not terminate, and memory is not recycled (this is even an inconvenient of mod_perl, and 
something to watch when designing mod_perl applications).


So I am not objecting to using 3000 MB of Heap, I am just curious.
If someone like Eric Robinson can run a non-trivial multi-user Tomcat application with an 
average 64 MB of Heap and you can do pretty much the same, then I am curious as to which 
Tomcat application (or situation) may require 3,000 MB of Heap, which is 50 times more.


A secondary motive for my question to the OP, was to find out whether this size was really 
the result of a rational calculation (or experience), or just some number plucked out of 
the air.
RAM prices are fickle, but let's say that for server-quality RAM, one currently pays 25 
US$ per GB.

And we do not know who the OP works for, but say he is talking about 1,000 
Tomcat servers.
Saving 1 GB of Heap to run his applications would thus mean saving 25,000 US$.
I believe it is worth asking the question.


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



Re: 2 POST requests to underlying Server

2010-08-10 Thread André Warnier

Ðavîd Låndïs wrote:

3) As I have already said We have put a Java script filter to disable
  multiple Clicks for dual request from the Browser ( IE 7+ / FF 3+ )

I had a similar issue once due to jQuery. If you attach the same click
listener twice to the same button, it'll submit 2 POST's or GET's for
one mouse click (in the latest version of jQuery). There may be other
ways to accomplish that as well with other libraries, etc -- the point
is your JavaScript filter to disable multiple Clicks may not be as
fool proof as you think.


...
which is basically what everyone is trying to tell Karthik, but he does not seem to want 
to hear.


So, Karthik :

a) you have NOT proven yet that the 2 POST requests do not come from the browser
b) in 100,000+ installations out there on the Internet, Apache + mod_jk dor NOT generate 
duplicate POST requests. (If they did, you can be sure that we would have heard about it 
by now).

c) Only YOU think that your Apache + mod_jk generate duplicate POST requests

So, prove that to us, by providing real data showing it, and then we will try to help you 
solve the problem.



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



Re: [OT] Tomcat unexpectedly shuts down

2010-08-10 Thread David Fisher
Hi Andre,

 So I am not objecting to using 3000 MB of Heap, I am just curious.
 If someone like Eric Robinson can run a non-trivial multi-user Tomcat 
 application with an average 64 MB of Heap and you can do pretty much the 
 same, then I am curious as to which Tomcat application (or situation) may 
 require 3,000 MB of Heap, which is 50 times more.

I will give you an example of two reasons for a large heap -

(1) You host a large data set that you treat as a global in memory database 
achieving lighting quick sorts and filters across any column. This consumes a 
large amount of memory for the life of the JVM. Daily refreshes require double 
space in transition. The size of the heap will limit the size of the data set.

(2) You need to produce large Excel spreadsheets or Powerpoint decks using 
Apache POI. Due to the binary nature of the file formats everything is 
constructed in memory and the memory footprint of the Java objects is much 
larger. The XML versions don't give you any relief as they are Zip files. This 
means you need large amounts of space for short periods of time. Again more 
memory means the more head room you have for these requests. You have to know 
your app well to know if you have enough room for the very occasional large 
request. If that can be too big then you will need to build an execution queue 
of some type behind your web app.

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



Re: [OT] Tomcat unexpectedly shuts down

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

André,

On 8/10/2010 5:31 PM, André Warnier wrote:
 It is just that 3000 MB is *a lot* of bytes (3,145,728,000 of them).

Yup. 3000MiB is even bigger (3,221,225,472 of them), and what you'll get
from the JVM. (See below)

 Which means that each time one of  these users hits the system, 
 Tomcat would need to read and load 1 MB of data just to retrieve
 this user's previous session data, without even having done anything
 yet for this user and his present request.

Maybe, but maybe not: the Java heap is usually entirely in memory, so
in-memory session data is very quickly accessed (or ignored, depending
on how the request is handled). There is no penalty for loading this
session data in this case. Unless otherwise configured, all session data
stays in-memory during the lifetime of the context. This isn't like PHP
(or Perl?) where the sessions are serialized every time a request
completes and de-serialized when a request begins (and the session data
must be fetched).

In the case where the session data is stored on disk or in a database,
the penalty for accessing data is highly dependent upon the strategy for
storage and retrieval: if the entire session must be fetched from
storage unconditionally, then yes, it is a giant waste of time if that
data is not used every time. Heck, it's a giant waste of time no matter
what. On the other hand, if session attributes are stored and accessed
individually, one may be able to get away with little to no overhead for
session attributes that one actually uses (and no overhead if the
session is not used).

 One may wonder how fast this server is expected to be, if it handles
 3,000 user sessions simultaneously ?

3000 sessions isn't really that crazy when you think about it. 3000
simultaneous requests might be a bit heavy on a single, modest server.

 So let's say that I am just curious as to what the application is.

Agreed.

 Where I do object :
 
 Christopher Schultz wrote: ...
 
 2. Caches. This may be something that is often not considered for a
 Perl hacker such as yourself, where webapps tend to be scripts that
 run once and then terminate.
 
 Wrong.  I am also a mod_perl hacker. In a mod_perl environment,
 scripts (or handlers) do not terminate, and memory is not recycled
 (this is even an inconvenient of mod_perl, and something to watch
 when designing mod_perl applications).

Apologies. I was thinking the .cgi-style scripts that I'm pretty sure
/do/ terminate. Use of mod_perl is outside the scope of my argument :)

 A secondary motive for my question to the OP, was to find out
 whether this size was really the result of a rational calculation
 (or experience), or just some number plucked out of the air. RAM
 prices are fickle, but let's say that for server-quality RAM, one 
 currently pays 25 US$ per GB. And we do not know who the OP works
 for, but say he is talking about 1,000 Tomcat servers.

That's 3TiB of RAM. Sweet.

 Saving 1 GB of
 Heap to run his applications would thus mean saving 25,000 US$. I
 believe it is worth asking the question.

Agreed.

- -chris

N.B. I was unable to get a predictable maximum heap size when running
with -Xmx:


public class MemoryInfo
{
public static void main(String[] args)
{
Runtime rt = Runtime.getRuntime();
System.out.printf(total=%10db (%4dMiB), rt.totalMemory(),
(rt.totalMemory() / (1024*1024)));
System.out.println();
System.out.printf(  max=%10db (%4dMiB), rt.maxMemory(),
(rt.maxMemory() / (1024*1024)));
System.out.println();
System.out.printf( free=%10db (%4dMiB), rt.freeMemory(),
(rt.freeMemory() / (1024*1024)));
System.out.println();
}
}

$ java -Xmx10M MemoryInfo
total=   9961472b (   9MiB)
  max=   9961472b (   9MiB)
 free=   9731320b (   9MiB)

Note that 9437184 (1024 * 1024 * 9)  9961472, so I'm not sure why the
extra memory. The code above doesn't necessarily get /only/ heap memory,
but you get an extra 5% for some reason.

$ java -Xmx100M MemoryInfo
total=  64356352b (  61MiB)
  max=  93257728b (  88MiB)
 free=  64019480b (  61MiB)

That's weird: the JVM gives me less than I requested this time: only 88%
of what I requested.

$ java -showversion -Xmx1000M MemoryInfo
java version 1.6.0_20
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)

total=  64356352b (  61MiB)
  max= 932118528b ( 888MiB)
 free=  64019480b (  61MiB)

... and again: less than I requested. Odd. Even when I use 1MB = 1024 *
1000, I'm still being stiffed by the JVM.

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

iEYEARECAAYFAkxhztUACgkQ9CaO5/Lv0PAXeACeP4uhSfDmw/GedynYNMvBqKUY
YdcAn09WBlQS8e16CUjo/wQQy+jqMP7x
=ENGs
-END PGP SIGNATURE-

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

RE: [OT] Tomcat unexpectedly shuts down

2010-08-10 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: [OT] Tomcat unexpectedly shuts down
 
 N.B. I was unable to get a predictable maximum heap size when 
 running with -Xmx:

You'll need to set -Xms and -Xmx to the same value if you want consistency and 
predictability.  Otherwise the default minimum and the adjustments made for the 
selected platform and GC algorithm kick in.

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



Re: [OT] Tomcat unexpectedly shuts down

2010-08-10 Thread André Warnier
Ok guys, my curiosity is satisfied in the absolute, and I know understand why one /could/ 
need a very large Heap size.


I would still like to hear the OP's answer however.
His questions led me to believe that he wasn't quite sure how much memory he needed just 
to run Tomcat.  Maybe he was horribly misinformed somehow or misread a number somewhere, 
or just copied the configuration of another Tomcat server without really realising what it 
meant.




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



java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No available certificate or key corresponds to the SSL cipher suites which are enabled.

2010-08-10 Thread Jing Chen
After getting a new SSL certificate from GeoTrust, I keep getting the following 
error after starting JBoss 4.0.5:
java.net.SocketException: SSL handshake errorj avax.net.ssl.SSLException: No 
available certificate or key corresponds to the SSL cipher suites which are 
enabled.

I first imported the intermediate certificate with alias root, then import the 
final certificate with another alias name.

Can someone help me figuring out where is the missing piece?

Thanks!!


Re: WARNING: Error registering request

2010-08-10 Thread VenkateswaraRao Eswar
Thanks for your suggestions. Upgrading to newer versions is defenetely a good 
solution. But unfortunately, we are not looking to upgrade our production 
environment at this point of time.
Any alternate solution to this issue with the current jdk/tomcat/Apache 
proxy versions instead of upgrading to newer versions?
 
Thanks,
Venkat

--- On Fri, 6/8/10, Christopher Schultz ch...@christopherschultz.net wrote:


From: Christopher Schultz ch...@christopherschultz.net
Subject: Re: WARNING: Error registering request
To: Tomcat Users List users@tomcat.apache.org
Date: Friday, 6 August, 2010, 10:59 AM


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/6/2010 5:20 AM, VenkateswaraRao Eswar wrote:
 With our production application, I am getting
 javax.management.InstanceAlreadyExistsException error messeges
 repeatedly before resulting in OutOfMemoryError.

While I appreciate and agree with Mark's sentiments, it's always nice to
have a production system that is working.

How long has your application been in production?

How long has this InstanceAlreadyExistsException -  OutOfMemoryError
condition been happening.

Did anything change in your production configuration around the time
that these errors started occurring?

Generally speaking, these kinds of things don't just magically start to
happen in a production system. Usually, one of the following things has
occurred:

1. Someone tweaked some configuration and didn't properly test the effects

2. You released a new version of your web application and didn't
properly test it

The solution to the first problem is, of course, to reverse the
configuration change and resume normal operations.

The solution to the second problem is probably to downgrade your wep
application, and re-think your next steps.

Once you get your production system back up and running, you can
concentrate on Mark's suggestions, which are, specifically:

1. Upgrade to a supported version of Java (which would be 1.6.x). This
is perhaps the easiest thing you can possibly do, since the APIs are (in
theory, anyway) backward compatible. The most noticeable thing about the
upgrade will be better performance all around.

2. Upgrade mod_jk2 to mod_jk (yes, it sounds like a downgrade but jk2
was abandoned because jk basically back-ported all the features of jk2).
The current version is 1.2.30. You didn't say what type of OS you were
on. If you're on *NIX, compile it yourself. If you're on Windows,
download the binary from the Tomcat website. Configuration is not too
bad, and we can help with that when you're ready to transition, if the
documentation isn't clear. Reading the sample mod_jk.conf file that
ships with mod_jk is very instructive, so do that before you come crying
to us.

3. Upgrade Tomcat to a supported version. 6.0.29 would be best, though
sometimes it's prudent to stay a few point-releases behind the latest,
just in case some weird bug appears that affects you. Upgrading from 5.0
to 6.0 shouldn't be too painful: just remember that you shouldn't try to
use your server.xml from your 5.0 install to go to 6.0. Instead, use the
stock 6.0 server.xml as a basis, and see what changes you'll need to
make. Again, this shouldn't be tough to do since Tomcat should be
backward-compatible as long as you stick to the servlet specification's
rules. Just remember that as Tomcat matures, it gets more strict about
the servlet spec rules, so you might notice things that no longer work
because you were relying on out-of-spec behavior.

Resources:
http://tomcat.apache.org/migration.html
(I thought there was an upgrade or migration page on the Wiki, but
it appears there is none... perhaps I should write one).

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

iEYEARECAAYFAkxcI1gACgkQ9CaO5/Lv0PBTNACeKvsYXmJ2doMZptQzJgQg/jot
+ccAnR1YhZ1qywv4imsI61A2qHpzWQd9
=VtD5
-END PGP SIGNATURE-

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





RE: 2 POST requests to underlying Server

2010-08-10 Thread Karthik Nanjangude
Hi

 the point
is your JavaScript filter to disable multiple Clicks may not be as
fool proof as you think.


The same test performed on the Internal IP (http://ip:port/ABCD), and was 
observed that the single Post request was observed with single Insertion to DB 
... compared to 2 POST request via External IO ( http://ABCD.com )

So how does this prove that the JavaScript as stated below is not working  
:(



var no_clicks=0;
function isClicked(){
  if(no_clicks == 0 ){
no_clicks++;
  document.xxx.action=abcd.jsp;
  document.xxx.submit();
  }else{
return false;
  }
}



With regards
KArthik

-Original Message-
From: Ðavîd Låndïs [mailto:dlan...@gmail.com]
Sent: Wednesday, August 11, 2010 2:54 AM
To: Tomcat Users List
Subject: Re: 2 POST requests to underlying Server

3) As I have already said We have put a Java script filter to disable
  multiple Clicks for dual request from the Browser ( IE 7+ / FF 3+ )

I had a similar issue once due to jQuery. If you attach the same click
listener twice to the same button, it'll submit 2 POST's or GET's for
one mouse click (in the latest version of jQuery). There may be other
ways to accomplish that as well with other libraries, etc -- the point
is your JavaScript filter to disable multiple Clicks may not be as
fool proof as you think.

On Tue, Aug 10, 2010 at 12:29 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Karthik,

 On 8/10/2010 9:08 AM, Karthik Nanjangude wrote:
 Problem exists ,Proof given

 No: Problem is observed, very little in the way of proof has been given.

 You've made assertions about the circumstances and observed results.

 You have actually provided no data at all. Instead, you've merely stated
 that you've read the logs and they prove something is wrong.

 Since apparently nobody believes that you are interpreting the logs
 correctly, why not simply post the logs themselves. You'll need to
 provide the following:

 1. An httpd log file showing the incoming request(s) from the client/browser

 2. A mod_jk log file showing the communication between httpd and Tomcat

 3. A tcpdump log file, if you really wish to include it

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

 iEYEARECAAYFAkxhfnMACgkQ9CaO5/Lv0PAXKACfZMSU3dhcRaJYD66BSXsodw3Q
 jGEAoI/M+o22p2m76vk+jZb+B4VMeTvE
 =AHZ2
 -END PGP SIGNATURE-

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



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


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



Re: 2 POST requests to underlying Server

2010-08-10 Thread Hassan Schroeder
On Tue, Aug 10, 2010 at 10:07 PM, Karthik Nanjangude
karthik.nanjang...@xius-bcgi.com wrote:

 The same test performed on the Internal IP (http://ip:port/ABCD), and was 
 observed that the single Post request was observed with single Insertion to 
 DB ... compared to 2 POST request via External IO ( http://ABCD.com )

 So how does this prove that the JavaScript as stated below is not working 
  :(

Forget the browser and the JavaScript -- reproduce the problem using
wget or curl or something basic to initiate your request, with wireshark
or tcpdump running on the external + internal segments simultaneously.

Then you'll have some interesting data :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



RE: 2 POST requests to underlying Server

2010-08-10 Thread Karthik Nanjangude
Hi

wireshark or tcpdump running on the external + internal segments 
simultaneously.

I can provide u the tcp dump samples which we used to validate using White 
shark.


Of course I need some time (probably by EOD ) to get permission from my 
authorities for the same.

Is this ok with u


With regards
KArthik

-Original Message-
From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com]
Sent: Wednesday, August 11, 2010 10:49 AM
To: Tomcat Users List
Subject: Re: 2 POST requests to underlying Server

On Tue, Aug 10, 2010 at 10:07 PM, Karthik Nanjangude
karthik.nanjang...@xius-bcgi.com wrote:

 The same test performed on the Internal IP (http://ip:port/ABCD), and was 
 observed that the single Post request was observed with single Insertion to 
 DB ... compared to 2 POST request via External IO ( http://ABCD.com )

 So how does this prove that the JavaScript as stated below is not working 
  :(

Forget the browser and the JavaScript -- reproduce the problem using
wget or curl or something basic to initiate your request, with wireshark
or tcpdump running on the external + internal segments simultaneously.

Then you'll have some interesting data :-)

--
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
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