Tomcat config with APACHE and mutliple VHOST

2006-05-05 Thread Pascal
Hello,

I not really found revelant info on internet about this.

Here is what we plan to do.

We have currently APACHE and mutli^ple vhost on few shared IP. We'd like to 
allow to some or all vhost to use jsp/servlet. So we will install TOMCAT and 
mod_JK

Here is our config snapshot
apache in /etc/httpd/
vhost conf file in /etc/httpd/conf.d/
public_html (or docuemntroot in every vhost) are in 
/home/user_account/domain_name/html

So our question is :
What would be the best configrution to allow all users or some users to have 
jsp file in their html directory ?
What is the best way, 1 apache instance and multiple Tomcat instances or manage 
everything with vhost ?

If you could give us a web pointer or some snip config exemple of server.xml, 
web.xml, vhost-conf files, worker.properties we will really apreciate it
Also were should we add the context ? and where have to be all files (like 
WEB-INF, etc...) ? 

Thanks a ton for your help, HowTo

Pascal

Re: Tomcat config with APACHE and mutliple VHOST

2006-05-05 Thread Pascal

Yes Apache serves the Static pages and PHP

We have 150 Vhost in fact.

Some of our best client would like to use jsp/servlet in addition to their 
existing php/htm file


Pascal
- Original Message - 
From: "Parsons Technical Services" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Saturday, May 06, 2006 3:09 AM
Subject: Re: Tomcat config with APACHE and mutliple VHOST


Any reason you need Apache? You can do the Vhost with Tomcat alone. Just 
an option.


Doug


- Original Message - 
From: "Pascal" <[EMAIL PROTECTED]>

To: 
Sent: Friday, May 05, 2006 9:03 PM
Subject: Tomcat config with APACHE and mutliple VHOST


Hello,

I not really found revelant info on internet about this.

Here is what we plan to do.

We have currently APACHE and mutli^ple vhost on few shared IP. We'd like 
to allow to some or all vhost to use jsp/servlet. So we will install 
TOMCAT and mod_JK


Here is our config snapshot
apache in /etc/httpd/
vhost conf file in /etc/httpd/conf.d/
public_html (or docuemntroot in every vhost) are in 
/home/user_account/domain_name/html


So our question is :
What would be the best configrution to allow all users or some users to 
have jsp file in their html directory ?
What is the best way, 1 apache instance and multiple Tomcat instances or 
manage everything with vhost ?


If you could give us a web pointer or some snip config exemple of 
server.xml, web.xml, vhost-conf files, worker.properties we will really 
apreciate it
Also were should we add the context ? and where have to be all files (like 
WEB-INF, etc...) ?


Thanks a ton for your help, HowTo

Pascal


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat config with APACHE and mutliple VHOST

2006-05-06 Thread Pascal

Hello

Nobody could help me please or give a web pointer to help us to well 
configure Tomcat with Apache with a lot of vhosts


Thanks by advance

Pascal





Yes Apache serves the Static pages and PHP

We have 150 Vhost in fact.

Some of our best client would like to use jsp/servlet in addition to their 
existing php/htm file


Pascal
- Original Message - 
From: "Parsons Technical Services" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Saturday, May 06, 2006 3:09 AM
Subject: Re: Tomcat config with APACHE and mutliple VHOST


Any reason you need Apache? You can do the Vhost with Tomcat alone. Just 
an option.


Doug


- Original Message - 
From: "Pascal" <[EMAIL PROTECTED]>

To: 
Sent: Friday, May 05, 2006 9:03 PM
Subject: Tomcat config with APACHE and mutliple VHOST


Hello,

I not really found revelant info on internet about this.

Here is what we plan to do.

We have currently APACHE and mutli^ple vhost on few shared IP. We'd like 
to allow to some or all vhost to use jsp/servlet. So we will install 
TOMCAT and mod_JK


Here is our config snapshot
apache in /etc/httpd/
vhost conf file in /etc/httpd/conf.d/
public_html (or docuemntroot in every vhost) are in 
/home/user_account/domain_name/html


So our question is :
What would be the best configrution to allow all users or some users to 
have jsp file in their html directory ?
What is the best way, 1 apache instance and multiple Tomcat instances or 
manage everything with vhost ?


If you could give us a web pointer or some snip config exemple of 
server.xml, web.xml, vhost-conf files, worker.properties we will really 
apreciate it
Also were should we add the context ? and where have to be all files 
(like WEB-INF, etc...) ?


Thanks a ton for your help, HowTo

Pascal


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat config with APACHE and mutliple VHOST

2006-05-08 Thread Pascal

Hello all,

Thanks Fabio and Pedro.

Pedro : I ahd already readen this 
http://www.csse.uwa.edu.au/~ryan/tech/tomcat.html , but there is smethink I 
do not understand.
Ok you update your vhost to add an handler for jsp page, with jkmount, it's 
fine
Ok you define all your vhost in server.xml : arfff so you have two 
definitions for every vhosts, one in the vhost.conf file itself and one in 
server.xml. Not very manageable but why not, and we could try to automatise 
this, so it could be fine


What is a trouble for us is this
Other file that needs editing is workers.properties First thing. Add the 
connection name to the worker.list

worker.list=ajp12, ajp13, connect_id
Next add that connection to the worker
worker.connect_id.port=8112
worker.connect_id.host=virtual.domainname.com
worker.connect_id.type=ajp13


Ok we add a connexion name, but it means to create a workers.properties for 
every vhosts ? Basicly it means we have to restart apache/tomcat every time 
we add a new vhost ? also where the workers.properties should be ? in the 
vhost documentroot ? in the tomcat dir ? in the WEB-INF dir of every vhosts 
? I think it is this last case no ?


Also with this solution does the auto-deploy will work ?


Thanks a ton

Pascal


Hi Pascal, hi All,

I'm very interested on this topic too.

I'm using Apache with vhosts + mod_jk + 1 tomcat with vhosts.
You have to configure the same vhosts in apache and tomcat (look  
tomcat conf docs).


I this should be possible to configure multiple tomcat instances (not in 
LB) too (one for each vhost).


But, at the moment, I'm not satisfy about these solutions because:
- the first it' very hard to manage because anytime you add a vhost you 
have to restart tomcat (an this procude a disservice)and often I have 
1 vhost => 1 web app


- with the second solution you will have decouple domains but too many 
instances (and resources)


I admit I'm not completely up to date with the last tomcat releses.

Have someone other ideas ?

thanks,
Fabio



Pedro Silveira Vieira da Silva wrote:

I think what you need is to use modjk:
http://tomcat.apache.org/connectors-doc/


Here are some examples how to use it:
http://www.csse.uwa.edu.au/~ryan/tech/tomcat.html

Pedro Silva


Pascal wrote:


Hello

Nobody could help me please or give a web pointer to help us to well
configure Tomcat with Apache with a lot of vhosts

Thanks by advance

Pascal






Yes Apache serves the Static pages and PHP

We have 150 Vhost in fact.

Some of our best client would like to use jsp/servlet in addition to
their existing php/htm file

Pascal
- Original Message - From: "Parsons Technical Services"
<[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Saturday, May 06, 2006 3:09 AM
Subject: Re: Tomcat config with APACHE and mutliple VHOST




Any reason you need Apache? You can do the Vhost with Tomcat alone.
Just an option.

Doug


- Original Message - From: "Pascal" <[EMAIL PROTECTED]>
To: 
Sent: Friday, May 05, 2006 9:03 PM
Subject: Tomcat config with APACHE and mutliple VHOST


Hello,

I not really found revelant info on internet about this.

Here is what we plan to do.

We have currently APACHE and mutli^ple vhost on few shared IP. We'd
like to allow to some or all vhost to use jsp/servlet. So we will
install TOMCAT and mod_JK

Here is our config snapshot
apache in /etc/httpd/
vhost conf file in /etc/httpd/conf.d/
public_html (or docuemntroot in every vhost) are in
/home/user_account/domain_name/html

So our question is :
What would be the best configrution to allow all users or some users
to have jsp file in their html directory ?
What is the best way, 1 apache instance and multiple Tomcat instances
or manage everything with vhost ?

If you could give us a web pointer or some snip config exemple of
server.xml, web.xml, vhost-conf files, worker.properties we will
really apreciate it
Also were should we add the context ? and where have to be all files
(like WEB-INF, etc...) ?

Thanks a ton for your help, HowTo

Pascal


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED

Re: Tomcat config with APACHE and mutliple VHOST

2006-05-08 Thread Pascal

Thank you Fabio

You don't have to create a connector per IP ? or vhost ?
I only have to create a connector for localhost ? and for both no ssl port 
and ssl port ?


We have few IP and Few domains per IP

I'm sorry I'm a newbie in Tomcat.

To resume I have to
Define virtualhost in server.xml
Define a connector in server.xml
And define only ONE worker.properties ?

In the exemple here http://www.csse.uwa.edu.au/~ryan/tech/tomcat.html he, in 
fact, declare a worker.list with different protocol ajp12, ajp13 and a 
connecter_id and then define for every vhost a worker.connect_id.host


In this case it means few instances of Tomcat. So in worker.properties how I 
delcare few vhosts/IP knowing there is few IPs


A localhost worker definition is enough and allow to have only one isntance 
of Tomcat for every vhost on every IPs ?


is that correct ?

Thanks for your help

Pascal

 What is a trouble for us is this
Other file that needs editing is workers.properties First thing. Add the 
connection name to the worker.list

worker.list=ajp12, ajp13, connect_id
Next add that connection to the worker
worker.connect_id.port=8112
worker.connect_id.host=virtual.domainname.com
worker.connect_id.type=ajp13


Ok we add a connexion name, but it means to create a workers.properties 
for every vhosts ? Basicly it means we have to restart apache/tomcat 
every time we add a new vhost ? also where the workers.properties should 
be ? in the vhost documentroot ? in the tomcat dir ? in the WEB-INF dir 
of every vhosts ? I think it is this last case no ?
It's enought to define only one worker because that is the link between 
apache and tomcat (in fact in server.xml you declare only one ajp 
connector).


Many connectors (usually) mean many tomcat instances.

Fabio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat config with APACHE and mutliple VHOST

2006-05-08 Thread Pascal


Oups

Ok in fact I should create few connector (one per IP/port non SSL/SSL)  and 
then only one worker.properties ?


Is that correct ?

Like an other thread show


   

...

Pascal

Thank you Fabio

You don't have to create a connector per IP ? or vhost ?
I only have to create a connector for localhost ? and for both no ssl port 
and ssl port ?


We have few IP and Few domains per IP

I'm sorry I'm a newbie in Tomcat.

To resume I have to
Define virtualhost in server.xml
Define a connector in server.xml
And define only ONE worker.properties ?

In the exemple here http://www.csse.uwa.edu.au/~ryan/tech/tomcat.html he, 
in fact, declare a worker.list with different protocol ajp12, ajp13 and a 
connecter_id and then define for every vhost a worker.connect_id.host


In this case it means few instances of Tomcat. So in worker.properties how 
I delcare few vhosts/IP knowing there is few IPs


A localhost worker definition is enough and allow to have only one 
isntance of Tomcat for every vhost on every IPs ?


is that correct ?

Thanks for your help

Pascal

 What is a trouble for us is this
Other file that needs editing is workers.properties First thing. Add 
the connection name to the worker.list

worker.list=ajp12, ajp13, connect_id
Next add that connection to the worker
worker.connect_id.port=8112
worker.connect_id.host=virtual.domainname.com
worker.connect_id.type=ajp13


Ok we add a connexion name, but it means to create a workers.properties 
for every vhosts ? Basicly it means we have to restart apache/tomcat 
every time we add a new vhost ? also where the workers.properties should 
be ? in the vhost documentroot ? in the tomcat dir ? in the WEB-INF dir 
of every vhosts ? I think it is this last case no ?
It's enought to define only one worker because that is the link between 
apache and tomcat (in fact in server.xml you declare only one ajp 
connector).


Many connectors (usually) mean many tomcat instances.

Fabio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie: Deploying .war file, getting it working with MySQL

2006-05-08 Thread Pascal

Hello

Do you tried to connect to your databse normaly (I mean without tomcat) to 
see if your user/pwd and database are set correctly in Mysql


Like this for example
#mysql -uUSER -pPASSWORD DATABASE

Are you sure the user have access authority to this databse from localhost ?

I know this is very simple but sometimes

Pascal
- Original Message - 
From: "Hugh Morgan" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Monday, May 08, 2006 5:16 PM
Subject: Re: Newbie: Deploying .war file, getting it working with MySQL



Franck Borel wrote:

Try this:





usernameroot

passwordROOT_PASSWORD

driverClassNamecom.mysql.jdbc.Driver

urljdbc:mysql://localhost/authority




Same error (after changing paramater ;) ).  Did make me think though, what 
is authority?  Should I have cganged this (to the name of the database for 
example)?


Thanks again,

Hugh



-- Franck



Franck Borel wrote:


Where did you place your Realm block?

It must be placed inside the context block like this:


   



I did not have it here, I had it in the Engine tag.  I have now
changed it, and stoped and restarted the server.  I still get the same
error. The relavent bit of my server.xml file looks like this -

   
...
 
...
 
   
 
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat config with APACHE and mutliple VHOST

2006-05-08 Thread Pascal

Fabio

Thanks a ton :)

So I'll try this config.
- 1 connector
- all vhost defined in server.xml
- 1 worker.properties (arff this last one I can't figure out how it can 
work, isn't it also use for auto-deploy war ? Ireally not need a 
worker.properties per vhost... anyway I'll try)


and we'll see...

One time again thank you for gived us some times

Pascal


- Original Message - 
From: "Fabio Gurgone" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Monday, May 08, 2006 5:34 PM
Subject: Re: Tomcat config with APACHE and mutliple VHOST



Pascal,

"normally", in your kind of configuration, tomcat connector listen on all 
your IPs.

When the *.jsp request arrives (main points):
- Apache checks if it's managing this vhost (VirtualHost)
- JkMount says (this is tomcat stuff)
- mod_jk speaks with Tomcat (connector)
- Catalina checks if it's managing this vhost (Host)
- Catalina serves the page to Apache
- Apache return the page to the client

One communication link between Apache and Tomcat should be enough (I'm 
using this conf on some servers).


bye,
Fabio

Pascal wrote:

Thank you Fabio

You don't have to create a connector per IP ? or vhost ?
I only have to create a connector for localhost ? and for both no ssl 
port and ssl port ?


We have few IP and Few domains per IP

I'm sorry I'm a newbie in Tomcat.

To resume I have to
Define virtualhost in server.xml
Define a connector in server.xml
And define only ONE worker.properties ?

In the exemple here http://www.csse.uwa.edu.au/~ryan/tech/tomcat.html he, 
in fact, declare a worker.list with different protocol ajp12, ajp13 and a 
connecter_id and then define for every vhost a worker.connect_id.host


In this case it means few instances of Tomcat. So in worker.properties 
how I delcare few vhosts/IP knowing there is few IPs


A localhost worker definition is enough and allow to have only one 
isntance of Tomcat for every vhost on every IPs ?


is that correct ?

Thanks for your help

Pascal

 What is a trouble for us is this
Other file that needs editing is workers.properties First thing. Add 
the connection name to the worker.list

worker.list=ajp12, ajp13, connect_id
Next add that connection to the worker
worker.connect_id.port=8112
worker.connect_id.host=virtual.domainname.com
worker.connect_id.type=ajp13


Ok we add a connexion name, but it means to create a workers.properties 
for every vhosts ? Basicly it means we have to restart apache/tomcat 
every time we add a new vhost ? also where the workers.properties 
should be ? in the vhost documentroot ? in the tomcat dir ? in the 
WEB-INF dir of every vhosts ? I think it is this last case no ?
It's enought to define only one worker because that is the link between 
apache and tomcat (in fact in server.xml you declare only one ajp 
connector).


Many connectors (usually) mean many tomcat instances.

Fabio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Does the securePort for Cluster/Channel/Receiver work yet?

2015-04-30 Thread pascal
Hi List

I'm trying to add encryption to session-replication and came along this
posts from January 2015
http://marc.info/?l=tomcat-user&m=142063952322011&w=2
as a follow up to a message from 2009.
So, I'm wondering as well if this feature is really implemented.

I added
  securePort="4500"
to 

Re: Does the securePort for Cluster/Channel/Receiver work yet?

2015-05-04 Thread pascal
Hi List

This was all done with tomcat-7.0.27 (sorry for being behind)
>

I just tried with 8.0.21 with the same result.
I would even appreciate a "don't bother trying" response from someone with
better insight into the code.
I'm also not complaining about a missing feature, the only bug may be in
the documentation :-)

Cheers Pascal


Re: Does the securePort for Cluster/Channel/Receiver work yet?

2015-05-05 Thread pascal
Hi Chris

2015-05-04 22:13 GMT+02:00 Christopher Schultz :

> Pascal,
>
> On 5/4/15 10:56 AM, pascal wrote:
> > This was all done with tomcat-7.0.27 (sorry for being behind)
> >>
> >
> > I just tried with 8.0.21 with the same result. I would even
> > appreciate a "don't bother trying" response from someone with
> > better insight into the code. I'm also not complaining about a
> > missing feature, the only bug may be in the documentation :-)
>
> If possible, please repeat your tests with 7.0.latest. Tons of fixes
> have been made to the clustering components within Tomcat.
>

Just tried with 7.0.61 with the same result.

I expect to have a tomcat listening on the port I specify with securePort=
as described here
https://tomcat.apache.org/tomcat-7.0-doc/config/cluster-receiver.html#Common_Attributes

I added this sole option to my working server.xml, restart tomcat and check
with netstat
Would you agree that I at least try it the right way?

That being said, I don't believe there are any supported options for
> secure communications for clustering.
>

Usually there are more SSL related settings like "use key x",  "trust CA
y", etc.
So probably this is really not implemented.

If you are using static membership, you could use stunnel or OpenVPN
> or something similar to encrypt your traffic. I'm not sure if OpenVPN
> can tunnel multicast,


Yes, that was my plan B as well. I'd say static membership and stunnel
or OpenVPN and multicast should work.

Cheers Pascal


Re: Why cannot I put JSVC into a shell script to run

2006-09-01 Thread Pascal Bleser
Patrick Wang wrote:
> Thanks for the reply, you are correct. The same command line doesnot work 
> when I
> put into a shell command. I used the command netstat to see if Tomcat has
> started since it listen to the port.

Rather use lsof -i instead of netstat + having to grep the output:

if lsof -i:8080 &>/dev/null; then
  # something is listening on 8080
else
  # nothing is listening on 8080
fi


Another approach is to use netcat in "zero I/O mode" to make a TCP
connect on the port:

if netcat -n -w 1 -z localhost 8080; then
  # something responds to connect on 8080
else
  # nothing responds to connect on 8080
fi

N.B.:
 -n is to avoid host and protocol name lookups
 -w 1 is to set the timeout for the connect to 1 second
 -z is for "zero I/O mode" -- i.e. just connect() and close

> Command from console works, starting shell script not working without an error
> shown up on the console.

Just a wild guess: what about your JAVA_HOME, JRE_HOME and other
environment variables that affect Tomcat ?

Are you starting that shell script from the same environment as when
you do it with the command, directly ?
Same environment means: same user, also from an interactive shell, etc...

If, for example, that shell script is being started by init as root,
you will end up having a totally different environment as when you log
in into an interactive shell.

> Since I am new to the bash shell script, I am not sure how to debug it.

bash -x ./my_script.sh

> I checked the catalina.err, it seems cannot find a file, classpath was not
> setup? But everything in the console works great. Could the environment on the
> console and shell script different?

See above.

Personally, I always setup the full environment (well, at least the
environment variables that affect Tomcat) in bin/setenv.sh
If that file exists, it will automatically be sourced by catalina.sh

That's where you should do your environment settings, especially
JAVA_HOME and JRE_HOME.
Do not rely on the environment as it is setup by an interactive login
(e.g. ~/.profile or ~/.bashrc)

e.g.
---8<---
JAVA_HOME=/usr/java/jdk1.5.0
JRE_HOME=$JAVA_HOME
JAVA_OPTS="-Xms128m -Xmx128m"
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME JRE_HOME
---8<---

cheers
-- 
  -o) Pascal Bleser   ATOS Worldline/Aachen(DE)
  /\\   System Architect  WLP Business Platform
 _\_v "Really, I'm not out to destroy Microsoft.  That will
just be a completely unintentional side effect."-L.Torvalds


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



HttpSessionListener with session replication (cluster)

2006-09-25 Thread Pascal Bleser
What happens when a HttpSession times out in a cluster, wrt
HttpSessionListeners ?

Will the HttpSessionListener be notified with a HttpSessionEvent on
_each_ node or only on the node that decides to destroy the session ?

JSR-154 (Servlet 2.4 spec) [1] says:
"SRV.10.7 Distributed Containers
In distributed Web containers, HttpSession instances are scoped to the
particular JVM servicing session requests, and the ServletContext
object is scoped to the Web container’s JVM. Distributed containers
are not required to propagate either servlet context events or
HttpSession events to other JVMs. Listener class instances
are scoped to one per deployment descriptor declaration per Java
Virtual Machine."

[1] http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

Hence it is not *required* for a Servlet Container implementation to
propagate HttpSessionEvents to each cluster node on HttpSession timeout.

But what about Tomcat ? ;)
(I know, I could test it myself, which is most probably what I'm going
to do anyway, but if anyone has/had a similar "issue", any feedback
would be highly appreciated)


Background: our security framework is keeping computed ACLs in a cache
in the ServletContext of each node, and we only replicate the
credentials as part of the HttpSessions (to reduce the session
replication payload as those ACL lists can be pretty big).
But we have to remove those cached ACLs when the HttpSession times
out, using a HttpSessionListener.
In a Servlet Container cluster, the ACLs would be computed and cached
on each node on the fly, but also have to be flushed out of the cache
on each node (hence, the question about HttpSessionEvents being fired
on each cluster node or not).

Thanks for any information or pointers :)

cheers
-- 
  -o) Pascal Bleser   ATOS Worldline/Aachen(DE)
  /\\   System Architect  WLP Business Platform
 _\_v "Really, I'm not out to destroy Microsoft.  That will
just be a completely unintentional side effect."-L.Torvalds


-
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: Help with Tomcat Clustering and load balancing

2006-09-29 Thread Pascal Bleser
Anil Ranka wrote:
>  I am new with Tomcat Clustering feature. I have configured my three
> tomcats nodes in cluster mode and they are talking to each other no issues.
> Out these three nodes N1, N2 and N3 only one node will be ACTIVE node and
> rest two will be PASSIVE. ACTIVE means my app will be loaded on only one
> node. When this ACTIVE node goes down, using clustering mechanism I am able
> to load my APP on next node from list. This scenario works very well. 
> NO ISSUES!!!

I presume that means you are using session replication (probably in
"pooled" mode) across the Tomcat nodes.

> Now to out side world I have to give URL so that they can submit jobs to
> this clustered nodes. Here I get lost. I am assuming I need load
> balancer/proxy will which will route my request to ACTIVE node.

You don't need a load balancer, as you have a hot standby scenario
and, hence, only one Tomcat node is active at a time.

A load balancer is only needed when you want to use several Tomcat
nodes in parallel (hence, "active/active" scenario).

> My question is : How to configure load balancer/proxy server to route my
> request to any specific ACTIVE node.

Well, you have a vast number of options especially if you consider a
more mature server platform (e.g. Linux), which offers a lot of
technical solutions to this problem.

On Linux, I would say that one of the most robust solutions is to use
two Tomcat nodes with heartbeat [1] and a VIP (Virtual IP address).
With this approach, an IP address is configured as an IP alias on the
active node (that's the "VIP"). Just map your DNS name to that VIP
instead of the "real IPs" of the nodes.
With heartbeat, the Tomcat nodes will monitor each other and when the
active node fails to service (either dies completely, e.g. hardware
failure, taken down for maintainance, Tomcat crashes or just fails to
service a request in a specified amount of time (= load is too high)),
the other node will perform a takeover.
In this case, a takeover just means to move the VIP address to the
fallback node, which then becomes the active one (this works very
reliably, using RARP).
This is a very stable and tested architecture, works extremely well.
Once heartbeat is set up correctly on both nodes, it just runs and
runs. Rock solid from my experience (even with much more complex
scenarios such as combined with Linux Virtual Server, shared storage,
rinetd and mon).

Another option is to put a director node in front of the Tomcat nodes.
There, again, a lot of different options can be used.
A very simple (and effective) one is to use "pen" [2]:
  pen -e 192.168.1.2:8080 80 192.168.1.1:8080
The example above will make pen listen on port 80 and redirect to
192.168.1.1 on port 8080. When 192.168.1.1 is not reachable, it will
redirect to 192.168.1.2 instead (also on port 8080), called the
"emergency node" (-e).
For further details, consult the pen documentation at [2].

To avoid having the director as a single point of failure (using
VRRP), read [3]

The same can be done without having director nodes, see [4]

Other options are Apache2 with mod_jk, LVS [5], haproxy [6], ...

[1] heartbeat: http://linux-ha.org/
[2] pen: http://siag.nu/pen/
[3] http://siag.nu/pen/vrrpd-linux.shtml
[4] http://siag.nu/pen/vrrpd-linux2.shtml
[5] http://www.linuxvirtualserver.org/
[6] http://haproxy.1wt.eu/ and
http://haproxy.1wt.eu/download/1.2/doc/haproxy-en.txt

hope this helps

-- 
  -o) Pascal Bleser   ATOS Worldline/Aachen(DE)
  /\\   System Architect  WLP Business Platform
 _\_v "Really, I'm not out to destroy Microsoft.  That will
just be a completely unintentional side effect."-L.Torvalds


-
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: Help with Tomcat Clustering and load balancing

2006-09-29 Thread Pascal Bleser
Anil Ranka wrote:
> Pascal,
>  Thanks for detail scenario. I am working on a product which should run on
> any platform. I am looking for a very generic solution which can run on any
> platform.
> 
> Any pointers.

Umm... stop dreaming ;)

As soon as you enter HA clustering and failover, there are hardly any
generic or platform agnostic solutions because it is typically bound
with the capabilities of the underlying operating system or to
specific software that handles it.

As an example, pen runs on several Un*x variants (Linux, *BSD, AIX,
Solaris, others) and there even seems to be a windows binary out there.

For more robust variants, such as the one I described with Linux and
heartbeat, you're not going to find any equivalent solution that is
"generic".

Using Apache2 and mod_jk is as generic as it gets.

> On 9/29/06, Pascal Bleser <[EMAIL PROTECTED]> wrote:
>>
>> Anil Ranka wrote:
>> >  I am new with Tomcat Clustering feature. I have configured my three
>> > tomcats nodes in cluster mode and they are talking to each other no
>> issues.
>> > Out these three nodes N1, N2 and N3 only one node will be ACTIVE node
>> and
>> > rest two will be PASSIVE. ACTIVE means my app will be loaded on only
>> one
>> > node. When this ACTIVE node goes down, using clustering mechanism I am
>> able
>> > to load my APP on next node from list. This scenario works very well.
>> 
>> > NO ISSUES!!!
>>
>> I presume that means you are using session replication (probably in
>> "pooled" mode) across the Tomcat nodes.
>>
>> > Now to out side world I have to give URL so that they can submit
>> jobs to
>> > this clustered nodes. Here I get lost. I am assuming I need load
>> > balancer/proxy will which will route my request to ACTIVE node.
>>
>> You don't need a load balancer, as you have a hot standby scenario
>> and, hence, only one Tomcat node is active at a time.
>>
>> A load balancer is only needed when you want to use several Tomcat
>> nodes in parallel (hence, "active/active" scenario).
>>
>> > My question is : How to configure load balancer/proxy server to
>> route my
>> > request to any specific ACTIVE node.
>>
>> Well, you have a vast number of options especially if you consider a
>> more mature server platform (e.g. Linux), which offers a lot of
>> technical solutions to this problem.
>>
>> On Linux, I would say that one of the most robust solutions is to use
>> two Tomcat nodes with heartbeat [1] and a VIP (Virtual IP address).
>> With this approach, an IP address is configured as an IP alias on the
>> active node (that's the "VIP"). Just map your DNS name to that VIP
>> instead of the "real IPs" of the nodes.
>> With heartbeat, the Tomcat nodes will monitor each other and when the
>> active node fails to service (either dies completely, e.g. hardware
>> failure, taken down for maintainance, Tomcat crashes or just fails to
>> service a request in a specified amount of time (= load is too high)),
>> the other node will perform a takeover.
>> In this case, a takeover just means to move the VIP address to the
>> fallback node, which then becomes the active one (this works very
>> reliably, using RARP).
>> This is a very stable and tested architecture, works extremely well.
>> Once heartbeat is set up correctly on both nodes, it just runs and
>> runs. Rock solid from my experience (even with much more complex
>> scenarios such as combined with Linux Virtual Server, shared storage,
>> rinetd and mon).
>>
>> Another option is to put a director node in front of the Tomcat nodes.
>> There, again, a lot of different options can be used.
>> A very simple (and effective) one is to use "pen" [2]:
>>   pen -e 192.168.1.2:8080 80 192.168.1.1:8080
>> The example above will make pen listen on port 80 and redirect to
>> 192.168.1.1 on port 8080. When 192.168.1.1 is not reachable, it will
>> redirect to 192.168.1.2 instead (also on port 8080), called the
>> "emergency node" (-e).
>> For further details, consult the pen documentation at [2].
>>
>> To avoid having the director as a single point of failure (using
>> VRRP), read [3]
>>
>> The same can be done without having director nodes, see [4]
>>
>> Other options are Apache2 with mod_jk, LVS [5], haproxy [6], ...
>>
>> [1] heartbeat: http://linux-ha.org/
>> [2] pen: http://siag.nu/pen/
>> [3] http://siag.nu/pen/vrrpd-linux.shtml
>> [4] http://siag.nu/pen/vrrpd-linux2.shtml
>> [5] http://www.linuxvirtualserver.org/
>> [6] http://haproxy.1wt.eu/ and
>> http://haproxy.1wt.eu/download/1.2/doc/haproxy-en.txt

-- 
  -o) Pascal Bleser   ATOS Worldline/Aachen(DE)
  /\\   System Architect  WLP Business Platform
 _\_v "Really, I'm not out to destroy Microsoft.  That will
just be a completely unintentional side effect."-L.Torvalds


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



Waiting for monitor entry & waiting to lock with ehcache

2006-10-09 Thread Pascal Alberty

Hi all,
our web application which is an add server (Java 1.5, Apache2 worker
mpm, Tomcat 5, mod_jk, on Debian) is using ehcache 1.2.3 to cache
data.

All was ok since we deploy a new feature which is occasionnaly cpu
consuming. This feature slow down the server for few seconds. After
this slow down, Tomcat stay at 100% CPU and Apache then is overloaded.

By dumping the JVM, I can observed many (around 200) threads waiting
for monitor and waiting for lock:

"TP-Processor91" daemon prio=1 tid=0x8a8e8b48 nid=0x1c05 waiting for
monitor entry [0x88e12000..0x88e130c0]
at net.sf.ehcache.Cache.get(Cache.java:653)
- waiting to lock <0x91607ce0> (a net.sf.ehcache.Cache)
at net.sf.ehcache.Cache.get(Cache.java:631)
...

This occurs (only) each time I use this cpu consuming feature.

Any idea ?

Thanks

--
Pascal Alberty
http://pascal.albertyorban.be

-
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: Waiting for monitor entry & waiting to lock with ehcache

2006-10-09 Thread Pascal Alberty

On 10/9/06, Leon Rosenberg <[EMAIL PROTECTED]> wrote:

Hello Pascal,

I think you should ask your question in the ehcache support list,
since your stacktrace shows that the problem is in their code.

regards
Leon


Already asked on ehcache sourceforge forum ... thanks :)

--
Pascal Alberty
http://pascal.albertyorban.be

-
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: org.apache.jk.common.ChannelSocket processConnection WARNING: processCallbacks status 2

2006-10-11 Thread Pascal Alberty

Same problem here.
Any idea ?

On 3/29/06, Sean O'Reilly <[EMAIL PROTECTED]> wrote:

I hope someone can help me with this.

I have been searching the archives for similar problems and have found
a few but with no solutions.

Running Fedora core 4, apache2.2 and tomcat5.5 jdk1.5 and am getting the
following error in catalina.out on a regular basis.

29-Mar-2006 21:43:40 org.apache.jk.common.HandlerRequest invoke
SEVERE: Error decoding request
java.io.IOException
at
org.apache.jk.common.JkInputStream.receive(JkInputStream.java:252) at
org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:500)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:352)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
##
HEX DUMP
##
29-Mar-2006 21:43:40 org.apache.jk.common.ChannelSocket
processConnection WARNING: processCallbacks status 2

can anyone else who has seen this error point me in the right direction
to fix it.

Thanks.
--
Sean O'Reilly
Systems Administrator
SECPay Ltd

http://www.secpay.com

[EMAIL PROTECTED]

Mobile 07917 463906

DDI 01732 300212

This email contains information which is confidential. It is for the
exclusive use of the addressee(s). If you are not the addressee, please
note that any distribution, dissemination, copying or use of this
communication or the information in it is prohibited. If you have
received this email in error, please telephone me immediately.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Pascal Alberty
http://pascal.albertyorban.be

-
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: JDBC Pool exhaustion

2006-10-11 Thread Pascal Alberty

Check your code to unclosed connections (and statments) first !

On 10/11/06, DE VINZELLES, Guillaume (ext.)
<[EMAIL PROTECTED]> wrote:

Hello there,

We are running a Tomcat 5.5.17 on a Sun Solaris system (SunFire V240) with a 
Sun JVM 1.5, and we are facing unavoidable JDBC pool exhaustions. We are using 
an Oracle 9i database.

Here is the JDBC entry from our server.xml:



The Tomcat manager shows around 1000 sessions on the server, which seems to be 
pertinent.

We can see with the JMXProxy that the JDBC pool connections are never recycled, 
e.g. the active connections number is going higher and higher and never stays 
at the same level, which is strange because the amount of active sessions isn't 
growing.

Do you have any idea about what we can do to 'force' the Tomcat server to 
release the unused JDBC connections?

Thanks in advance,

Best Regards,

Guillaume de Vinzelles
DSI/PFS Neuf Cegetel
Altran Technologies

[EMAIL PROTECTED]

01 70 18 21 64


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





--
Pascal Alberty
http://pascal.albertyorban.be

-
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: JDBC Pool exhaustion

2006-10-11 Thread Pascal Alberty

Stupid questions (sorry):
- Are you sure that you are using the tomcat connection pool ?
- have you dump (by logging or by a simple system.out.println) your
connection objets to see if you are reusing the same or a new one ?

Good luck

On 10/11/06, DE VINZELLES, Guillaume (ext.)
<[EMAIL PROTECTED]> wrote:

We've checked it two weeks ago, but we got to be sure, so we are doing it again 
today (and tomorrow, I expect).

Thanks for the advice.

Guillaume de Vinzelles
DSI/PFS Neuf Cegetel
Altran Technologies

[EMAIL PROTECTED]

01 70 18 21 64
-Message d'origine-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Pascal Alberty
Envoyé: mercredi 11 octobre 2006 16:10
À: Tomcat Users List
Objet: Re: JDBC Pool exhaustion

Check your code to unclosed connections (and statments) first !

On 10/11/06, DE VINZELLES, Guillaume (ext.)
<[EMAIL PROTECTED]> wrote:
> Hello there,
>
> We are running a Tomcat 5.5.17 on a Sun Solaris system (SunFire V240) with a 
Sun JVM 1.5, and we are facing unavoidable JDBC pool exhaustions. We are using an 
Oracle 9i database.
>
> Here is the JDBC entry from our server.xml:
>
>  driverClassName="oracle.jdbc.driver.OracleDriver" 
url="jdbc:oracle:thin:@address:port:schema"
> username="user" password="pass" maxActive="120" maxIdle="10" maxWait="5000" 
removeAbandoned="true" removeAbandonedTimeout="60" />
>
> The Tomcat manager shows around 1000 sessions on the server, which seems to 
be pertinent.
>
> We can see with the JMXProxy that the JDBC pool connections are never 
recycled, e.g. the active connections number is going higher and higher and never 
stays at the same level, which is strange because the amount of active sessions 
isn't growing.
>
> Do you have any idea about what we can do to 'force' the Tomcat server to 
release the unused JDBC connections?
>
> Thanks in advance,
>
> Best Regards,
>
> Guillaume de Vinzelles
> DSI/PFS Neuf Cegetel
> Altran Technologies
>
> [EMAIL PROTECTED]
>
> 01 70 18 21 64
>
>
> -----
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Pascal Alberty
http://pascal.albertyorban.be

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





--
Pascal Alberty
http://pascal.albertyorban.be

-
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: JDBC Pool exhaustion

2006-10-11 Thread Pascal Alberty

Seems to be good except:


finally {
try {
if (result != null) {
result.close();
result = null;
}
if (oCmd != null) {
oCmd.close();
oCmd = null;
}
if (myConnection != null) {
myConnection.close();
myConnection = null;
}
} catch (SQLException e) {}
}


If there is an exception during result or oCmd closing, your
connection is never closed ...
--
Pascal Alberty
http://pascal.albertyorban.be

-
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: JDBC Pool exhaustion

2006-10-12 Thread Pascal Alberty

On 10/12/06, DE VINZELLES, Guillaume (ext.)
<[EMAIL PROTECTED]> wrote:

Hello,

One of our connections wasn't properly closed, as you said.
You fixed the problem and now everything is running fine.


Great !

"Un grand classique" ;-)

Pascal

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



CPU level is not coming back to a normal level

2006-10-12 Thread Pascal Alberty

Prod Box is:
- Debian kernel 2.6
- Bi-Xeon 3.2 Ghz - 1 GB Ram
- Apache 2.0 - prefork - maxclients = 256 - keealive = false - around
300 request/sec
- Tomcat 5.0 - mod_jk 1.2.18 - 512 Mb allocated.
- JDK 1.5

MySQL is on another separate box.

Web app is an ad server serving all requests through servlets giving
mainly HTML and gif.

At normal charge, around 50 threads are created on tomcat and around
40 are working, others are waiting (. CPUs are around 20% each mainly
for Tomcat.

We are developing a new servlet which goal is to generate a png file
from XHTML using Flying Saucer xhtmlrenderer. This one is using AWT
for the XHTML and CSS rendering.

When I'm testing the new servlet on my dev box, all is ok. When i'm
running the same servlet on the prod box, Tomcat is reaching almost 2
x 100% CPUs for about 4 to 7 seconds. During this time, many threads
are created (to the max, around 256 - see maxclients config). All
Apache sockets are busy and slowing down. After that, sockets are
released and Tomcat is working well again after few seconds.

BUT !! CPUs stay around 2 x 40%. When I dump JVM Tomcat, around 140
threads are still
remaining. 40 are working and around 100 are waiting in the thread pool.

My questions are:
- why CPUs stay busy whereas the same threads number are working in both case ?
- is it possible that's because the notifyall() on these 100 extra threads ?
- if yes, how can I ask Tomcat to kill these non working threads ?
- if no ... any idea ?

Thanks for your help.

--
Pascal Alberty
http://pascal.albertyorban.be

-
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: CPU level is not coming back to a normal level

2006-10-12 Thread Pascal Alberty

On 10/12/06, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:

> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Pascal Alberty
> Subject: CPU level is not coming back to a normal level
>
> When I'm testing the new servlet on my dev box, all is ok. When i'm
> running the same servlet on the prod box, Tomcat is reaching almost 2
> x 100% CPUs for about 4 to 7 seconds.

Does this period coincide with garbage collection?  (Although 4 - 7
seconds is rather long for a GC.)  Have you tried using a profiler to
see where the threads are spending their time?


First, thanks for your quick answer.

I have set up GC information. While XHTML rendering, there is one Full
GC which spent 0.2 sec. All other GC operations are taking less then
0.01 sec which seems "normal".

When dumping the JVM through a kill -3, I can see threads working on
sockets talking to apache.


> how can I ask Tomcat to kill these non working threads ?

What do you have maxSpareThreads for each of your connectors set to?
Look here for the HTTP connector doc:
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html


I'm not using this one


or here for AJP:
http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html


maxProcessors is 256 (same as Apache maxclients)
maxSpareThreads is not set because it's a tomcat-5.5 parameter and i'm
using tomcat 5.0

Thanks again

--
Pascal Alberty
http://pascal.albertyorban.be

-
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: Max Memory Reading

2006-10-13 Thread Pascal Alberty

/etc/init.d/tomcat5 ?
Check for -Xms and -Xmm options

On 10/13/06, Alan Flisch <[EMAIL PROTECTED]> wrote:


Already checked that, it's not in the environment and not set in either
startup.sh or catalina.sh.

On Fri, 2006-10-13 at 14:17 +0700, Lintang JP wrote:

> maybe the value for environment variables called JAVA_OPTS equals those
> values ?
> try to echo $JAVA_OPTS and see if theres any value.
>
>
> On 10/13/06, Alan Flisch <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi,
> >
> > I was having some problems with perm gen space on one of our tomcat
> > instances and decided to increase the perm gen size and review the
> > JAVA_OPTS settings in general when I noticed something curious.  No
> > settings are currently made so its just running with default values, but
> > the manager status page shows the following...
> >
> > >Free memory: 158.53 MB Total memory: 373.75 MB Max memory: 913.37 MB
> >
> > That max memory figure in particular looks like a pretty strange
> > default!  I thought  the default was 64m.
> >
> > The installation details are as follows...
> > Apache Tomcat/5.5.16 1.5.0_06-b05 Sun Microsystems Inc. SunOS 5.9 sparc
> > The system has 16G of RAM.
> >
> > Has anybody any thoughts?
> >
> > Regards,
> > Alan
> >
> >
> >
> > 

> > This e-mail and any accompanying documents contain confidential
> > information intended for a specific individual which is private and
> > protected by law.
> > If you are not the intended recipient, any disclosure, copying,
> > distribution or other use of this information is strictly prohibited.
> > You are also requested to advise us immediately if you receive information
> > which is not addressed to you.
> > beCogent is Authorised and Regulated by the Financial Services Authority.
> >
> > 
*
> >
>
>
>

Alan Flisch
Senior Developer
beCogent Ltd.
www.beCogent.com

T: +44 (0)1236 628 113
F: +44 (0)1236 628 101
E: [EMAIL PROTECTED]



This e-mail and any accompanying documents contain confidential information 
intended for a specific individual which is private and protected by law.
If you are not the intended recipient, any disclosure, copying, distribution or 
other use of this information is strictly prohibited.
You are also requested to advise us immediately if you receive information 
which is not addressed to you.
beCogent is Authorised and Regulated by the Financial Services Authority.
*




--
Pascal Alberty
http://pascal.albertyorban.be

-
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: CPU level is not coming back to a normal level

2006-10-13 Thread Pascal Alberty

Any other idea ?

Thanks

On 10/13/06, Pascal Alberty <[EMAIL PROTECTED]> wrote:

On 10/12/06, Caldarale, Charles R <[EMAIL PROTECTED]> wrote:
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Pascal Alberty
> > Subject: CPU level is not coming back to a normal level
> >
> > When I'm testing the new servlet on my dev box, all is ok. When i'm
> > running the same servlet on the prod box, Tomcat is reaching almost 2
> > x 100% CPUs for about 4 to 7 seconds.
>
> Does this period coincide with garbage collection?  (Although 4 - 7
> seconds is rather long for a GC.)  Have you tried using a profiler to
> see where the threads are spending their time?

First, thanks for your quick answer.

I have set up GC information. While XHTML rendering, there is one Full
GC which spent 0.2 sec. All other GC operations are taking less then
0.01 sec which seems "normal".

When dumping the JVM through a kill -3, I can see threads working on
sockets talking to apache.

> > how can I ask Tomcat to kill these non working threads ?
>
> What do you have maxSpareThreads for each of your connectors set to?
> Look here for the HTTP connector doc:
> http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

I'm not using this one

> or here for AJP:
> http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html

maxProcessors is 256 (same as Apache maxclients)
maxSpareThreads is not set because it's a tomcat-5.5 parameter and i'm
using tomcat 5.0

Thanks again

--
Pascal Alberty
http://pascal.albertyorban.be




--
Pascal Alberty
http://pascal.albertyorban.be

-
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: CPU level is not coming back to a normal level

2006-10-13 Thread Pascal Alberty

There is also the following one, but in wait mode:

"Java2D Disposer" daemon prio=1 tid=0x083a5858 nid=0x7443 in
Object.wait() [0x853ff000..0x853ff1c0]
at java.lang.Object.wait(Native Method)
- waiting on <0x92d654d0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x92d654d0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at sun.java2d.Disposer.run(Disposer.java:107)
at java.lang.Thread.run(Thread.java:595)

Complete dump could be found here:
http://pascal.albertyorban.be/wp-content/dump.txt (i don't know if
attached files are allowed by this mailinglist).

Thanks for your help

On 10/13/06, Leon Rosenberg <[EMAIL PROTECTED]> wrote:

On 10/13/06, Pascal Alberty <[EMAIL PROTECTED]> wrote:
>
> I have set up GC information. While XHTML rendering, there is one Full
> GC which spent 0.2 sec. All other GC operations are taking less then
> 0.01 sec which seems "normal".
>
> When dumping the JVM through a kill -3, I can see threads working on
> sockets talking to apache.

and there are no other suspicious working threads?

Leon

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





--
Pascal Alberty
http://pascal.albertyorban.be

-
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: CPU level is not coming back to a normal level

2006-10-15 Thread Pascal Alberty

I found something about this thread.
http://www.mail-archive.com/java2d-interest@capra.eng.sun.com/msg03812.html

Do you thing it could be related ?

I just make another charge test, threads growth to 200 without 2D
disposer ... and CPU stays around 20% ...



On 10/13/06, Pascal Alberty <[EMAIL PROTECTED]> wrote:

There is also the following one, but in wait mode:

"Java2D Disposer" daemon prio=1 tid=0x083a5858 nid=0x7443 in
Object.wait() [0x853ff000..0x853ff1c0]
at java.lang.Object.wait(Native Method)
- waiting on <0x92d654d0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x92d654d0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at sun.java2d.Disposer.run(Disposer.java:107)
at java.lang.Thread.run(Thread.java:595)

Complete dump could be found here:
http://pascal.albertyorban.be/wp-content/dump.txt (i don't know if
attached files are allowed by this mailinglist).

Thanks for your help

On 10/13/06, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> On 10/13/06, Pascal Alberty <[EMAIL PROTECTED]> wrote:
> >
> > I have set up GC information. While XHTML rendering, there is one Full
> > GC which spent 0.2 sec. All other GC operations are taking less then
> > 0.01 sec which seems "normal".
> >
> > When dumping the JVM through a kill -3, I can see threads working on
> > sockets talking to apache.
>
> and there are no other suspicious working threads?
>
> Leon
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Pascal Alberty
http://pascal.albertyorban.be




--
Pascal Alberty
http://pascal.albertyorban.be

-
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: max_threads issue & blocked threads (*warning* long thread dump attached)

2006-10-17 Thread Pascal Alberty

Check your connectiontimeout value. May be it is too high ?
Have you a heavy load on this server ? How many (concurent) users ?

On 10/18/06, Derek Wormdahl <[EMAIL PROTECTED]> wrote:

We initially started this project running on the Sun JVM but ran into an
issue with the JVM aborting when doing a PDF conversion in the
application.  Some conflict with the iText libraries or something.
JRockit was the only JVM that seemed to not have the problem.  We
haven't tried the Sun JVM since we've noticed these issues but it may be
a tradeoff we need to make in order to see if the problem persists.  So
do you think it's more likely a JVM bug/issue opposed to an application
issue?

Thanks,
-Derek

--
Pascal Alberty
http://pascal.albertyorban.be

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



Asynchronous messaging in tomcat

2006-01-27 Thread Gehl, Pascal
Hi,
 
I know we are not supposed to do this but is there a big inconvenience
to do asynchronous message consuming in tomcat 5+ (by spawning a daemon
thread for my message listener ?)
Is it true that if a I create a thread on my own I won't have access to
the tomcat JNDI context ?
 
I ask this because we really don't want to use an EJB container only for
MDB.
 
thanks
 
paskos


Your opinion on some logs - Apache/mod_jk/Tomcat

2006-03-08 Thread Pascal Alberty
Hi all,

I have some questions concerning the followings logs. Architecture is:
Apache/mod_jk/Tomcat/MySQL. May be somes are "normal". Google searches
do not give me clear answers.

Thanks in advance !!




1. Apache - mod_jk.log

[Wed Mar 08 15:34:40 2006] [error] jk_child_init::mod_jk.c (2312):
Attachning shm:/etc/apache2/logs/jk-runtime-status errno=2

2. Apache - error.log

[Wed Mar 08 15:30:24 2006] [error] [client 217.136.140.100] request
failed: error reading the headers, referer: http://

3. Tomcat - Catalina.log

Mar 8, 2006 3:09:06 PM org.apache.jk.common.ChannelSocket processConnection
INFO: connection timeout reached

4. Tomcat - Catalina.log

Mar 8, 2006 3:16:24 AM org.apache.commons.modeler.Registry registerComponent
SEVERE: Error registering
Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest171775
javax.management.InstanceAlreadyExistsException:
Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest171775
at 
com.sun.jmx.mbeanserver.RepositorySupport.addMBean(RepositorySupport.java:452)
at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1410)
at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:936)
at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:337)
at 
com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:497)
at 
org.apache.commons.modeler.Registry.registerComponent(Registry.java:871)
at 
org.apache.jk.common.ChannelSocket.registerRequest(ChannelSocket.java:436)
at 
org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:443)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:352)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Mar 8, 2006 3:16:24 AM org.apache.jk.common.ChannelSocket registerRequest
WARNING: Error registering request


--
Pascal Alberty

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Your opinion on some logs - Apache/mod_jk/Tomcat

2006-03-08 Thread Pascal Alberty
Thanks for your quick answer. Note that this log appears even there is
no management manipulation on Tomcat (reloading, deploying, ...).

Thanks

Pascal

On 3/8/06, Tim Lucia <[EMAIL PROTECTED]> wrote:
> The last one (4) results from not deregistering the object mentioned from
> the JMX server.  Typically this is a register during contextInitialized
> (ApplicationLifecycleListener) and a de-register during contextDestroyed.
> The effect would be that a reloaded application would not be JMX-enabled and
> the previous copy would not be garbaged collected.
>
> Tim
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Pascal Alberty
> Sent: Wednesday, March 08, 2006 9:44 AM
> To: users@tomcat.apache.org; dev@httpd.apache.org
> Subject: Your opinion on some logs - Apache/mod_jk/Tomcat
>
> Hi all,
>
> I have some questions concerning the followings logs. Architecture is:
> Apache/mod_jk/Tomcat/MySQL. May be somes are "normal". Google searches do
> not give me clear answers.
>
> Thanks in advance !!
>
>
>
>
> 1. Apache - mod_jk.log
>
> [Wed Mar 08 15:34:40 2006] [error] jk_child_init::mod_jk.c (2312):
> Attachning shm:/etc/apache2/logs/jk-runtime-status errno=2
>
> 2. Apache - error.log
>
> [Wed Mar 08 15:30:24 2006] [error] [client 217.136.140.100] request
> failed: error reading the headers, referer: http://
>
> 3. Tomcat - Catalina.log
>
> Mar 8, 2006 3:09:06 PM org.apache.jk.common.ChannelSocket processConnection
> INFO: connection timeout reached
>
> 4. Tomcat - Catalina.log
>
> Mar 8, 2006 3:16:24 AM org.apache.commons.modeler.Registry registerComponent
> SEVERE: Error registering
> Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest171775
> javax.management.InstanceAlreadyExistsException:
> Catalina:type=RequestProcessor,worker=jk-8009,name=JkRequest171775
> at
> com.sun.jmx.mbeanserver.RepositorySupport.addMBean(RepositorySupport.java:45
> 2)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(Def
> aultMBeanServerInterceptor.java:1410)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Default
> MBeanServerInterceptor.java:936)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultM
> BeanServerInterceptor.java:337)
> at
> com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:497
> )
> at
> org.apache.commons.modeler.Registry.registerComponent(Registry.java:871)
> at
> org.apache.jk.common.ChannelSocket.registerRequest(ChannelSocket.java:436)
> at
> org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:443)
> at
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:352)
> at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
> at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
> at
> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:684)
> at java.lang.Thread.run(Thread.java:595)
> Mar 8, 2006 3:16:24 AM org.apache.jk.common.ChannelSocket registerRequest
> WARNING: Error registering request
>
>
> --
> Pascal Alberty
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Pascal Alberty

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Your opinion on some logs - Apache/mod_jk/Tomcat

2006-03-09 Thread Pascal Alberty
> 1. Apache - mod_jk.log
>
> [Wed Mar 08 15:34:40 2006] [error] jk_child_init::mod_jk.c (2312):
> Attachning shm:/etc/apache2/logs/jk-runtime-status errno=2

First one is solved.
By default, directory for this log is /etc/apache2/logs/ and apache
does not have enough permission to create the log file.
So, you can change this directory using the "JkShmFile" directive in
your httpd.conf. For example:

JkShmFile /var/log/apache2/jk-runtime-status

--
Pascal Alberty

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat+Eclipse, breakpoints not working

2006-03-29 Thread Pascal Alberty
Add the following parameters to the tomcat JAVA_OPTIONS
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

In Eclipse, create a new "Java Remote Application". By default, port
used will be 8000 as configured previously.

Launch Tomcat, run this "JRA", place breakpoints, use your web
application. Eclipse will go in debug mode if breakpoints are meet.

See http://tomcat.apache.org/faq/development.html for more explanations.

Pascal

On 3/29/06, Mark Slater <[EMAIL PROTECTED]> wrote:
> I'm using Eclipse to try and debug a servlet in tomcat. I've got
> eclipse set up so that it starts and stops tomcat in debug mode (I
> can tell because the list of tomcat threads is visible and updated
> when I'm using the debug perspective). I added a few breakpoints to
> my code and triggered the servlet, but the breakpoints didn't pause
> the execution. I know the functions were hit because I've got stack
> traces being logged with exceptions (they're the reason I'm trying to
> debug in the first place).
>
> I'm not using Eclipse to build or deploy my webapp, but I do want to
> be able to use it to debug. I have maven building the war and I
> deploy the webapp by hand (ie cp target mywebapp.war TOMCAT_HOME/
> webapps/). I used the eclipse plugin for maven to generate
> the .project and .classpath files that eclipse is using when I browse
> my source code. What can I do so that I can also debug it?
>
> Thanks!
>
> Mark
>
> -----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Pascal Alberty

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Resource configuration problems on servlets (images, css, javascript)

2006-11-28 Thread Pascal Guy

Hi all,
I'm a bit new to servlet programming so i'll be as clear as i can.
I'm developing a small web application to test servlets in a project at 
school
The project is fairly simple we a jsp pages that POST requests to a 
central servlet that controls the flow of the application
My partner codded the jsp pages (which include css, javascript and 
images) everything working on his side as far as the pages displaying 
the images and the javascipt functionality


The problem comes when we integrate to post the request to my controller
The controller works fine but the resources are not working (css, images 
and javascript)


the configuration is simple


   controller
   org.test.controller.Controller
   
   debug
   0
   
   
   listings
   false
   
   1
   

   
   controller
   /controller
   
  
the images have the right path to access the resources when i check the 
properties


When i debug the application i can see multiple request when i acces the 
login page (or any other page for that matter)
as if the request to get the images (or resources) were handled by my 
servlet and my servlet as it's coded does'nt recognize that type of 
event (each request has to have an event type)


The controller works fine but even with multiple changes to my 
configuration i can't get the resources to work properly.


Do i need to map the resource types to something so it bypasses my 
servlet (and not be treated as a request)


I can't figure this out, though i've tried many setups.

Thanks anybody.

--
Pascal


-
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: Resource configuration problems on servlets (images, css, javascript)

2006-11-28 Thread Pascal Guy

Hi,

i have tried the absolute path

   

which renders to

   http://localhost:8080/images/topImage.gif   (which i know is not 
the good path)


but in the jsp we access the resource like this

   " width="300" height="15">


which renders to

   http://localhost:8080/TEST/images/topImage.gif(where TEST is my 
application)


this worked fine for my partner on his sample controller servlet but did 
not have any server side code except the jsp
also when i look at the deployed application in Eclipse it gives me this 
path


C:\Program 
Files\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\_webapps\TEST\images_


so the path is good (i think) when i look at the properties of the 
images on the html page


you said all the resources should make a request to the server but what 
i can't understand is why is it being caught and treated by my servlet


that's why i assumed there was some configuration problem so these 
request would be treated by a default servlet of some sort and not my 
servlet
which is configured to have event types for every request and treats 
these requests for resources as "unknown events"


my lack of knowledge in servlets is probably misleading me here


Pascal



Kristian Rink wrote:

Hi;

Pascal Guy schrieb:
  

The problem comes when we integrate to post the request to my controller
The controller works fine but the resources are not working (css, images
and javascript)




I am not sure to understand your problem right, but:

  

   
   controller
   /controller
   


[...]
  

Do i need to map the resource types to something so it bypasses my
servlet (and not be treated as a request)




There _will_ be a request for each and every static component (i.e.
image, css, js file, whatever) to be loaded from the server - but
indeed, you shouldn't have your controller taking care of that.

How are you referring to images and js from within your code? You should
be sure to use absolute URLS (i.e. "/images/logo.png" instead of
"images/logo.png"), otherwise you might end up with your server
searching for the content in a place where it's not supposed to be found
 (i.e. "//controller/images/logo.png"). If you keep
that in mind, chances are you won't have to do much configuration work
in your web.xml but simply ensure that folders containing static things
are somewhere out of the way of your servlet mappings.

Hope this helps, good luck to you!
Cheers,
Kris

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



Tomcat 5.5.20 in Maven repository

2007-02-28 Thread Pascal Cohen

Hello

I have seen in the maven repository that the latest version of some 
Tomcat components (for my concerns: jasper-runtime, jasper-compiler and 
jasper-compiler-jdt) was the 5.5.15 version while the latest available 
version on the tomcat website is 5.5.20.

Is it planned to update the maven repository ?

Thanks in advance for your help.

Pascal


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



[install as win service] procrun windows executable ? is tomcat5.exe obsolete?

2007-05-10 Thread Pascal Fonte

Hi,

I want to install tomcat 5.0.28 as a windows service.
in a batch, I call the exécutable Tomcat5.exe (Prunsrv).
it works

however,
- the tomcat 5.0 documentation says nothing about tomcat5.exe
- the tomcat 5.5 documentation says that the Tomcat5.exe function is 
obsolete :
"This section of the documentation applies to procrun 1.0, and is now 
obsolete."

http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html

Anybody knows if the Tomcat5.exe executable shipped with "tomcat version 
5.0.28" is obsolete?


Unfortunately, I could not find the procrun windows executable files
http://jakarta.apache.org/commons/daemon/procrun.html

Anybody knows where I could find more documentation about procrun and 
procrun windows executables files ?


thank you in advance

Pascal

_
Gagnez des pc Windows Vista avec Live.com http://www.image-addict.fr/


-
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: [install as win service] procrun windows executable ? is tomcat5.exe obsolet

2007-05-10 Thread Pascal Fonte

Thank you very much.

Now, with the wrapper I have an alternative way to install tomcat 5.0.28 as 
a windows service.


However, I would like to make sure:
- the tomcat5.exe procrun executable works fine with tomcat 5.0
- I can use the procrun documentation to manage the tomcat5.exe procrun 
executable.


Thank you again

Pascal




the procrun files for tomcat can be found in Tomcat SVN,
http://svn.apache.org/viewvc/tomcat/connectors/trunk/procrun/bin/

you can also try out an alternative wrapper, works in a similar fashion
http://people.apache.org/~fhanik/wrapper.html

Filip
Pascal Fonte wrote:

Hi,

I want to install tomcat 5.0.28 as a windows service.
in a batch, I call the exécutable Tomcat5.exe (Prunsrv).
it works

however,
- the tomcat 5.0 documentation says nothing about tomcat5.exe
- the tomcat 5.5 documentation says that the Tomcat5.exe function is 
obsolete :
"This section of the documentation applies to procrun 1.0, and is now 
obsolete."

http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html

Anybody knows if the Tomcat5.exe executable shipped with "tomcat version 
5.0.28" is obsolete?


Unfortunately, I could not find the procrun windows executable files
http://jakarta.apache.org/commons/daemon/procrun.html

Anybody knows where I could find more documentation about procrun and 
procrun windows executables files ?


thank you in advance

Pascal

_
Gagnez des pc Windows Vista avec Live.com http://www.image-addict.fr/


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



_
Ten :  Messenger en illimité sur votre mobile !  
http://mobile.live.fr/messenger/ten/



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



Does the tomcat5.exe procrun file work with tomcat 5.0.x ? (no doc)

2007-05-11 Thread Pascal Fonte

Hi

Does the tomcat5.exe procrun file work with tomcat 5.0.x ?
Indeed, this file is shipped with tomcat 5.0.30, but there is no 
documentation in

http://tomcat.apache.org/tomcat-5.0-doc/setup.html

Thanks a lot

Pascal

_
Découvrez le Blog heroic Fantaisy d'Eragon! 
http://eragon-heroic-fantasy.spaces.live.com/



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



byte trafic accounting

2007-10-16 Thread Pascal Lambert
Our application serves request for mobile device (cellular phone). We
need to find a way to keep track of how many byte were read from the
request and sent in the response. We need to whole size of the
request/response not just the "Content-Length" (GET /TestValve/apps
HTTP/1.1 ... headers, everything). I was planning to go for a Valve but
it doesn't work:


public void invoke(Request request, Response response) throws
IOException, ServletException {
getNext().invoke(request, response);
String localAddr = request.getLocalAddr();
int bytesRead = request.getCoyoteRequest().getBytesRead();
long bytesSent = response.getCoyoteResponse().getBytesWritten();
System.out.println("request from: " + localAddr + ", recv=" +
bytesRead + ", sent=" + bytesSent);
}


bytesRead and bytesSent are always 0.

What's wrong? How can I do it?

We're are currently using Tomcat 5.5.25.

Pascal

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



Question about Tomcat 6.020 appBase Vs autoDeploy?

2009-12-21 Thread Pascal Vachon
Hi,

I'm new to Tomcat, but I managed to install Tomcat 6.020 which I use on a 
development server (production server will come soon).
I have three development environments on this server, which are DEV, TEST 
and STAGE.

Here's what my directory looks like: 
\Tomcat 6.0\webapps\WebAppMan\dev
\Tomcat 6.0\webapps\WebAppMan\test
\Tomcat 6.0\webapps\WebAppMan\stage

Here's the host line in my server.xml file: 


As you can see, my appBase is set to "webapps/WebAppMan", because I wanted 
to have URLs like this (identifying the development environment used):
https://xwebapp-man-mobile-dev.domain.com/dev/...
https://xwebapp-man-mobile-dev.domain.com/test/...
https://xwebapp-man-mobile-dev.domain.com/stage/...

However, even if autoDeploy is set to true, it doesn't seem to work inside 
nested folders.
It works If I place a .WAR file inside the "webapps/WebAppMan" folder, but 
it doesn't work if I place it inside the "webapps/WebAppMan/dev" folder 
for example.

The problem with that, is that I want to give developpers read/write 
access to everything inside the "dev", "test" and "stage" folders... but I 
don't want to give them access to the "WebAppMan" folder.
They told me they have to use the autoDeploy feature to correctly install 
their applications... and I want them to install these inside the "dev", 
"test" or "stage" folders (not inside the root folder "WebAppMan").

I could change my appBase to point directly in the "dev" folder like 
appBase="webapps/WebAppMan/dev"... but that would mean I would also have 
to do this for the test and stage environment.
I would then have to create three DNS hosts instead of one (ex: 
xwebapp-man-mobile-dev, xwebapp-man-mobile-test, 
xwebapp-man-mobile-stage).  I tried to avoid that, cause we have a naming 
convention here that the DNS host name is identifying the dev server or 
the prod server, and the folder name is identifying the environment used 
on that server.

Is there a way to keep my logic in place... and still satisfy the 
developers demand (be able to deploy applications themselves using a .WAR 
file)?
Again, I'm new to Tomcat, so sorry if this looks like a weird question.

Thanks!
_
Pascal Vachon
Senior Analyst Programmer
Canam Group
Phone: 418-228-8031 #2567 | Fax: 418-227-8697
Email: pascal.vac...@canamgroup.ws
Web Site: Canam Group



  Do you really need to print this email? Think green! 

Re: Question about Tomcat 6.020 appBase Vs autoDeploy?

2009-12-21 Thread Pascal Vachon
Thanks for your quick answer... but doesn't that require a different DNS 
host name for my three development environments? (ex: 
xwebapp-man-mobile-dev, xwebapp-man-mobile-test, 
xwebapp-man-mobile-stage).







Like I mentionned in my question,  I would like to use the same DNS host 
name for my three development environments... but use a different folder 
for each one of them in my URL.
I just don't know how to make the autoDeploy works inside nested folders.

Pascal



From:
Mark Thomas 
To:
Tomcat Users List 
Date:
12/21/2009 01:57 PM
Subject:
Re: Question about Tomcat 6.020 appBase Vs autoDeploy?



On 21/12/2009 18:50, Pascal Vachon wrote:
> Is there a way to keep my logic in place... and still satisfy the 
> developers demand (be able to deploy applications themselves using a 
.WAR 
> file)?
> Again, I'm new to Tomcat, so sorry if this looks like a weird question.

You can use virtual hosting. See
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

You can give your developers read/write to the dev host's appBase but
not the other appBase directories.

Mark



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





[jdbc-pool] Transaction left open by the connection validation mechanism ?

2013-01-03 Thread Davoust, Pascal
Hi all,

I'm using the tomcat jdbc connection pool (7.0.34) to connect against a
PostgreSQL database (version 8.4 - jdbc driver 9.0.801) and I'm having a
potentially dodgy situation with the validation mechanism.

The code I'm using does change the transaction isolation level of a
connection that has been newly borrowed from the pool (before doing
anything else) but sometimes gets an error while doing so, such as:

org.postgresql.util.PSQLException: Cannot change transaction isolation
level in the middle of a transaction.

I've been investigating the code for a while to check whether any
transaction was left open (read: without any commit or rollback) before
being returned to the pool, but no chance, everything looks clean.

Then I suspected the validation mechanism which validates the connection.
Mine was set to validate the connection every 30 s while idle, using a
"SELECT 1" statement.

Indeed, I disabled the validation mechanism and tadaa, no error at all!

I then had a look at the corresponding code into the tomcat jdbc pool
(source 7.0.34), and more specifically in
class org.apache.tomcat.jdbc.pool.PooledConnection, method public boolean
validate(int validateAction,String sql) at line 452 (excerpt below):

Statement stmt = null;
try {
stmt = connection.createStatement();
stmt.execute(query);
stmt.close();
this.lastValidated = now;
return true;
} catch (Exception ex) {
if (getPoolProperties().getLogValidationErrors()) {
log.warn("SQL Validation error", ex);
} else if (log.isDebugEnabled()) {
log.debug("Unable to validate object:",ex);
}
if (stmt!=null)
try { stmt.close();} catch (Exception ignore2){/*NOOP*/}
}
return false;

It looks to me that there is a mistake here: if the connection to validate
does not have autoCommit set to true, then the transaction is started and
left open by this code.
Which explains the errors I was experiencing, since once the connection has
been validated, then the transaction isolation level cannot be changed
since a transaction is still ongoing!

Did I miss something or is this a real bug which I should file?

Thanks in advance
Regards


Re: [jdbc-pool] Transaction left open by the connection validation mechanism ?

2013-01-04 Thread Davoust, Pascal
Indeed I was referring to the tomcat jdbc-pool code, not mine :-).

Now, I would suggest to consider that this problem is more common than you
could imagine at first sight. First because this is randomly occuring, but
frequently enough so that it shows up in quite a few areas.
A few examples where this problem occurred and was filed (but not analyzed
down to the root cause):

Spring DataSource Txn Mgr :
https://jira.springsource.org/browse/SPR-8870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel

Hyperic :
https://jira.hyperic.com/browse/HHQ-5054

If I'm correct, then I suggest that the behavior is corrected by default,
not requiring additional configuration. Especially so that most people use
the provided sample and documentation, which enables the validation
mechanism. Or maybe do it the other way round, have a configuration key
which allows to disable the rollback after validation... One last way would
have been to test against the auto commit state of the connection to decide
whether a rollback was necessary, but I believe that the pool does not
maintain the connection state for performance reasons (unless an
interceptor is configured to do it) and therefore would be an even more
detrimental hit on performance since would require a round-trip to the db
server...

In any case, let me know if you need me to provide more details or to file
this problem into the bug tracking system!

Regards

Pascal

2013/1/4 Christopher Schultz 

> > I think Pascal is saying that the above snippet is in the Tomcat
> > JDBC code, not his.
>
> Whoops, I think you're right. That's a minor bug, but definitely one
> that should be fixed IMO.
>
> Also, if the validation query succeeds and the connection is in
> auto-commit mode, we may want to issue a rollback. I wouldn't want to
> do that without any additional configuration, though, because it would
> needlessly send ROLLBACK queries in many cases (such as other
> databases - MySQL doesn't get upset when I tried a simple, similar
> test - or when you don't intend to change the transaction isolation
> level, etc.).
>
> Perhaps a configuration directive like rollBackAfterValidationQuery or
> something?
>
> - -chris
>


Re: [jdbc-pool] Transaction left open by the connection validation mechanism ?

2013-01-04 Thread Davoust, Pascal
Sorry, I probably did not make myself clear.

I certainly do not suggest to issue the rollback on each connection
checkout, but only as part of the validation process - because this is
where the problem lies and only there - which I would imagine is triggered
only occasionally (when connection is idle for example): I doubt someone
would actually validate connections each time it's checked or out in. But I
might be wrong.

In any case, I suppose that the pool must not hand over a connection at
check-out time with an open transaction triggered by the internal
validation mechanism of the pool - irrespective of what you do with the
connection.

Am I wrong?

Regards
Le 5 janv. 2013 00:20, "Christopher Schultz" 
a écrit :

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Pascal,
>
> On 1/4/13 5:56 PM, Davoust, Pascal wrote:
> > Indeed I was referring to the tomcat jdbc-pool code, not mine :-).
> >
> > Now, I would suggest to consider that this problem is more common
> > than you could imagine at first sight. First because this is
> > randomly occuring, but frequently enough so that it shows up in
> > quite a few areas. A few examples where this problem occurred and
> > was filed (but not analyzed down to the root cause):
> >
> > Spring DataSource Txn Mgr :
> >
> https://jira.springsource.org/browse/SPR-8870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
> >
> >  Hyperic : https://jira.hyperic.com/browse/HHQ-5054
> >
> > If I'm correct, then I suggest that the behavior is corrected by
> > default, not requiring additional configuration.
>
> I disagree: issuing a ROLLBACK on every connection-checkout seems
> heavy-handed if it's not necessary. You are talking about a fairly
> rare set of circumstances (e.g. changing tx isolation level for only
> some uses of the connection-pool) and punishing everyone (performance)
> for that circumstance is IMHO unnecessary.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with undefined - http://www.enigmail.net/
>
> iEYEAREIAAYFAlDnY5oACgkQ9CaO5/Lv0PARVgCgvPLCsydboLrgcLiQUg9wD/zI
> g/MAn0ZakKw6QgXd7n47UZ3CRtaYrRex
> =j8ND
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Practical to write code in webapp that can return metadata from current access log?

2016-09-10 Thread Pascal Abaziou
Hi  David, 

As they are sophisticated, diagnostic services are usually given by dedicated 
solution and not ad-hoc development. I known licensed solutions (app dynamics 
and there should exists other competitors Here is a quora discussion about open 
source competitors : 
https://www.quora.com/Application-Performance-Management-Is-there-an-open-source-competitor-to-AppDynamics
 

As you mention «  information about the number of calls to the main service », 
these informations can also be offered by API management solutions. There’s a 
number of open source competitors for this orientation.

Kind regards,
Pascal

> Le 9 sept. 2016 à 21:40, KARR, DAVID  a écrit :
> 
> I'm considering writing a secondary diagnostics service for my CXF REST app 
> running in Tomcat (TomEE) that can return some information about the number 
> of calls to the main service in a particular time period.  Is there an API I 
> can use in Java that will give me access to the current access log 
> information?  I know that I could always hack something together with a fully 
> qualified path to the file and manual code to parse it, but it seems like 
> this is something that would have been done before, so perhaps there's an 
> easier to use API for this.
> 
> -
> 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



Release of tomcat-connectors 1.2.41

2015-05-31 Thread Pascal Wittmann
Hi everyone,

does anyone know when tomcat-connectors 1.2.41 will be released? It
seems it fixes CVE-2014-8111.

Regards,
Pascal



signature.asc
Description: OpenPGP digital signature


Re: Question concerning mod_jk Security Fix CVE-2014-8111

2015-06-08 Thread Pascal Wittmann
Hi Peter,

I've asked the same question on 31.05 but got no reply so far. Thanks
for the RedHat link.

Regards,
Pascal


On 06/08/2015 01:43 PM, Kreuser, Peter wrote:
> Hi,
> 
> could you please tell us, when the fixed mod_jk-Version 1.2.41 will be 
> publicly available?
> 
> The webpage does not mention any vulnerability at all, plus no newer release 
> than the vulnerable 1.2.40.
> 
> For now RedHat mentions only the fix to the source code from December 2014.
> http://svn.apache.org/viewvc?view=revision&revision=1647017
> 
> Best regards.
> 
> Peter
> 
> 




signature.asc
Description: OpenPGP digital signature


Tomcat 6 : saerching for a bug fix between 6.0.24 and 6.0.44

2015-06-24 Thread Pascal Abaziou
Hello,

I’m searching for the version that fixes a bug I’ve on a tomcat 6.0.24 (on 
redhat).
As I do not reproduce it on my windows workstation with tomcat 6.0.44, I need 
elements to argue to upgrade to the sys admin.

So the bug : with a REST resource service implemented with Jersey, if there’s 
no method corresponding to a URI (under the hierarchy that Jersey should 
handle), Jersey raises a 404 NOT_FOUND error.

In 6.0.24, tomcat raises a 500 internal error.
In 6.0.44, tomcat propagates the 404 not found error.

As the sysadmin want to stay on version delivered by redhead, I need elements 
to motivate an update.

I’ve read the tomcat 6 changelog, but did not find when this was fixed.

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



Re: Tomcat 6 : saerching for a bug fix between 6.0.24 and 6.0.44

2015-06-24 Thread Pascal Abaziou

> Le 25 juin 2015 à 00:23, Mark Eggers  a écrit :
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 6/24/2015 2:40 PM, André Warnier wrote:
>> Pascal Abaziou wrote:
>>> Hello,
>>> 
>>> I’m searching for the version that fixes a bug I’ve on a tomcat 
>>> 6.0.24 (on redhat). As I do not reproduce it on my windows 
>>> workstation with tomcat 6.0.44, I need elements to argue to
>>> upgrade to the sys admin.
>>> 
>>> So the bug : with a REST resource service implemented with
>>> Jersey, if there’s no method corresponding to a URI (under the
>>> hierarchy that Jersey should handle), Jersey raises a 404
>>> NOT_FOUND error.
>>> 
>>> In 6.0.24, tomcat raises a 500 internal error. In 6.0.44, tomcat 
>>> propagates the 404 not found error.
>>> 
>>> As the sysadmin want to stay on version delivered by redhead, I 
>>> need elements to motivate an update.
>>> 
>>> I’ve read the tomcat 6 changelog, but did not find when this was 
>>> fixed.
>>> 
>> 
>> You know, I don't want to discourage you, but..
>> 
>> Assuming even that this was a bug that was fixed on its own, and
>> not some side-effect of some other change..
>> 
>> As you know, Tomcat is an open-source and free software, developed 
>> and supported by volunteers, who apart from their Tomcat
>> involvement, all have a paying job which they do on the side..
>> This user's list is the same.
>> 
>> Tomcat 6.0.24 is at least 5 years old. The current Tomcat version
>> is 8.0.23. Between these two, there are 5 years and probably close
>> to 100 versions. Some of these versions correct real bugs or
>> security issues which could leave any lower version vulnerable to
>> hacking.
>> 
>> The Tomcat developers, having a limited amount of time to dedicate 
>> to it, rather understandably prefer to spend this time working on 
>> and supporting the latest version, rather than very old ones.
>> 
>> All of this to say that unless there is a very strong incentive for
>> someone to go and dig through the documentation and the code, your
>> chances of getting real help on this apparently minor and
>> peripheral issue, affecting an old version of Tomcat but not more
>> recent ones, are really slim.
>> 
>> If your sysadmin does not understand the benefits of upgrading to
>> a more recent version, rather than this very old one, then the
>> problem is with him, not with you and not with the Tomcat
>> developers. Maybe you should just take the change logs, starting
>> with 6.0.44 and working back to 6.0.24, append them to one another,
>> and send this to him as a token of what he is missing in terms of
>> bug corrections and security fixes, by /not/ upgrading. And if he
>> still does not understand the issue, or cannot give you a better
>> reason to want to stay with 6.0.24, send the list to his boss.
> 
> There's another issue when comparing vendor-packaged versus
> Apache-distributed Tomcat versions.
> 
> Vendors often backport various fixes from later Apache-distributed
> versions to vendor-packaged versions. For example, you may see the
> following in RedHat (I'm running Fedora 22 or CentOS 6) distributions:
> 
> CentOS 6
> 
> Name: tomcat6
> Arch: x86_64
> Version : 6.0.24
> Release : 83.el6_6
> Size: 92 k
> Repo: updates
> 
> First of all, you have to select Tomcat 6 as opposed to Tomcat on
> CentOS 6.6.  I understand that the Tomcat 7 version is only available
> in the EPEL repository.
> 
> Here's the information for tomcat.noarch from the EPEL repository.
> 
> Name: tomcat
> Arch: noarch
> Version : 7.0.33
> Release : 4.el6
> Size: 86 k
> Repo: epel
> 
> The key thing to look at in both of these listings is the Release tag.
> RedHat (and I suppose other vendors) release updates to their packages
> that include backports for certain issues. In general, RedHat
> addresses security issues, but avoids backporting API changes between
> releases of their Linux platform.
> 
> It is very difficult to compare RedHat's version of 6.0.24 or 7.0.33
> with the Apache release. You would have to compare both sets of change
> logs to find out how RedHat's release compared to Apache's release.
> Then, since it doesn't appear that this particular problem was
> uniquely identified in the Apache Tomcat changelogs, you would have to
> determine what change (and when) fixed the issue.
> 
> Finally, you would the

Re: Tomcat 6 : saerching for a bug fix between 6.0.24 and 6.0.44

2015-06-25 Thread Pascal Abaziou

> Le 25 juin 2015 à 10:40, André Warnier  a écrit :
> 
> Pascal Abaziou wrote:
> 
>>> Le 25 juin 2015 à 00:23, Mark Eggers  a 
>>> écrit :
>>> 
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA1
>>> 
>>> On 6/24/2015 2:40 PM, André Warnier wrote:
>>>> Pascal Abaziou wrote:
>>>>> Hello,
>>>>> 
>>>>> I’m searching for the version that fixes a bug I’ve on a tomcat 6.0.24 
>>>>> (on redhat). As I do not reproduce it on my windows workstation with 
>>>>> tomcat 6.0.44, I need elements to argue to
>>>>> upgrade to the sys admin.
>>>>> 
>>>>> So the bug : with a REST resource service implemented with
>>>>> Jersey, if there’s no method corresponding to a URI (under the
>>>>> hierarchy that Jersey should handle), Jersey raises a 404
>>>>> NOT_FOUND error.
>>>>> 
>>>>> In 6.0.24, tomcat raises a 500 internal error. In 6.0.44, tomcat 
>>>>> propagates the 404 not found error.
>>>>> 
>>>>> As the sysadmin want to stay on version delivered by redhead, I need 
>>>>> elements to motivate an update.
>>>>> 
>>>>> I’ve read the tomcat 6 changelog, but did not find when this was fixed.
>>>>> 
>>>> You know, I don't want to discourage you, but..
>>>> 
>>>> Assuming even that this was a bug that was fixed on its own, and
>>>> not some side-effect of some other change..
>>>> 
>>>> As you know, Tomcat is an open-source and free software, developed and 
>>>> supported by volunteers, who apart from their Tomcat
>>>> involvement, all have a paying job which they do on the side..
>>>> This user's list is the same.
>>>> 
>>>> Tomcat 6.0.24 is at least 5 years old. The current Tomcat version
>>>> is 8.0.23. Between these two, there are 5 years and probably close
>>>> to 100 versions. Some of these versions correct real bugs or
>>>> security issues which could leave any lower version vulnerable to
>>>> hacking.
>>>> 
>>>> The Tomcat developers, having a limited amount of time to dedicate to it, 
>>>> rather understandably prefer to spend this time working on and supporting 
>>>> the latest version, rather than very old ones.
>>>> 
>>>> All of this to say that unless there is a very strong incentive for
>>>> someone to go and dig through the documentation and the code, your
>>>> chances of getting real help on this apparently minor and
>>>> peripheral issue, affecting an old version of Tomcat but not more
>>>> recent ones, are really slim.
>>>> 
>>>> If your sysadmin does not understand the benefits of upgrading to
>>>> a more recent version, rather than this very old one, then the
>>>> problem is with him, not with you and not with the Tomcat
>>>> developers. Maybe you should just take the change logs, starting
>>>> with 6.0.44 and working back to 6.0.24, append them to one another,
>>>> and send this to him as a token of what he is missing in terms of
>>>> bug corrections and security fixes, by /not/ upgrading. And if he
>>>> still does not understand the issue, or cannot give you a better
>>>> reason to want to stay with 6.0.24, send the list to his boss.
>>> There's another issue when comparing vendor-packaged versus
>>> Apache-distributed Tomcat versions.
>>> 
>>> Vendors often backport various fixes from later Apache-distributed
>>> versions to vendor-packaged versions. For example, you may see the
>>> following in RedHat (I'm running Fedora 22 or CentOS 6) distributions:
>>> 
>>> CentOS 6
>>> 
>>> Name: tomcat6
>>> Arch: x86_64
>>> Version : 6.0.24
>>> Release : 83.el6_6
>>> Size: 92 k
>>> Repo: updates
>>> 
>>> First of all, you have to select Tomcat 6 as opposed to Tomcat on
>>> CentOS 6.6.  I understand that the Tomcat 7 version is only available
>>> in the EPEL repository.
>>> 
>>> Here's the information for tomcat.noarch from the EPEL repository.
>>> 
>>> Name: tomcat
>>> Arch: noarch
>>> Version : 7.0.33
>>> Release : 4.el6
>>> Size: 86 k
>>> Repo: epel
>>> 
>>&g

Re: Tomcat 6 : saerching for a bug fix between 6.0.24 and 6.0.44

2015-06-25 Thread Pascal Abaziou

> Le 25 juin 2015 à 21:45, Pascal Abaziou  a écrit :
> 
> 
>> Le 25 juin 2015 à 10:40, André Warnier > <mailto:a...@ice-sa.com>> a écrit :
>> 
>> Pascal Abaziou wrote:
>> 
>>>> Le 25 juin 2015 à 00:23, Mark Eggers >>> <mailto:its_toas...@yahoo.com.INVALID>> a écrit :
>>>> 
>>>> -BEGIN PGP SIGNED MESSAGE-
>>>> Hash: SHA1
>>>> 
>>>> On 6/24/2015 2:40 PM, André Warnier wrote:
>>>>> Pascal Abaziou wrote:
>>>>>> Hello,
>>>>>> 
>>>>>> I’m searching for the version that fixes a bug I’ve on a tomcat 6.0.24 
>>>>>> (on redhat). As I do not reproduce it on my windows workstation with 
>>>>>> tomcat 6.0.44, I need elements to argue to
>>>>>> upgrade to the sys admin.
>>>>>> 
>>>>>> So the bug : with a REST resource service implemented with
>>>>>> Jersey, if there’s no method corresponding to a URI (under the
>>>>>> hierarchy that Jersey should handle), Jersey raises a 404
>>>>>> NOT_FOUND error.
>>>>>> 
>>>>>> In 6.0.24, tomcat raises a 500 internal error. In 6.0.44, tomcat 
>>>>>> propagates the 404 not found error.
>>>>>> 
>>>>>> As the sysadmin want to stay on version delivered by redhead, I need 
>>>>>> elements to motivate an update.
>>>>>> 
>>>>>> I’ve read the tomcat 6 changelog, but did not find when this was fixed.
>>>>>> 
>>>>> You know, I don't want to discourage you, but..
>>>>> 
>>>>> Assuming even that this was a bug that was fixed on its own, and
>>>>> not some side-effect of some other change..
>>>>> 
>>>>> As you know, Tomcat is an open-source and free software, developed and 
>>>>> supported by volunteers, who apart from their Tomcat
>>>>> involvement, all have a paying job which they do on the side..
>>>>> This user's list is the same.
>>>>> 
>>>>> Tomcat 6.0.24 is at least 5 years old. The current Tomcat version
>>>>> is 8.0.23. Between these two, there are 5 years and probably close
>>>>> to 100 versions. Some of these versions correct real bugs or
>>>>> security issues which could leave any lower version vulnerable to
>>>>> hacking.
>>>>> 
>>>>> The Tomcat developers, having a limited amount of time to dedicate to it, 
>>>>> rather understandably prefer to spend this time working on and supporting 
>>>>> the latest version, rather than very old ones.
>>>>> 
>>>>> All of this to say that unless there is a very strong incentive for
>>>>> someone to go and dig through the documentation and the code, your
>>>>> chances of getting real help on this apparently minor and
>>>>> peripheral issue, affecting an old version of Tomcat but not more
>>>>> recent ones, are really slim.
>>>>> 
>>>>> If your sysadmin does not understand the benefits of upgrading to
>>>>> a more recent version, rather than this very old one, then the
>>>>> problem is with him, not with you and not with the Tomcat
>>>>> developers. Maybe you should just take the change logs, starting
>>>>> with 6.0.44 and working back to 6.0.24, append them to one another,
>>>>> and send this to him as a token of what he is missing in terms of
>>>>> bug corrections and security fixes, by /not/ upgrading. And if he
>>>>> still does not understand the issue, or cannot give you a better
>>>>> reason to want to stay with 6.0.24, send the list to his boss.
>>>> There's another issue when comparing vendor-packaged versus
>>>> Apache-distributed Tomcat versions.
>>>> 
>>>> Vendors often backport various fixes from later Apache-distributed
>>>> versions to vendor-packaged versions. For example, you may see the
>>>> following in RedHat (I'm running Fedora 22 or CentOS 6) distributions:
>>>> 
>>>> CentOS 6
>>>> 
>>>> Name: tomcat6
>>>> Arch: x86_64
>>>> Version : 6.0.24
>>>> Release : 83.el6_6
>>>> Size: 92 k
>>>> Repo: updates
>>>> 
>>>> First of all, you have to select 

Re: Tomcat 6 : saerching for a bug fix between 6.0.24 and 6.0.44

2015-06-25 Thread Pascal Abaziou

> Le 25 juin 2015 à 16:16, Christopher Schultz  a 
> écrit :
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Pascal,
> 
> On 6/25/15 10:01 AM, Christopher Schultz wrote:
>> Pascal,
>> 
>> On 6/24/15 4:23 PM, Pascal Abaziou wrote:
>>> Hello,
>> 
>>> I’m searching for the version that fixes a bug I’ve on a tomcat 
>>> 6.0.24 (on redhat). As I do not reproduce it on my windows 
>>> workstation with tomcat 6.0.44, I need elements to argue to
>>> upgrade to the sys admin.
>> 
>>> So the bug : with a REST resource service implemented with
>>> Jersey, if there’s no method corresponding to a URI (under the
>>> hierarchy that Jersey should handle), Jersey raises a 404
>>> NOT_FOUND error.
>> 
>>> In 6.0.24, tomcat raises a 500 internal error. In 6.0.44, tomcat 
>>> propagates the 404 not found error.
>> 
>>> As the sysadmin want to stay on version delivered by redhead, I 
>>> need elements to motivate an update.
>> 
>>> I’ve read the tomcat 6 changelog, but did not find when this was 
>>> fixed.
>> 
>> This is more compelling reading:
>> 
>> http://tomcat.apache.org/security-6.html
> 
> Here are some issues you may want to specifically be aware of (search
> for them in the text of the above document):
> 
> CVE-2012-0022
> CVE-2012-4534
> CVE-2012-2733
> CVE-2012-3544/CVE-2013-4322
> CVE-2005-2090/CVE-2013-4286
> CVE-2014-0099
> CVE-2014-0075
> CVE-2014-0227
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> 
> iQIcBAEBCAAGBQJVjA07AAoJEBzwKT+lPKRY3/wP/0AryA0WY6uek7TLhNg/G+dT
> hSFoVPNohDsKde2BP+kdCabBRVUnqe2b5rRID0CuGQe4Ve5RCzdmwQtXoJEvySNW
> WEiQVIKO4sg3D3ihrAAyDtWKKSwlHr8PY9R+J80yPATfKKdGjvAJkRMe1CxCGbZ9
> hcU3F7g86h7dnqh2nL3EcfscCT/4E+0QXmrEaNWluMD2acCYFcfJRVzLpo+vTP7B
> exrOdlgPp4TWPt/StzoDIrJ00daI6y0rYtgQSNrKIXFGVgCB7PsEpDQoQ2fcLHkD
> QVUl5EfAIP4/oWSnLjh7Ncj2x/gp15yc3oR/EkBNgeqxVPzB+y0UHTrn7p6CzlED
> bVxFzOCdBCFHGqIuZi1hR26TIbHOu3XJlBBafpVD2kxJnKgyo5mjpxj/mMNVwX2A
> Wj/NHtmieKMRIqTKlqXyIFEYBBrzYVNNjRPmIR/ghPwGRntw45x2eEuzZLL49f1O
> NXIwiuf80H5pjrmMt/dWztRlq5QlyqFtxf/xMSNtWu1tnfG6OJI2Nsmtc1MCCXmu
> apZx3Em+lohCEh9/ElX8ZlKGJ2AsjhI6WNXvcS3uE7/8zInCU/P04y+QI9Zw/w/F
> jQAJ4gSarQAyk+hDKtSHcC2LfeExhbRR9upONF/P3wPOZukWN/T6ZJsMelhpzx/m
> /aJbYhiVNM9fmo6bfLww
> =ywXV
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

Christopher,

Many thanks for the link.

It will be very helpful.

Regards,
Pascal


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



Is it possible to disable JMX?

2019-08-26 Thread Pascal Schumacher

|Hi,

according to https://tomcat.apache.org/tomcat-9.0-doc/changelog.html it
should be possible to disable JMX when using Tomcat 9.0.20+.

I tried different way to pass --no-jmx to Tomcat 9.0.24 ("catalina.bat
start --no-jmx", "startup.bat --no-jmx", editing catalina.bat), but the
"Catalina" folder is present in JMX and memory consumption remains the same.

I guess I am misunderstanding something and there is not way to disable
JMX when using org.apache.catalina.startup.Bootstrap?

Thanks and kind regards,
Pascal|

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



ClassNotFoundException when deserializing custom object with FileStore for PersistentManagerBase.processExpires

2024-12-03 Thread Pascal Rigaux

Hi,

I have bug https://bz.apache.org/bugzilla/show_bug.cgi?id=48007 on recent 
tomcats.

To reproduce one must:
- use PersistentManager in global context.xml
- have an object in session only available through a webapp class loader
- wait for manager backgroundProcess to call PersistentManagerBase.processExpires 
> Storebase.processExpires
  (by default, 6 * 10 seconds)

=> it fails to unserialize, and removes the session from FileStore.


My technical understanding of the issue:

getObjectInputStream() is using Thread.currentThread().getContextClassLoader()
which is set in FileStore.load() using current Context classLoader

This is ok when called by manager.findSession(...) , but 
Storebase.processExpires() is using current context

=> it is ok when PersistentManager is in the application specific
context.xml
=> it is wrong when PersistentManager is in global context.xml

One can workaround the issue by moving  from global 
context.xml to webapp context.xml ,
as explained here : 
https://dev.wicket.apache.narkive.com/KXmPFrnQ/problems-with-tomcat-session-persistence-classnotfoundexception-of-secondlevelcachesessionstore

If you use PersistentValve, another workaround is to use  + an external cron.


Stacktrace with tomcat 9:

SEVERE [Catalina-utility-3] 
org.apache.catalina.session.StoreBase.processExpires Error processing session 
expiration for key [xxx]
java.lang.ClassNotFoundException: 
org.springframework.security.core.context.SecurityContextImpl
at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1339)
at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1148)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at 
org.apache.catalina.util.CustomObjectInputStream.resolveClass(CustomObjectInputStream.java:149)
at java.base/java.io.ObjectInputStream.readNonProxyDesc(Unknown 
Source)
at java.base/java.io.ObjectInputStream.readClassDesc(Unknown 
Source)
at 
java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject0(Unknown 
Source)
at java.base/java.io.ObjectInputStream.readObject(Unknown 
Source)
at java.base/java.io.ObjectInputStream.readObject(Unknown 
Source)
at 
org.apache.catalina.session.StandardSession.doReadObject(StandardSession.java:1268)
at 
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:846)
at 
org.apache.catalina.session.FileStore.load(FileStore.java:203)
at 
org.apache.catalina.session.StoreBase.processExpires(StoreBase.java:138)
at 
org.apache.catalina.session.PersistentManagerBase.processExpires(PersistentManagerBase.java:409)
at 
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:595)
at 
org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:4823)
..

It would be nice in my use-cases to be able to configure globally 
PersistentManager.
It would be enough for us to have an option to disable 
Storebase.processExpires(), but it may be somewhat ugly...

cu
Pascal Rigaux.

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



Re: ClassNotFoundException when deserializing custom object with FileStore for PersistentManagerBase.processExpires

2024-12-05 Thread Pascal Rigaux

On 04/12/2024 18:09, Mark Thomas wrote:

The Manager/Store component can't easily determine if it is being configured 
from the global, host or context level context.xml file.

The root cause here is configuration error - configuring multiple web 
applications to use the same file for session persistence.


Thanks for the explantation!


Suggestions for StandardManager.file() :


- allowing a directory as absolute pathname:

  if (file.isAbsolute()) {
if (file.isDirectory()) {
  var contextName = getContext().getBaseName();
  return new File(file, "SESSIONS-" + contextName + ".ser");


- a quite ugly code to detect bad usage:

static Map pathname2contextName = new HashMap<>();

...

  if (file.isAbsolute()) {
var contextName = getContext().getBaseName();
var prev = pathname2contextName.get(pathname);
if (prev != null && !prev.equals(contextName)) {
  log.error("You can not share same absolute \"pathname\" for multiple s (found same 
\"pathname\" for " + contextName + " and " + prev + ")");
}
pathname2contextName.put(pathname, contextName);


cu


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



Re: ClassNotFoundException when deserializing custom object with FileStore for PersistentManagerBase.processExpires

2024-12-03 Thread Pascal Rigaux

Oops, I missed something :

When you use  or 
the behaviour is different if the pathname/directory is absolute or relative.

If it is relative, it is stored relative to each applications temporary work 
directory, and handled with each application classLoader, and it works 
perfectly.

Maybe this should be mentionned more clearly in the documentation? Maybe 
display a warning log for absolute pathname/directory in global context.xml?

cu,
Pascal R.

On 03/12/2024 16:36, Pascal Rigaux wrote:

Hi,

I have bug https://bz.apache.org/bugzilla/show_bug.cgi?id=48007 on recent 
tomcats.

To reproduce one must:
- use PersistentManager in global context.xml
- have an object in session only available through a webapp class loader
- wait for manager backgroundProcess to call PersistentManagerBase.processExpires 
> Storebase.processExpires
   (by default, 6 * 10 seconds)

=> it fails to unserialize, and removes the session from FileStore.


My technical understanding of the issue:

getObjectInputStream() is using Thread.currentThread().getContextClassLoader()
which is set in FileStore.load() using current Context classLoader

This is ok when called by manager.findSession(...) , but 
Storebase.processExpires() is using current context

=> it is ok when PersistentManager is in the application specific
context.xml
=> it is wrong when PersistentManager is in global context.xml

One can workaround the issue by moving  from global 
context.xml to webapp context.xml ,
as explained here : 
https://dev.wicket.apache.narkive.com/KXmPFrnQ/problems-with-tomcat-session-persistence-classnotfoundexception-of-secondlevelcachesessionstore

If you use PersistentValve, another workaround is to use  + an external cron.


Stacktrace with tomcat 9:

SEVERE [Catalina-utility-3] 
org.apache.catalina.session.StoreBase.processExpires Error processing session 
expiration for key [xxx]
     java.lang.ClassNotFoundException: 
org.springframework.security.core.context.SecurityContextImpl
     at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1339)
     at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1148)
     at java.base/java.lang.Class.forName0(Native Method)
     at java.base/java.lang.Class.forName(Unknown Source)
     at 
org.apache.catalina.util.CustomObjectInputStream.resolveClass(CustomObjectInputStream.java:149)
     at 
java.base/java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
     at java.base/java.io.ObjectInputStream.readClassDesc(Unknown 
Source)
     at 
java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
     at java.base/java.io.ObjectInputStream.readObject0(Unknown 
Source)
     at java.base/java.io.ObjectInputStream.readObject(Unknown 
Source)
     at java.base/java.io.ObjectInputStream.readObject(Unknown 
Source)
     at 
org.apache.catalina.session.StandardSession.doReadObject(StandardSession.java:1268)
     at 
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:846)
     at 
org.apache.catalina.session.FileStore.load(FileStore.java:203)
     at 
org.apache.catalina.session.StoreBase.processExpires(StoreBase.java:138)
     at 
org.apache.catalina.session.PersistentManagerBase.processExpires(PersistentManagerBase.java:409)
     at 
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:595)
     at 
org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:4823)
     ..

It would be nice in my use-cases to be able to configure globally 
PersistentManager.
It would be enough for us to have an option to disable 
Storebase.processExpires(), but it may be somewhat ugly...

cu
Pascal Rigaux.


--
Pascal Rigaux

Expert en développement et déploiement d'applications
DSIUN-PAS (Pôle Applications et Services numériques)
Université Paris 1 Panthéon-Sorbonne  -  Centre Pierre Mendès France (PMF)
Coordonnées : https://annuaire.univ-paris1.fr/Pascal.Rigaux@


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



session Manager "maxActiveSessions" alternative behavior : allow new session but expire old session

2025-01-08 Thread Pascal Rigaux

Hi,

On some applications we have:
- quite low number of users most of the time
- high number of users twice a year

These applications store quite a lot of information in session.
To cope with the surge of users, we would need to:
- either increase mx (Java max memory)
- or use short session timeout (lifetime)
- or use horizontal scaling (k8s... but we currently have no such solutions)

The best solution for us would be a "maxActiveSessions" setting which would set 
a high bound to the number of sessions,
but compared to current implementation, it would allow new sessions and expire 
old sessions.

We mostly achieved this with a cron (1) calling a script (2): it uses 
tomcat-manager to force a shorter lifetime when there is a lot of sessions.

Since it would be nicer to have this behavior directly in tomcat, I did it 
using a small class extending StandardManager (2).
I wonder if this could be useful to other users?...

cu.


(1) */10 * * * * ~/tomcat/expire-if-too-many-sessions student-info 4000 8
(2) script "expire-if-too-many-sessions":
--
webapp=$1
max_sessions=$2
idle=$3

nb_sessions=`curl -s --user "$user" "$url/manager/text/list" | grep "$webapp" | 
awk -F: '{print $3}'`

if [ $nb_sessions -gt $max_sessions ]; then
echo "too many sessions ($nb_sessions > $max_sessions). telling tomcat to expire 
$webapp sessions inactive more than $idle"
out=`curl -s --user "$user" 
"$url/manager/text/expire?path=/$webapp&idle=$idle"`
if echo $out | grep -q '^OK'; then
:
else
echo "error expiring: $out"
fi
fi
-


(3)
-
protected int maxActiveSessionsGoal = -1;

/**
 * If you have too many sessions, you may memory overflow.
 * This setting will expire old sessions to keep sessions memory usage low.
 * -1 is no limit
 */
public void setMaxActiveSessionsGoal(int max) {
maxActiveSessionsGoal = max;
}


public void processExpires() {
super.processExpires();
if (maxActiveSessionsGoal >= 0) {
var nb = getActiveSessions();
if (nb > maxActiveSessionsGoal) {
expireNbOldSessions(nb - maxActiveSessionsGoal);
}
}
}

private void expireNbOldSessions(int nbToRemove) {
var time = sessions.values().stream()
.mapToLong(Session::getLastAccessedTimeInternal).sorted()
// we want the nbToRemove-th element in the array
.skip(nbToRemove).findFirst()
.orElse(0);
if (time == 0) {
log.error("internal error expireNbOldSessions");
return;
}
log.info("To achieve maxActiveSessionsGoal (" + maxActiveSessionsGoal + ") for " + 
getContext().getBaseName() + ", we will expire sessions older than " + new Date(time) + " (" + nbToRemove + 
" sessions)");
for (Session session : findSessions()) {
if (session.getLastAccessedTimeInternal() < time) {
session.expire();
}
}
}
-

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



Re: session Manager "maxActiveSessions" alternative behavior : allow new session but expire old session

2025-01-09 Thread Pascal Rigaux

Hi,

On 08/01/2025 22:13, Christopher Schultz wrote:

[...]
It would allow anyone to force a logout of all current users at will just by 
making any request that causes an unauthenticated session to be created.

Instant DOS.


Note that current "maxActiveSessions" implementation also causes a DOS: if you 
can create many sessions, it will block new users.

I must look at the application unauthenticated sessions:
- if they are already big, there is already a DOS via OutOfMemory
- if there are small, they would need to be handled specifically, expiring them 
first

In any case, as you suggested, the application should not depend on such big 
sessions. That's the real solution to avoid any issues!

cu
Pascal Rigaux.


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



Tomcat 9.0.14 Windows service slow to stop

2019-01-07 Thread Jean-Pascal Houde
Hello,

I'm having a problem that seems to occur only since Tomcat 9.0.14. I'm using 
Tomcat installed as a service on a Windows 2012 R2 server. 
The service starts normally, but stopping it from the Windows Services window 
takes a long time (about a minute). This happens even with no web application 
deployed on the server. I've tried downgrading to 9.0.13 and 9.0.12 and both 
version stops normally, under 1-2 seconds.

Here is what I am doing:
1. Download Tomcat Windows 64-bit zip
2. Install service using "service install tomcat9"
3. Open Windows "Services" control panel
3. Start Tomcat9 service -> very fast
4. Stop Tomcat9 service -> gets stuck on "stopping service..." for around a 
minute.

This is what the commons-daemon log file shows:
[2019-01-07 18:27:21] [info]  [ 7500] Commons Daemon procrun (1.1.0.0 64-bit) 
started
[2019-01-07 18:27:21] [info]  [ 7500] Running 'tomcat9' Service...
[2019-01-07 18:27:21] [info]  [ 3904] Starting service...
[2019-01-07 18:27:22] [info]  [ 3904] Service started in 1190 ms.
[2019-01-07 18:27:23] [info]  [ 9796] Stopping service...
[2019-01-07 18:27:24] [info]  [ 9796] Service stop thread completed.
[2019-01-07 18:28:24] [info]  [ 7500] Run service finished.
[2019-01-07 18:28:24] [info]  [ 7500] Commons Daemon procrun finished

You can see the full minute between the initial "Stopping services..." and the 
finish of the stopping process. Other log files don't show anything suspicious.

Anyone seeing the same issue with this version? 

Thanks,


Jean-Pascal Houde


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



RE: Tomcat 9.0.14 Windows service slow to stop

2019-01-08 Thread Jean-Pascal Houde
/mail-archives.apache.org/mod_mbox/tomcat-users/201812.mbox/aj
> > ax
> /%3CDEB74971-2714-401F-9428-25EE0ECC6D11%40shaw.ca%3E
> <http://mail-archives.apache.org/mod_mbox/tomcat-users/201812.mbox/aja
> x/%3CDEB74971-2714-401F-9428-25EE0ECC6D11%40shaw.ca%3E>
> >
> >  I’m not fluent in Tomcat, but it appears something changed in the 
> > catalina.sh script of 9.0.14 that changed the stop/start behaviour.
>
> Certainly nothing in catalina.sh affects Windows Services. Even 
> catalina.bat is ignored for Windows Services.
>

+1


> Your issue is that Tomcat's scripts (well, actually, some 3rd-party 
> scripts, actually) can't manage to stop Tomcat. Jean-Pascal's problem 
> is that his shutdown is taking 60sec when he thinks it shouldn't take 
> that long.
>

I've seen this happen when an application, or a 3rd-party library starts a 
non-daemon thread and it is not stopped prior to the shutdown attempt.  I think 
that there is a 60 second timeout because I've also noticed about that same 
time frame when it happens.


>
> Jean-Pascal, what do the Tomcat logs say? There should be something 
> like catalina.out or stdout.log or something like that.
>

+1

Another thing I would try is to look at a thread dump.

Igal


>
> - -chris
>
> >> On Jan 7, 2019, at 3:38 PM, Jean-Pascal Houde 
> >> wrote:
> >>
> >> Hello,
> >>
> >> I'm having a problem that seems to occur only since Tomcat 9.0.14. 
> >> I'm using Tomcat installed as a service on a Windows 2012
> >> R2 server. The service starts normally, but stopping it from the 
> >> Windows Services window takes a long time (about a minute). This 
> >> happens even with no web application deployed on the server. I've 
> >> tried downgrading to 9.0.13 and 9.0.12 and both version stops 
> >> normally, under 1-2 seconds.
> >>
> >> Here is what I am doing: 1. Download Tomcat Windows 64-bit zip 2.
> >> Install service using "service install tomcat9" 3. Open Windows 
> >> "Services" control panel 3. Start Tomcat9 service -> very fast 4.
> >> Stop Tomcat9 service -> gets stuck on "stopping service..." for 
> >> around a minute.
> >>
> >> This is what the commons-daemon log file shows: [2019-01-07 
> >> 18:27:21] [info]  [ 7500] Commons Daemon procrun (1.1.0.0 64-bit) 
> >> started [2019-01-07 18:27:21] [info]  [ 7500] Running 'tomcat9'
> >> Service... [2019-01-07 18:27:21] [info]  [ 3904] Starting 
> >> service... [2019-01-07 18:27:22] [info]  [ 3904] Service started in 
> >> 1190 ms. [2019-01-07 18:27:23] [info]  [ 9796] Stopping service... 
> >> [2019-01-07 18:27:24] [info]  [ 9796] Service stop thread 
> >> completed. [2019-01-07 18:28:24] [info]  [ 7500] Run service 
> >> finished. [2019-01-07 18:28:24] [info]  [ 7500] Commons Daemon 
> >> procrun finished
> >>
> >> You can see the full minute between the initial "Stopping 
> >> services..." and the finish of the stopping process. Other log 
> >> files don't show anything suspicious.
> >>
> >> Anyone seeing the same issue with this version?
> >>
> >> Thanks,
> >>
> >>
> >> Jean-Pascal Houde
> >>
> >>
> >> ---
> >> --
> >>
> >>
> 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
> >
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlw0LcEACgkQHPApP6U8
> pFgfsg//Yv9k+Lqnn/nH2Pd2iahEJnPRZVRUeg2bRFQGlpwRURApBzup8646UsFE
> zo9zxfJuuw2L/jea7rfZaXJaXay6nhaJ/h5+RPfq1CExNLjcK/3GjJwmZxSUqJxl
> PtNtpjsJr8lD3OXMzu9sqr26Zj3AtPbAqpJFr1A9LGlflpIi5ohqzVkpA3h2knEH
> luxjEbsD5uaG7YlQdzal76a81RBN0glBUvdgP1dPsgXKscMdYkoIzNYL7G5TniAx
> 3Jsilp0oWYfDEJ0oFRmUAjN++jq4QefMZHow3QUEU8xZ8L47JQv6ZlmkSbqPndH0
> /kdrUA9Cv82lN0czBz2u+KmKduot7tc+KEqS+RJD8Pkj9Jy7FOLCu9klLXk3LXFG
> M22XPJdwnIDQeVnjJKxjiUhetFjOCSzH3FyL/VuxAsO4qsCqSgiW/RRrU+FdLYfs
> OQPjOzGISu/9lwZ+M7yPJ1XzCoBbpVE1iHf0R5vuI0H922oXRu0dyx/IKnEpbGrv
> GY6zRrte4AtLO0oMXeDxWH/iC9xgRn+B4oy8Gd3RY9l6A1vLeT41flCSjAvtSkeU
> AE5N4iJp39mGJ/iUpWa7C5tzwbV1syv1weC4BzHVl5+W+YBBlv6x/HJX2Zc9dsMO
> okn6tCEuKFnSCqc4N4IdocolkISqObVe35RYioYHxBStMDr5dpU=
> =xtqK
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>