RE: SEVERE: All threads (700) are currently busy, waiting. Increase maxThreads (700) or check the servlet status

2009-11-05 Thread Joan Monplet Ortega
Yeah, It's the one Tomcat. We have 4GB RAM on production Server and We run it 
with 1GB.

The version Tomcat is "Apache Tomcat/6.0.18".

Also, We're working with Lucene but I'm not sure that the problem is here.

We're looking Server Status from Apache Web Server and We have many keepalive 
connections and If we check the Tomcat' status (I'm using Lambda Probe), We can 
see that exists a lot of connection with KeepAlive.

We're using mod_proxy_ajp (Apache 2.2.x) for connecting to Apache Web Server & 
Tomcat.

When we restart Tomcat Web Server, the number of Threads (Stage KeepAlive) 
grows, and We don't understand why occur that. It seems that Tomcat no unblock 
Threads whose stages are unblocked. So, In 2 or 3 hours the current Threads 
busy increase until the Max threads.


What's the best way connecting Apache & Tomcat? mod_jk or mod_proxy_ajp?

What's the meaning stage keepalive in Tomcat?

How to we find the problematic servlet that does the many connections are 
blocked? Because in LambdaProbe We can't find the exactly servlet url.

Thanks


-Mensaje original-
De: André Warnier [mailto:a...@ice-sa.com] 
Enviado el: jueves, 05 de noviembre de 2009 23:52
Para: Tomcat Users List
Asunto: Re: SEVERE: All threads (700) are currently busy, waiting. Increase 
maxThreads (700) or check the servlet status

Joan Monplet Ortega wrote:
> 
> SEVERE: All threads (700) are currently busy, waiting. Increase
> maxThreads (700) or check the servlet status
> 
That sounds like a lot of threads.
>  
> 
> And we checked all servlets and we are sure that all cursors to database
> are closed (statement, resultset, etc...).
> 
Yeah, but it looks like they are busy anyway.  What are they doing ?

>  
> 
> When we have high traffic to our website the problem occurs.
> 
No kidding.
Is that one Tomcat ? And if it is, how much physical memory is available 
on that system ?

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


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



Re: ConnectionPool question

2009-11-05 Thread Elli Albek
Hi,

> Elli,
>
> On 11/4/2009 7:01 PM, Elli Albek wrote:
>> I also
>> remember that closing a connection closes statements and result sets, but it
>> has been a while since I read the source.
>
> Pooled connections are almost certainly not behaving this way. This has
> been discussed at least twice in the last week or two, and, I believe,
> already once in this thread.
>
> - -chris

This is certainly not the case for my DBCP library (1.2.2). I just
stepped through the source code: Calling connection.close() is closing
result sets and statements. In addition I commented the code that
closes statements and result sets in our framework to create a leak,
and DBCP closed everything. Relevant DBCP Code snippets below.

Josh:
You are correct, wrapping connections, statements and datasources is
not a good idea. It is complicated code and can lead to many problems.
Fortunately for you, you don’t have to do that. You can recklessly
leave statements and result sets open, and as long as you call
connectiohn.close() at the end DBCP will do all the work for you. You
can verify this by downloading the source code, and putting a break
point just before you call close.

I am telling you this based on experience. We do wrap everything for
logging purpose (data source, connection, statement). Doing it was far
from trivial, even using the DBCP ready-to-use wrapper classes
(DelegatingConnection, DelagatingStatement…).

Of course is it good to follow best practices and close things as soon
as possible in finally blocks. But in your case, it may just be an
unnecessary intermediary step that you can skip. Maybe you can start
with a brute force filter and rely on the good fellows that wrote DBCP
to clean up the mess. Then go to a better solution, where you use a
framework that does most of this work for you. There are too many java
database frameworks to list, some of them are heavy, some are minimal
right above the JDBC layer, and still provide automatic closing of
resources.

Below is the DBCP code that keeps track of open statements/result sets
and closes them when the connection is closed (BDCP 1.2.2).

PollableConnectionFactory:
public void passivateObject(Object obj) throws Exception {
  ...
  if(obj instanceof DelegatingConnection) {
((DelegatingConnection)obj).passivate();
  }
}

DelegatingConnection (called via subclass PollableConnection):

protected void passivate() throws SQLException {
try {
// The JDBC spec requires that a Connection close any open
// Statement's when it is closed.
List statements = getTrace();
if( statements != null) {
Statement[] set = new Statement[statements.size()];
statements.toArray(set);
for (int i = 0; i < set.length; i++) {
set[i].close();
}
clearTrace();
}
setLastUsed(0);
if(_conn instanceof DelegatingConnection) {
((DelegatingConnection)_conn).passivate();
}
}
finally {
_closed = true;
}
}

Delegating statement:
public void close() throws SQLException {
try {
try {
if (_conn != null) {
_conn.removeTrace(this);
_conn = null;
}

// The JDBC spec requires that a statment close any open
// ResultSet's when it is closed.
// FIXME The PreparedStatement we're wrapping should
handle this for us.
// See bug 17301 for what could happen when ResultSets
are closed twice.
List resultSets = getTrace();
if( resultSets != null) {
ResultSet[] set = (ResultSet[])
resultSets.toArray(new ResultSet[resultSets.size()]);
for (int i = 0; i < set.length; i++) {
set[i].close();
}
clearTrace();
}

_stmt.close();
}
catch (SQLException e) {
handleException(e);
}
}
finally {
_closed = true;
}
}

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



Re: Want to customise the tomcat's session logic

2009-11-05 Thread Sam Gendler
On Mon, Nov 2, 2009 at 5:03 AM, Pid  wrote:

> On 02/11/2009 10:06, S Arvind wrote:
>
>> Hi Tomcat developers,
>>
>>Bascially my requirement is ability to control the session
>> sharing in browser. Till now we maintained each application as differnet
>> context but pointing to same doc-base. So different web application will
>> be
>> running on a same code to control the session sharing between different
>> application . But now we want to run in same context as one application
>> but
>> control the session sharing. So i planned to customise session creation n
>> management of the tomcat to our requirements to add some value to
>> *path*attribute in session. Is this possible?
>>
>
>
> I'm not sure your question is very clear, perhaps if you are able to make
> your question clearer someone will be able to help.
>
>
If I understand correctly, you want to combine apps under a single context,
but you still want some control over data in session, perhaps using a 'path'
within the session object to store different values for different 'apps.'

I know next to nothing about session management infrastructure in tomcat,
but I happened to notice another mail o the list that mentioned the
SessionManager which is specified in context.xml (I think).  Based on that
small piece of information, I'm guessing that you could provide your own
SessionManager, which is likely responsible for creating new sessions and
managing existing sessions.  If so, it seems likely that you can manage
sessions any way you'd like.  For instance, whenever the session object is
accessed, you could first inject the current 'path' for the request based on
attributes in the request object, which would cause all attributes to be set
with that path prefix in the session during that request.

Documentation for the SessionManager object is here:
http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html


Re: Tomcat Xalan classpath problem

2009-11-05 Thread Benson Margulies
i don't suppose you've had time to look at the test case?

On Tue, Nov 3, 2009 at 9:22 AM, Rainer Jung  wrote:

> Just to make sure w.r.t. it being working in Jetty: You use the same
> Java version? Sun changed an important bit between Java 5 and Java 6,
> where they are now caching something detected during runtime in a global
> static thus partially breaking the dynamics of XML parser detection when
> using mutiple classloaders. The usual indication is a class cast
> exception, which is not the case in your situation, but nevertheless I
> wanted to check, whether there's a relation to Java 6 vs. Java 5
> (handling in Java 6 is broken).
>
> Regards,
>
> Rainer
>
> On 03.11.2009 14:00, Benson Margulies wrote:
> > Here's the relevant log traffic of the missing method. I can get past
> this
> > problem by putting xalan into the endorsed directory, but I should not
> have
> > to do that when using the JAXP 1.4 API to create XPathFactory.
> >
> >
> > Caused by: java.lang.NoSuchMethodError:
> > org.apache.xpath.XPathContext.(Z)V
> > at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:207)
> > at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:281)
> > at
> >
> com.basistech.vws.env.GazetteerConfigManager.initialGazetteerConfiguration(GazetteerConfigManager.java:67)
> > at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialGazetteerConfiguration(RLPEnvironmentManager.java:400)
> > at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialConfiguration(RLPEnvironmentManager.java:358)
> > at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialize(RLPEnvironmentManager.java:182)
> > ... 48 more
> > org.apache.cxf.common.injection.ResourceInjector  - method annotated by
> > @PostConstruct throws exception when invoked
> > java.lang.reflect.InvocationTargetException
> >
> >
> > On Tue, Nov 3, 2009 at 7:48 AM, André Warnier  wrote:
> >
> >> Benson Margulies wrote:
> >>
> >>> I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that
> allow
> >>> the caller to pass in the class name of implementation classes.
> >>>
> >>> It all works find standalone. It works fine in Jetty. It fails in
> Tomcat
> >>> 6.0.20. The error is a missing method in a Xalan class; as if Tomcat
> has
> >>> somehow gotten an older version of Xalan into the classpath.
> >>>
> >>> I don't see any likely suspects in the Tomcat tree, so I'm momentarily
> >>> mystified.
> >>>
> >>>  A piece of the logfile where the error messages occur may help someone
> to
> >> help you.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: ConnectionPool question

2009-11-05 Thread Josh Gooding
Barry, that's a normal console message when using the DataSource.  :)

Alright.  I have a question.  I've finished up the ConnectionPool wrapper
class that I found and is being used.  I don't need it to run, but I figured
it's there why not modify it to handle EVERYTHING dealing with connections.
While I have a getConnection(), I have also created many recycleConnection
methods that close abandoned Statements, Connections, ResultSets, and
DatabaseMetaData's.

So my ConnectionPool class is here
http://www.realissuesforrealpeople.com/ConnectionPool.java

and my DatabaseTransaction class is here
http://www.realissuesforrealpeople.com/DatabaseTransaction.java - Thanks for
the template for the Transaction Mr. Schultz btw.

I haven't worked on the filter as of yet, however, I am being told that the
ConnectionPool wrapper is a horrible idea and that I will end up with
problems with it.  As well as the DatabaseTransaction class.  Can anyone
forsee any issues with either that I am not forseeing?  My ability to use
the force is broken at the moment.  I"m looking at the filter as of right
now.  I"ve never implemented one however.

On Thu, Nov 5, 2009 at 4:03 PM, Propes, Barry L wrote:

> Oh yeahgood point..I likely don't have many (I have a few) DB errors
> printing tighto the console.
>
> Fortunately, I've shored that area up greatly.
>
>
>
> -Original Message-
> From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
> Sent: Thursday, November 05, 2009 2:52 PM
> To: Tomcat Users List
> Subject: RE: ConnectionPool question
>
> > From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
> > Subject: RE: ConnectionPool question
> >
> > When I FIRST make a DB query through one of my JSPs/servlets, I get
> > this msg printed to the console.
> >
> > AbandonedObjectPool is used
> > (org.apache.commons.dbcp.abandonedobjectp...@b32627)
> >LogAbandoned: true
> >RemoveAbandoned: true
> >RemoveAbandonedTimeout: 30
>
> The above message is displayed by the constructor for the pool, directly to
> System.out, when the DataSource is being instantiated.  It simply says that
> your config is using the abandoned pool mechanism, and not an indication
> that you actually have any abandoned connections at this time.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: Tomcat Memory and Garbage Collection questions...

2009-11-05 Thread Martin Gainty

you're going to want to trap the stack and heap parameters with all the tools 
chuck mentioned
you're going to want to note which webapps are being loaded and where (do you 
have a cluster)
track ALL the resource changes you make specifically Database resources which 
can consume unrestricted heap as well any any file i/o or graphic packages 
loaded

in the end run heap space not being reclaimed can be caused by a thousand 
different things

we can provide a comprehensive solution if we would be able to submit bids for 
a statement of work where one of us will come down and take a look

thanks,
Martin Gainty 
__ 
do not modify or alter this transmission. Thank You




> From: trevin.john...@occ.treas.gov
> To: users@tomcat.apache.org
> Date: Thu, 5 Nov 2009 17:26:14 -0500
> Subject: RE: Tomcat Memory and Garbage Collection questions...
> 
> I see odd behavior. Our tomcat setting is set for a max memory setting of 
> 256Mb in our Development Environment. Yet it goes over 256Mb. Up to 290Mb. I 
> assumed that it would never go over 256Mb in task manager. Is that correct?
> thanks
> 
> Answers Below as well... 
> 
> -Original Message-
> From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
> Sent: Monday, November 02, 2009 4:06 PM
> To: Tomcat Users List
> Subject: RE: Tomcat Memory and Garbage Collection questions...
> 
> > From: Johnson, Trevin (Contractor)
> > [mailto:trevin.john...@occ.treas.gov]
> > Subject: Tomcat Memory and Garbage Collection questions...
> > 
> > When we restart the tomcat service our tomcat memory is about 120Mb. It
> > keeps going up over the next few days util it reaches 700Mb and we have
> > to reboot the server.
> 
> Why do you reboot?  Is the server unresponsive?
> -We actually just restart Tomcat service and it goes back down to about 120Mb
> 
> > 1.We do not see the memory going down for the tomcat service. Shouldn't
> > the memory go down as well as up over this timespan
> 
> What are you using to show the memory usage?
> -We are using task manager to show Tomcat memory usage
> 
> > 2.Should the memory get to maximum 768Mb and then go back down or get
> > recycled?
> 
> Depends on what you're looking at.  If it's Task Manager, it won't go down.  
> If you're using JConsole to look at the heap, it should go up and down.
> 
> > 3.Is this a bug or what is normal behavior for the tomcat memory?
> 
> Depends; see above.
> 
> > 4.. How do we implement garbage collection for our windows server(-
> > Xincgc)?
> 
> Garbage collection is always present.  Incremental GC can be useful to 
> minimize pause times, but it is more overhead and has some restrictions on 
> just what it can collect.  Unless you really think you need that option, I 
> wouldn't set it right now.
> 
> I'd strongly recommend using JConsole to look at heap usage, then use a 
> profiler if you find that the heap usage does not stabilize.  You can also 
> turn on -verbose:gc, and use jhat and jmap to do basic heap analysis.
> 
> Some useful resources:
> http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html
> http://java.sun.com/javase/technologies/hotspot/gc/index.jsp
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
  
_
Find the right PC with Windows 7 and Windows Live. 
http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wl&filt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000&cat=1,2,3,4,5,6&brands=5,6,7,8,9,10,11,12,13,14,15,16&addf=4,5,9&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009

RE: SEVERE: All threads (700) are currently busy, waiting. Increase maxThreads (700) or check the servlet status

2009-11-05 Thread Caldarale, Charles R
> From: Joan Monplet Ortega [mailto:j...@solostocks-int.com]
> Subject: SEVERE: All threads (700) are currently busy, waiting.
> Increase maxThreads (700) or check the servlet status
> 
> We have Apache Web Server & Tomcat 6.x, both are connected throws
> mod_proxy_ajp.

Exact Tomcat version, please.  6.x covers a multitude of sins.

> We have one instance Tomcat and different appBase (webapps).

Different appBase (multiple  elements) or a different docBase for each 
webapp?  (Probably doesn't matter.)

> SEVERE: All threads (700) are currently busy, waiting. Increase
> maxThreads (700) or check the servlet status
> 
> When we have high traffic to our website the problem occurs.

And a thread dump shows...??
http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

 - Chuck


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


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



RE: Tomcat Memory and Garbage Collection questions...

2009-11-05 Thread Caldarale, Charles R
> From: Johnson, Trevin (Contractor)
> [mailto:trevin.john...@occ.treas.gov]
> Subject: RE: Tomcat Memory and Garbage Collection questions...
> 
> I see odd behavior. Our tomcat setting is set for a max memory setting
> of 256Mb in our Development Environment. Yet it goes over 256Mb. Up to
> 290Mb. I assumed that it would never go over 256Mb in task manager. Is
> that correct?

Your assumption is incorrect.  The Java heap limit is only part of the total 
process space, which is what Task Manager is showing; also included in the 
process space is code, the C heap, stacks, and lots of OS overhead.  Task 
Manager is a dismally poor means of discovering any real information.

 - Chuck


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


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



Re: SEVERE: All threads (700) are currently busy, waiting. Increase maxThreads (700) or check the servlet status

2009-11-05 Thread André Warnier

Joan Monplet Ortega wrote:


SEVERE: All threads (700) are currently busy, waiting. Increase
maxThreads (700) or check the servlet status


That sounds like a lot of threads.
 


And we checked all servlets and we are sure that all cursors to database
are closed (statement, resultset, etc...).


Yeah, but it looks like they are busy anyway.  What are they doing ?

 


When we have high traffic to our website the problem occurs.


No kidding.
Is that one Tomcat ? And if it is, how much physical memory is available 
on that system ?


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



Re: howto setup url security constraint with parameters?

2009-11-05 Thread André Warnier

Pivo wrote:

Caldarale, Charles R wrote:

From: Piavlo [mailto:lolitus...@gmail.com]
Subject: Re: howto setup url security constraint with parameters?

The problem is that   does not work for user dirs
defined with org.apache.catalina.startup.UserConfig


Sounds like a bug, but I haven't looked at the code.  What version of Tomcat 
are you using?
  

Currently 6.0.20 , but this also does not work with 5.5 versions.
But putting aside the buggy  WatchedResource issue -  is there a way to
do a security constraint of a url on granularity of also matching
specific HTTP GET parameters/values pairs in that url?



Just jumping in with some lateral thinking, and without the background.
The idea would be to catch these requests earlier, and dispatch them, on 
the base of the GET parameters, to different webapps, each with it's 
appropriate security constraints.
I think a servlet filter (such as the URLRewriteFilter) would be too 
late already.

But a front-end Apache httpd would not.

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



Re: Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread André Warnier

Michael C wrote:

Andre,

From what I'm able to remember, that's amazing! 

..
Waow.  I can already see the long-distance credits piling up here.
I can feel the QOS increasing, the Hops decreasing along with the 
Latency, and the TTL just shifted left one place.


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



Re: howto setup url security constraint with parameters?

2009-11-05 Thread Pivo
Caldarale, Charles R wrote:
>> From: Piavlo [mailto:lolitus...@gmail.com]
>> Subject: Re: howto setup url security constraint with parameters?
>>
>> The problem is that   does not work for user dirs
>> defined with org.apache.catalina.startup.UserConfig
>> 
>
> Sounds like a bug, but I haven't looked at the code.  What version of Tomcat 
> are you using?
>   
Currently 6.0.20 , but this also does not work with 5.5 versions.
But putting aside the buggy  WatchedResource issue -  is there a way to
do a security constraint of a url on granularity of also matching
specific HTTP GET parameters/values pairs in that url?

 Thanks
 Alex

>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>   


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



RE: Tomcat Memory and Garbage Collection questions...

2009-11-05 Thread Johnson, Trevin (Contractor)
I see odd behavior. Our tomcat setting is set for a max memory setting of 256Mb 
in our Development Environment. Yet it goes over 256Mb. Up to 290Mb. I assumed 
that it would never go over 256Mb in task manager. Is that correct?
thanks

Answers Below as well... 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, November 02, 2009 4:06 PM
To: Tomcat Users List
Subject: RE: Tomcat Memory and Garbage Collection questions...

> From: Johnson, Trevin (Contractor)
> [mailto:trevin.john...@occ.treas.gov]
> Subject: Tomcat Memory and Garbage Collection questions...
> 
> When we restart the tomcat service our tomcat memory is about 120Mb. It
> keeps going up over the next few days util it reaches 700Mb and we have
> to reboot the server.

Why do you reboot?  Is the server unresponsive?
-We actually just restart Tomcat service and it goes back down to about 120Mb

> 1.We do not see the memory going down for the tomcat service. Shouldn't
> the memory go down as well as up over this timespan

What are you using to show the memory usage?
-We are using task manager to show Tomcat memory usage

> 2.Should the memory get to maximum 768Mb and then go back down or get
> recycled?

Depends on what you're looking at.  If it's Task Manager, it won't go down.  If 
you're using JConsole to look at the heap, it should go up and down.

> 3.Is this a bug or what is normal behavior for the tomcat memory?

Depends; see above.

> 4.. How do we implement garbage collection for our windows server(-
> Xincgc)?

Garbage collection is always present.  Incremental GC can be useful to minimize 
pause times, but it is more overhead and has some restrictions on just what it 
can collect.  Unless you really think you need that option, I wouldn't set it 
right now.

I'd strongly recommend using JConsole to look at heap usage, then use a 
profiler if you find that the heap usage does not stabilize.  You can also turn 
on -verbose:gc, and use jhat and jmap to do basic heap analysis.

Some useful resources:
http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html
http://java.sun.com/javase/technologies/hotspot/gc/index.jsp

 - Chuck


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


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


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



Re: Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread André Warnier

Michael C wrote:

Chuck,

I fully agree about IE but the people in charge don't wanna hear it.
The fact that this is a third party tomcat install confuses me even
more than if it was normal, and definitely frustrating that the logs
could be anywhere. If we pretend I did have a normal install, are
there any extra steps involved going from 5 to 6 that could be useful?
 Because going from 5.5.17 to 5.5.28 was extremely easy, following the
steps I said in the original email.  I do plan on experimenting with a
vanilla install tomorrow (I get access tomorrow afternoon since
everyone will be gone) but not sure how helpful it will be given the
third party nature.

Well you see, we're guessing also, because we have no idea what Smarts 
did to Tomcat.  Although if they say that you could just download a new 
tomcat and unzip it to the same directory, then what they did might not 
be so bad.

There is one element here that may be a cause of problems :
To run Tomcat as a service under Windows, there are a couple of .exe 
programs being used.  Under all versions of Tomcat 5.0 and 5.5, they are 
called "tomcat5.exe" and "tomcat5w.exe".
So when you upgraded before from 5.5.17 to 5.5.28, these names did not 
change.
But with Tomcat 6, they are the same programs, but they are renamed to 
tomcat6.exe and tomcat6w.exe.
But Smarts probably doesn't know that, so it may still try to call up 
tomcat5.exe to start Tomcat as a service.
And who knows which one is running, when you say that the Service is 
running..


Maybe you could start at the beginning.
Verify that the Tomcat service is running, and have a look :
- with the Task Manager, and check which tomcat-like .exe program is 
really running

- with a command window,
  - enter "net start" and check if you see a line in there mentioning 
tomcat (and if yes, paste it here so that we can see it too)

  - enter "netstat -an" and see there is a line with something like
TCP  127.0.0.1:8080 ..LISTEN
and then if it says by any chance
TCP  127.0.0.1:8180 ..LISTEN
instead, try with your browser to access
http://localhost:8180

Come to think of it, enter "netstat -an" and then cut and paste here all 
the lines that start with TCP.

I mean we can guess, but it is very energy-consuming, spiritually speaking.

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



Re: Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread Michael C
Andre,

>From what I'm able to remember, that's amazing!  Also I will check all
of those places as soon as I'm allowed back on. I'm almost certain
server.XML contains 8080.

-Mike

On Thursday, November 5, 2009, André Warnier  wrote:
> Michael C wrote:
>
> Chuck,
>
> I can't get to the server at the moment but I'm an absolute noob. The
> way I know it doesn't work is that when I go to http:// server>:8080 I don't get the tomcat screen that comes up with version
> 5.5.28.  Just page cannot be displayed. As soon as I am allowed, I'll
> check the log files (which I hope are in /logs folder). Tomcat is run
> as a service by the Smarts program when it starts, and the service
> does start, so I'm not sure where I would see errors.  Also, a little
> telepathy couldn't hurt.
>
>
> Mmm.  Maybe I can gain some credits on my long-distance devination rating 
> here.
> Let me feel the nodes and receive the vibes.. what do I see ?
> I see.. a system.. a Windows system..
> with a Smarts directory, and in it a tomcat directory...
> and that tomcat directory looks like it contains a logs directory, where 
> there might well be some file which would tell Chuck what happens.
> it also seems to contain a bin directory, with a program called tomcat6w.exe.
> and when you double-click on that one, it opens a dialog.
> and in that dialog, there are plenty of things, like a path to a JVM and 
> stuff.
> also, in Windows there are Event logs. Sometimes they also contain 
> interesting stuff about Services.
> there is also, under the tomcat directory, a /conf directory, with a file in 
> it called server.xml.
> I would bet that it contains at least one part looking like
> 
> and if it does not, it probably should.
> I mean, instead of 8180 or something.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



RE: Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread Caldarale, Charles R
> From: Michael C [mailto:tomcat6d...@gmail.com]
> Subject: Re: Tomcat 5.5.28 to 6.0.20 migration question
> 
> I fully agree about IE but the people in charge don't wanna hear it.

I didn't mean for everyone, just for your testing until things are sorted.

> If we pretend I did have a normal install, are there any extra steps 
> involved going from 5 to 6 that could be useful?

Not really; the config is pretty much the same, other than for clustering.  
There are a few new options for 6.0, but nothing that should stop your webapps 
from working.  There are some Jasper fixes for spec compliance that may result 
in incompatibilities, and these can be disabled by setting the appropriate 
system properties.  Whether or not they're of consequence can't be determined 
without looking at the logs.
http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html

 - Chuck


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


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



SEVERE: All threads (700) are currently busy, waiting. Increase maxThreads (700) or check the servlet status

2009-11-05 Thread Joan Monplet Ortega
Hi,

 

We have Apache Web Server & Tomcat 6.x, both are connected throws
mod_proxy_ajp.

 

We have one instance Tomcat and different appBase (webapps).

 

We have a fatal problem, our Tomcat throws the next exception:

 

SEVERE: All threads (700) are currently busy, waiting. Increase
maxThreads (700) or check the servlet status

 

And we checked all servlets and we are sure that all cursors to database
are closed (statement, resultset, etc...).

 

When we have high traffic to our website the problem occurs.

 

Do you have any idea to resolve the problem?

 

Thanks

 

Joan

 

 

 

 



Re: Manager Application | Security | Tomcat 5.5.27

2009-11-05 Thread Anurag Kapur
Thank you for the information you provided.

I had totally missed the point that JMX proxy servlet can also be used to
specific attributes of the exposed MBeans.

Yes, we do have apache in front of the tomcat container as well as firewalls
as part of our infrastructure. I was still looking for best practices around
the manager webapp and security.

Thanks again for your reply.

Regards
Anurag


On Thu, Nov 5, 2009 at 9:53 PM, Tobias Crefeld  wrote:

> Am Thu, 5 Nov 2009 19:42:58 + schrieb Anurag Kapur
> > On Thu, Nov 5, 2009 at 12:29 PM, Tobias Crefeld  wrote:
>
> > > Separating JMX Proxy from manager won't be very helpful because JMX
> > > Proxy itself is offering control over tomcat. And it needs direct
> > > access to MBeans of Tomcat's JVM.
>
> > My Understanding:
> >
> > Even if an attacker gets access to the jmx proxy servelt, it would
> > not pose the same risk as access to the manager application would.
> > With the proxy servlet you can only query the MBeans and get
> > information about the state of the container. However, with access to
> > manager application, you can potentially reload/start/stop contexts
> > which is a big risk.
> >
> > Am I correct with this understanding?
>
> The doc under
> http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html#Using the
> JMX Proxy Servlet describes a command "set" in addition to the "query"
> you mentioned. I haven't tested but it looks like that it offers nearly
> the same possibilities as "manager" does.
>
> Actually "query" alone discloses enough information that a potential
> attacker could use to get real confidential information via other
> channels that I don't want to have it in the web.
>
> I don't know how safe you webserver is - standard-setup of Solaris
> runs with no active packet filter... - but if you have no other
> firewall with ALG I would strongly suggest that you run e.g. an Apache
> in front of Tomcat with no access by Tomcat-deployers. Today in our
> standard setup there is such an Apache2 that offers the same Tomcat via
> two different virtual hosts. One is only proxying URIs that belong to
> the production context and can be reached from the whole web. The other
> is proxying the manager-applications as well (manager, probe and j4p)
> but there are some Apache-rules that allow only access for clients from
> VPN-users.
>
>
> BTW: j4p might be another nice approach to get a read-only monitoring.
> It's a Tomcat application that delivers all (?) the data that can get
> reached by JMX/TCPIP or Mbeans. There is script jmx4perl to read this
> data and there is a plugin check_jmx4perl to poll this data by a
> Nagios-server.
> I found a article which describes this nice tool:
>
> http://blog.techstacks.com/2009/09/tomcat-management-jmx4perl-makes-it-easier.html
>
> Actually I haven't tested it in detail and so I can't promise that this
> tool is already ready for production. Ask me in two months when I can
> tell you more... ;)
>
>
> RU,
>  Tobias.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread Michael C
Chuck,

I fully agree about IE but the people in charge don't wanna hear it.
The fact that this is a third party tomcat install confuses me even
more than if it was normal, and definitely frustrating that the logs
could be anywhere. If we pretend I did have a normal install, are
there any extra steps involved going from 5 to 6 that could be useful?
 Because going from 5.5.17 to 5.5.28 was extremely easy, following the
steps I said in the original email.  I do plan on experimenting with a
vanilla install tomorrow (I get access tomorrow afternoon since
everyone will be gone) but not sure how helpful it will be given the
third party nature.

--Mike

On Thursday, November 5, 2009, Caldarale, Charles R
 wrote:
>> From: Michael C [mailto:tomcat6d...@gmail.com]
>> Subject: Re: Tomcat 5.5.28 to 6.0.20 migration question
>>
>> when I go to http://:8080 I don't get the tomcat screen
>> that comes up with version 5.5.28.  Just page cannot be displayed.
>
> Sounds like you're using IE as your browser; if so, I'd strongly recommend 
> picking anything else, since IE likes to hide errors behind its "friendly" 
> error pages (which can be turned off).
>
>> As soon as I am allowed, I'll check the log files (which I hope
>> are in /logs folder).
>
> When using a 3rd-party repackaged or an embedded version of Tomcat, there's 
> no telling where the logs are; you may have to hunt for them.  Also, since 
> the log file names are configurable, the repackaged/embedded version might 
> not even be using the normal file names, let alone locations.  You might try 
> experimenting a bit with a standard Tomcat download from tomcat.apache.org to 
> get an idea of what to expect.
>
>> Also, a little telepathy couldn't hurt.
>
> It's 21:50 where Pid is, so that might have to wait until tomorrow.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



Re: Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread André Warnier

Michael C wrote:

Chuck,

I can't get to the server at the moment but I'm an absolute noob. The
way I know it doesn't work is that when I go to http://:8080 I don't get the tomcat screen that comes up with version
5.5.28.  Just page cannot be displayed. As soon as I am allowed, I'll
check the log files (which I hope are in /logs folder). Tomcat is run
as a service by the Smarts program when it starts, and the service
does start, so I'm not sure where I would see errors.  Also, a little
telepathy couldn't hurt.

Mmm.  Maybe I can gain some credits on my long-distance devination 
rating here.

Let me feel the nodes and receive the vibes.. what do I see ?
I see.. a system.. a Windows system..
with a Smarts directory, and in it a tomcat directory...
and that tomcat directory looks like it contains a logs directory, where 
there might well be some file which would tell Chuck what happens.
it also seems to contain a bin directory, with a program called 
tomcat6w.exe.

and when you double-click on that one, it opens a dialog.
and in that dialog, there are plenty of things, like a path to a JVM and 
stuff.
also, in Windows there are Event logs. Sometimes they also contain 
interesting stuff about Services.
there is also, under the tomcat directory, a /conf directory, with a 
file in it called server.xml.

I would bet that it contains at least one part looking like

and if it does not, it probably should.
I mean, instead of 8180 or something.

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



Re: Manager Application | Security | Tomcat 5.5.27

2009-11-05 Thread Tobias Crefeld
Am Thu, 5 Nov 2009 19:42:58 + schrieb Anurag Kapur
> On Thu, Nov 5, 2009 at 12:29 PM, Tobias Crefeld  wrote:

> > Separating JMX Proxy from manager won't be very helpful because JMX
> > Proxy itself is offering control over tomcat. And it needs direct
> > access to MBeans of Tomcat's JVM.

> My Understanding:
> 
> Even if an attacker gets access to the jmx proxy servelt, it would
> not pose the same risk as access to the manager application would.
> With the proxy servlet you can only query the MBeans and get
> information about the state of the container. However, with access to
> manager application, you can potentially reload/start/stop contexts
> which is a big risk.
> 
> Am I correct with this understanding?

The doc under
http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html#Using the
JMX Proxy Servlet describes a command "set" in addition to the "query"
you mentioned. I haven't tested but it looks like that it offers nearly
the same possibilities as "manager" does.

Actually "query" alone discloses enough information that a potential
attacker could use to get real confidential information via other
channels that I don't want to have it in the web.

I don't know how safe you webserver is - standard-setup of Solaris
runs with no active packet filter... - but if you have no other
firewall with ALG I would strongly suggest that you run e.g. an Apache
in front of Tomcat with no access by Tomcat-deployers. Today in our
standard setup there is such an Apache2 that offers the same Tomcat via
two different virtual hosts. One is only proxying URIs that belong to
the production context and can be reached from the whole web. The other
is proxying the manager-applications as well (manager, probe and j4p)
but there are some Apache-rules that allow only access for clients from
VPN-users.


BTW: j4p might be another nice approach to get a read-only monitoring.
It's a Tomcat application that delivers all (?) the data that can get
reached by JMX/TCPIP or Mbeans. There is script jmx4perl to read this
data and there is a plugin check_jmx4perl to poll this data by a
Nagios-server.
I found a article which describes this nice tool:
http://blog.techstacks.com/2009/09/tomcat-management-jmx4perl-makes-it-easier.html

Actually I haven't tested it in detail and so I can't promise that this
tool is already ready for production. Ask me in two months when I can
tell you more... ;)


RU,
 Tobias.

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



RE: Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread Caldarale, Charles R
> From: Michael C [mailto:tomcat6d...@gmail.com]
> Subject: Re: Tomcat 5.5.28 to 6.0.20 migration question
> 
> when I go to http://:8080 I don't get the tomcat screen 
> that comes up with version 5.5.28.  Just page cannot be displayed.

Sounds like you're using IE as your browser; if so, I'd strongly recommend 
picking anything else, since IE likes to hide errors behind its "friendly" 
error pages (which can be turned off).

> As soon as I am allowed, I'll check the log files (which I hope 
> are in /logs folder).

When using a 3rd-party repackaged or an embedded version of Tomcat, there's no 
telling where the logs are; you may have to hunt for them.  Also, since the log 
file names are configurable, the repackaged/embedded version might not even be 
using the normal file names, let alone locations.  You might try experimenting 
a bit with a standard Tomcat download from tomcat.apache.org to get an idea of 
what to expect.

> Also, a little telepathy couldn't hurt.

It's 21:50 where Pid is, so that might have to wait until tomorrow.

 - Chuck


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


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



Re: Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread André Warnier

Caldarale, Charles R wrote:

From: Michael C [mailto:tomcat6d...@gmail.com]
Subject: Tomcat 5.5.28 to 6.0.20 migration question

Tomcat no longer works.


Care to tell us what that means?  Log entries, error messages, anything useful? 
 Or do we have to call Pid to get him to use his Internet Telepathy?


Michael,
since you are new here, don't go misinterpreting the above.
Chuck is a bit rough sometimes, but he's good.
And the above contains a hint that he might even be inclined to help, if 
you provide some more info.
Cos' if he wasn't, he'd just have told you to go find yourself a Smarts 
forum.


;-)

And by the way, Pid is another one of the gurus here.  His specialty is 
to devine, at long distance and with minimal information, what actually 
does not work.  But we keep him in reserve for the really bizarre cases, 
ghostbusters-like.


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



Re: Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread Michael C
Chuck,

I can't get to the server at the moment but I'm an absolute noob. The
way I know it doesn't work is that when I go to http://:8080 I don't get the tomcat screen that comes up with version
5.5.28.  Just page cannot be displayed. As soon as I am allowed, I'll
check the log files (which I hope are in /logs folder). Tomcat is run
as a service by the Smarts program when it starts, and the service
does start, so I'm not sure where I would see errors.  Also, a little
telepathy couldn't hurt.

--Mike

On Thursday, November 5, 2009, Caldarale, Charles R
 wrote:
>> From: Michael C [mailto:tomcat6d...@gmail.com]
>> Subject: Tomcat 5.5.28 to 6.0.20 migration question
>>
>> Tomcat no longer works.
>
> Care to tell us what that means?  Log entries, error messages, anything 
> useful?  Or do we have to call Pid to get him to use his Internet Telepathy?
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you received 
> this in error, please contact the sender and delete the e-mail and its 
> attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



Re: webapps question

2009-11-05 Thread Michele Mase'
Thanx for the log4j hint!
I'had only listed the libs. The most difficult thing is to explain some
"ancient" developers (they wrote the webservices) that sometimes they should
change the old library!
I'll try to put all libraries except from commons-logging and log4j into the
shared libs
Michele

On Thu, Nov 5, 2009 at 8:33 PM, Jeffrey Janner
wrote:

> I'm not sure about commons-logging, but log4j is definitely not
> share-safe.
>
> I tried it, and in our case, ended up with messages from different
> webapps interleaving in "seemingly random" log files.  That might have
> had more to do with how my developers were using log4j than the library
> itself, but I still ended up moving the log4j *and* commons-logging back
> into WEB-INF/lib.
>
> I've not had any problems sharing the Oracle class library, but if
> you're running a jvm 1.5 (1.4? see oracle docs) or greater, then you
> really should be using the ojdbc14.jar file instead of classes12.jar.
> And get the latest (or at least 10.2.0.4) version from the Oracle
> website to get any bug fixes or performance improvements.
>
> -Original Message-
> From: Joseph Morgan [mailto:joseph.mor...@ignitesales.com]
> Sent: Wednesday, November 04, 2009 7:50 AM
> To: Tomcat Users List; p...@pidster.com
> Subject: RE: webapps question
>
> I think you're right:
>
> http://stackoverflow.com/questions/217929/problem-with-commons-logging-l
> og4j-setup-in-spring-webapp-with-tomcat-6
>
> So commons-logging is not safe in common lib area.
>
>
> -Original Message-
> From: Pid [mailto:p...@pidster.com]
> Sent: Wednesday, November 04, 2009 7:23 AM
> To: Tomcat Users List
> Subject: Re: webapps question
>
> On 04/11/2009 13:17, Joseph Morgan wrote:
> > Michele,
> >
> > It looks like all of the jar files you mention can safely be deployed
> in
> > Tomcat's common lib area.
>
> I'm not sure that's true of commons-logging or log4j.
>
> Someone else might have a better memory than me, but I've a feeling that
>
> they hold onto classloader references, which may cause a memory leak
> during redeployments.
>
>
> p
>
>
> > Another question, though, to ask yourself and your developers is, do
> you
> > really need 100 individual web apps to support the web services you
> > have?
> >
> > In other words, there is no requirement to have a 1 to 1 correlation
> > between applications and web services.
> >
> > Joe
> >
> > -Original Message-
> > From: Michele Mase' [mailto:michele.m...@gmail.com]
> > Sent: Wednesday, November 04, 2009 4:56 AM
> > To: Tomcat Users List
> > Subject: Re: webapps question
> >
> > Thanx 4 you answer;
> > ps: there are 100 webservices, not webapps
> > Pls, help me: I'm not a developer ... and I don't understand the
> > disadvantages of "static classes/fields loaded from common classloader
> > will
> > be shared among all webapps", Could you be a little more specific
> about
> > the
> > disadvantages?
> > Your suggestion is to "split" the apps into vitualhost like,
> context.xml
> > ecc..?
> > I use the oracle odbc thin; which problem should I have putting the
> jdbc
> > driver int the commos/lib ?
> > For reference, those are the jars userd in all webservices:
> > classes12.jar
> > ibatis-common-2.jar ibatis-dao-2.jar ibatis-sqlmap-2.jar
> activation.jar
> > axis-ant.jar axis.jar commons-discovery-0.2.jar
> > commons-logging-1.0.4.jar
> > jaxrpc.jar LEGO_CONDIVISI.jar log4j-1.2.8.jar mail.jar saaj.jar
> > wsdl4j-1.5.1.jar xmlsec-1.4.0.jar
> > Michele
> >
> > On Wed, Nov 4, 2009 at 11:00 AM, Mikolaj Rydzewski
> wrote:
> >
> >> Michele Mase' wrote:
> >>
> >>> I've 100 webapps on one single tomcat instance.
> >>> Every webapps has in his WEB-INF/lib the same jars
> >>> I've some permgen memory problems too
> >>> Moving all the shared libs in tomcat's root/common/lib should help
> me
> >>> reducing the perm gen memory usage?
> >>> Should it be a good pratics
> >>>
> >> It will solve one problem, but will cause others, difficult to trace.
> > E.g.
> >> static classes/fields loaded from common classloader will be shared
> > among
> >> all webapps.
> >> You should rather refactor your webapp to be able to change its 'work
> >> context' depending on URI/domain name.
> >>
> >> --
> >> Mikolaj Rydzewski
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
> ---

RE: Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread Caldarale, Charles R
> From: Michael C [mailto:tomcat6d...@gmail.com]
> Subject: Tomcat 5.5.28 to 6.0.20 migration question
> 
> Tomcat no longer works.

Care to tell us what that means?  Log entries, error messages, anything useful? 
 Or do we have to call Pid to get him to use his Internet Telepathy?

 - Chuck


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


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



Tomcat 5.5.28 to 6.0.20 migration question

2009-11-05 Thread Michael C
Hi all,

I’m using a program called EMC Smarts which is a network monitoring
tool.  It can accommodate a web interface using Tomcat, which is
currently version 5.5.28 and works perfectly.  I am trying to upgrade
to version 6.0.20 but am having some trouble.  Smarts official
documentation for Tomcat upgrades says to rename the tomcat folder
within the Smarts directory to tomcat-old and just unzip the new one
in place of the old one (and rename it to what the old one was named).
 But also needed are several folders from the old install,
specifically tss, templates and webconsole, as well as the
SMViewletAuth.war file from the webapps folder.  They are supposed to
be pasted into the new install.  I’ve done all this (I did the same
process which worked to get to 5.5.28), and Tomcat no longer works.  I
read on the migration page that there are some directory structure
differences between Tomcat 5 and 6, but I am no Tomcat expert, in fact
today is the first time I’ve had to deal with it at all.  I know my
version of java is good, and I looked in conf/catalina.properties and
noticed that there are differences, but I have no idea if this
matters.  I have requested support from EMC about this, but I do not
have high hopes.  Any input at all would be appreciated.

--Michael

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



RE: Strange processes

2009-11-05 Thread Hehl, Thomas
OK, not identical. But they are the same linux version and have the same
versions of all of the software that I'm using. Obviously there is some
difference between them.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Thursday, November 05, 2009 3:32 PM
To: Tomcat Users List
Subject: Re: Strange processes

* PGP Signed by an unknown key

Thomas,

On 11/5/2009 1:44 PM, Hehl, Thomas wrote:
> OK, but these servers are all identical. Why would one do this and the
> rest not?

Your previous statement seems to be in conflict with your observations.
 Something must be different: kernel version? 'ps' version?

-chris

* Unknown Key
* 0xF2EFD0F0(L)


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


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



RE: ConnectionPool question

2009-11-05 Thread Propes, Barry L
Oh yeahgood point..I likely don't have many (I have a few) DB errors 
printing to the console.

Fortunately, I've shored that area up greatly.

 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Thursday, November 05, 2009 2:52 PM
To: Tomcat Users List
Subject: RE: ConnectionPool question

> From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
> Subject: RE: ConnectionPool question
> 
> When I FIRST make a DB query through one of my JSPs/servlets, I get 
> this msg printed to the console.
> 
> AbandonedObjectPool is used
> (org.apache.commons.dbcp.abandonedobjectp...@b32627)
>LogAbandoned: true
>RemoveAbandoned: true
>RemoveAbandonedTimeout: 30

The above message is displayed by the constructor for the pool, directly to 
System.out, when the DataSource is being instantiated.  It simply says that 
your config is using the abandoned pool mechanism, and not an indication that 
you actually have any abandoned connections at this time.

 - Chuck


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


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


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



RE: ConnectionPool question

2009-11-05 Thread Caldarale, Charles R
> From: Propes, Barry L [mailto:barry.l.pro...@citi.com]
> Subject: RE: ConnectionPool question
> 
> When I FIRST make a DB query through one of my JSPs/servlets, I get
> this msg printed to the console.
> 
> AbandonedObjectPool is used
> (org.apache.commons.dbcp.abandonedobjectp...@b32627)
>LogAbandoned: true
>RemoveAbandoned: true
>RemoveAbandonedTimeout: 30

The above message is displayed by the constructor for the pool, directly to 
System.out, when the DataSource is being instantiated.  It simply says that 
your config is using the abandoned pool mechanism, and not an indication that 
you actually have any abandoned connections at this time.

 - Chuck


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


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



RE: ConnectionPool question

2009-11-05 Thread Propes, Barry L
When I FIRST make a DB query through one of my JSPs/servlets, I get this msg 
printed to the console.


AbandonedObjectPool is used (org.apache.commons.dbcp.abandonedobjectp...@b32627)

   LogAbandoned: true
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 30


I don't get it afterwards, possibly insinuating I'm using one connection that 
get's recycled. Even if I get an exception error later thrown (printed) to the 
console, it doesn't give me that message again.

 

-Original Message-
From: Elli Albek [mailto:e...@sustainlane.com] 
Sent: Wednesday, November 04, 2009 6:02 PM
To: Tomcat Users List
Subject: Re: ConnectionPool question

As far as I remember, "abandoned" is a connection that was not closed. So if 
you call recycle on a connection it will not generate abandoned message. The 
messages that you see are from connections that you do not close. I also 
remember that closing a connection closes statements and result sets, but it 
has been a while since I read the source.

Give the filter above a shot. It would takes maybe an hour to get running and 
can solve all your problems in one go. You may experience a major boost to your 
system performance even comparing to closing every connection (because you will 
be using a single connection per request as opposed to multiple open/close).

E

On Wed, Nov 4, 2009 at 11:43 AM, Christopher Schultz < 
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Josh,
>
> On 11/4/2009 12:11 PM, Josh Gooding wrote:
> > type="javax.sql.DataSource"
>
> [snip]
>
> > javax.sql.DataSource
>
> I believe it is these types that must match, and they do. Don't change 
> a thing.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkrx2VUACgkQ9CaO5/Lv0PCvIQCgvuD2fkIQ7iHH+xlT22SdRmnq
> E7YAn0JmNbP22/rm6hwKPchNm1dbbXyj
> =zIOM
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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



Re: Strange processes

2009-11-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thomas,

On 11/5/2009 1:44 PM, Hehl, Thomas wrote:
> OK, but these servers are all identical. Why would one do this and the
> rest not?

Your previous statement seems to be in conflict with your observations.
 Something must be different: kernel version? 'ps' version?

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

iEYEARECAAYFAkrzNlcACgkQ9CaO5/Lv0PDU4QCghxDkj0I0odQjaDs6OlqWQ2Jx
nUoAoJ1OfGcDbDSRUEFqmJwiQ/7DCxOW
=h03X
-END PGP SIGNATURE-

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



Re: Manager Application | Security | Tomcat 5.5.27

2009-11-05 Thread Anurag Kapur
Thank you  for your reply.

On Thu, Nov 5, 2009 at 12:29 PM, Tobias Crefeld  wrote:

> Am Thu, 5 Nov 2009 11:04:06 +
> schrieb Anurag Kapur :
>
> > 1. Why is it considered that the manager webapp should not be
> > deployed on production environments? Am I just believing a rumour
> > here or does it actually impose any security risks?
>
> With "manager" you only need a credential to control the whole
> application server which possibly could be evaluated by social
> engineering. There are already some bots in the web that test the
> default credentials of early manager installations automatically.
>
> It is always better to use 2 or 3 barriers. For example you could setup
> a filter that some IP-addresses from management systems only could get
> access to /manager/.
>

Ok. I know putting the manager app behind 2-3 barriers is better than
leaving it in the hands of basic tomcat authentication. But again, this
method is *better* and not foolproof. Thus we want to get rid of the manager
application completely.


> Separating JMX Proxy from manager won't be very helpful because JMX
> Proxy itself is offering control over tomcat. And it needs direct
> access to MBeans of Tomcat's JVM.
>

My Understanding:

Even if an attacker gets access to the jmx proxy servelt, it would not pose
the same risk as access to the manager application would. With the proxy
servlet you can only query the MBeans and get information about the state of
the container. However, with access to manager application, you can
potentially reload/start/stop contexts which is a big risk.

Am I correct with this understanding?


>


> RU,
>  Tobias.


Does any one else have any other views on this topic? Your
inputs/suggestions would be highly appreciated.

Thanks
Anurag


RE: webapps question

2009-11-05 Thread Jeffrey Janner
I'm not sure about commons-logging, but log4j is definitely not
share-safe.

I tried it, and in our case, ended up with messages from different
webapps interleaving in "seemingly random" log files.  That might have
had more to do with how my developers were using log4j than the library
itself, but I still ended up moving the log4j *and* commons-logging back
into WEB-INF/lib.

I've not had any problems sharing the Oracle class library, but if
you're running a jvm 1.5 (1.4? see oracle docs) or greater, then you
really should be using the ojdbc14.jar file instead of classes12.jar.
And get the latest (or at least 10.2.0.4) version from the Oracle
website to get any bug fixes or performance improvements.

-Original Message-
From: Joseph Morgan [mailto:joseph.mor...@ignitesales.com] 
Sent: Wednesday, November 04, 2009 7:50 AM
To: Tomcat Users List; p...@pidster.com
Subject: RE: webapps question

I think you're right:

http://stackoverflow.com/questions/217929/problem-with-commons-logging-l
og4j-setup-in-spring-webapp-with-tomcat-6

So commons-logging is not safe in common lib area.


-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Wednesday, November 04, 2009 7:23 AM
To: Tomcat Users List
Subject: Re: webapps question

On 04/11/2009 13:17, Joseph Morgan wrote:
> Michele,
>
> It looks like all of the jar files you mention can safely be deployed
in
> Tomcat's common lib area.

I'm not sure that's true of commons-logging or log4j.

Someone else might have a better memory than me, but I've a feeling that

they hold onto classloader references, which may cause a memory leak 
during redeployments.


p


> Another question, though, to ask yourself and your developers is, do
you
> really need 100 individual web apps to support the web services you
> have?
>
> In other words, there is no requirement to have a 1 to 1 correlation
> between applications and web services.
>
> Joe
>
> -Original Message-
> From: Michele Mase' [mailto:michele.m...@gmail.com]
> Sent: Wednesday, November 04, 2009 4:56 AM
> To: Tomcat Users List
> Subject: Re: webapps question
>
> Thanx 4 you answer;
> ps: there are 100 webservices, not webapps
> Pls, help me: I'm not a developer ... and I don't understand the
> disadvantages of "static classes/fields loaded from common classloader
> will
> be shared among all webapps", Could you be a little more specific
about
> the
> disadvantages?
> Your suggestion is to "split" the apps into vitualhost like,
context.xml
> ecc..?
> I use the oracle odbc thin; which problem should I have putting the
jdbc
> driver int the commos/lib ?
> For reference, those are the jars userd in all webservices:
> classes12.jar
> ibatis-common-2.jar ibatis-dao-2.jar ibatis-sqlmap-2.jar
activation.jar
> axis-ant.jar axis.jar commons-discovery-0.2.jar
> commons-logging-1.0.4.jar
> jaxrpc.jar LEGO_CONDIVISI.jar log4j-1.2.8.jar mail.jar saaj.jar
> wsdl4j-1.5.1.jar xmlsec-1.4.0.jar
> Michele
>
> On Wed, Nov 4, 2009 at 11:00 AM, Mikolaj Rydzewski
wrote:
>
>> Michele Mase' wrote:
>>
>>> I've 100 webapps on one single tomcat instance.
>>> Every webapps has in his WEB-INF/lib the same jars
>>> I've some permgen memory problems too
>>> Moving all the shared libs in tomcat's root/common/lib should help
me
>>> reducing the perm gen memory usage?
>>> Should it be a good pratics
>>>
>> It will solve one problem, but will cause others, difficult to trace.
> E.g.
>> static classes/fields loaded from common classloader will be shared
> among
>> all webapps.
>> You should rather refactor your webapp to be able to change its 'work
>> context' depending on URI/domain name.
>>
>> --
>> Mikolaj Rydzewski
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


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


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



***  NOTICE  *
This message is intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, 
confidential, and exempt from disclosure under applicable law.  If the 
reader of this message is not the intended recipient or the employee or 
agent responsible for delivering this message to the intended recipient, 
you are hereby notified that any dissemination, distribution, or copying 
of this communication

RE: Strange processes

2009-11-05 Thread Hehl, Thomas
OK, but these servers are all identical. Why would one do this and the
rest not?

I don't have direct access to this server, but will try what you
suggest.


-Original Message-
From: Mikolaj Rydzewski [mailto:m...@ceti.pl] 
Sent: Thursday, November 05, 2009 1:41 PM
To: Tomcat Users List
Subject: Re: Strange processes

Hehl, Thomas wrote:
> What I don't understand is that every time someone hits our site,
tomcat
> spawns several more processes and they never go away. This same tomcat
> and webapp are currently running on nearly 40 servers and they all
only
> have two processes except this one that spawns about 8 processes with
> every hit.
>   
Some linux kernels / JDKs shows java threads as separate processes. 
Check pstree output and java thread dump (kill -3 ).

-- 
Mikolaj Rydzewski 


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


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



Re: Strange processes

2009-11-05 Thread Mikolaj Rydzewski

Hehl, Thomas wrote:

What I don't understand is that every time someone hits our site, tomcat
spawns several more processes and they never go away. This same tomcat
and webapp are currently running on nearly 40 servers and they all only
have two processes except this one that spawns about 8 processes with
every hit.
  
Some linux kernels / JDKs shows java threads as separate processes. 
Check pstree output and java thread dump (kill -3 ).


--
Mikolaj Rydzewski 


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