Only see html/code

2008-01-20 Thread Chris Baty
Hi Guys,
I'm running  Tomcat 5.5 and Apache 2, with Tomcat connector (Kind of a newbie). 
 I got my Tomcat working fine at /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers. 
 When I point the browser (locally) at localhost:8180/cwrecyclers/ I see 
exactly what I expect.  But when I look remotely also I see is the html.  I've 
looked at all my config files and they all look fine.  Could someone point me 
in the right direction?
Thanks
Chris

Apache:
VirtualHost  67.207.133.158:80
ServerAdmin [EMAIL PROTECTED]
ServerName  cwrecyclers.hopto.org

# Indexes + Directory Root.
DirectoryIndex index.jsp
DocumentRoot /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers/
#DocumentRoot /var/www/cwrecyclers/

JkMount /cwrecyclers/*.jsp cwrecyclers
JkMount /cwrecyclers/* cwrecyclers


# Globally deny access to the WEB-INF directory
 LocationMatch .*WEB-INF.*
deny from all
 /LocationMatch


# Logfiles
ErrorLog  /var/log/apache2/cwrecyclers.hopto.org.error.log
CustomLog /var/log/apache2/cwrecyclers.hopto.org.access.log combined
/VirtualHost



workers.properties
# Tomcat and Java configuration
#
workers.tomcat_home=/usr/share/tomcat5.5
workers.java_home=/usr/lib/jvm/java-1.5.0-sun
ps=/
worker.list=yougarage

# Definition for local worker using AJP 1.3
#
worker.yougarage.type=ajp13
worker.yougarage.host=yougarage.tv
worker.yougarage.port=8009
worker.yougarage.cachesize=20

worker.list=cwrecyclers

# Definition for local worker using AJP 1.3
#
worker.cwrecyclers.type=ajp13
worker.cwrecyclers.host=cwrecyclers.hopto.org
worker.cwrecyclers.port=8009
worker.cwrecyclers.cachesize=20






  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Re: Only see html/code

2008-01-20 Thread Martin Gainty
Hi Chris

is your webserver is forwarding/redirecting or retunfing in the response
anything other than html?
if so could you display these pages and your configuration from web.xml

M--
- Original Message -
From: Chris Baty [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Sunday, January 20, 2008 7:35 AM
Subject: Only see html/code


 Hi Guys,
 I'm running  Tomcat 5.5 and Apache 2, with Tomcat connector (Kind of a
newbie).  I got my Tomcat working fine at
/usr/share/tomcat5.5-webapps/ROOT/cwrecyclers.  When I point the browser
(locally) at localhost:8180/cwrecyclers/ I see exactly what I expect.  But
when I look remotely also I see is the html.  I've looked at all my config
files and they all look fine.  Could someone point me in the right
direction?
 Thanks
 Chris

 Apache:
 VirtualHost  67.207.133.158:80
 ServerAdmin [EMAIL PROTECTED]
 ServerName  cwrecyclers.hopto.org

 # Indexes + Directory Root.
 DirectoryIndex index.jsp
 DocumentRoot /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers/
 #DocumentRoot /var/www/cwrecyclers/

 JkMount /cwrecyclers/*.jsp cwrecyclers
 JkMount /cwrecyclers/* cwrecyclers


 # Globally deny access to the WEB-INF directory
  LocationMatch .*WEB-INF.*
 deny from all
  /LocationMatch


 # Logfiles
 ErrorLog  /var/log/apache2/cwrecyclers.hopto.org.error.log
 CustomLog /var/log/apache2/cwrecyclers.hopto.org.access.log
combined
 /VirtualHost



 workers.properties
 # Tomcat and Java configuration
 #
 workers.tomcat_home=/usr/share/tomcat5.5
 workers.java_home=/usr/lib/jvm/java-1.5.0-sun
 ps=/
 worker.list=yougarage

 # Definition for local worker using AJP 1.3
 #
 worker.yougarage.type=ajp13
 worker.yougarage.host=yougarage.tv
 worker.yougarage.port=8009
 worker.yougarage.cachesize=20

 worker.list=cwrecyclers

 # Definition for local worker using AJP 1.3
 #
 worker.cwrecyclers.type=ajp13
 worker.cwrecyclers.host=cwrecyclers.hopto.org
 worker.cwrecyclers.port=8009
 worker.cwrecyclers.cachesize=20









 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Only see html/code

2008-01-20 Thread Rainer Jung

Hi Chris,

Chris Baty schrieb:

Hi Guys, I'm running  Tomcat 5.5 and Apache 2, with Tomcat connector
(Kind of a newbie).  I got my Tomcat working fine at
/usr/share/tomcat5.5-webapps/ROOT/cwrecyclers.  When I point the
browser (locally) at localhost:8180/cwrecyclers/ I see exactly what I
expect.  But when I look remotely also I see is the html.  I've
looked at all my config files and they all look fine.  Could someone
point me in the right direction? Thanks Chris


What the exact URL, you are testing with?
Is it a JSP? Is it an index.jsp, i.e. do you ask for a directory, which 
includes an index.jsp?




Apache:
VirtualHost  67.207.133.158:80
ServerAdmin [EMAIL PROTECTED]
ServerName  cwrecyclers.hopto.org

# Indexes + Directory Root.


Don't do this. It will not work reliably. Instead include index.jsp in 
the list of welcome files on your webapp web.xml.



DirectoryIndex index.jsp


Don't do this. Since you forward all cwrecyclers requests to Tomcat, 
Apache httpd does not need to know about the webapp directory.

DocumentRoot /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers/
#DocumentRoot /var/www/cwrecyclers/



The first Mount is already included in the second one.

JkMount /cwrecyclers/*.jsp cwrecyclers
JkMount /cwrecyclers/* cwrecyclers


If you don't tel httpd about the webapp with DocumentRoot, you can 
remove this as well.



# Globally deny access to the WEB-INF directory
 LocationMatch .*WEB-INF.*
deny from all
 /LocationMatch


# Logfiles
ErrorLog  /var/log/apache2/cwrecyclers.hopto.org.error.log
CustomLog /var/log/apache2/cwrecyclers.hopto.org.access.log combined
/VirtualHost





workers.properties

 # Tomcat and Java configuration
 #
Remove the next two, they are useless.
workers.tomcat_home=/usr/share/tomcat5.5 
workers.java_home=/usr/lib/jvm/java-1.5.0-sun ps=/



worker.list=yougarage

# Definition for local worker using AJP 1.3
# 
worker.yougarage.type=ajp13
worker.yougarage.host=yougarage.tv 
worker.yougarage.port=8009


Remove cachesize, the default for Apache httpd are better:

worker.yougarage.cachesize=20

worker.list=cwrecyclers

# Definition for local worker using AJP 1.3
# 
worker.cwrecyclers.type=ajp13 
worker.cwrecyclers.host=cwrecyclers.hopto.org 
worker.cwrecyclers.port=8009


Remove cachesize, the default for Apache httpd are better:

worker.cwrecyclers.cachesize=20



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat App becomes Unresponsive

2008-01-20 Thread tc
I have been asked to investigate a tomcat/java application.

The basic problem is that this application sometimes becomes unresponsive
if more than one user uses it at a time.  Restarting Tomcat clears the
problem.  I don't think it has ever occurred when only one person was
using the app.

It is a fairly straight forward data-entry app; the data is stored in a
mysql database.

The developers think there may some issue with the database.  They have
also done multi-user testing without being able to reproduce the problem.

I'm looking for pointers to any resources on the web or elsewhere that can
help me track down the problem, or ideas about where to look, or what we
can do to improve post-freeze diagnosis of this problem.

I am also a developer, but I don't have a lot of experience with Java or
Tomcat.  I'm trying to bring a fresh perspective to this problem.

Thanks.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



mod_jk taking a single tomcat-worker offline for software maintenance

2008-01-20 Thread Thomas Glanzmann
Hello,
I have mod_jk version 1:1.2.18-3etch1 (which comes with Debian Etch) as
loadbalancer in front of four tomcats version 5.5.20-2etch2 that do not
duplicate sessions because of their size (100Mbyte per session; 120 -
500 users). My workers.property looks the following:

worker.list=router, jkstatus

worker.router.type=lb
worker.router.balance_workers=tomcat-01, tomcat-02, tomcat-03, tomcat-04

worker.tomcat-01.type=ajp13
worker.tomcat-01.host=tomcat-01
worker.tomcat-01.port=8009
worker.tomcat-01.lbfactor=1

worker.tomcat-02.type=ajp13
worker.tomcat-02.host=tomcat-02
worker.tomcat-02.port=8009
worker.tomcat-02.lbfactor=1

worker.tomcat-03.type=ajp13
worker.tomcat-03.host=tomcat-03
worker.tomcat-03.port=8009
worker.tomcat-03.lbfactor=1

worker.tomcat-04.type=ajp13
worker.tomcat-04.host=tomcat-04
worker.tomcat-04.port=8009
worker.tomcat-04.lbfactor=2

worker.jkstatus.type=status

I have to schedule once a week a software update, so I have to take a
tomcat server offline to upgrade the software. The problem is that I
don't want to kick any users. So I switch in jk_status the mode to
disabled. This works for most of the users. After their session times
out, they're gone. But I have a few sticky users, who leave their
browser open (and come back after 4 hours or a day) or bookmark a site
that contains a session id. Mod jk sees the session id and directs it to
the disabled tomcat. On the tomcat itself the session id is invalid, it
generates a new one and I have the user back on my disabled tomcat.
Duplicating the session to another tomcat is currently not possible
because a single session has around 100 Mbyte and even in off-hours like
right now, there are 100 active sessions.

How do other people handle this problem? Is there a way to make mod_jk
to check if the session is still active on the tomcat (maybe with a
newer version) and only puts a session to a disabled tomcat if indeed
the session is still active on that tomcat?

Thomas

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: mod_jk taking a single tomcat-worker offline for softwaremaintenance

2008-01-20 Thread Rainer Jung

Hi Thomas,

Thomas Glanzmann schrieb:

Hello,
I have mod_jk version 1:1.2.18-3etch1 (which comes with Debian Etch) as
loadbalancer in front of four tomcats version 5.5.20-2etch2 that do not
duplicate sessions because of their size (100Mbyte per session; 120 -
500 users). My workers.property looks the following:

worker.list=router, jkstatus

worker.router.type=lb
worker.router.balance_workers=tomcat-01, tomcat-02, tomcat-03, tomcat-04

worker.tomcat-01.type=ajp13
worker.tomcat-01.host=tomcat-01
worker.tomcat-01.port=8009
worker.tomcat-01.lbfactor=1

worker.tomcat-02.type=ajp13
worker.tomcat-02.host=tomcat-02
worker.tomcat-02.port=8009
worker.tomcat-02.lbfactor=1

worker.tomcat-03.type=ajp13
worker.tomcat-03.host=tomcat-03
worker.tomcat-03.port=8009
worker.tomcat-03.lbfactor=1

worker.tomcat-04.type=ajp13
worker.tomcat-04.host=tomcat-04
worker.tomcat-04.port=8009
worker.tomcat-04.lbfactor=2

worker.jkstatus.type=status

I have to schedule once a week a software update, so I have to take a
tomcat server offline to upgrade the software. The problem is that I
don't want to kick any users. So I switch in jk_status the mode to
disabled. This works for most of the users. After their session times
out, they're gone. But I have a few sticky users, who leave their
browser open (and come back after 4 hours or a day) or bookmark a site
that contains a session id. Mod jk sees the session id and directs it to
the disabled tomcat. On the tomcat itself the session id is invalid, it
generates a new one and I have the user back on my disabled tomcat.
Duplicating the session to another tomcat is currently not possible
because a single session has around 100 Mbyte and even in off-hours like
right now, there are 100 active sessions.

How do other people handle this problem? Is there a way to make mod_jk
to check if the session is still active on the tomcat (maybe with a
newer version) and only puts a session to a disabled tomcat if indeed
the session is still active on that tomcat?

Thomas


No, the design of mod_jk is stateless w.r.t. sessions. There are only 
the obvious solutions, i.e. assuming that after some time of disabling 
(time depending on typical session use cases like 10 minutes or an hour) 
you stop the worker and thereby redirect users that still try to use the 
node to another node. They'll get an error of course and would need to 
relogin.


Usually with some time of disable status you can reduce the number of 
sessions, that will need to relogin and thus be disturbed by your 
maintenance to about 5% (your mileage may vary).


If you want to improve user experience more, you could include a 
maintenance information in your app, like Please logout and relogin 
during the next hour because we have a maintenance scheduled starting at 



Regards,

Rainer

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 4.x, 5.x Client mode vs Server mode and JAVA_OPTS, how-to-know which is running?

2008-01-20 Thread David Brown
Hello TC committers, contributors and users. I am a long time TC user and it is 
the reason I have my current gig. In spite of the length of time using Tomcat I 
was not aware of the Client vs Server mode using the JAVA_OPTS variable in 
catalina or the startup script. Currently, I am using JMeter to assess the 
webapps running under TC. I suspect a lot of my clients problems reside with 
the deployed webapps and not-so-such problems with TC. This being said I would 
like to investigate performance issues with TC i.e. the so-called Client vs 
Server mode. Is there some definitive test to know which mode a currently 
running TC instance is running under? There are 3 instances I have to deal 
with: development deployment, test deployment and production deployment. 
Obviously, I cannot do anything to the  Production app server that would risk 
bouncing or shutting down the box. JMeter monitoring does not work under TC 4.x 
because there is no manager/status page from which to parse the XML 
 data. The currently running TC instances are deployed as Services under Windoe 
2003 servers. I examied the properties dialog boxes from the Services 
application and I do not see any reference to JAVA_OPTS or any type of startup 
params. If anyone has TC Client vs Server mode expertise or if you just want to 
rant and rave please reply. The particulars follow. Thanks, David.

OS: Windows 2003 server SP1
TC: 4.x and 5.x
JDK: 1.3.x and 1.4.x
Deployed as a service in all instances.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Fw: Tomcat 4.x, 5.x Client mode vs Server mode and JAVA_OPTS, how-to-know which is running?

2008-01-20 Thread Martin Gainty


I dont believe you can force JAVA VM to run in 'server-mode' configuration
on any windows box
perhaps if you try to use -server option configured in the  %JAVA_OPTS%
with a AMD64 bit processor?
http://java.sun.com/j2se/1.5.0/docs/guide/vm/server-class.html

M
 - Original Message -
 From: David Brown [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Sunday, January 20, 2008 2:42 PM
 Subject: Tomcat 4.x, 5.x Client mode vs Server mode and JAVA_OPTS,
 how-to-know which is running?


  Hello TC committers, contributors and users. I am a long time TC user
and
 it is the reason I have my current gig. In spite of the length of time
using
 Tomcat I was not aware of the Client vs Server mode using the JAVA_OPTS
 variable in catalina or the startup script. Currently, I am using JMeter
to
 assess the webapps running under TC. I suspect a lot of my clients
problems
 reside with the deployed webapps and not-so-such problems with TC. This
 being said I would like to investigate performance issues with TC i.e. the
 so-called Client vs Server mode. Is there some definitive test to know
which
 mode a currently running TC instance is running under? There are 3
instances
 I have to deal with: development deployment, test deployment and
production
 deployment. Obviously, I cannot do anything to the  Production app server
 that would risk bouncing or shutting down the box. JMeter monitoring does
 not work under TC 4.x because there is no manager/status page from which
to
 parse the XML
   data. The currently running TC instances are deployed as Services under
 Windoe 2003 servers. I examied the properties dialog boxes from the
Services
 application and I do not see any reference to JAVA_OPTS or any type of
 startup params. If anyone has TC Client vs Server mode expertise or if you
 just want to rant and rave please reply. The particulars follow. Thanks,
 David.
 
  OS: Windows 2003 server SP1
  TC: 4.x and 5.x
  JDK: 1.3.x and 1.4.x
  Deployed as a service in all instances.
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat App becomes Unresponsive

2008-01-20 Thread David Delbecq
If you are on a UNIX jvm, issue a signal 3 (SIGQUIT) to the jvm process 
when tomcat stops responding. It will dump on standard-out (normaly 
redirected to catalina.out) the list of Threads with a stacktrace for 
each. By invstigating stacktrace you will get clues as where the problem 
is. I don't know if mysql is protected against deadlocks, but it may be 
user1 locks ressource X, user2 locks ressource Y, user1 wait for Y to 
free, user2 wait for X to free, all other users are waiting for X to 
free, filling in the ThreadQueue, tomcat then look like unresponsive.


Of course the same kind of concurrency issue can occurs with 
synchronized{} blocks


Note, you can also get such dump on windows, it requires you to press 
magic key combinaison in JVM terminal (don't remember which)

tc a écrit :

I have been asked to investigate a tomcat/java application.

The basic problem is that this application sometimes becomes unresponsive
if more than one user uses it at a time.  Restarting Tomcat clears the
problem.  I don't think it has ever occurred when only one person was
using the app.

It is a fairly straight forward data-entry app; the data is stored in a
mysql database.

The developers think there may some issue with the database.  They have
also done multi-user testing without being able to reproduce the problem.

I'm looking for pointers to any resources on the web or elsewhere that can
help me track down the problem, or ideas about where to look, or what we
can do to improve post-freeze diagnosis of this problem.

I am also a developer, but I don't have a lot of experience with Java or
Tomcat.  I'm trying to bring a fresh perspective to this problem.

Thanks.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat App becomes Unresponsive

2008-01-20 Thread tc
Okay, sounds good.  Thanks.  Now if I could just figure out how to cause
it to happen...

 If you are on a UNIX jvm, issue a signal 3 (SIGQUIT) to the jvm process
 when tomcat stops responding. It will dump on standard-out (normaly
 redirected to catalina.out) the list of Threads with a stacktrace for
 each. By invstigating stacktrace you will get clues as where the problem
 is. I don't know if mysql is protected against deadlocks, but it may be
 user1 locks ressource X, user2 locks ressource Y, user1 wait for Y to
 free, user2 wait for X to free, all other users are waiting for X to
 free, filling in the ThreadQueue, tomcat then look like unresponsive.

 Of course the same kind of concurrency issue can occurs with
 synchronized{} blocks

 Note, you can also get such dump on windows, it requires you to press
 magic key combinaison in JVM terminal (don't remember which)
 tc a écrit :
 I have been asked to investigate a tomcat/java application.

 The basic problem is that this application sometimes becomes
 unresponsive
 if more than one user uses it at a time.  Restarting Tomcat clears the
 problem.  I don't think it has ever occurred when only one person was
 using the app.

 It is a fairly straight forward data-entry app; the data is stored in a
 mysql database.

 The developers think there may some issue with the database.  They have
 also done multi-user testing without being able to reproduce the
 problem.

 I'm looking for pointers to any resources on the web or elsewhere that
 can
 help me track down the problem, or ideas about where to look, or what we
 can do to improve post-freeze diagnosis of this problem.

 I am also a developer, but I don't have a lot of experience with Java or
 Tomcat.  I'm trying to bring a fresh perspective to this problem.

 Thanks.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



web.xml problems outside tomcat webapp folder

2008-01-20 Thread Frank Habermann
Hi,

i am using tomcat 6.0.14 on windows and create projects with eclipse.
For my own projects i do not use the webapps folder from the original package 
of tomcat. I use a different location. But with this solution i have some 
problems. Tomcat is not using all values from the web.xml. Perhaps jsp-config 
is not used. If i put my project to the original webapps folder it works. 
What is wrong here or can i do that this config values will work also in a 
different location?

thanks
Frank Habermann

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: web.xml problems outside tomcat webapp folder

2008-01-20 Thread Hassan Schroeder
On Jan 20, 2008 1:41 PM, Frank Habermann [EMAIL PROTECTED] wrote:

 i am using tomcat 6.0.14 on windows and create projects with eclipse.
 For my own projects i do not use the webapps folder from the original package
 of tomcat. I use a different location. But with this solution i have some
 problems. Tomcat is not using all values from the web.xml.

Do you have any initialization errors in your logs? If not, can you
create a reproducible test case (war)?

-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fw: Tomcat 4.x, 5.x Client mode vs Server mode and JAVA_OPTS, how-to-know which is running?

2008-01-20 Thread Rainer Jung

Martin Gainty schrieb:


I dont believe you can force JAVA VM to run in 'server-mode' configuration
on any windows box
perhaps if you try to use -server option configured in the  %JAVA_OPTS%
with a AMD64 bit processor?
http://java.sun.com/j2se/1.5.0/docs/guide/vm/server-class.html


C:\Programme\Java\jdk1.6.0_04\binjava -version
java version 1.6.0_04
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)

C:\Programme\Java\jdk1.6.0_04\binjava -server -version
java version 1.6.0_04
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)

Server class detection only describes the rules for automatic 
client/server choice. You can always force your choice.


David: if you don't specify via -server/-client, it will be client VM on 
32 Bit Win.


Regards,

Rainer


M

- Original Message -
From: David Brown [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Sunday, January 20, 2008 2:42 PM
Subject: Tomcat 4.x, 5.x Client mode vs Server mode and JAVA_OPTS,
how-to-know which is running?



Hello TC committers, contributors and users. I am a long time TC user

and

it is the reason I have my current gig. In spite of the length of time

using

Tomcat I was not aware of the Client vs Server mode using the JAVA_OPTS
variable in catalina or the startup script. Currently, I am using JMeter

to

assess the webapps running under TC. I suspect a lot of my clients

problems

reside with the deployed webapps and not-so-such problems with TC. This
being said I would like to investigate performance issues with TC i.e. the
so-called Client vs Server mode. Is there some definitive test to know

which

mode a currently running TC instance is running under? There are 3

instances

I have to deal with: development deployment, test deployment and

production

deployment. Obviously, I cannot do anything to the  Production app server
that would risk bouncing or shutting down the box. JMeter monitoring does
not work under TC 4.x because there is no manager/status page from which

to

parse the XML

 data. The currently running TC instances are deployed as Services under

Windoe 2003 servers. I examied the properties dialog boxes from the

Services

application and I do not see any reference to JAVA_OPTS or any type of
startup params. If anyone has TC Client vs Server mode expertise or if you
just want to rant and rave please reply. The particulars follow. Thanks,
David.

OS: Windows 2003 server SP1
TC: 4.x and 5.x
JDK: 1.3.x and 1.4.x
Deployed as a service in all instances.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: web.xml problems outside tomcat webapp folder

2008-01-20 Thread mgainty
yes..can you also display you configuration for default Virtual Host appBase
attribute?
In other words %TOMCAT_HOME%\conf\server.xml you should see appBase that
looks like
Host name=YourServerGoesHere appBase=webapps

M--
- Original Message -
Wrom: LMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMK
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, January 20, 2008 6:19 PM
Subject: Re: web.xml problems outside tomcat webapp folder


 On Jan 20, 2008 1:41 PM, Frank Habermann [EMAIL PROTECTED] wrote:

  i am using tomcat 6.0.14 on windows and create projects with eclipse.
  For my own projects i do not use the webapps folder from the original
package
  of tomcat. I use a different location. But with this solution i have
some
  problems. Tomcat is not using all values from the web.xml.

 Do you have any initialization errors in your logs? If not, can you
 create a reproducible test case (war)?

 --
 Hassan Schroeder  [EMAIL PROTECTED]

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 4.x, 5.x Client mode vs Server mode and JAVA_OPTS, how-to-know which is running?

2008-01-20 Thread Caldarale, Charles R
 From: David Brown [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat 4.x, 5.x Client mode vs Server mode and 
 JAVA_OPTS, how-to-know which is running?

Martin's comment about not being able to run in server mode on a Windows
box is, of course, fallacious.  A HotSpot JVM will run in server or
client mode on any box (although the client libraries don't seem to be
included in recent 64-bit Linux JVM downloads; don't know if they're
included in the 64-bit Windows versions).

 The currently running TC instances are deployed as 
 Services under Windoe 2003 servers.

To select the server vs client mode on Tomcat 5.0, 5.5, or 6.0 installed
as a Windows service, run the tomcat5w.exe program from Tomcat's bin
directory, go to the Java tab, and set the value in the Java Virtual
Machine box to use the server or client directory, as desired.  E.g.:
  jre_folder\bin\server\jvm.dll
  jre_folder\bin\client\jvm.dll

I would hope there's something similar for 4.1, but I've never used that
level.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: comet questions

2008-01-20 Thread Filip Hanik - Dev Lists
setting a timeout doesn't mean you're gonna get a timeout in exactly 5 
seconds, it means that after 5 seconds the server can time it out.

the server is still only checking for timeouts at certain intervals.

the way you describe it, like connectionTimeout drives your timeout, 
that would mean you're actually in an event, what I think it is, it 
could be related to chunk parsing, and that will be taken care of in the 
next release, hopefully out next week



filip

Peter Warren wrote:

Anyone else experiencing comet timeout problems with the nio connector
and the latest 6.0.x trunk?

My cometEvent.setTimeout(...) setting is ignored, but I do receive
comet timeouts based on the connectionTimeout setting for the nio
connector.  Setting the connectionTimeout to 10 secs gives me a comet
timeout event every 10 secs.  Setting it to 2 mins gives a comet
timeout every 2 mins.

The docs don't mention any link between the connectionTimeout settings
and comet timeout events that I can find.

Connector config:
Connector port=80
protocol=org.apache.coyote.http11.Http11NioProtocol maxThreads=500
connectionTimeout=1 keepAliveTimeout=3
maxKeepAliveRequests=-1 socket.soKeepAlive=true
socket.appReadBufSize=2048 socket.appWriteBufSize=2048
socket.rxBufSize=2048 socket.txBufSize=2048
acceptorThreadCount=2 redirectPort=8443 /

On Jan 9, 2008 12:23 PM, Peter Warren [EMAIL PROTECTED] wrote:
  

Using the nio connector from the latest 6.0.x trunk, I'm failing to
receive any comet timeouts.  I set the comet timeout to 5 secs but,
after waiting much longer than 5 secs, the only two events I receive
are begin and read.

event: BEGIN, subtype: null
for servlet: com.seekspeak.server.debug.CometTestServlet
time: Wed Jan 09 12:12:28 PST 2008
on cometEvent: [EMAIL PROTECTED]
with org.apache.tomcat.comet.timeout attribute: null
with org.apache.tomcat.comet.timeout.support attribute: true
event: READ, subtype: null
for servlet: com.seekspeak.server.debug.CometTestServlet
time: Wed Jan 09 12:12:28 PST 2008
on cometEvent: [EMAIL PROTECTED]
with org.apache.tomcat.comet.timeout attribute: 5000
with org.apache.tomcat.comet.timeout.support attribute: true

I see that the Http11NioProcessor changed some comet timeout specific
code from the previous rev.  Could this be having an impact?

Below is my test client and test servlet.  Am I doing something wrong?

Thanks,
Peter

SERVLET
---
public class CometTestServlet extends HttpServlet implements CometProcessor {

public void event(CometEvent cometEvent) throws IOException,
ServletException {
System.out.println(event:  + cometEvent.getEventType() + ,
subtype:  + cometEvent.getEventSubType());
System.out.println(\tfor servlet:  + this.getClass().getName());
System.out.println(\ttime:  + new Date(System.currentTimeMillis()));
System.out.println(\ton cometEvent:  + cometEvent);
System.out.println(\twith \org.apache.tomcat.comet.timeout\
attribute: 
+
cometEvent.getHttpServletRequest().getAttribute(org.apache.tomcat.comet.timeout));
System.out.println(\twith
\org.apache.tomcat.comet.timeout.support\ attribute: 
+
cometEvent.getHttpServletRequest().getAttribute(org.apache.tomcat.comet.timeout.support));
if (cometEvent.getEventType() == CometEvent.EventType.BEGIN) {
cometEvent.setTimeout(5 * 1000);
} else if (cometEvent.getEventType() == CometEvent.EventType.ERROR) {
cometEvent.close();
} else if (cometEvent.getEventType() == CometEvent.EventType.END) {
cometEvent.close();
} else if (cometEvent.getEventType() == CometEvent.EventType.READ) {
handleReadEvent(cometEvent);
}
}


private void handleReadEvent(CometEvent cometEvent) throws
IOException, ServletException {
ServerCometChannel talker = new ServerCometChannel(cometEvent);
respond(talker);
}

private void respond(ServerCometChannel channel) throws IOException {
String clientMessage = channel.receive();
if (clientMessage != null  clientMessage.length()  0) {
channel.send(comet succeeded);
}
}

private class ServerCometChannel {

private static final int OUTPUT_BUFFER_SIZE = 512;

private CometEvent cometEvent;

private InputStream inputStream;

private PrintWriter outputWriter;

public ServerCometChannel(CometEvent cometEvent) throws
IOException, ServletException {
this.cometEvent = cometEvent;
inputStream = cometEvent.getHttpServletRequest().getInputStream();
OutputStream outputStream =
cometEvent.getHttpServletResponse().getOutputStream();
this.outputWriter = new PrintWriter(new BufferedWriter(new
OutputStreamWriter(outputStream),
OUTPUT_BUFFER_SIZE));
}

private String receive() 

Re: comet end event

2008-01-20 Thread Filip Hanik - Dev Lists


now I get it. I just ran through a test case, and an END event was not 
thrown just because there was an end chunk.

the response is very much still open at that point

Filip

Peter Warren wrote:

What java.net.HttpURLConnection has to do with Tomcat and comet is
that HttpURLConnection is Java's implementation of an http client and
will likely be used by people developing comet apps for Tomcat.  In my
case, I want to use it because I can't use raw sockets on my applet
client due to permission problems when trying to use sockets behind a
proxy.

I understand that asynchronous writes are possible, but they're not
when using HttpURLConnection because HttpURLConnection sends a last
chunk message when it's done with its request.  Last chunk
generates a comet end event, which then requires that the connection
to the client be closed.

I guess I don't understand why tomcat needs to close the connection
after an END event.  It seems to me that the last chunk message from
the client simply indicates that the client is done sending its
request.  Why does the server need to close the connection when the
client finishes its request?

Peter

On Jan 19, 2008 6:01 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:
  

I'm not sure what HttpURLConnection has to do with Tomcat or comet.
and yes, asynchronous writes are possible, just not after the END or
ERROR events have been issued

Filip


Peter Warren wrote:


Does that mean that HttpURLConnection cannot be used for comet
requests with asynchronous (i.e. delayed) responses?

It would seem so to me since HttpURLConnection always sends an END
message before reading from the server and since the server can no
longer write to the client after closing the comet event.  Am I
missing something?  Is there a way to write to the client after the
comet event is closed?

Would you consider it a bug that HttpURLConnection is implemented that way?

Peter

On Jan 18, 2008 9:21 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote:

  

during end and error, you MUST close the Comet event

Filip


Peter Warren wrote:



What do I do to make the END event stop repeating?  I don't want to
close the CometEvent yet because the server is waiting for data to
send to the client.  If I don't close the comet event, the END event
repeats incessantly.

I'm using an unsigned applet as a comet client.  To accommodate
proxies, I've had to change my comet client to use HttpURLConnection
instead of Sockets.  (Accessing ProxySelector from an applet to create
a socket with a proxy generates an AccessControlException.)

HttpURLConnection unfortunately sends a 0crlf when its input stream is
retrieved for reading.  This generates a Comet END event.  Short of
closing the comet event, how can I make the server stop notifying me
of END events?  I can't close the comet event because I want to hold
onto the comet output stream for use later to send data to the client.

From the comet docs:
EventType.END: End may be called to end the processing of the request.
Fields that have been initialized in the begin method should be reset.
After this event has been processed, the request and response objects,
as well as all their dependent objects will be recycled and used to
process other requests. End will also be called when data is available
and the end of file is reached on the request input (this usually
indicates the client has pipelined a request).

This seems to indicate that even if I could get the END event to go
away quietly, the comet event's output stream might no longer be
usable anyway.

It seems to me I have 3 options:
1) figure out how to make the comet END event stop repeating and hope
it's output stream still works
2) figure out how to keep HttpURLConnection from sending 0crlf (don't
know if that can be done)
2) use sockets with ProxySelector (which requires signing my applet
and getting users to grant it privileges)

Thanks,
Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: 

Re: comet client doesn't receive server response

2008-01-20 Thread Filip Hanik - Dev Lists
yes, most proxies will wait until they receive the end of the response, 
before passing it on.

that's what you are seeing, a regular servlet, ends the response right away

Filip

Peter Warren wrote:

What is interesting to me is that the exact same client code only
using a different url (i.e. to a normal http servlet, not a comet
servlet) succeeds.  Is there something in comet response headers that
an antivirus app or firewall would pick up on?  Why would a request to
a normal servlet succeed and a comet servlet fail?  Keep in mind the
comet servlet has been shown to be funtional on numerous other
machines.

I believe I disabled all firewalls and antivirus on the suspect
machine, but I will double-check.

Thanks for your response,
Peter

On Jan 15, 2008 9:37 AM, Leonardo Fraga
[EMAIL PROTECTED] wrote:
  

Hello,

I've had problems with long http responses and some kind of antiviruses
and internet firewalls (avg family, basically).
They put a hook on the winsocket stack for http connections and buffer
everything you are receiving, until the end (or some high amount of
data), to run the checks. In my case, this buffering lasts for minutes,
with no byte sent back to the browser.

I think this can be a simple point to check...

Hugs,

Leonardo Fraga
Web Developer
[EMAIL PROTECTED]


Peter Warren wrote:



I posted this question along with some others recently.  I'm
re-posting it in its own thread with some additional information.

I have a comet client app that works on all the machines I've tested
except one.  The failing machine sends a comet request to the server
and then waits indefinitely for the response, even though the server
has sent the response and flushed the buffer.  I'm trying to figure
out why the client doesn't receive the response and would really
appreciate any tips.

Server is latest from 6.0.x trunk and using nio connector.

Failing machine info:
- runs windows xp
- windows firewall is turned off
- fails on multiple networks, so it doesn't seem to be a router or
firewall issue
- computer has no problem with other network access
- same test code pointed at a non-comet servlet (simply changing the
url) succeeds!!!

I used a socket monitoring tool to see if the client machine receives
the response at all.  It doesn't appear to.  Below are traces from a
successful machine and the failing machine.  I'm not a sockets expert,
so I don't really know what to look for, but the two things that stand
out to me are:
- failing machine uses localhost ip instead of its LAN ip (which is
192.168.1.102 according to ipconfig)
 - succeeding machine uses LAN ip
 - I don't understand why they're different
- failing machine receives WSAEWOULDBLOCK error instead of server response

I believe the WSAEWOULDBLOCK basically indicates that there's nothing
on the socket to be read, which seems to indicate that the failing
machine never receives the response at all.

Is this a comet problem?  Is it a routing problem?  Anyone have any
ideas for what the problem might be?  Any tips on what I should
investigate next?

Thanks,
Peter

SUCCEEDING MACHINE SOCKET TRACE
=
Connect 
Address:   66.241.85.247:80
Return Value:  0
Error Code:0

GetSockName 
Address:   192.168.1.133:1104
Return Value:  0
Error Code:0

SetSockOpt -
Level: SOL_SOCKET
Opt Name:  SO_KEEPALIVE
Opt Len:   4
Return Value:  0
Error Code:0
01 00 00 00 

Send ---
Address:   192.168.1.133:1104 = 66.241.85.247:80
Flags: 0
Return Value:  0
Error Code:0
Data:
POST /servlet/Receive HTTP/1.1
Host: www.seekspeak.com
User-Agent: SeekSpeak
Connection: keep-alive
Content-Type: text/plain
Transfer-Encoding: chunked

2c
source_chat_id=192.168.1.1%3A486547763981705


Recv ---
Address:   192.168.1.133:1104 = 66.241.85.247:80
Flags: 0
Return Value:  0
Error Code:0
Data:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=4618F4394D4924A5629628ED1CD2ADDE; Path=/
Transfer-Encoding: chunked
Date: Thu, 10 Jan 2008 07:55:05 GMT

49
OK
COMMAND
INVITATION_ACCEPTED
tutorial_client
Invitation accepted...


FAILING MACHINE SOCKET TRACE
=
Connect 
Address:   66.241.85.247:80
Return Value:  0
Error Code:0

GetSockName 
Address:   127.0.0.1:2085
Return Value:  0
Error Code:0

SetSockOpt -
Level: SOL_SOCKET
Opt Name:  SO_KEEPALIVE
Opt Len:   4
Return Value:  0
Error Code:0
01 00 00 00 

Send 

Re: mod_jk taking a single tomcat-worker offline for softwaremaintenance

2008-01-20 Thread Thomas Glanzmann
Rainer,

 No, the design of mod_jk is stateless w.r.t. sessions. There are only the 
 obvious solutions, i.e. assuming that after some time of disabling (time 
 depending on typical session use cases like 10 minutes or an hour) you stop 
 the worker and thereby redirect users that still try to use the node to 
 another node. They'll get an error of course and would need to relogin.

 Usually with some time of disable status you can reduce the number of 
 sessions, that will need to relogin and thus be disturbed by your 
 maintenance to about 5% (your mileage may vary).

 If you want to improve user experience more, you could include a 
 maintenance information in your app, like Please logout and relogin during 
 the next hour because we have a maintenance scheduled starting at 

thank you a lot for the fast follow-up and the clarification of the
stateless architecture of mod_jk in case of session ids. I will continue
to do the obvious as you described it.

Thomas

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]