Re: check number of http connection in tomcat

2010-03-03 Thread André Warnier

chuikingman wrote:

It is tomcat-3.3.2 in red hat linux AS4 , kernel 2.6.9
Can you take exmaple how to use manager webapp 
Please advice 

Tomcat 3.3.2 is so old that most people on this list may not even 
remember if there existed a manager application in it, never mind how to 
get it and install it and configure it under RedHat.
The current released version is Tomcat 6.0.  Before that, there have 
been Tomcat 5.5 and Tomcat 5.0 and Tomcat 4.1, at least.
If you want to get help for that or any other Tomcat-related subject, I 
would strongly recommend that you upgrade that Tomcat to a more recent 
version (and probably also the Java JVM).




In case the above is not clear enough : it is not that nobody here 
/would want/ to help you; they would if they could.
But Tomcat 3.3.2 is so old that some of the people here were probably 
still in school when it was released, and that any people here who have 
actually used it are probably over 50 years old.  And you know that 
after 35, it is downhill all the way : you start forgetting things and 
so on.  Got it ?




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



Re: RE: check number of http connection in tomcat

2010-03-03 Thread chuikingman

I try to use tomcat manager .
There is account role admin in the linux dir 
But when I access  http://XXXx:8080/admin/index.html
I input the user name tomcatadmin and passwordtomcat .
It is failed and show not authorized.
I paste the  /conf/users/tomcat-users.xml file below 
tomcat-users
  role rolename=manager/
  role rolename=admin/
  user name=tomcat password=tomcat roles=tomcat /
  user name=role1  password=tomcat roles=role1  /
  user name=both   password=tomcat roles=tomcat,role1 /
  user name=tomcatadmin  password=tomcat roles=admin,manager /
/tomcat-users
  Could you advice what is wrong for the password ??
How can I fix it ...
Please advice 


Guifre Bosch Fabregas wrote:
 
 in linux you can use:
 ps -ef | grep http | grep -v grep | wc -l
 
 This command returns the number of http active process
 
 El 03/03/2010 07:42, Caldarale, Charles R chuck.caldar...@unisys.com
 escribió:
 
 From: chuikingman [mailto:chuiking...@yahoo.com.hk]
 Subject: check number of http connection in tomcat

 I use tomcat .
 
 Congratulations.  What version?  What platform?
 
 
 I want to know how to check the number of http connection in the
 existing Tomcat web server ??
 ...
 It's not perfectly clear what you want, but the netstat tool is available
 on
 most platforms and will display all active connections.  The manager
 webapp
 that is part of the standard Tomcat download shows the number of active
 sessions, and Lambda Probe (www.lambdaprobe.org) and MoSKito (
 moskito.anotheria.net) can give you detailed statistics.
 
  - 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: user...
 
 

-- 
View this message in context: 
http://old.nabble.com/check-number-of-http-connection-in-tomcat-tp27764524p27765631.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: jvm exits without trace

2010-03-03 Thread Taylan Develioglu
Downgrading to 1.6.0_16 did not help. I'm replacing the apr connector
with http now.

On Wed, 2010-02-24 at 14:52 +0100, Carl wrote:
 Taylan,
 
  The failures we've seen are in anywhere between 8 hours to a week of
  runtime.
 
 The timing of the failures seems similar.
 
  We have also had failures with hotspot error files (hs_err) present, and
  the cause specified was indeed SIGSEGV indicating a page fault.
 
 I have never seen any hs_* files but have seen core files where strace 
 showed the jvm stopped on a seg fault.
 
  We also use jdk 1.6.0_18, I'm downgrading the machines to 1.6.0_16 when
  the situation allows (during regular updates of the application, or a
  crash) to see if that helps.
 
 I have used jdk 1.6.0_17 and 1.6.0_18 with the same results... have not 
 tried 1.6.0_16.  Please post your results of this trial.
 
  Running tomcat on the
  foreground might show something, but then again I could be waiting for a
  month for it to happen.
 
 Yes, this has been part of my problem as anytime we change something, we 
 have to wait a week for the server to fail.
 
 In one sense, I am fortunate that I have a little more flexibility than you. 
 I have two servers (different hardware) but only need one in service at a 
 time.  Therefore, I always have one server I can test ideas on although I 
 have never been able to develop a meaningful stress test, i.e., the only way 
 I can test a change is to put it in production.
 
 Thanks,
 
 Carl
 
 - Original Message - 
 From: Taylan Develioglu tdevelio...@ebuddy.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Wednesday, February 24, 2010 8:31 AM
 Subject: Re: jvm exits without trace
 
 
  Hello Carl,
 
  The failures we've seen are in anywhere between 8 hours to a week of
  runtime. Most of them have (still) been running for almost a month
  without failure. There are ~100 machines.
 
 From the top of my head, I think we've had about 10+ failures now.
 
  We have also had failures with hotspot error files (hs_err) present, and
  the cause specified was indeed SIGSEGV indicating a page fault. But I
  don't know if the two are related.
 
  We also use jdk 1.6.0_18, I'm downgrading the machines to 1.6.0_16 when
  the situation allows (during regular updates of the application, or a
  crash) to see if that helps.
 
  It might be useful to note that the failures happen with tomcat 6.0.20
  as well as 6.0.24.
 
  As far as load concerns, I haven't had a failure on an idle machines.
  The machines are well loaded, but only at a fraction limit in regards to
  load and cpu utilization.
  Most memory is commited to tomcat, where a 24G machine would have 18G
  allocated to heap, 128M to permgen and some unspecified amount would get
  used by jni for apr. About 4G remains free after calculating taking into
  account the jvm itsself.
  A 16G machine would have 12G allocated to the heap.
 
  Besides the fact that our apps heavily use nio and mina I wouldn't say
  there's anything else noteworthy. There can be anywhere up to 1
  concurrents on one machine.
 
  I had searched for coredumps, but no luck. Running tomcat on the
  foreground might show something, but then again I could be waiting for a
  month for it to happen.
 
  On Wed, 2010-02-24 at 12:42 +0100, Carl wrote:
  Taylan,
 
  I am the person who started the Tomcat dies suddenly thread which I 
  still
  haven't resolved.  I am curious about the pattern of failures you are
  experiencing because they may provide some clues to my problem.  In my 
  case,
  the system will run for 15 minutes to 10 days before failing (most of the
  time it is several days to a week.)  It appears to die from a seg fault 
  in
  the JVM (I am using Sun 1.6.0_18 but have tried previous versions)... you
  may be able to see the cause of the failure from the core file (the core
  files on my systems were in several directories so you may have to do a
  'find' to locate them.)  Load may be a factor but the failures generally
  come after the load has been heavy for a while.  I am running a couple of
  applications and it seems the failures are more frequent when people are
  hitting the additional apps (the primary app is always used, the 
  remaining
  apps are used sporatically.)
 
  How does this compare to what you are experiencing?
 
  Thanks,
 
  Carl
 
  - Original Message - 
  From: Taylan Develioglu tdevelio...@ebuddy.com
  To: Tomcat Users List users@tomcat.apache.org; p...@pidster.com
  Sent: Wednesday, February 24, 2010 5:09 AM
  Subject: Re: jvm exits without trace
 
 
   The GC log shows plenty of heap space left in all the spaces.
  
   I purposely didn't bother replacing the variables because I figured 
   they
   would not be relevant.
  
   But if you think they might provide clues they're as follows:
  
   JAVA_HEAP_SIZE=18432M
   JAVA_EDEN_SIZE=$(($(echo $JAVA_HEAP_SIZE|sed 's/M$\|G$//')/6))M
   JAVA_PERM_SIZE=128M
   JAVA_STCK_SIZE=128K
  
   EDEN_SIZE is 1/6th of total heap.
  
   

Deploy war

2010-03-03 Thread Kaushal Shriyan
Hi,

At the moment, I stop,kill tomcat and scp the war to webapps folder
and start tomcat server. is there a better way to do it ?

Thanks,

Kaushal

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



Re: check number of http connection in tomcat

2010-03-03 Thread André Warnier

chuikingman wrote:

I try to use tomcat manager .
There is account role admin in the linux dir 
But when I access  http://XXXx:8080/admin/index.html

I input the user name tomcatadmin and passwordtomcat .
It is failed and show not authorized.
I paste the  /conf/users/tomcat-users.xml file below 
tomcat-users

  role rolename=manager/
  role rolename=admin/
  user name=tomcat password=tomcat roles=tomcat /
  user name=role1  password=tomcat roles=role1  /
  user name=both   password=tomcat roles=tomcat,role1 /
  user name=tomcatadmin  password=tomcat roles=admin,manager /
/tomcat-users
  Could you advice what is wrong for the password ??
How can I fix it ...
Please advice 

As explained previously, I am really guessing here, because your version 
of Tomcat is so old..


But assuming it works like more recent versions :

1) the correct link is probably : http://XXXx:8080/manager
(admin is another application)

2) make sure that around your tomcat-users section above, there are no 
XML comment signs like

!--
tomcat-users


--

(and if you remove them, restart Tomcat)


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



Re: Deploy war

2010-03-03 Thread André Warnier

Kaushal Shriyan wrote:

Hi,

At the moment, I stop,kill tomcat and scp the war to webapps folder
and start tomcat server. is there a better way to do it ?



http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html


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



Re: Access to Tomcat's MBeans

2010-03-03 Thread Pid

On 03/03/2010 06:32, Caldarale, Charles R wrote:

From: Cummins College [mailto:cummins.grou...@gmail.com]
Subject: Access to Tomcat's MBeans

Could someone please help us how to access Tomcat's Mbeans
using Java code.


This is not a direct answer, but you could download the source for Lambda Probe 
(www.lambdaprobe.org) and see how it does it.


Or examine the source code of the Manager app, which I believe does that.


p


  - Chuck


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


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




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



Re: jvm exits without trace

2010-03-03 Thread Pid

On 03/03/2010 09:11, Taylan Develioglu wrote:

Downgrading to 1.6.0_16 did not help. I'm replacing the apr connector
with http now.


As Chuck mentioned in the other thread, significant changes occurred at 
1.6.10, so trying the release before (1.6.7) might be necessary to 
establish a better determination.



p


On Wed, 2010-02-24 at 14:52 +0100, Carl wrote:

Taylan,


The failures we've seen are in anywhere between 8 hours to a week of
runtime.


The timing of the failures seems similar.


We have also had failures with hotspot error files (hs_err) present, and
the cause specified was indeed SIGSEGV indicating a page fault.


I have never seen any hs_* files but have seen core files where strace
showed the jvm stopped on a seg fault.


We also use jdk 1.6.0_18, I'm downgrading the machines to 1.6.0_16 when
the situation allows (during regular updates of the application, or a
crash) to see if that helps.


I have used jdk 1.6.0_17 and 1.6.0_18 with the same results... have not
tried 1.6.0_16.  Please post your results of this trial.


Running tomcat on the
foreground might show something, but then again I could be waiting for a
month for it to happen.


Yes, this has been part of my problem as anytime we change something, we
have to wait a week for the server to fail.

In one sense, I am fortunate that I have a little more flexibility than you.
I have two servers (different hardware) but only need one in service at a
time.  Therefore, I always have one server I can test ideas on although I
have never been able to develop a meaningful stress test, i.e., the only way
I can test a change is to put it in production.

Thanks,

Carl

- Original Message -
From: Taylan Develioglutdevelio...@ebuddy.com
To: Tomcat Users Listusers@tomcat.apache.org
Sent: Wednesday, February 24, 2010 8:31 AM
Subject: Re: jvm exits without trace



Hello Carl,

The failures we've seen are in anywhere between 8 hours to a week of
runtime. Most of them have (still) been running for almost a month
without failure. There are ~100 machines.

 From the top of my head, I think we've had about 10+ failures now.

We have also had failures with hotspot error files (hs_err) present, and
the cause specified was indeed SIGSEGV indicating a page fault. But I
don't know if the two are related.

We also use jdk 1.6.0_18, I'm downgrading the machines to 1.6.0_16 when
the situation allows (during regular updates of the application, or a
crash) to see if that helps.

It might be useful to note that the failures happen with tomcat 6.0.20
as well as 6.0.24.

As far as load concerns, I haven't had a failure on an idle machines.
The machines are well loaded, but only at a fraction limit in regards to
load and cpu utilization.
Most memory is commited to tomcat, where a 24G machine would have 18G
allocated to heap, 128M to permgen and some unspecified amount would get
used by jni for apr. About 4G remains free after calculating taking into
account the jvm itsself.
A 16G machine would have 12G allocated to the heap.

Besides the fact that our apps heavily use nio and mina I wouldn't say
there's anything else noteworthy. There can be anywhere up to 1
concurrents on one machine.

I had searched for coredumps, but no luck. Running tomcat on the
foreground might show something, but then again I could be waiting for a
month for it to happen.

On Wed, 2010-02-24 at 12:42 +0100, Carl wrote:

Taylan,

I am the person who started the Tomcat dies suddenly thread which I
still
haven't resolved.  I am curious about the pattern of failures you are
experiencing because they may provide some clues to my problem.  In my
case,
the system will run for 15 minutes to 10 days before failing (most of the
time it is several days to a week.)  It appears to die from a seg fault
in
the JVM (I am using Sun 1.6.0_18 but have tried previous versions)... you
may be able to see the cause of the failure from the core file (the core
files on my systems were in several directories so you may have to do a
'find' to locate them.)  Load may be a factor but the failures generally
come after the load has been heavy for a while.  I am running a couple of
applications and it seems the failures are more frequent when people are
hitting the additional apps (the primary app is always used, the
remaining
apps are used sporatically.)

How does this compare to what you are experiencing?

Thanks,

Carl

- Original Message -
From: Taylan Develioglutdevelio...@ebuddy.com
To: Tomcat Users Listusers@tomcat.apache.org;p...@pidster.com
Sent: Wednesday, February 24, 2010 5:09 AM
Subject: Re: jvm exits without trace



The GC log shows plenty of heap space left in all the spaces.

I purposely didn't bother replacing the variables because I figured
they
would not be relevant.

But if you think they might provide clues they're as follows:

JAVA_HEAP_SIZE=18432M
JAVA_EDEN_SIZE=$(($(echo $JAVA_HEAP_SIZE|sed 's/M$\|G$//')/6))M
JAVA_PERM_SIZE=128M
JAVA_STCK_SIZE=128K

EDEN_SIZE is 1/6th of total 

Re: Deploy war

2010-03-03 Thread Pid

On 03/03/2010 09:52, André Warnier wrote:

Kaushal Shriyan wrote:

Hi,

At the moment, I stop,kill tomcat and scp the war to webapps folder
and start tomcat server. is there a better way to do it ?



http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html


At the very least you could upload an inactive version webapp.war-off 
and then rename it webapp.war once it's there, which would reduce the 
downtime.



p


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




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



Re: Deploy war

2010-03-03 Thread André Warnier

Pid wrote:

On 03/03/2010 09:52, André Warnier wrote:

Kaushal Shriyan wrote:

Hi,

At the moment, I stop,kill tomcat and scp the war to webapps folder
and start tomcat server. is there a better way to do it ?



http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html


At the very least you could 


*without stopping Tomcat*

upload an inactive version webapp.war-off
and then rename it webapp.war once it's there, which would reduce the 
downtime.




Which is what is explained - among other useful things like autoDeploy - 
in the section Deploying on a running Tomcat server.




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



Fw: java.util.logging - help needed with configuration and problem determination

2010-03-03 Thread Stuart Grace
I mistakenly stated this worked on my PC.  I think the problem is 
happening on my workstation and is not related to jsvc.




Stuart Grace/Fishkill/IBM 
03/03/2010 12:21 AM

To
users@tomcat.apache.org
cc

Subject
java.util.logging - help needed with configuration and problem 
determination





I'm using JSVC to start Tomcat 6.0.20 as a daemon on Solaris.  Java is 
jdk1.6.0_16. 
I need to deploy the same war file as 2 different contexts.  Each context 
has the same logging.properties file in the classes directory.  The 
conf/logging.properties has not been changed.

Problem:  The logging from both contexts IBINET and IBMIN are being 
written to both logs.  ie IBINET.-mm-dd.log and IBMIN--mm-dd.log.  


This did work on my PC where jsvc was not being used.   Very difficult to 
test with out jsvc on Solaris due to firewall. 

Does the logging.properties file below look correct for loggers named 
eocene.web.*  ? 



logging.properties
handlers = 6IBINET.org.apache.juli.FileHandler, 
7IBMIN.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

6IBINET.org.apache.juli.FileHandler.level = FINE
6IBINET.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
6IBINET.org.apache.juli.FileHandler.prefix = IBINET.

7IBMIN.org.apache.juli.FileHandler.level = FINE
7IBMIN.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
7IBMIN.org.apache.juli.FileHandler.prefix = IBMIN.

eocene.web.*.[Catalina].[localhost].[/IBINET].level = FINE
eocene.web.*.[Catalina].[localhost].[/IBINET].handlers = 
6IBINET.org.apache.juli.FileHandler

eocene.web.*.[Catalina].[localhost].[/IBMIN].level = FINE
eocene.web.*.[Catalina].[localhost].[/IBMIN].handlers = 
7IBMIN.org.apache.juli.FileHandler

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = 
java.util.logging.SimpleFormatter

startup script looks like 
case $1 in
  start)
#
# Start Tomcat
#
$DAEMON_HOME/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.io.tmpdir=$TMP_DIR \
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties 
\
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-wait 10 \
-pidfile $PID_FILE \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap
#
# To get a verbose JVM
#-verbose \
# To get a debug of jsvc.
#-debug \
exit $?
;;

IBINET and IBMIN logs contain the same exact data from both contexts
 =ls -l logs
total 82
-rw-r--r--   1 eocene01 atthb3589930 Mar  2 23:26 
IBINET.2010-03-02.log
-rw-r--r--   1 eocene01 atthb3589930 Mar  2 23:26 IBMIN.2010-03-02.log
-rw-r--r--   1 root other   1377 Mar  2 23:25 
catalina.2010-03-02.log
-rw-r--r--   1 root other  15722 Mar  2 23:26 catalina.out
-rw-r--r--   1 root other  0 Mar  2 23:22 
host-manager.2010-03-02.log
-rw-r--r--   1 root other232 Mar  2 23:22 
localhost.2010-03-02.log
-rw-r--r--   1 root other   1132 Mar  2 23:25 
manager.2010-03-02.log


Tomcat generate empty 0 kb logs

2010-03-03 Thread Miriam esteve
O/s Windows Vista
jdk1.5.0_22
TOMCAT 5.5.28

 My problem is that Tomcat that I have installed as a server in Windows only
create empty (0 Kb) Logs Files.
 I have searched in all system, in windows events logs, and of course in
tomcat/logs/  but there is nothing!!

Someone knows why??

I have every time I start tomcat a new 0kb log file for all of this:

jakarta_service_-mm-dd.log.
stderr_-mm-dd.log.
stdout_-mm-dd.log.
admin.-mm-dd.log.
catalina.-mm-dd.log.
host-manager.-mm-dd.log.
localhost.-mm-dd.log.
manager.-mm-dd.log.


RE: Curious to know if the following is permitted

2010-03-03 Thread Karthik Nanjangude
Hi

 just use whatever the webapps inside

I do not follow-up

My requirements were to expose the war to Outer world via http
and also use / provide credential access for the same application's Business 
layer from outside the war file via  standalone Client via JNDI via RMI-IIOP

This activity is to done when the Web application is up and running only ( 
probably EOD process )

Axis mounted on Web application would solve this problem ...
but exploring any other way around with out AXIS ...




with regards
karthik



-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Tuesday, March 02, 2010 9:03 PM
To: Tomcat Users List
Subject: RE: Curious to know if the following is permitted

 From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com]
 Subject: RE: Curious to know if the following is permitted

 Are u saying about AXIS, Using Http protocol for loosely based Client
 usage.

I wouldn't think AXIS is necessary - just use whatever the webapps inside 
Tomcat are already expecting.

 - Chuck


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


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


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



Re: Tomcat dies suddenly

2010-03-03 Thread Carl

Chuck,

Thanks, I will give it a try after I complete the two experiments currently 
underway (the IBM JVM and running with strace from the command line.)


Tried bringing the server running the IBM JVM into production this morning 
(tested it yesterday with different browsers... can't use IE 6 but all the 
others seemed to work) but couldn't as there is some problem with SSL.  The 
indicators are that some people can access the application just fine but 
others (they appear to be mostly IE users, will be getting the IE versions 
later this morning) never get past the first page (I can see from the log 
what is requested)... the first page starts a series of processes including 
copying some signed jars down, if needed, starting an applet that serves as 
a conduit for moving information to printers, etc.  The odd part is all of 
these worked fine yesterday when we were using the firewall to redirect 
traffic on a specific port to this server (yesterday, we were sending 
traffic on port 8084 to 443 on this server, this morning we were sending all 
443 traffic to this server.)  More testing this morning but all ideas are 
certainly welcome.


Thanks,

Carl

- Original Message - 
From: Caldarale, Charles R chuck.caldar...@unisys.com

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, March 02, 2010 10:10 PM
Subject: RE: Tomcat dies suddenly



From: Carl [mailto:c...@etrak-plus.com]
Subject: Re: Tomcat dies suddenly

Still looking for the exorcist but we now know that an older
version of the Sun JVM doesn't do the trick.


Not necessarily.  6u10 was a major internal upgrade, so it might be 
interesting to try 6u7:


http://java.sun.com/products/archive/j2se/6u7/index.html

(There were no 6u8 or 6u9 releases.)

- 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



getServerName returns 'localhost'

2010-03-03 Thread vgud

Gentlemen,

I have the application which could be accessed from different domain
addresses and I need to know from what domain request was sent. I try to get
following from request:

getRemoteHost: 127.0.0.1
getServerName: localhost

I use tomcat 5.5 and I suppose i should configure something to get correct
domain name. Can anyone help me?? Any help will be apreciated.

Best regards
-- 
View this message in context: 
http://old.nabble.com/getServerName-returns-%27localhost%27-tp27767838p27767838.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: getServerName returns 'localhost'

2010-03-03 Thread André Warnier

vgud wrote:

Gentlemen,

I have the application which could be accessed from different domain
addresses and I need to know from what domain request was sent. I try to get
following from request:

getRemoteHost: 127.0.0.1
getServerName: localhost

I use tomcat 5.5 and I suppose i should configure something to get correct
domain name. Can anyone help me?? Any help will be apreciated.

Are users accessing Tomcat directly ? or through an Apache front-end for 
example ?


Also, your question above is not very clear.  Can you revisit your usage 
of from above, and rephrase what you are trying to get exactly ?
Do you mean that your server responds to different domain names, and you 
want to know which one users use ?
Or do you want to know from which (user-side) IP address they are 
accesing your server ?



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



RE: Tomcat generate empty 0 kb logs

2010-03-03 Thread Joseph Morgan
These may not be as empty as they appear.  For example. Startup Tomcat
and, once up, open the catalina log file... Windows may not be reporting
their actual size.  However, shutdown Tomcat and you will usually see
the size update.

-Original Message-
From: Miriam esteve [mailto:miesvesa...@gmail.com] 
Sent: Wednesday, March 03, 2010 5:52 AM
To: users@tomcat.apache.org
Subject: Tomcat generate empty 0 kb logs

O/s Windows Vista
jdk1.5.0_22
TOMCAT 5.5.28

 My problem is that Tomcat that I have installed as a server in Windows
only
create empty (0 Kb) Logs Files.
 I have searched in all system, in windows events logs, and of course in
tomcat/logs/  but there is nothing!!

Someone knows why??

I have every time I start tomcat a new 0kb log file for all of this:

jakarta_service_-mm-dd.log.
stderr_-mm-dd.log.
stdout_-mm-dd.log.
admin.-mm-dd.log.
catalina.-mm-dd.log.
host-manager.-mm-dd.log.
localhost.-mm-dd.log.
manager.-mm-dd.log.

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



Re: getServerName returns 'localhost'

2010-03-03 Thread vgud

Users use tomcat directly.

My server responds to different domain names, and I want to know which one
users use. I try to get domain name by request.getServerName() but instead
of domainName.com I get 'localhost'.


awarnier wrote:
 
 vgud wrote:
 Gentlemen,
 
 I have the application which could be accessed from different domain
 addresses and I need to know from what domain request was sent. I try to
 get
 following from request:
 
 getRemoteHost: 127.0.0.1
 getServerName: localhost
 
 I use tomcat 5.5 and I suppose i should configure something to get
 correct
 domain name. Can anyone help me?? Any help will be apreciated.
 
 Are users accessing Tomcat directly ? or through an Apache front-end for 
 example ?
 
 Also, your question above is not very clear.  Can you revisit your usage 
 of from above, and rephrase what you are trying to get exactly ?
 Do you mean that your server responds to different domain names, and you 
 want to know which one users use ?
 Or do you want to know from which (user-side) IP address they are 
 accesing your server ?
 
 
 -
 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/getServerName-returns-%27localhost%27-tp27767838p27768081.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 generate empty 0 kb logs

2010-03-03 Thread Miriam esteve
The log size are 0 kb because are empty, I start, stop and all can I do, and
the logs are empty allways.


2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com

 These may not be as empty as they appear.  For example. Startup Tomcat
 and, once up, open the catalina log file... Windows may not be reporting
 their actual size.  However, shutdown Tomcat and you will usually see
 the size update.

 -Original Message-
 From: Miriam esteve [mailto:miesvesa...@gmail.com]
 Sent: Wednesday, March 03, 2010 5:52 AM
 To: users@tomcat.apache.org
 Subject: Tomcat generate empty 0 kb logs

 O/s Windows Vista
 jdk1.5.0_22
 TOMCAT 5.5.28

  My problem is that Tomcat that I have installed as a server in Windows
 only
 create empty (0 Kb) Logs Files.
  I have searched in all system, in windows events logs, and of course in
 tomcat/logs/  but there is nothing!!

 Someone knows why??

 I have every time I start tomcat a new 0kb log file for all of this:

 jakarta_service_-mm-dd.log.
 stderr_-mm-dd.log.
 stdout_-mm-dd.log.
 admin.-mm-dd.log.
 catalina.-mm-dd.log.
 host-manager.-mm-dd.log.
 localhost.-mm-dd.log.
 manager.-mm-dd.log.

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




RE: Tomcat threads

2010-03-03 Thread Joseph Morgan
scalable also seems to be a relative term here, and there are well
documented strategies for scalability.  So, the question is, are you
just looking for strategies for scalability or do you have a real
problem with load?

-Original Message-
From: Bharath Vasudevan [mailto:bharath@gmail.com] 
Sent: Tuesday, March 02, 2010 6:43 PM
To: Tomcat Users List
Subject: Re: Tomcat threads

Why is it illlogical? Fast is a relative term. If the number of requests
increases, the number of threads that can be handled by the system goes
down
. The context switches and the pain to handle the switches makes
handling of
the requests in lesser threads which is scalable.

On Tue, Mar 2, 2010 at 4:34 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Bharath Vasudevan [mailto:bharath@gmail.com]
  Subject: Re: Tomcat threads
 
  If we get a request on a thread, let some other thread do
  the work for it and store the response info. The thread
  which does the work writes the response on that request.

 If the processing is fast, why would you go to the complexity and
overhead
 of switching to another thread to process the request?

 You should also read the servlet spec, in particular SRV.2.3.3.3:

 Implementations of the request and response objects are not
guaranteed to
 be thread
 safe. This means that they should only be used within the scope of the
 request handling
 thread.

 References to the request and response objects should not be given to
 objects
 executing in other threads as the resulting behavior may be
 nondeterministic. If
 the thread created by the application uses the container-managed
objects,
 such as
 the request or response object, those objects must be accessed only
within
 the
 servlet's service life cycle and such thread itself should have a life
 cycle within
 the life cycle of the servlet's service method because accessing those
 objects
 after the service method ends may cause undeterministic problems.

 The illogical behavior you're asking for simply isn't allowed.

  - Chuck


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


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



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



RE: Tomcat generate empty 0 kb logs

2010-03-03 Thread Joseph Morgan
What is your logging level set to?

-Original Message-
From: Miriam esteve [mailto:miesvesa...@gmail.com] 
Sent: Wednesday, March 03, 2010 7:20 AM
To: Tomcat Users List
Subject: Re: Tomcat generate empty 0 kb logs

The log size are 0 kb because are empty, I start, stop and all can I do,
and
the logs are empty allways.


2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com

 These may not be as empty as they appear.  For example. Startup Tomcat
 and, once up, open the catalina log file... Windows may not be
reporting
 their actual size.  However, shutdown Tomcat and you will usually see
 the size update.

 -Original Message-
 From: Miriam esteve [mailto:miesvesa...@gmail.com]
 Sent: Wednesday, March 03, 2010 5:52 AM
 To: users@tomcat.apache.org
 Subject: Tomcat generate empty 0 kb logs

 O/s Windows Vista
 jdk1.5.0_22
 TOMCAT 5.5.28

  My problem is that Tomcat that I have installed as a server in
Windows
 only
 create empty (0 Kb) Logs Files.
  I have searched in all system, in windows events logs, and of course
in
 tomcat/logs/  but there is nothing!!

 Someone knows why??

 I have every time I start tomcat a new 0kb log file for all of this:

 jakarta_service_-mm-dd.log.
 stderr_-mm-dd.log.
 stdout_-mm-dd.log.
 admin.-mm-dd.log.
 catalina.-mm-dd.log.
 host-manager.-mm-dd.log.
 localhost.-mm-dd.log.
 manager.-mm-dd.log.

 -
 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: check number of http connection in tomcat

2010-03-03 Thread Joseph Morgan
 and that any people here who have actually used it are probably over 50 
 years old.  
 And you know that after 35, it is downhill all the way : you start 
 forgetting things and so on.

Hey... I resemble that remark!  They always say that the 2nd thing to go is 
memory.  I don't remember what the first one is!

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Wednesday, March 03, 2010 2:40 AM
To: Tomcat Users List
Subject: Re: check number of http connection in tomcat

chuikingman wrote:
 It is tomcat-3.3.2 in red hat linux AS4 , kernel 2.6.9
 Can you take exmaple how to use manager webapp 
 Please advice 
 
Tomcat 3.3.2 is so old that most people on this list may not even 
remember if there existed a manager application in it, never mind how to 
get it and install it and configure it under RedHat.
The current released version is Tomcat 6.0.  Before that, there have 
been Tomcat 5.5 and Tomcat 5.0 and Tomcat 4.1, at least.
If you want to get help for that or any other Tomcat-related subject, I 
would strongly recommend that you upgrade that Tomcat to a more recent 
version (and probably also the Java JVM).



In case the above is not clear enough : it is not that nobody here 
/would want/ to help you; they would if they could.
But Tomcat 3.3.2 is so old that some of the people here were probably 
still in school when it was released, and that any people here who have 
actually used it are probably over 50 years old.  And you know that 
after 35, it is downhill all the way : you start forgetting things and 
so on.  Got it ?



-
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: getServerName returns 'localhost'

2010-03-03 Thread André Warnier

vgud wrote:

Users use tomcat directly.

My server responds to different domain names, and I want to know which one
users use. I try to get domain name by request.getServerName() but instead
of domainName.com I get 'localhost'.


Look up the java doc for HttpRequest.
You should probably use remadr = request.getRemoteAddress() or something 
like that. That will give you the IP of the client, not your own IP. 
Then you should use a DNS lookup (I mean the equivalent Java function) 
to translate the remote IP into the corresponding remote name.


request.getServerName() probably gives you the name of your own server 
(the one which is in the Host tag of your server.xml config file.



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



Re: getServerName returns 'localhost'

2010-03-03 Thread André Warnier

André Warnier wrote:

vgud wrote:

Users use tomcat directly.

My server responds to different domain names, and I want to know which 
one
users use. I try to get domain name by request.getServerName() but 
instead

of domainName.com I get 'localhost'.


Look up the java doc for HttpRequest.
You should probably use remadr = request.getRemoteAddress() or something 
like that. That will give you the IP of the client, not your own IP. 
Then you should use a DNS lookup (I mean the equivalent Java function) 
to translate the remote IP into the corresponding remote name.


request.getServerName() probably gives you the name of your own server 
(the one which is in the Host tag of your server.xml config file.




More precisely :

getRemoteAddr

public java.lang.String getRemoteAddr()

Returns the Internet Protocol (IP) address of the client or last 
proxy that sent the request. For HTTP servlets, same as the value of the 
CGI variable REMOTE_ADDR.


Returns:
a String containing the IP address of the client that sent the 
request


getRemoteHost

public java.lang.String getRemoteHost()

Returns the fully qualified name of the client or the last proxy 
that sent the request. If the engine cannot or chooses not to resolve 
the hostname (to improve performance), this method returns the 
dotted-string form of the IP address. For HTTP servlets, same as the 
value of the CGI variable REMOTE_HOST.


Returns:
a String containing the fully qualified name of the client


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



Re: getServerName returns 'localhost'

2010-03-03 Thread Ronald Klop

Did you do something like this in server.xml?

Engine defaultHost=localhost
  Host name=localhost /
/Engine

And your client goes to www.example.com, but you getServerName() returns localhost in 
stead of www.example.com?

Ronald.

Op woensdag, 3 maart 2010 14:19 schreef vgud ivan.gudi...@yahoo.com:


 


Users use tomcat directly.

My server responds to different domain names, and I want to know which one
users use. I try to get domain name by request.getServerName() but instead
of domainName.com I get 'localhost'.


awarnier wrote:
 
 vgud wrote:

 Gentlemen,
 
 I have the application which could be accessed from different domain

 addresses and I need to know from what domain request was sent. I try to
 get
 following from request:
 
 getRemoteHost: 127.0.0.1

 getServerName: localhost
 
 I use tomcat 5.5 and I suppose i should configure something to get

 correct
 domain name. Can anyone help me?? Any help will be apreciated.
 
 Are users accessing Tomcat directly ? or through an Apache front-end for 
 example ?
 
 Also, your question above is not very clear.  Can you revisit your usage 
 of from above, and rephrase what you are trying to get exactly ?
 Do you mean that your server responds to different domain names, and you 
 want to know which one users use ?
 Or do you want to know from which (user-side) IP address they are 
 accesing your server ?
 
 
 -

 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/getServerName-returns-%27localhost%27-tp27767838p27768081.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









Problem setting keyAlias for https connector using tomcat 6.0 API's

2010-03-03 Thread Bhuvanesh Pattanashetti
Hello All,

I m using tomcat
connectorhttp://tomcat.apache.org/tomcat-6.0-doc/api/index.htmlAPI's
to establish a connector (on some port both http  https) at run time.


I have no issues with the Http as of now.

But Https, facing one issue.



The connector specified on port is getting established successfully.

I do it as following.



connector.setPort(7005);

connector.setProperty(keystoreFile, C:/myKeyStore.jks);

connector.setProperty(keystorePass, keypassword);

And some more properties.



When there is more than one certificate in the keystore, I want it to pick
particular certificate specified by alias.

But when i set *connector.setProperty (keyAlias, mykey);*

It’s not picking the certificate with specified alias, rather picking some
random certificate.



I tried with Connector port=7005 keystoreFile=pathToKeyStore
keystorePass=keypassword keyAlias=mykey /

This works very much fine.



Can you please suggest me how to set keyAlias for connector using connector
API's.


Please let me know if more information is needed.

Looking for your replies

Thanks,

Bhuvan


Re: getServerName returns 'localhost'

2010-03-03 Thread Peter Crowther
On 3 March 2010 13:47, André Warnier a...@ice-sa.com wrote:
 André Warnier wrote:
 vgud wrote:
 My server responds to different domain names, and I want to know which
 one users use.
[...]
 More precisely :

 getRemoteAddr

 public java.lang.String getRemoteAddr()

    Returns the Internet Protocol (IP) address of the client or last proxy
 that sent the request. For HTTP servlets, same as the value of the CGI
 variable REMOTE_ADDR.

Andre, you're answering the question of which client sent this request?

The OP is asking a different question: What hostname did the client
send this request to?

I'd parse the host header in the request to find out, but that's just me!

- Peter

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



RE: check number of http connection in tomcat

2010-03-03 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: check number of http connection in tomcat
 
 1) the correct link is probably : http://XXXx:8080/manager

That will get you a 404 (at least on non-stone-age Tomcats).  The actual 
manager URL is:
http://XXXx:8080/manager/html

 - 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: getServerName returns 'localhost'

2010-03-03 Thread vgud

Exactly. So, could it be configured somehow to make me able get correct
domain?

Ronald Klop wrote:
 
 Did you do something like this in server.xml?
 
 Engine defaultHost=localhost
Host name=localhost /
 /Engine
 
 And your client goes to www.example.com, but you getServerName() returns
 localhost in stead of www.example.com?
 
 Ronald.
 
 Op woensdag, 3 maart 2010 14:19 schreef vgud ivan.gudi...@yahoo.com:
 
  
 
 Users use tomcat directly.
 
 My server responds to different domain names, and I want to know which
 one
 users use. I try to get domain name by request.getServerName() but
 instead
 of domainName.com I get 'localhost'.
 
 
 awarnier wrote:
  
  vgud wrote:
  Gentlemen,
  
  I have the application which could be accessed from different domain
  addresses and I need to know from what domain request was sent. I try
 to
  get
  following from request:
  
  getRemoteHost: 127.0.0.1
  getServerName: localhost
  
  I use tomcat 5.5 and I suppose i should configure something to get
  correct
  domain name. Can anyone help me?? Any help will be apreciated.
  
  Are users accessing Tomcat directly ? or through an Apache front-end
 for 
  example ?
  
  Also, your question above is not very clear.  Can you revisit your
 usage 
  of from above, and rephrase what you are trying to get exactly ?
  Do you mean that your server responds to different domain names, and
 you 
  want to know which one users use ?
  Or do you want to know from which (user-side) IP address they are 
  accesing your server ?
  
  
  -
  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/getServerName-returns-%27localhost%27-tp27767838p27768081.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
 
 
 
 
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/getServerName-returns-%27localhost%27-tp27767838p27768758.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: getServerName returns 'localhost'

2010-03-03 Thread André Warnier

Peter Crowther wrote:

On 3 March 2010 13:47, André Warnier a...@ice-sa.com wrote:

André Warnier wrote:

vgud wrote:

My server responds to different domain names, and I want to know which
one users use.

[...]

More precisely :

getRemoteAddr

public java.lang.String getRemoteAddr()

   Returns the Internet Protocol (IP) address of the client or last proxy
that sent the request. For HTTP servlets, same as the value of the CGI
variable REMOTE_ADDR.


Andre, you're answering the question of which client sent this request?

The OP is asking a different question: What hostname did the client
send this request to?

I'd parse the host header in the request to find out, but that's just me!



You are right, I am off-base here, apologies.

String hostname = request.getHeader(Host) should work.

But then, the question is, according to the OP, request.getServerName() 
returns localhost, although that is very unlikely to have been used by 
the client in the Host header.

However, the java API says :

ServletRequest.getServerName

public java.lang.String getServerName()

Returns the host name of the server to which the request was sent. 
It is the value of the part before : in the Host header value, if any, 
or the resolved server name, or the server IP address.


Returns:
a String containing the name of the server


That does not seem to work in his case.

Does it only work when the Host or Alias tags with the corresponding 
names are set ?

(A question for people who like to scan the code..  Christopher ?)


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



RE: getServerName returns 'localhost'

2010-03-03 Thread Caldarale, Charles R
 From: vgud [mailto:ivan.gudi...@yahoo.com]
 Subject: Re: getServerName returns 'localhost'
 
 So, could it be configured somehow to make me able get 
 correct domain?

Only if you added all possible domain names and variations thereof that get to 
that system's IP address(es).

As Peter suggests, the proper approach is to use the HOST header in the request.

 - 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: getServerName returns 'localhost'

2010-03-03 Thread André Warnier

vgud wrote:

Exactly. So, could it be configured somehow to make me able get correct
domain?

Ronald Klop wrote:

Did you do something like this in server.xml?

Engine defaultHost=localhost
   Host name=localhost /
/Engine


Maybe try this :

 Engine defaultHost=localhost
Host name=localhost
Aliaswww.example.com/Alias
Aliasanother.example.com/Alias
Aliasathird.example.com/Alias
  /Host
 /Engine

(I mean specify the different domain names of your host explicitly as 
aliases)


Does it work then ?

(And sorry for the previous answer; I asked the right questions, but 
then gave the wrong answer anyway :-( )


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



Re: Tomcat generate empty 0 kb logs

2010-03-03 Thread Miriam esteve
my level set is Error.
Redirect stdout and stderror AUTO

and other question that may be help is that I can start only whit: *start
tomcat5*, because startup.bat  open Tomcat console but close it
inmediatelly... (I obviously I can't see the log!!)



2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com

 What is your logging level set to?

 -Original Message-
 From: Miriam esteve [mailto:miesvesa...@gmail.com]
 Sent: Wednesday, March 03, 2010 7:20 AM
 To: Tomcat Users List
 Subject: Re: Tomcat generate empty 0 kb logs

 The log size are 0 kb because are empty, I start, stop and all can I do,
 and
 the logs are empty allways.


 2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com

  These may not be as empty as they appear.  For example. Startup Tomcat
  and, once up, open the catalina log file... Windows may not be
 reporting
  their actual size.  However, shutdown Tomcat and you will usually see
  the size update.
 
  -Original Message-
  From: Miriam esteve [mailto:miesvesa...@gmail.com]
  Sent: Wednesday, March 03, 2010 5:52 AM
  To: users@tomcat.apache.org
  Subject: Tomcat generate empty 0 kb logs
 
  O/s Windows Vista
  jdk1.5.0_22
  TOMCAT 5.5.28
 
   My problem is that Tomcat that I have installed as a server in
 Windows
  only
  create empty (0 Kb) Logs Files.
   I have searched in all system, in windows events logs, and of course
 in
  tomcat/logs/  but there is nothing!!
 
  Someone knows why??
 
  I have every time I start tomcat a new 0kb log file for all of this:
 
  jakarta_service_-mm-dd.log.
  stderr_-mm-dd.log.
  stdout_-mm-dd.log.
  admin.-mm-dd.log.
  catalina.-mm-dd.log.
  host-manager.-mm-dd.log.
  localhost.-mm-dd.log.
  manager.-mm-dd.log.
 
  -
  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: getServerName returns 'localhost'

2010-03-03 Thread Konstantin Kolinko
1. What, exactly, version of 5.5.x is used.
2. Is Tomcat running standalone, or is behind Apache HTTPD, IIS or
other web server, or a load balancer
3. What connectors are configured in server.xml? What connectors
(protocols) are mentioned in catalina.log at startup time. E.g.:
03.02.2010 12:10:01 org.apache.coyote.http11.Http11BaseProtocol init

4. Whether Tomcat-Native (tcnative-1.dll, tcnative-1.so) is used?
5. Operating system.

6. Are the clients using HTTP/1.1 or HTTP/1.0

Best regards,
Konstantin Kolinko

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



RE: Tomcat generate empty 0 kb logs

2010-03-03 Thread Joseph Morgan
So... can you get tomcat going at all, or is it just that the logs are
always empty?

-Original Message-
From: Miriam esteve [mailto:miesvesa...@gmail.com] 
Sent: Wednesday, March 03, 2010 8:38 AM
To: Tomcat Users List
Subject: Re: Tomcat generate empty 0 kb logs

my level set is Error.
Redirect stdout and stderror AUTO

and other question that may be help is that I can start only whit:
*start
tomcat5*, because startup.bat  open Tomcat console but close it
inmediatelly... (I obviously I can't see the log!!)



2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com

 What is your logging level set to?

 -Original Message-
 From: Miriam esteve [mailto:miesvesa...@gmail.com]
 Sent: Wednesday, March 03, 2010 7:20 AM
 To: Tomcat Users List
 Subject: Re: Tomcat generate empty 0 kb logs

 The log size are 0 kb because are empty, I start, stop and all can I
do,
 and
 the logs are empty allways.


 2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com

  These may not be as empty as they appear.  For example. Startup
Tomcat
  and, once up, open the catalina log file... Windows may not be
 reporting
  their actual size.  However, shutdown Tomcat and you will usually
see
  the size update.
 
  -Original Message-
  From: Miriam esteve [mailto:miesvesa...@gmail.com]
  Sent: Wednesday, March 03, 2010 5:52 AM
  To: users@tomcat.apache.org
  Subject: Tomcat generate empty 0 kb logs
 
  O/s Windows Vista
  jdk1.5.0_22
  TOMCAT 5.5.28
 
   My problem is that Tomcat that I have installed as a server in
 Windows
  only
  create empty (0 Kb) Logs Files.
   I have searched in all system, in windows events logs, and of
course
 in
  tomcat/logs/  but there is nothing!!
 
  Someone knows why??
 
  I have every time I start tomcat a new 0kb log file for all of this:
 
  jakarta_service_-mm-dd.log.
  stderr_-mm-dd.log.
  stdout_-mm-dd.log.
  admin.-mm-dd.log.
  catalina.-mm-dd.log.
  host-manager.-mm-dd.log.
  localhost.-mm-dd.log.
  manager.-mm-dd.log.
 
 
-
  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: getServerName returns 'localhost'

2010-03-03 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: getServerName returns 'localhost'
 
 public java.lang.String getServerName()
  Returns the host name of the server to which the request was sent.
 It is the value of the part before : in the Host header value, if
 any, or the resolved server name, or the server IP address.
  Returns:
  a String containing the name of the server
 
 That does not seem to work in his case.
 
 Does it only work when the Host or Alias tags with the
 corresponding names are set ?

The code shows that the HOST header is being used by getServerName().  Testing 
with the RequestDumperFilter enabled in examples/WEB-INF/web.xml shows that it 
works as documented; here's a portion of the output from Tomcat running on my 
desktop with the default Host name of localhost:
serverName=usrv-caldarcr.na.uis.unisys.com
serverPort=8080

It appears the OP has something else going on that's interfering with the 
target IP address.  (Internal routing, perhaps?)

 - 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: Tomcat generate empty 0 kb logs

2010-03-03 Thread André Warnier

Miriam esteve wrote:

my level set is Error.
Redirect stdout and stderror AUTO

and other question that may be help is that I can start only whit: *start
tomcat5*, because startup.bat  open Tomcat console but close it
inmediatelly... (I obviously I can't see the log!!)


In that same command window, try
catalina.bat run

That should run Tomcat in that same window.  Maybe you'll see there what 
happens.

(You can stop Tomcat with a CTRL-C, if needed)

If you see an error message then, copy and paste it here (the first few 
lines)






2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com


What is your logging level set to?

-Original Message-
From: Miriam esteve [mailto:miesvesa...@gmail.com]
Sent: Wednesday, March 03, 2010 7:20 AM
To: Tomcat Users List
Subject: Re: Tomcat generate empty 0 kb logs

The log size are 0 kb because are empty, I start, stop and all can I do,
and
the logs are empty allways.


2010/3/3 Joseph Morgan joseph.mor...@ignitesales.com


These may not be as empty as they appear.  For example. Startup Tomcat
and, once up, open the catalina log file... Windows may not be

reporting

their actual size.  However, shutdown Tomcat and you will usually see
the size update.

-Original Message-
From: Miriam esteve [mailto:miesvesa...@gmail.com]
Sent: Wednesday, March 03, 2010 5:52 AM
To: users@tomcat.apache.org
Subject: Tomcat generate empty 0 kb logs

O/s Windows Vista
jdk1.5.0_22
TOMCAT 5.5.28

 My problem is that Tomcat that I have installed as a server in

Windows

only
create empty (0 Kb) Logs Files.
 I have searched in all system, in windows events logs, and of course

in

tomcat/logs/  but there is nothing!!

Someone knows why??

I have every time I start tomcat a new 0kb log file for all of this:

jakarta_service_-mm-dd.log.
stderr_-mm-dd.log.
stdout_-mm-dd.log.
admin.-mm-dd.log.
catalina.-mm-dd.log.
host-manager.-mm-dd.log.
localhost.-mm-dd.log.
manager.-mm-dd.log.

-
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: Tomcat generate empty 0 kb logs

2010-03-03 Thread Caldarale, Charles R
 From: Miriam esteve [mailto:miesvesa...@gmail.com]
 Subject: Re: Tomcat generate empty 0 kb logs
 
 my level set is Error.

So then normal operation will produce ... 0 bytes.  Try leaving it at the 
default value of INFO and see what you get.

 - 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: getServerName returns 'localhost'

2010-03-03 Thread Caldarale, Charles R
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Subject: RE: getServerName returns 'localhost'
 
 The code shows that the HOST header is being used by getServerName().
 Testing with the RequestDumperFilter enabled in examples/WEB-
 INF/web.xml shows that it works as documented; here's a portion of the
 output from Tomcat running on my desktop with the default Host name
 of localhost:
 serverName=usrv-caldarcr.na.uis.unisys.com
 serverPort=8080

The above works with 6.0.24 using both Jio and Nio connectors, with and without 
APR.  Also works on 5.5.26 with the standard connector (haven't tried it with 
APR).

 - 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: Tomcat generate empty 0 kb logs

2010-03-03 Thread Miriam esteve
André,

I'm try with
catalina.bat run

Using CATALINA_BASE:   E:\opt\tomcat
Using CATALINA_HOME:   E:\opt\tomcat
Using CATALINA_TMPDIR: E:\opt\tomcat\temp
Using JRE_HOME:E:\opt\java\jdk1.5.0_22
Using CLASSPATH:   E:\opt\tomcat\bin\bootstrap.jar
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Charles,
The level error at INFO= 0 kb, empty logs.

Joseph,
the Tomcat works fine, the problem is only I can't see the logs

.




2010/3/3 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Miriam esteve [mailto:miesvesa...@gmail.com]
  Subject: Re: Tomcat generate empty 0 kb logs
 
  my level set is Error.

 So then normal operation will produce ... 0 bytes.  Try leaving it at the
 default value of INFO and see what you get.

  - 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: Tomcat generate empty 0 kb logs

2010-03-03 Thread Caldarale, Charles R
 From: Miriam esteve [mailto:miesvesa...@gmail.com]
 Subject: Re: Tomcat generate empty 0 kb logs
 
 Error occurred during initialization of VM
 Could not reserve enough space for object heap
 Could not create the Java virtual machine.

The above would explain why your logs are empty - Tomcat isn't even starting.  
You apparently are requesting more heap space than your OS allows for the 
process type.  What platform are you on, and what do you have set in JAVA_OPTS 
or CATALINA_OPTS?

 the Tomcat works fine

Please reconcile that statement with the above error messages...

 - 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: DB connection error -Tomcat 6 config

2010-03-03 Thread Propes, Barry L
Appreciate it, Mark.

I'll rebuild the Tomcat collection with that jar and see if it will alleviate 
this issue.
 

-Original Message-
From: Mark Shifman [mailto:mark.shif...@yale.edu] 
Sent: Tuesday, March 02, 2010 7:08 PM
To: Tomcat Users List
Subject: Re: DB connection error -Tomcat 6 config

Propes, Barry L wrote:
 I wonder now...should I perhaps be using this jar?   ojdbc6.jar  ?

 Has anyone upgraded their Oracle drivers that's using TC 6 and JDK 1.6?

 If anyone has used these environments together and needed to make the change, 
 please apprise.
   
I am using ojdbc6.jar with tomcat 6 (two different versions) and it works just 
fine.  I am using dbcp that comes with tomcat 6 without any problems.

There were some things that weren't implemented correctly/well in ojdbc14, 
which work with ojdbc6, some calls for getting metadata from prepared 
statements or result sets (can't remember the exact details).  ojdbc6 seems to 
work just fine.

mas
 Thanks,

 Barry

 -Original Message-
 From: Propes, Barry L [GCG-NAOT]
 Sent: Tuesday, March 02, 2010 9:50 AM
 To: 'Tomcat Users List'
 Subject: RE: DB connection error -Tomcat 6 config

 Really? Well, when I was implementing connection pooling in 4.1.31, I 
 specifically remember having to use  ojdbc14_g.jar instead of ojdbc14.jar to 
 successfully get the conn pooling to work.

 I'll swap out the ojdbc14_g.jar  for the ojdbc14.jar and just use the latter 
 and see if that works.

 Thanks, Karthik.

 -Original Message-
 From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com]
 Sent: Monday, March 01, 2010 10:59 PM
 To: Tomcat Users List
 Subject: RE: DB connection error -Tomcat 6 config

 Hi

 Please double check the ojdbc14.jar size, Some times I find the jar files 
 corrupt due to various reasons.

 Also check only 1 copy of this 'jar' exists in /TOMCAT6.0.2.0/lib directory 
 and make sure the same does not exist within the web application.

 ojdbc14_g.jar is used for advance debug purpose, although it works try 
 with normal ojdbc14.jar




 With regards
 karthik

 -Original Message-
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Sent: Tuesday, March 02, 2010 4:44 AM
 To: 'Tomcat Users List'
 Subject: RE: DB connection error -Tomcat 6 config

 Sorry, no.

 webapps/chngctrl/META-INF/context.xml.

 Thanks, Chuck.

 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
 Sent: Monday, March 01, 2010 4:29 PM
 To: Tomcat Users List
 Subject: RE: DB connection error -Tomcat 6 config

   
 From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
 Subject: RE: DB connection error -Tomcat 6 config

 If I try to reference the resource reference in the 
 webapps/META-INF/context.xml file,
 

 Is that the real location?  If so, it's not valid.  The webapps directory is 
 the default directory under which each webapp is normally deployed; there 
 must be a webapp name between webapps and META-INF (e.g., ROOT).  Any 
 other construct is incorrect.

  - Chuck


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


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


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


 -
 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


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



RE: DB connection error -Tomcat 6 config

2010-03-03 Thread Propes, Barry L
Wow - thanks, Bob. Yeah, that's exactly what we have here.

I have narrowed down the problem or error simply to the naming context.
But why it worked before on 4.1.31 and won't now is a slight mystery.
Maybe in the older version something with server.xml overrode other instances 
where now META-INF/context.xml largley does the overriding. Either way, that 
info is correct, so I'm still troubleshooting.

Thanks for the info, Bob! 

-Original Message-
From: Bob Hall [mailto:rfha...@yahoo.com] 
Sent: Tuesday, March 02, 2010 7:39 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

--- On Tue, 3/2/10 at 3:39 PM, Propes, Barry L barry.l.pro...@citi.com wrote:

 Then that should work...are you using
 DBCP with it?
 
  I wonder now...should I perhaps be using this jar?
 ojdbc6.jar  ?
 
  Has anyone upgraded their Oracle drivers that's using
 TC 6 and JDK 1.6?
 
  If anyone has used these environments together and
 needed to make the change, please apprise.
 

We did *not* have to upgrade to ojdbc6; we are using:
  ojdbc14 (10.2.0.3.0)
  DBCP
  tomcat 6.0.20
  Java 1.6.0_16
  Oracle 10.2.0.4.0

- Bob


  

-
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: Tomcat generate empty 0 kb logs

2010-03-03 Thread Miriam esteve
How can the tomcat start with: start tomcat5, and I can access to my web
application and with startup.sh don't start???

Anyway,
I'm on Windows Vista and I have two setting of JAVA_OPTS,
one in the enviorement variables:
-server -XX:+UseParallelGC -Xmx876m -XX:MaxPermSize=2160m
-Djava.awt.headless=true
-Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
-Dfile.encoding=UTF-8 -Dsakai.demo=true

and the other ones in the GUI of tomcat5w:
-Dcatalina.base=E:\opt\tomcat
-Dcatalina.home=E:\opt\tomcat
-Djava.endorsed.dirs=E:\opt\tomcat\common\endorsed
-Djava.io.tmpdir=E:\opt\tomcat\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=E:\opt\tomcat\conf\logging.properties
-Xmx768m
-Xms768m
-XX:PermSize=128m
-XX:MaxPermSize=256m
-Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false

(One question about that,are these the same JAVA_OPTS??)

And I don't have CATALINA_OPTS

2010/3/3 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Miriam esteve [mailto:miesvesa...@gmail.com]
  Subject: Re: Tomcat generate empty 0 kb logs
 
  Error occurred during initialization of VM
  Could not reserve enough space for object heap
  Could not create the Java virtual machine.

 The above would explain why your logs are empty - Tomcat isn't even
 starting.  You apparently are requesting more heap space than your OS allows
 for the process type.  What platform are you on, and what do you have set in
 JAVA_OPTS or CATALINA_OPTS?

  the Tomcat works fine

 Please reconcile that statement with the above error messages...

  - 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: Deploy war

2010-03-03 Thread Kaushal Shriyan
On Wed, Mar 3, 2010 at 4:50 PM, André Warnier a...@ice-sa.com wrote:
 Pid wrote:

 On 03/03/2010 09:52, André Warnier wrote:

 Kaushal Shriyan wrote:

 Hi,

 At the moment, I stop,kill tomcat and scp the war to webapps folder
 and start tomcat server. is there a better way to do it ?


 http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html

 At the very least you could

 *without stopping Tomcat*

 upload an inactive version webapp.war-off

 and then rename it webapp.war once it's there, which would reduce the
 downtime.


 Which is what is explained - among other useful things like autoDeploy - in
 the section Deploying on a running Tomcat server.



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



Hi,

is it possible to restart tomcat using ant ? I googled and found out
that its possible using build.xml file.
Any example ?

Thanks and Regards,

Kaushal

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



Re: Tomcat generate empty 0 kb logs

2010-03-03 Thread Miriam esteve
I change -XX:MaxPermSize=2160m to 256m on JAVA_OPTS of enviorement
variables, and now, catalina.bat run works, and start tomcat, but, the log
is even empty.


2010/3/3 Miriam esteve miesvesa...@gmail.com

 How can the tomcat start with: start tomcat5, and I can access to my web
 application and with startup.sh don't start???

 Anyway,
 I'm on Windows Vista and I have two setting of JAVA_OPTS,
 one in the enviorement variables:
 -server -XX:+UseParallelGC -Xmx876m -XX:MaxPermSize=2160m
 -Djava.awt.headless=true
 -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
 -Dfile.encoding=UTF-8 -Dsakai.demo=true

 and the other ones in the GUI of tomcat5w:
 -Dcatalina.base=E:\opt\tomcat
 -Dcatalina.home=E:\opt\tomcat
 -Djava.endorsed.dirs=E:\opt\tomcat\common\endorsed
 -Djava.io.tmpdir=E:\opt\tomcat\temp
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=E:\opt\tomcat\conf\logging.properties
 -Xmx768m
 -Xms768m
 -XX:PermSize=128m
 -XX:MaxPermSize=256m
 -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false

 (One question about that,are these the same JAVA_OPTS??)

 And I don't have CATALINA_OPTS

 2010/3/3 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Miriam esteve [mailto:miesvesa...@gmail.com]

  Subject: Re: Tomcat generate empty 0 kb logs
 
  Error occurred during initialization of VM
  Could not reserve enough space for object heap
  Could not create the Java virtual machine.

 The above would explain why your logs are empty - Tomcat isn't even
 starting.  You apparently are requesting more heap space than your OS allows
 for the process type.  What platform are you on, and what do you have set in
 JAVA_OPTS or CATALINA_OPTS?

  the Tomcat works fine

 Please reconcile that statement with the above error messages...

  - 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: Deploy war

2010-03-03 Thread Gurkan Erdogdu
I wonder whether you have looked at
http://tomcat.apache.org/tomcat-6.0-doc/index.html or not

2010/3/3 Kaushal Shriyan kaushalshri...@gmail.com

 On Wed, Mar 3, 2010 at 4:50 PM, André Warnier a...@ice-sa.com wrote:
  Pid wrote:
 
  On 03/03/2010 09:52, André Warnier wrote:
 
  Kaushal Shriyan wrote:
 
  Hi,
 
  At the moment, I stop,kill tomcat and scp the war to webapps folder
  and start tomcat server. is there a better way to do it ?
 
 
  http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html
 
  At the very least you could
 
  *without stopping Tomcat*
 
  upload an inactive version webapp.war-off
 
  and then rename it webapp.war once it's there, which would reduce the
  downtime.
 
 
  Which is what is explained - among other useful things like autoDeploy -
 in
  the section Deploying on a running Tomcat server.
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 

 Hi,

 is it possible to restart tomcat using ant ? I googled and found out
 that its possible using build.xml file.
 Any example ?

 Thanks and Regards,

 Kaushal

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




-- 
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com


RE: Tomcat generate empty 0 kb logs

2010-03-03 Thread Caldarale, Charles R
 From: Miriam esteve [mailto:miesvesa...@gmail.com]
 Subject: Re: Tomcat generate empty 0 kb logs
 
 How can the tomcat start with: start tomcat5, and I can access to my
 web application and with startup.sh don't start???

The Windows start command initiates a service; the .bat scripts run Tomcat as a 
regular process.  As you've discovered, your heap settings were very different 
for the two environments.

 I'm on Windows Vista 

32- or 64-bit?

 one in the enviorement variables:
 -server -XX:+UseParallelGC -Xmx876m -XX:MaxPermSize=2160m

As you determined, the above MaxPermSize is outrageous.  Also, the -Xmx setting 
doesn't match what you have set for the service execution.

 and the other ones in the GUI of tomcat5w:
 -Djava.util.logging.config.file=E:\opt\tomcat\conf\logging.properties

Please post the above file to the list.

 (One question about that,are these the same JAVA_OPTS??)

JAVA_OPTS is used when running Tomcat via the scripts, the tomcat5w.exe 
settings when running as a service.  They do not have to match, but it's 
usually better to keep them in sync to eliminate confusion when switching 
between the two execution mechanisms.

 And I don't have CATALINA_OPTS

CATALINA_OPTS applies only to Tomcat itself when run from the scripts, whereas 
JAVA_OPTS applies to both Tomcat and the shutdown program; the latter can run 
quite happily with the default heap and other settings.

 - 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: Curious to know if the following is permitted

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

Karthik,

On 3/3/2010 6:56 AM, Karthik Nanjangude wrote:
 Hi
 
 just use whatever the webapps inside
 
 I do not follow-up
 
 My requirements were to expose the war to Outer world via http
 and also use / provide credential access for the same application's Business 
 layer from outside the war file via  standalone Client via JNDI via RMI-IIOP
 
 This activity is to done when the Web application is up and running only ( 
 probably EOD process )
 
 Axis mounted on Web application would solve this problem ...
 but exploring any other way around with out AXIS ...

I don't believe that Tomcat provides complete a JNDI service, including
remote connection capability. I believe it is in-process only. That
means that, in order to access the information in JNDI, you'd have to
build your own service to do it.

I may be wrong, but I think you'll have to go do JBoss or some other
J2EE container to get a complete JNDI service.

The reason we're asking you about your requirements is that we suspect
there may be a better way to accomplish your task.

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

iEYEARECAAYFAkuOiQgACgkQ9CaO5/Lv0PAn9gCfb8vH177HKhsP2m01nHl1KtpA
YpYAoJbm8rzrqPIRfAoBOaAD75LkYm5i
=APZS
-END PGP SIGNATURE-

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



RE: getServerName returns 'localhost'

2010-03-03 Thread vgud

I tried to log all request headers and notice three interesting headers:

x-forwarded-for : 10.0.0.24
x-forwarded-host : myRealDomain.com
x-forwarded-server : my.server.ip.address

So, tomcat(or someone else) does some forwarding and attach those headers on
request?

If so where and how it is configured?


n828cl wrote:
 
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: getServerName returns 'localhost'
 
 public java.lang.String getServerName()
  Returns the host name of the server to which the request was sent.
 It is the value of the part before : in the Host header value, if
 any, or the resolved server name, or the server IP address.
  Returns:
  a String containing the name of the server
 
 That does not seem to work in his case.
 
 Does it only work when the Host or Alias tags with the
 corresponding names are set ?
 
 The code shows that the HOST header is being used by getServerName(). 
 Testing with the RequestDumperFilter enabled in examples/WEB-INF/web.xml
 shows that it works as documented; here's a portion of the output from
 Tomcat running on my desktop with the default Host name of localhost:
 serverName=usrv-caldarcr.na.uis.unisys.com
 serverPort=8080
 
 It appears the OP has something else going on that's interfering with the
 target IP address.  (Internal routing, perhaps?)
 
  - 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
 
 
 

-- 
View this message in context: 
http://old.nabble.com/getServerName-returns-%27localhost%27-tp27767838p27770177.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: Access Log /Filter/?

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

Xie,

On 3/2/2010 6:20 PM, Xie Xiaodong wrote:
 Second, you are absolutely right about the log.info(). I first
 wrote like this for testing and forgot to get it back to debug
 level.

Don't forget that calling log.debug() with a bunch of string
concatenations still performs those string concatenations. It's better
to do something like this:

if(log.isDebugEnabled())
  log.debug(something + something else + a third thing);

 In modern jvm, it does not matter much between StringBuffer and 
 StringBuilder, jvm will change StringBuffer used in single thread
 scenario into StringBuilder automaticlly.

No, it won't: if you ask for StringBuffer, you'll get a StringBuffer. If
you just do a + b, the /compiler/ will use StringBuilder if your
target is 1.5+ but the JVM doesn't do anything like what you describe.

 You could google this information. There are some benchmark test
 about it.

I'd love to see an example demonstrating your claim.

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

iEUEARECAAYFAkuOid0ACgkQ9CaO5/Lv0PD7FQCYjz53of2knok9gwKfyShrecka
JACgjWY1WBpOYTSTJJ5dlDOO5BAnJJ4=
=8yWQ
-END PGP SIGNATURE-

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



Re: Access Log /Filter/?

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

Jason,

On 3/2/2010 7:21 PM, Jason Brittain wrote:
 Why does the request have to be an HTTP request in order to have the
 access log run?
 
 That does seem to be a bug.

Note that this is not actually a part of the AccessLogValve, it's just
part of Xie's implementation.

 By default, the access logger logs the common
 log web server
 format, but of course it doesn't have to, so it should log non-HTTP requests
 as well, but maybe
 only if a non-default pattern is configured?

Fair enough: most of the information you'd want to log is from HTTP
requests (like the URI, for instance). The only things that are
available for non-HTTP requests are:

- - current date/time
- - transaction time
- - number of bytes read and sent
- - local address
- - remote address
- - request attributes
- - server name

Actually, that's quite a bit, but I've never seen an HTTP log that
doesn't log the URI :)

 long t2 = System.currentTimeMillis();
 long time = t2 - t1;

 This isn't your choice, it's in the original code, but why not just do:

 long elapsed = System.currentTimeMillis();
 ...
 elapsed = System.currentTimeMillis() - elapsed;

 ??

 Fewer items on the stack, etc.

 
 Except that then it is more difficult to debug.  Right?  It isn't as easy to
 inspect the value of
 the current time if you perform the subtraction without first assigning the
 current time to a
 variable.

Fair enough, though debugging this timing code shouldn't really be required.

   private Date getDate() {
 // Only create a new Date once per second, max.
 long systime = System.currentTimeMillis();
 AccessDateStruct struct = currentDateStruct.get();
 if ((systime - struct.currentDate.getTime())  1000) {
 struct.currentDate.setTime(systime);
 struct.currentDateString = null;
 }
 return struct.currentDate;
 }

 I don't understand why this is ThreadLocal, instead of just synchronized
 across the object. Maybe it's slightly faster to avoid the
 synchronization and just use ThreadLocals, but I'm not sure how many
 requests per second a single Thread is going to process, so I'm not
 convinced that caching this data is worth the complexity it requires in
 this class. I'd love to hear from a Tomcat dev about this.

 
 Tomcat can (hopefully) answer a larger number of requests per second
 every year on decently modern hardware.  Benchmark it both ways on
 a reasonably good/wide machine and you'll see why avoiding the sync
 is helpful.  I don't think it muddies the code very badly here.

Okay. Certainly avoiding object creation is a good idea, and avoiding
highly-contended synchronization is a good idea, too. I'd like to see a
performance comparison between these strategies, though. Maybe I'll run
one :)

 The %b portion of the Combined Log Format is documented to be the size of
 the object returned to the client, not including the response headers.
 http://httpd.apache.org/docs/1.3/logs.html#common

Right. Presumably, the Content-Length is synonymous with the above, but
it might not be. Also, Content-Length is not always set, so you'll get a
lot of - written in the log even when response bodies actually has
content. In this implementation, %b is equivalent to %{Content-Length}o.

Counting bytes isn't that big of a deal, either. I'll submit a patch at
some point... maybe using a different pattern character.

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

iEYEARECAAYFAkuOjCAACgkQ9CaO5/Lv0PAAmgCgt9QVocFjXVNB3t4ib6fWOUIL
++YAoKdpBuT1uhobAIxasRsdw/PaK00e
=zS1q
-END PGP SIGNATURE-

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



Re: getServerName returns 'localhost'

2010-03-03 Thread Cyrille Le Clerc
Hello Ivan,

The headers x-forwarded-for, x-forwarded-host and x-forwarded-server
are typically added by Apache Httpd mod_proxy (1).

It seems that you use Apache Httpd mod_proxy in front of your Tomcat,
both located on the same server (this is the reason why get
localhost).

Your solution may be to look at the ProxyPreserveHost On directive
in Apache configuration (2).

If you use It would look like :

ProxyPreserveHost On
ProxyPass /mypath http://localhost:8080/mypath

Hope this helps,

Cyrille

--
Cyrille Le Clerc
clecl...@xebia.fr
http://blog.xebia.fr

(1) see http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers
(2) see http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost


On Wed, Mar 3, 2010 at 5:09 PM, vgud ivan.gudi...@yahoo.com wrote:

 I tried to log all request headers and notice three interesting headers:

 x-forwarded-for : 10.0.0.24
 x-forwarded-host : myRealDomain.com
 x-forwarded-server : my.server.ip.address

 So, tomcat(or someone else) does some forwarding and attach those headers on
 request?

 If so where and how it is configured?


 n828cl wrote:
 
  From: André Warnier [mailto:a...@ice-sa.com]
  Subject: Re: getServerName returns 'localhost'
 
  public java.lang.String getServerName()
       Returns the host name of the server to which the request was sent.
  It is the value of the part before : in the Host header value, if
  any, or the resolved server name, or the server IP address.
       Returns:
           a String containing the name of the server
 
  That does not seem to work in his case.
 
  Does it only work when the Host or Alias tags with the
  corresponding names are set ?
 
  The code shows that the HOST header is being used by getServerName().
  Testing with the RequestDumperFilter enabled in examples/WEB-INF/web.xml
  shows that it works as documented; here's a portion of the output from
  Tomcat running on my desktop with the default Host name of localhost:
          serverName=usrv-caldarcr.na.uis.unisys.com
          serverPort=8080
 
  It appears the OP has something else going on that's interfering with the
  target IP address.  (Internal routing, perhaps?)
 
   - 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
 
 
 

 --
 View this message in context: 
 http://old.nabble.com/getServerName-returns-%27localhost%27-tp27767838p27770177.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


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


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



Re: Access Log /Filter/?

2010-03-03 Thread Xie Xiaodong
Hello,


I think log.debug() method should first check current logging levels, or our
code will have those if() {} template everywhere.

I checked java.util.logging.Logger, and found this:

public void log(Level level, String msg, Object param1) {
if (level.intValue()  levelValue || levelValue == offValue) {
return;
}
LogRecord lr = new LogRecord(level, msg);
Object params[] = { param1 };
lr.setParameters(params);
doLog(lr);
}


Java 6 hotspot can determine that the StringBuffer synchronization isn't
actually used across threads in many cases, and thus it doesn't bother
synchronizing. Thus, the performance of the two classes becomes identical.

http://www.javalobby.org/java/forums/t88518.html

But it is more secure to not depend on specific jvm version, so it is more
appropriate to use StringBuilder when necessary.


On Wed, Mar 3, 2010 at 5:19 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jason,

 On 3/2/2010 7:21 PM, Jason Brittain wrote:
  Why does the request have to be an HTTP request in order to have the
  access log run?
 
  That does seem to be a bug.

 Note that this is not actually a part of the AccessLogValve, it's just
 part of Xie's implementation.

  By default, the access logger logs the common
  log web server
  format, but of course it doesn't have to, so it should log non-HTTP
 requests
  as well, but maybe
  only if a non-default pattern is configured?

 Fair enough: most of the information you'd want to log is from HTTP
 requests (like the URI, for instance). The only things that are
 available for non-HTTP requests are:

 - - current date/time
 - - transaction time
 - - number of bytes read and sent
 - - local address
 - - remote address
 - - request attributes
 - - server name

 Actually, that's quite a bit, but I've never seen an HTTP log that
 doesn't log the URI :)

  long t2 = System.currentTimeMillis();
  long time = t2 - t1;
 
  This isn't your choice, it's in the original code, but why not just do:
 
  long elapsed = System.currentTimeMillis();
  ...
  elapsed = System.currentTimeMillis() - elapsed;
 
  ??
 
  Fewer items on the stack, etc.
 
 
  Except that then it is more difficult to debug.  Right?  It isn't as easy
 to
  inspect the value of
  the current time if you perform the subtraction without first assigning
 the
  current time to a
  variable.

 Fair enough, though debugging this timing code shouldn't really be
 required.

private Date getDate() {
  // Only create a new Date once per second, max.
  long systime = System.currentTimeMillis();
  AccessDateStruct struct = currentDateStruct.get();
  if ((systime - struct.currentDate.getTime())  1000) {
  struct.currentDate.setTime(systime);
  struct.currentDateString = null;
  }
  return struct.currentDate;
  }
 
  I don't understand why this is ThreadLocal, instead of just synchronized
  across the object. Maybe it's slightly faster to avoid the
  synchronization and just use ThreadLocals, but I'm not sure how many
  requests per second a single Thread is going to process, so I'm not
  convinced that caching this data is worth the complexity it requires in
  this class. I'd love to hear from a Tomcat dev about this.
 
 
  Tomcat can (hopefully) answer a larger number of requests per second
  every year on decently modern hardware.  Benchmark it both ways on
  a reasonably good/wide machine and you'll see why avoiding the sync
  is helpful.  I don't think it muddies the code very badly here.

 Okay. Certainly avoiding object creation is a good idea, and avoiding
 highly-contended synchronization is a good idea, too. I'd like to see a
 performance comparison between these strategies, though. Maybe I'll run
 one :)

  The %b portion of the Combined Log Format is documented to be the size
 of
  the object returned to the client, not including the response headers.
  http://httpd.apache.org/docs/1.3/logs.html#common

 Right. Presumably, the Content-Length is synonymous with the above, but
 it might not be. Also, Content-Length is not always set, so you'll get a
 lot of - written in the log even when response bodies actually has
 content. In this implementation, %b is equivalent to
 %{Content-Length}o.

 Counting bytes isn't that big of a deal, either. I'll submit a patch at
 some point... maybe using a different pattern character.

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

 iEYEARECAAYFAkuOjCAACgkQ9CaO5/Lv0PAAmgCgt9QVocFjXVNB3t4ib6fWOUIL
 ++YAoKdpBuT1uhobAIxasRsdw/PaK00e
 =zS1q
 -END PGP SIGNATURE-

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




-- 
Sincerely yours and Best Regards,
Xie Xiaodong


Re: Tomcat generate empty 0 kb logs

2010-03-03 Thread Miriam esteve
 Windows Vista* 32 bit*

I just change the JAVA_OPTS and put both equal


-Xms768m
-Xmx768m
-XX:PermSize=256m
-XX:MaxPermSize=512m

The level set to INFO.

the catalina.bat run /startup.bat works, but logs not...

I attach the logging.properties.


2010/3/3 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Miriam esteve [mailto:miesvesa...@gmail.com]
  Subject: Re: Tomcat generate empty 0 kb logs
 
  How can the tomcat start with: start tomcat5, and I can access to my
  web application and with startup.sh don't start???

 The Windows start command initiates a service; the .bat scripts run Tomcat
 as a regular process.  As you've discovered, your heap settings were very
 different for the two environments.

  I'm on Windows Vista

 32- or 64-bit?**

  one in the enviorement variables:
  -server -XX:+UseParallelGC -Xmx876m -XX:MaxPermSize=2160m

 As you determined, the above MaxPermSize is outrageous.  Also, the -Xmx
 setting doesn't match what you have set for the service execution.

  and the other ones in the GUI of tomcat5w:
  -Djava.util.logging.config.file=E:\opt\tomcat\conf\logging.properties

 Please post the above file to the list.

  (One question about that,are these the same JAVA_OPTS??)

 JAVA_OPTS is used when running Tomcat via the scripts, the tomcat5w.exe
 settings when running as a service.  They do not have to match, but it's
 usually better to keep them in sync to eliminate confusion when switching
 between the two execution mechanisms.

  And I don't have CATALINA_OPTS

 CATALINA_OPTS applies only to Tomcat itself when run from the scripts,
 whereas JAVA_OPTS applies to both Tomcat and the shutdown program; the
 latter can run quite happily with the default heap and other settings.

  - Chuck


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


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



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

Tomcat+apache on name_based virtual hosts

2010-03-03 Thread chenll

Hi, I have a server which has only one IP and runs on Windows XP.  And I have 
two domain names: a.university.com and b.university.com. I have built two 
websites for both of them on the Apache 2. 
Now I installed another web application which runs on Tomcat 6, and want to 
load the web application when I enter http://b.university.com/webap in IE. What 
should I do? Thank you in advanced!

 
  
_
想知道明天天气如何?必应告诉你!
http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5form=MICHJ2

problems with welcome files

2010-03-03 Thread martin
Hi,
i have installed apache http 2.2.14 and tomcat 6.0.24. I deployed
railohttp://www.getrailo.org
3.1.2.001 final (cfml engine). I have to
use Windows XP and i have
administrative privileges.

This is my httpd-vhost.conf:
VirtualHost *:80
   ServerName railo
   DirectoryIndex index.cfm index.html
   ProxyRequests Off
   Proxy *
   Order deny,allow
   Allow from all
   /Proxy
   ProxyPass / ajp://railo:8009/
   ProxyPassReverse / ajp://railo:8009/
/VirtualHost


I added this to tomcats server.xml:
 Host name=railo
   Context path= docBase=C:/Tomcat6.0/webapps/railo /
 /Host


Railo has the following in its web.xml
welcome-file-list
 welcome-fileindex.cfm/welcome-file
   welcome-fileindex.cfml/welcome-file
/welcome-file-list

Everytime i try to access a directory which contains an index.cfm file i get
a HTTP 500 error (FileNotFoundException) from Tomcat.
I.E.
http://railo/coldbox/dashboard/index.cfm   This works.
http://railo/coldbox/dashboard   Does not work. I get this:

HTTP Status 500 -
--
*type* Exception report
*message*
*description* *The server encountered an internal error () that prevented it
from fulfilling this request.*
*exception*
java.io.FileNotFoundException: C:\webapps\viss-dev\coldbox\dashboard
(Zugriff verweigert)
   java.io.FileInputStream.open(Native Method)
   java.io.FileInputStream.init(Unknown Source)

 
railo.commons.io.res.type.file.FileResource.getInputStream(FileResource.java:198)
   railo.commons.io.IOUtil.copy(IOUtil.java:153)

 railo.runtime.engine.CFMLEngineImpl.serviceFile(CFMLEngineImpl.java:288)
   railo.loader.servlet.FileServlet.service(FileServlet.java:32)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
*note* *The full stack trace of the root cause is available in the Apache
Tomcat/6.0.24 logs.*
--
Apache Tomcat/6.0.24

WTF is wrong?


Re: Tomcat+apache on name_based virtual hosts

2010-03-03 Thread Jordan Michaels
You can do this by creating new Host and Context entries in the
server.xml file for each site.

For example:

 Host name=a.university.com appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false
  Context path= docBase=[PATH TO WEBAPP] /
 /Host

and

 Host name=b.university.com appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false
  Context path= docBase=[PATH TO WEBAPP] /
 /Host

Hope this helps!


Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions


chenll wrote:
 Hi, I have a server which has only one IP and runs on Windows XP.  And I have 
 two domain names: a.university.com and b.university.com. I have built two 
 websites for both of them on the Apache 2. 
 Now I installed another web application which runs on Tomcat 6, and want to 
 load the web application when I enter http://b.university.com/webap in IE. 
 What should I do? Thank you in advanced!
 
  
 
 _
 想知道明天天气如何?必应告诉你!
 http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5form=MICHJ2

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



Re: Tomcat+apache on name_based virtual hosts

2010-03-03 Thread Pid

On 03/03/2010 17:01, chenll wrote:


Hi, I have a server which has only one IP and runs on Windows XP.  And I have 
two domain names: a.university.com and b.university.com. I have built two 
websites for both of them on the Apache 2.
Now I installed another web application which runs on Tomcat 6, and want to 
load the web application when I enter http://b.university.com/webap in IE. What 
should I do? Thank you in advanced!



_
想知道明天天气如何?必应告诉你!
http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5form=MICHJ2


Please don't hijack an existing thread.

Start a new message, this means a completely new message addressed to 
the list, simply editing the subject line  body leaves headers in place 
that put your message in the middle of another (in this case, long) thread.



p

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



Re: Tomcat threads

2010-03-03 Thread Bharath Vasudevan
Hi Charles,

Let me explain the scenario. When tomcat gets a request, it does a socket
send to some other process to handle the request and then respond. This
would happen fast. But assuming 20k client requests come in at the same
time, the server would try to allocate 20k threads and handle it. Mostly the
system would trash and go down.

But if it was to be handled gracefully, we can have the threads pick up the
request throw it in a queue and let the worker threads work and respond. Let
me know if I am missing something here.

Bharath


On Tue, Mar 2, 2010 at 7:22 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Bharath Vasudevan [mailto:bharath@gmail.com]
  Subject: Re: Tomcat threads
 
  Why is it illlogical?

 40+ years of system architecture experience.

  If the number of requests increases, the number of threads
  that can be handled by the system goes down.

 You'll have to explain that one, since it doesn't make sense as written.

  The context switches and the pain to handle the switches makes
  handling of the requests in lesser threads which is scalable.

 Nor does that.  What are you categorizing as a lesser thread?  What makes
 those any more scalable than any other kind of thread?  You're free to set
 the thread pool limit to any value you want, including infinity.  Setting
 the limit to larger than what the logical and physical resources of the
 system you're running on can handle will induce performance problems (e.g.,
 page thrashing, excessive GCs) or outright failures as soon as someone
 decides to start pounding on your server.

  - 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: Tomcat generate empty 0 kb logs

2010-03-03 Thread Caldarale, Charles R
 From: Miriam esteve [mailto:miesvesa...@gmail.com]
 Subject: Re: Tomcat generate empty 0 kb logs
 
 I attach the logging.properties.

You can't - the list strips out attachments.  Paste the contents of the file 
directly into your message to the list.

 - 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: Tomcat threads

2010-03-03 Thread Mark Thomas
On 03/03/2010 17:21, Bharath Vasudevan wrote:
 Hi Charles,
 
 Let me explain the scenario. When tomcat gets a request, it does a socket
 send to some other process to handle the request and then respond. This
 would happen fast. But assuming 20k client requests come in at the same
 time, the server would try to allocate 20k threads and handle it. Mostly the
 system would trash and go down.
 
 But if it was to be handled gracefully, we can have the threads pick up the
 request throw it in a queue and let the worker threads work and respond. Let
 me know if I am missing something here.

Like the fact that Tomncat is open source and you could just look at the
source code for the various connectors and figure this all out for
yourself? You don't even have to read the source. The connectors
documentation covers this pretty well.

Mark



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



Re: Access Log /Filter/?

2010-03-03 Thread Xie Xiaodong
Hello, Christopher,


For log.debug() part, seems I misunderstood your meaning. Sorry about that,
you are right. But I do not think it matters too much. :)



On Wed, Mar 3, 2010 at 5:54 PM, Xie Xiaodong xxd82...@gmail.com wrote:

 Hello,


 I think log.debug() method should first check current logging levels, or
 our code will have those if() {} template everywhere.

 I checked java.util.logging.Logger, and found this:

 public void log(Level level, String msg, Object param1) {
 if (level.intValue()  levelValue || levelValue == offValue) {
 return;
 }
 LogRecord lr = new LogRecord(level, msg);
  Object params[] = { param1 };
 lr.setParameters(params);
 doLog(lr);
 }


 Java 6 hotspot can determine that the StringBuffer synchronization isn't
 actually used across threads in many cases, and thus it doesn't bother
 synchronizing. Thus, the performance of the two classes becomes identical.

 http://www.javalobby.org/java/forums/t88518.html

 But it is more secure to not depend on specific jvm version, so it is more
 appropriate to use StringBuilder when necessary.


 On Wed, Mar 3, 2010 at 5:19 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jason,

 On 3/2/2010 7:21 PM, Jason Brittain wrote:
  Why does the request have to be an HTTP request in order to have the
  access log run?
 
  That does seem to be a bug.

 Note that this is not actually a part of the AccessLogValve, it's just
 part of Xie's implementation.

  By default, the access logger logs the common
  log web server
  format, but of course it doesn't have to, so it should log non-HTTP
 requests
  as well, but maybe
  only if a non-default pattern is configured?

 Fair enough: most of the information you'd want to log is from HTTP
 requests (like the URI, for instance). The only things that are
 available for non-HTTP requests are:

 - - current date/time
 - - transaction time
 - - number of bytes read and sent
 - - local address
 - - remote address
 - - request attributes
 - - server name

 Actually, that's quite a bit, but I've never seen an HTTP log that
 doesn't log the URI :)

  long t2 = System.currentTimeMillis();
  long time = t2 - t1;
 
  This isn't your choice, it's in the original code, but why not just do:
 
  long elapsed = System.currentTimeMillis();
  ...
  elapsed = System.currentTimeMillis() - elapsed;
 
  ??
 
  Fewer items on the stack, etc.
 
 
  Except that then it is more difficult to debug.  Right?  It isn't as
 easy to
  inspect the value of
  the current time if you perform the subtraction without first assigning
 the
  current time to a
  variable.

 Fair enough, though debugging this timing code shouldn't really be
 required.

private Date getDate() {
  // Only create a new Date once per second, max.
  long systime = System.currentTimeMillis();
  AccessDateStruct struct = currentDateStruct.get();
  if ((systime - struct.currentDate.getTime())  1000) {
  struct.currentDate.setTime(systime);
  struct.currentDateString = null;
  }
  return struct.currentDate;
  }
 
  I don't understand why this is ThreadLocal, instead of just
 synchronized
  across the object. Maybe it's slightly faster to avoid the
  synchronization and just use ThreadLocals, but I'm not sure how many
  requests per second a single Thread is going to process, so I'm not
  convinced that caching this data is worth the complexity it requires in
  this class. I'd love to hear from a Tomcat dev about this.
 
 
  Tomcat can (hopefully) answer a larger number of requests per second
  every year on decently modern hardware.  Benchmark it both ways on
  a reasonably good/wide machine and you'll see why avoiding the sync
  is helpful.  I don't think it muddies the code very badly here.

 Okay. Certainly avoiding object creation is a good idea, and avoiding
 highly-contended synchronization is a good idea, too. I'd like to see a
 performance comparison between these strategies, though. Maybe I'll run
 one :)

  The %b portion of the Combined Log Format is documented to be the size
 of
  the object returned to the client, not including the response headers.
  http://httpd.apache.org/docs/1.3/logs.html#common

 Right. Presumably, the Content-Length is synonymous with the above, but
 it might not be. Also, Content-Length is not always set, so you'll get a
 lot of - written in the log even when response bodies actually has
 content. In this implementation, %b is equivalent to
 %{Content-Length}o.

 Counting bytes isn't that big of a deal, either. I'll submit a patch at
 some point... maybe using a different pattern character.

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

 iEYEARECAAYFAkuOjCAACgkQ9CaO5/Lv0PAAmgCgt9QVocFjXVNB3t4ib6fWOUIL
 ++YAoKdpBuT1uhobAIxasRsdw/PaK00e
 =zS1q
 -END PGP SIGNATURE-

 

Re: Tomcat threads

2010-03-03 Thread Bharath Vasudevan
Thanks Bill. Comet is something that I can dig into :).

On Tue, Mar 2, 2010 at 7:21 PM, Bill Barker billwbar...@verizon.net wrote:



 Caldarale, Charles R chuck.caldar...@unisys.com wrote in message
 news:99c8b2929b39c24493377ac7a121e21f96cb817...@usea-exch8.na.uis.unisys.com.
 ..

  From: Bharath Vasudevan [mailto:bharath@gmail.com]
 Subject: Re: Tomcat threads

 If we get a request on a thread, let some other thread do
 the work for it and store the response info. The thread
 which does the work writes the response on that request.


 If the processing is fast, why would you go to the complexity and overhead
 of switching to another thread to process the request?

 You should also read the servlet spec, in particular SRV.2.3.3.3:

 Implementations of the request and response objects are not guaranteed to
 be thread
 safe. This means that they should only be used within the scope of the
 request handling
 thread.

 References to the request and response objects should not be given to
 objects
 executing in other threads as the resulting behavior may be
 nondeterministic. If
 the thread created by the application uses the container-managed objects,
 such as
 the request or response object, those objects must be accessed only within
 the
 servlet's service life cycle and such thread itself should have a life
 cycle within
 the life cycle of the servlet's service method because accessing those
 objects
 after the service method ends may cause undeterministic problems.

 The illogical behavior you're asking for simply isn't allowed.


 At least not until Tomcat 7 ;).  In there, you can do exactly what the user
 is asking for using the AsyncContext.  The details are in the Servlet 3.0
 spec, but basically the request is handed off to another thread and the
 original one returns to the pool.  This also allows for two-way
 communication instead of relying on polling.

 Of course Comet offers similar functionality in Tomcat 6 if you don't mind
 being bound to Tomcat.


  - 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: Tomcat generate empty 0 kb logs

2010-03-03 Thread Miriam esteve
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the License); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an AS IS BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

handlers = 1catalina.org.apache.juli.FileHandler,
2localhost.org.apache.juli.FileHandler,
3manager.org.apache.juli.FileHandler, 4admin.org.apache.juli.FileHandler,
5host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler


# Handler specific properties.
# Describes specific configuration info for Handlers.


1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.

2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.

3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.

4admin.org.apache.juli.FileHandler.level = FINE
4admin.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4admin.org.apache.juli.FileHandler.prefix = admin.

5host-manager.org.apache.juli.FileHandler.level = FINE
5host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
5host-manager.org.apache.juli.FileHandler.prefix = host-manager.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter



# Facility specific properties.
# Provides extra control for each logger.


org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers =
2localhost.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers
= 3manager.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].handlers
= 4admin.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level
= INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers
= 5host-manager.org.apache.juli.FileHandler

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
#org.apache.catalina.startup.HostConfig.level = FINE
#org.apache.catalina.session.ManagerBase.level = FINE


2010/3/3 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Miriam esteve [mailto:miesvesa...@gmail.com]
  Subject: Re: Tomcat generate empty 0 kb logs
 
  I attach the logging.properties.

 You can't - the list strips out attachments.  Paste the contents of the
 file directly into your message to the list.

  - 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: Tomcat threads

2010-03-03 Thread Bharath Vasudevan
That would be the last go. Trying to figure out if there is techniques to
handle such scenarios. Looks like comet can asynchronously push data to the
user. If this is going to be seamless to the client, it might as well look
like a response for their request.

On Wed, Mar 3, 2010 at 9:25 AM, Mark Thomas ma...@apache.org wrote:

 On 03/03/2010 17:21, Bharath Vasudevan wrote:
  Hi Charles,
 
  Let me explain the scenario. When tomcat gets a request, it does a socket
  send to some other process to handle the request and then respond. This
  would happen fast. But assuming 20k client requests come in at the same
  time, the server would try to allocate 20k threads and handle it. Mostly
 the
  system would trash and go down.
 
  But if it was to be handled gracefully, we can have the threads pick up
 the
  request throw it in a queue and let the worker threads work and respond.
 Let
  me know if I am missing something here.

 Like the fact that Tomncat is open source and you could just look at the
 source code for the various connectors and figure this all out for
 yourself? You don't even have to read the source. The connectors
 documentation covers this pretty well.

 Mark



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




RE: Tomcat threads

2010-03-03 Thread Caldarale, Charles R
 From: Bharath Vasudevan [mailto:bharath@gmail.com]
 Subject: Re: Tomcat threads
 
 When tomcat gets a request, it does a socket send to some 
 other process to handle the request and then respond.

Tomcat doesn't do that - your webapp does.

You have now introduced a previously unmentioned dependency - that the response 
depends on the behavior of an external resource, unrelated to Tomcat.  That 
changes the picture considerably.  The neat thing the servlet 3.0 AsyncContext 
does is handle this case by letting you decouple the original Request and 
Response objects from the original processing thread.

 But assuming 20k client requests come in at the same time,
 the server would try to allocate 20k threads and handle it.

No, the server will allocate maxThreads request handlers; the other requests 
would sit in the TCP stack's queue (not in the JVM), up to the configured 
acceptCount value - which you can set as high as your OS allows.

 Mostly the system would trash and go down.

Which is my point about why you don't want to set maxThreads to arbitrarily 
large (or small) values.

 But if it was to be handled gracefully, we can have the 
 threads pick up the request throw it in a queue and let
 the worker threads work and respond.

Which you can do in your webapp by sending an interim response to the client 
and having the client poll for the final one.  You'd have to disable 
keep-alives as well.  The 3.0 spec allows the container to perform this task, 
rather than requiring the webapp to do so.

 - 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: Tomcat threads

2010-03-03 Thread Caldarale, Charles R
 From: Bharath Vasudevan [mailto:bharath@gmail.com]
 Subject: Re: Tomcat threads
 
 Looks like comet can asynchronously push data to the user.

You do understand that there really is no such thing as push (at least in 
HTTP)?  The client has to have a receive up, so you can't use just a plain 
browser - the client has to be Comet-compatible.

With Tomcat 7, you will be able to use the trick Bill B mentioned: send 
incomplete chunked responses to keep the client from timing out until the full 
response is ready, without dedicating a thread to the task.

 - 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: Tomcat threads

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

Bharath,

On 3/2/2010 7:42 PM, Bharath Vasudevan wrote:
 Why is it illlogical? Fast is a relative term. If the number of requests
 increases, the number of threads that can be handled by the system goes down
 . The context switches and the pain to handle the switches makes handling of
 the requests in lesser threads which is scalable.

If you can afford the memory and CPU to create a second thread pool that
does the real work of your webapp, why not just allocate those same
threads in the request processing thread pool?

Seems like a wash in terms of thread availability with a significant
reduction in overhead of managing multiple thread pools, passing data
between them, etc. and trying to work around a problem that really
doesn't exist.

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

iEYEARECAAYFAkuOpC4ACgkQ9CaO5/Lv0PCGXACgkVGoBYzmZwMUPGT9ZE5G8vlD
LqEAn1IX6EuxlfY4hPZGO5uJOzbb2gI8
=pvO1
-END PGP SIGNATURE-

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



Re: Tomcat threads

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

Bharath,

On 3/3/2010 12:21 PM, Bharath Vasudevan wrote:
 Let me explain the scenario. When tomcat gets a request, it does a socket
 send to some other process to handle the request and then respond. This
 would happen fast. But assuming 20k client requests come in at the same
 time, the server would try to allocate 20k threads and handle it. Mostly the
 system would trash and go down.
 
 But if it was to be handled gracefully, we can have the threads pick up the
 request throw it in a queue and let the worker threads work and respond. Let
 me know if I am missing something here.

Wouldn't you have to limit that queue, otherwise you might never catch
up with the requests and run out of memory? Limiting the work queue size
versus the thread pool size are equivalent in terms of user experience:
at some point, the remote requests are refused.

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

iEYEARECAAYFAkuOpKMACgkQ9CaO5/Lv0PB/GQCgk+dKujEGRKF69ZVjmn7uWcVA
rbAAniTg+2nvvOygxACU1tNCmRauitsS
=wO/z
-END PGP SIGNATURE-

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



RE: problems with welcome files

2010-03-03 Thread Caldarale, Charles R
 From: martin [mailto:mrt...@googlemail.com]
 Subject: problems with welcome files
 
 i have installed apache http 2.2.14 and tomcat 6.0.24.

Step 1: Get httpd out of the game; test with Tomcat's HTTP Connector first.  
When that works, add httpd back in.

 I added this to tomcats server.xml:
  Host name=railo
Context path= docBase=C:/Tomcat6.0/webapps/railo /
  /Host

Step 2: the above gets you the railo webapp deployed twice, once as default, 
once as railo.  Remove the Context element and rename the railo directory to 
ROOT (case sensitive, even on Windows).

Step 3: make sure the name railo is defined in your DNS box or hosts file, or 
add an Alias to the above Host for usable domain name.

 Railo has the following in its web.xml
 welcome-file-list
  welcome-fileindex.cfm/welcome-file
welcome-fileindex.cfml/welcome-file
 /welcome-file-list

What else is in its web.xml?  (In particular, servlet mappings.)

 http://railo/coldbox/dashboard/index.cfm   This works.
 http://railo/coldbox/dashboard   Does not work. I get this:

First fix your deployment problems as described above.

 - 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: Tomcat+apache on name_based virtual hosts

2010-03-03 Thread Caldarale, Charles R
 From: Jordan Michaels [mailto:jor...@viviotech.net]
 Subject: Re: Tomcat+apache on name_based virtual hosts
 
 You can do this by creating new Host and Context entries in the
 server.xml file for each site.

Please don't suggest putting Context elements in server.xml; that's ancient, 
dismal practice.  Place the Context elements in 
conf/Catalina/[host]/ROOT.xml, with a docBase attribute pointing to the 
location of the .war file or directory.

  Host name=a.university.com appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
   Context path= docBase=[PATH TO WEBAPP] /
  /Host
  Host name=b.university.com appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false
   Context path= docBase=[PATH TO WEBAPP] /
  /Host

Having the same appBase for multiple Host elements is asking for trouble, 
since the two hosts will scribble on top of each other.

 - 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: Tomcat threads

2010-03-03 Thread Bharath Vasudevan
Hmmm...

No, the server will allocate maxThreads request handlers; the other
requests would sit in the TCP stack's queue (not in the JVM), up to the
configured acceptCount value - which you can set as high as your OS allows.

I was assuming that the tomcat main thread is going to pick it up from the
TCP stack and let the web server thread handle the request. Wont tomcat
reject the request when max threads have been reached (since it would have
already picked up tcp layer)?

On Wed, Mar 3, 2010 at 9:45 AM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Bharath Vasudevan [mailto:bharath@gmail.com]
  Subject: Re: Tomcat threads
 
  When tomcat gets a request, it does a socket send to some
  other process to handle the request and then respond.

 Tomcat doesn't do that - your webapp does.

 You have now introduced a previously unmentioned dependency - that the
 response depends on the behavior of an external resource, unrelated to
 Tomcat.  That changes the picture considerably.  The neat thing the servlet
 3.0 AsyncContext does is handle this case by letting you decouple the
 original Request and Response objects from the original processing thread.

  But assuming 20k client requests come in at the same time,
  the server would try to allocate 20k threads and handle it.

 No, the server will allocate maxThreads request handlers; the other
 requests would sit in the TCP stack's queue (not in the JVM), up to the
 configured acceptCount value - which you can set as high as your OS allows.

  Mostly the system would trash and go down.

 Which is my point about why you don't want to set maxThreads to arbitrarily
 large (or small) values.

  But if it was to be handled gracefully, we can have the
  threads pick up the request throw it in a queue and let
  the worker threads work and respond.

 Which you can do in your webapp by sending an interim response to the
 client and having the client poll for the final one.  You'd have to disable
 keep-alives as well.  The 3.0 spec allows the container to perform this
 task, rather than requiring the webapp to do so.

  - 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: Access Log /Filter/?

2010-03-03 Thread Caldarale, Charles R
 From: Xie Xiaodong [mailto:xxd82...@gmail.com]
 Subject: Re: Access Log /Filter/?
 
 http://www.javalobby.org/java/forums/t88518.html

I think you're cherry-picking the data.  The most useful comment about 
StringBuilder in that thread was this:

Re: StringBuffer
 Thus, the performance of the two classes becomes identical.

Reality is more complicated than that.
- You can't rely on latest/hardest optimizations in the HotSpot Client VM, 
which is the VM you gotta use for most desktop apps, games and others.
- Optimizations are not portable. Just because Sun has optimizations X it 
doesn't mean that IBM, BEA, GCJ etc. (even at the same Java SE level) have it 
too, and vice-versa.
- Optimizations are fragile and difficult to predict. Say you have a 
StringBuffer that is non-escaping (thus benefits from lock elision etc) because 
it's a local var of a single method. Now if this method grows too big and you 
refactor it into multiple smaller, private helper methods, suddenly the 
StringBuffer is passed from one method to another and it's not anymore a 
non-escaping local... unless, thanks to inlining or smarter escape analysis, 
the optimized code can handle it again as non-escaping... but now you're 
depending on a combination of several optimizations, and it's increasingly 
difficult (at least for the average developer) to predict the compiler's 
behavior and to rely on its behavior.

Conclusion (for this particular optimization): Using StringBuilder is no more 
complex than StringBuffer, so there's no excuse to not use it when you now the 
buffer is unshared. Unlike some other optimizations, this doesn't confuse your 
code, doesn't create maintenance problems or incur increased development cost. 
in cases like this - where writing optimal code is just as easy as non-optimal 
code - I'd optimize since version 0.

 - 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: Access Log /Filter/?

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

Xie,

On 3/3/2010 11:54 AM, Xie Xiaodong wrote:
 I think log.debug() method should first check current logging levels, or our
 code will have those if() {} template everywhere.

[snip]

 For log.debug() part, seems I misunderstood your meaning. Sorry about that,
 you are right. But I do not think it matters too much. :)

Well, if were using tricks to avoid synchronization, we probably ought
to avoid four object creations (StringBuilder, char[] in sb, String, and
char[] in s) plus the character-copy operations. This is a filter that
is supposed to avoid performance impact on the webapp: this is such a
cheap optimization, it would be foolish not to do it.

 Java 6 hotspot can determine that the StringBuffer synchronization isn't
 actually used across threads in many cases, and thus it doesn't bother
 synchronizing. Thus, the performance of the two classes becomes identical.
 
 http://www.javalobby.org/java/forums/t88518.html

It's a rough reference from a comment on a blog. Gimmie something I can
really read, not I remember a guy saying once...

Jeremy Manson says this:

A final note. Some people think that there is no performance impact to
using StringBuffer instead of StringBuilder, because of all of the
clever things JVMs do to eliminate synchronization (I can blog about
this, too, if you want). This is a little unclear. Whether it can even
perform these optimizing transformations definitely depends wildly on
which JDK you use; I wrote a microbenchmark to test it, and the results
differed on different JDKs -- but all that microbenchmarks really
demonstrate is the performance of the microbenchmark.

(http://jeremymanson.blogspot.com/2008/08/dont-use-stringbuffer.html
from 24 August 2008)

 But it is more secure to not depend on specific jvm version, so it is more
 appropriate to use StringBuilder when necessary.

I agree. Using my own microbenchmark (below), these are the results I get:

(On my OpenVZ dev box, Linux 2.6 kernel)
$ java -showversion BufferVsBuilder 1000
java version 1.6.0_12
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode)

Priming...
Running...
Builder:   24538
Buffer:25745
Overhead:  1657

$ java -showversion BufferVsBuilder 1000
java version 1.6.0_12
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode)

Priming...
Running...
Builder:   24175
Buffer:25416
Overhead:  1656


(On my laptop, W7 32-bit)
F:\Users\Chris\Desktopjava -showversion BufferVsBuilder 1000
java version 1.6.0_18
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

Priming...
Running...
Builder:   27507
Buffer:31525
Overhead:  1183

F:\Users\Chris\Desktopjava -showversion BufferVsBuilder 1000
java version 1.6.0_18
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

Priming...
Running...
Builder:   27339
Buffer:31346
Overhead:  1116

It seems that, in these two environments, StringBuilder outperforms
StringBuffer by a small margin (5% on average in my Linux environment,
13% in my Microsoft Windows environment), but consistently.

It seems that the JVM has to do some work to even determine if the
synchronization can be eliminated before it can actually do it, so why
bother making it do that work in the first place? Avoiding
synchronization is simply the right choice.

- -chris

The code:
public class BufferVsBuilder
{
static long elapsedBuilder = 0;
static long elapsedBuffer = 0;
static long elapsedNothing = 0;

public static void testBuilder(long iterations)
{
long elapsed = System.currentTimeMillis();

for(long i=iterations; i0; --i)
{
StringBuilder sb = new StringBuilder(128);
sb.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
;
}

elapsed = System.currentTimeMillis() - elapsed;

elapsedBuilder += elapsed;
}

public static void testBuffer(long iterations)
{
long elapsed = System.currentTimeMillis();

for(long i=iterations; i0; --i)
{
StringBuffer sb = new StringBuffer(128);
sb.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
.append(some text)
 

Re: Tomcat 6.0.12 in windows vista 64 bits does not start

2010-03-03 Thread iainmac

Thanks for that but the files you mention are not there.

I went to 

commons/daemon/binaries/1.0.2/windows and downloaded 

commons-daemon-1.0.2-bin-windows.zip 

In that zip there is a prunsrv.exe in the base directory and the same in the
amd directory. i.e. not procrun.exe and procrunw.exe.

Sorry if I need my hand holding but I am very unfamiliar with this.

mturk wrote:
 
 On 02/26/2010 11:43 AM, iainmac wrote:

 Thanks - is it safe to use that with 6.0.24?

 
 Download from
 http://commons.apache.org/downloads/download_daemon.cgi
 Click on the 'browse download area'
 and go to the binaries - 1.0.2 - windows
 Download and extract .zip file and then rename
 procrun.exe to tomcat6.exe  for the required CPU arch.
 Rename procrunw.exe to tomcat6w.exe (same for all platforms)
 and copy those two files inside Tomcat bin directory.
 
 This is procedure we are going to implement with
 next Tomcat releases instead maintaining our
 set of binaries. Renaming and downloading will
 took place at build time of course.
 
 
 Regards
 -- 
 ^TM
 
 -
 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/Tomcat-6.0.12-in-windows-vista-64-bits-does-not-start-tp18967895p27772446.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 6.0.12 in windows vista 64 bits does not start

2010-03-03 Thread Caldarale, Charles R
 From: iainmac [mailto:iain_macau...@hotmail.com]
 Subject: Re: Tomcat 6.0.12 in windows vista 64 bits does not start
 
 Thanks for that but the files you mention are not there.

They are, just not quite as you expected.

 In that zip there is a prunsrv.exe in the base directory and 
 the same in the amd directory.

The prunmgr.exe is a 32-bit program that runs on both 32- and 64-bit Windows 
systems; rename that to tomcat6w.exe.  The amd64/prunsrv.exe program is the one 
you want for 64-bit Windows, and should be renamed to tomcat.exe.  Both should 
replace the executables of the same names that you have in Tomcat's bin 
directory.

 - 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: Tomcat threads

2010-03-03 Thread Peter Crowther
On 3 March 2010 18:24, Bharath Vasudevan bharath@gmail.com wrote:

 Hmmm...

 No, the server will allocate maxThreads request handlers; the other
 requests would sit in the TCP stack's queue (not in the JVM), up to the
 configured acceptCount value - which you can set as high as your OS
 allows.

 I was assuming that the tomcat main thread is going to pick it up from the
 TCP stack and let the web server thread handle the request. Wont tomcat
 reject the request when max threads have been reached (since it would have
 already picked up tcp layer)?

 No, because the container doesn't know when a thread might become
available.  Serving content after a delay is considered better than not
serving content at all, so the requests are simply queued in the TCP stack.

- Peter


RE: Tomcat+apache on name_based virtual hosts

2010-03-03 Thread chenll

Note: both a.university.com and b.university.com are built on Apache instead of 
Tomcat, so they are not in the directory of webapps. just 
a.university.com/webap is pointed to the web application which is built on 
Tomcat.
 
 From: chuck.caldar...@unisys.com
 To: users@tomcat.apache.org
 Date: Wed, 3 Mar 2010 12:17:47 -0600
 Subject: RE: Tomcat+apache on name_based virtual hosts
 
  From: Jordan Michaels [mailto:jor...@viviotech.net]
  Subject: Re: Tomcat+apache on name_based virtual hosts
  
  You can do this by creating new Host and Context entries in the
  server.xml file for each site.
 
 Please don't suggest putting Context elements in server.xml; that's 
 ancient, dismal practice. Place the Context elements in 
 conf/Catalina/[host]/ROOT.xml, with a docBase attribute pointing to the 
 location of the .war file or directory.
 
  Host name=a.university.com appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false
  Context path= docBase=[PATH TO WEBAPP] /
  /Host
  Host name=b.university.com appBase=webapps
  unpackWARs=true autoDeploy=true
  xmlValidation=false xmlNamespaceAware=false
  Context path= docBase=[PATH TO WEBAPP] /
  /Host
 
 Having the same appBase for multiple Host elements is asking for trouble, 
 since the two hosts will scribble on top of each other.
 
 - 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
 
  
_
MSN十年回馈,每位用户可免费获得价值25元的卡巴斯基反病毒软件2010激活码,快来领取!
http://kaba.msn.com.cn/?k=1

Re: check number of http connection in tomcat

2010-03-03 Thread Bill Barker



Caldarale, Charles R chuck.caldar...@unisys.com wrote in message 
news:99c8b2929b39c24493377ac7a121e21f96cb875...@usea-exch8.na.uis.unisys.com...

From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: check number of http connection in tomcat

1) the correct link is probably : http://XXXx:8080/manager


That will get you a 404 (at least on non-stone-age Tomcats).  The actual 
manager URL is:

http://XXXx:8080/manager/html



It's nice to see that 3.3.2 is still so popular.  I've gotten two questions 
about it in one week :).


Actually, the OP had the correct URL for TC 3.3.2.  It's called admin there, 
but works more like the manager for TC 4.0+.  Since it is from the 
stone-age, it has considerably less functionality.


To answer the OP, the instructions are in the index.html file under the 
/webapps/admin directory.  The short answer is that if you haven't changed 
the conf/apps-admin.xml (yes, TC 3.3 was the first one to have context 
configuration files), then you need to edit the conf/users/admin-users.xml 
to enable a user for the admin app.  The file posted by the OP is in the 
wrong  format (it is for TC 4.0+).


Of course, one of the things that the TC 3.3 admin app lacks is the ability 
to show the number of connections, so this will likely be of little use to 
the OP ;).  It mostly lets you start and stop webapps.  Since it shares 
connectors with later Tomcat versions, this information is available via JMX 
however.





- 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: Access to Tomcat's MBeans

2010-03-03 Thread Bill Barker



Pid p...@pidster.com wrote in message 
news:4b8e40b8.9070...@pidster.com...

On 03/03/2010 06:32, Caldarale, Charles R wrote:

From: Cummins College [mailto:cummins.grou...@gmail.com]
Subject: Access to Tomcat's MBeans

Could someone please help us how to access Tomcat's Mbeans
using Java code.


This is not a direct answer, but you could download the source for Lambda 
Probe (www.lambdaprobe.org) and see how it does it.


Or examine the source code of the Manager app, which I believe does that.



A good suggestion.

If you are running with a SecurityManager, then you will probably be SOL 
(and rightly so).  Otherwise, the main problem that has been reported here 
is to find the correct MBeanServer, so if you don't mind programming against 
Tomcat, using it's Registry class 
(http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/tomcat/util/modeler/Registry.html) 
saves pain if there are multiple MBeanServers, but this assumes that you are 
using TC 6.0.x.


Otherwise, startup Tomcat once with remote JMX enabled, and browse with the 
remote client to find the ObjectNames that you want, and just use normal JMX 
calls.


Otherwise, it's the same as anything


p


  - Chuck


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



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




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



Tomcat Resources: Configuring external jndi repository's resource in tomcat

2010-03-03 Thread CHITHS

We are moving from Sun appserver to tomcat 6.X server.
In Sun application server we had the ability to register an object
configured in an external jndi resource repositories in the local appserver
jndi using

external-jndi-resource elements in the application server config file
(domain.xml).

Eg:
 jndi-name=localJNDIName object-type=user
res-type=javax.naming.ldap.LdapContext
  
  
  /
  /


Is there an equivalent feature in tomcat?

If yes, please can u elaborate how to use it.

The intent is to bind an external jndi repository's resource as a Tomcat
JNDI's resource.
The webapps eployed within tomcat needs to just refer tomcat's JNDI to
access all objects


Regds,
Chiths

 

-- 
View this message in context: 
http://old.nabble.com/Tomcat-Resources%3A-Configuring-external-jndi-repository%27s-resource-in-tomcat-tp2046p2046.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


Re: Apache 2.2.3(mod_proxy_ajp) - Tomcat 6.0.13 Loadbalancing - error logs in apache

2010-03-03 Thread jkv

Thanks for the reply Ster,

But we don't have the privilege to upgrade Apache, because we are using Red
Had Enterprise Linux and we have to go with the default httpd installation
in it, i.e., 2.2.3, but is there a possibility for us to use mod_jk instead
of mod_proxy for load balancing? I read mod_proxy was quite new when 2.2.3
was released and is this issue related to mod_proxy rather than Apache
Server as a whole? I definitely can think of upgrading Tomcat.

We have a eye popping requirement to handle 15000 concurrent https users
simultaneously, an I am not sure a single Apache Server and five Tomcat
instances (what we now have) can take this?

Regards



Pid Ster wrote:
 
 On 26/02/2010 06:36, jkv wrote:

 We are using the above setup to load balance http and https request, for
 https request
 
 Apache HTTPD 2.2.3 was released on 28 Jul 2006, you should definitely 
 upgrade to the latest version, there have been *many* important updates 
 since then.
 
 Tomcat 6.0.13 was released on 14 May 2007, you should definitely upgrade 
 to the latest version.
 
 Please let us know if the upgraded applications still display the same 
 problem.
 
 
 p
 
 Apache is configured to serve the certificates and the request is
 actually
 being processed
 by 3 tomcat instances (TomcatA, TomcatB, TomcatB)running behind. We are
 getting a strange log in apache

 [error] ajp_read_header: ajp_ilink_receive failed
 [error] (120006)APR does not understand this error code: proxy: read
 response failed from (null) (localhost)

 I have another question like, when Apache forwards a http/https request
 to
 tomcat and suppose that tomcat takes too long to respond! will the same
 request be routed to a different tomcat??
 As we have not configured sticky sessions in Apache, We are having many
 instances where in the java application in TomcatA takes too long (throws
 exception because it waits to connect to another host which takes too
 long)
 in responding back to Apache and I can see logs in other tomcats, say
 TomcatB and TomcatC with a session Id x.NodeA, with
 empty body which throws exceptions in my application level, why does this
 occur and can this be eliminated?? I am not sure that this occurs only
 for
 https request where we get empty body.

 Apache configurations are as follows

 Proxy balancer://tomcatcluster
  Order deny,allow
  Allow from all
  BalancerMember ajp://localhost:8109/test route=NodeA
  BalancerMember ajp://localhost:8209/test route=NodeB
  BalancerMember ajp://localhost:8309/test route=NodeC
 /Proxy

 ProxyPass /test balancer://tomcatcluster lbmethod=byrequests
 nofailover=On
 ProxyPassReverse /test  ajp://localhost:8109/test
 ProxyPassReverse /test  ajp://localhost:8209/test
 ProxyPassReverse /test  ajp://localhost:8309/test

 Thanks in advance.
 
 
 -
 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/Apache-2.2.3%28mod_proxy_ajp%29---Tomcat-6.0.13-Loadbalancing---error-logs-in-apache-tp27714229p2097.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: check number of http connection in tomcat

2010-03-03 Thread André Warnier

Bill Barker wrote:



Caldarale, Charles R chuck.caldar...@unisys.com wrote in message 
news:99c8b2929b39c24493377ac7a121e21f96cb875...@usea-exch8.na.uis.unisys.com... 


From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: check number of http connection in tomcat

1) the correct link is probably : http://XXXx:8080/manager


That will get you a 404 (at least on non-stone-age Tomcats).  The 
actual manager URL is:

http://XXXx:8080/manager/html



It's nice to see that 3.3.2 is still so popular.  I've gotten two 
questions about it in one week :).


Actually, the OP had the correct URL for TC 3.3.2.  It's called admin 
there, but works more like the manager for TC 4.0+.  Since it is from 
the stone-age, it has considerably less functionality.


To answer the OP, the instructions are in the index.html file under the 
/webapps/admin directory.  The short answer is that if you haven't 
changed the conf/apps-admin.xml (yes, TC 3.3 was the first one to have 
context configuration files), then you need to edit the 
conf/users/admin-users.xml to enable a user for the admin app.  The file 
posted by the OP is in the wrong  format (it is for TC 4.0+).


Of course, one of the things that the TC 3.3 admin app lacks is the 
ability to show the number of connections, so this will likely be of 
little use to the OP ;).  It mostly lets you start and stop webapps.  
Since it shares connectors with later Tomcat versions, this information 
is available via JMX however.




I told you, we need guys over 50 to answer questions about Tomcat 3.3.2.
Maybe there's hope for us after all.

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



Re: Access to Tomcat's MBeans

2010-03-03 Thread André Warnier

Bill Barker wrote:



Otherwise, startup Tomcat once with remote JMX enabled, and browse with 
the remote client to find the ObjectNames that you want, and just use 
normal JMX calls.




And try this : http://code.google.com/p/jmxsh/


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



Re: Tomcat threads

2010-03-03 Thread Bharath Vasudevan
Thanks Folks.

On Wed, Mar 3, 2010 at 1:03 PM, Peter Crowther
peter.crowt...@melandra.comwrote:

 On 3 March 2010 18:24, Bharath Vasudevan bharath@gmail.com wrote:

  Hmmm...
 
  No, the server will allocate maxThreads request handlers; the other
  requests would sit in the TCP stack's queue (not in the JVM), up to the
  configured acceptCount value - which you can set as high as your OS
  allows.
 
  I was assuming that the tomcat main thread is going to pick it up from
 the
  TCP stack and let the web server thread handle the request. Wont tomcat
  reject the request when max threads have been reached (since it would
 have
  already picked up tcp layer)?
 
  No, because the container doesn't know when a thread might become
 available.  Serving content after a delay is considered better than not
 serving content at all, so the requests are simply queued in the TCP stack.

 - Peter