Java Mailing List Archive

http://www.junlu.com/

Home » users-digest.tomcat »

users Digest 23 Mar 2013 08:20:32 -0000 Issue 11311

users-digest-help

2013-03-23


Author LoginPost Reply

users Digest 23 Mar 2013 08:20:32 -0000 Issue 11311

Topics (messages 240659 through 240682)

Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently
 240659 by: Pid
 240660 by: Julien Martin
 240661 by: Pid
 240662 by: Daniel Mikusa

Re: Where does Tomcat log the logAbandoned information?
 240663 by: Pid
 240666 by: Julien Martin
 240682 by: Rainer Jung

Re: [totally OT] Tomcat Behavior on Multiple HTTP requests from same browser
 240664 by: André Warnier
 240665 by: Mark Eggers
 240672 by: Christopher Schultz
 240673 by: Christopher Schultz
 240680 by: Caldarale, Charles R

Diagnosing Silently Frozen Tomcats
 240667 by: Robinson, Eric
 240668 by: Mark Eggers
 240669 by: Carrillo, Dan
 240670 by: Robinson, Eric
 240671 by: Mark Thomas
 240674 by: Mark Eggers
 240675 by: Christopher Schultz
 240677 by: Michael Gesundheit
 240678 by: Robinson, Eric
 240679 by: Robinson, Eric

Re: virtual directory
 240676 by: Christopher Schultz

Re: Executable Tomcat JAR/WAR executes fine standalone, classloading errors in JNLP
 240681 by: Nick Williams

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: users@(protected)
To unsubscribe, e-mail: users-digest-unsubscribe@(protected)
For additional commands, e-mail: users-digest-help@(protected)

----------------------------------------------------------------------


Attachment: users_240659.eml (zipped)
On 22/03/2013 14:56, Julien Martin wrote:
> Hi,
> You mean if I set maxActive to 1?


> J.
>
> 2013/3/22 Pid <pid@(protected)>
>
>> On 22/03/2013 14:42, Julien Martin wrote:
>>> @Chuck: thanks for the link. I have read it. Umm... the thing is I don't
>>> close my connection manually. I use Spring. Here is my configuration:
>>>
>>> <bean class="org.apache.commons.dbcp.BasicDataSource"
>>> destroy-method="close" id="dataSource">
>>> <property name="driverClassName" value="${database.driverClassName}" />
>>> <property name="url" value="${database.url}" />
>>> <property name="username" value="${database.username}" />
>>> <property name="password" value="${database.password}" />
>>> <property name="testOnBorrow" value="true" />
>>> <property name="testOnReturn" value="true" />
>>> <property name="testWhileIdle" value="true" />
>>> <property name="timeBetweenEvictionRunsMillis" value="1800000" />
>>> <property name="numTestsPerEvictionRun" value="3" />
>>> <property name="minEvictableIdleTimeMillis" value="1800000" />
>>> <property name="validationQuery" value="SELECT 1" />
>>> <property name="maxActive" value="2"/>
>>> <property name="logAbandoned" value="true"/>
>>> <property name="removeAbandoned" value="true"/>
>>> </bean>
>>
>> What happens if you set it to 1?


Yes, I meant maxActive, sorry.

Why use a DeferredResult here if you're just setting the result
synchronously and inline anyway? You may as well just remove the key
from the map manually. Am I missing something?


p

>>> Any idea what I am getting wrong?
>>>
>>> @Daniel, I have configured jmx with Spring and I get a numIdle of 0 and
>>> numActive of 2 after the problem occurs. This confirms what you and Chuck
>>> say: my app leaks db connections.
>>>
>>> However, I am still not sure why my app leaks the connections. I use the
>>> default Spring configuration...
>>>
>>> Sorry: it is slightly offtopic now. I guess this is no longer a Tomcat
>>> question so I should post it elsewhere.
>>>
>>> Julien.
>>>
>>>
>>> 2013/3/22 Caldarale, Charles R <Chuck.Caldarale@(protected)>
>>>
>>>>> From: Julien Martin [mailto:balteo@(protected)]
>>>>> Subject: Re: My use of Spring MVC's DeferredResult class causes Tomcat
>>>> 7.0.35 to crash silently
>>>>
>>>>> "http-bio-8080-exec-10" daemon prio=10 tid=0x00007f68840a2800
>> nid=0x41b5
>>>> in
>>>>> Object.wait() [0x00007f690cc57000]
>>>>>   java.lang.Thread.State: WAITING (on object monitor)
>>>>> at java.lang.Object.wait(Native Method)
>>>>> - waiting on <0x00000007e8fc4650> (a
>>>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
>>>>> at java.lang.Object.wait (Object.java:503)
>>>>> at
>>>>
>> org.apache.commons.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:1115)
>>>>> - locked <0x00000007e8fc4650> (a
>>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
>>>>> at
>>>>
>> org.apache.commons.dbcp.PoolingDataSource.getConnection (PoolingDataSource.java:106)
>>>>
>>>> Looks like you're leaking database connections, likely by not returning
>>>> them to the pool. Read Chris' article on how to do it right:
>>>>
>>>>
>>>>
>> http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/
>>>>
>>>> - 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-unsubscribe@(protected)
>>>> For additional commands, e-mail: users-help@(protected)
>>>>
>>>>
>>>
>>
>>
>> --
>>
>> [key:62590808]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>>
>


--

[key:62590808]


Attachment: users_240660.eml (zipped)
You're right. I should set the result in another method/thread i.e. a post
method...
Is this related to the memory leaks?
J.

2013/3/22 Pid <pid@(protected)>

> On 22/03/2013 14:56, Julien Martin wrote:
> > Hi,
> > You mean if I set maxActive to 1?
>
>
> > J.
> >
> > 2013/3/22 Pid <pid@(protected)>
> >
> >> On 22/03/2013 14:42, Julien Martin wrote:
> >>> @Chuck: thanks for the link. I have read it. Umm... the thing is I
> don't
> >>> close my connection manually. I use Spring. Here is my configuration:
> >>>
> >>> <bean class="org.apache.commons.dbcp.BasicDataSource"
> >>> destroy-method="close" id="dataSource">
> >>> <property name="driverClassName" value="${database.driverClassName}" />
> >>> <property name="url" value="${database.url}" />
> >>> <property name="username" value="${database.username}" />
> >>> <property name="password" value="${database.password}" />
> >>> <property name="testOnBorrow" value="true" />
> >>> <property name="testOnReturn" value="true" />
> >>> <property name="testWhileIdle" value="true" />
> >>> <property name="timeBetweenEvictionRunsMillis" value="1800000" />
> >>> <property name="numTestsPerEvictionRun" value="3" />
> >>> <property name="minEvictableIdleTimeMillis" value="1800000" />
> >>> <property name="validationQuery" value="SELECT 1" />
> >>> <property name="maxActive" value="2"/>
> >>> <property name="logAbandoned" value="true"/>
> >>> <property name="removeAbandoned" value="true"/>
> >>> </bean>
> >>
> >> What happens if you set it to 1?
>
>
> Yes, I meant maxActive, sorry.
>
> Why use a DeferredResult here if you're just setting the result
> synchronously and inline anyway? You may as well just remove the key
> from the map manually. Am I missing something?
>
>
> p
>
> >>> Any idea what I am getting wrong?
> >>>
> >>> @Daniel, I have configured jmx with Spring and I get a numIdle of 0 and
> >>> numActive of 2 after the problem occurs. This confirms what you and
> Chuck
> >>> say: my app leaks db connections.
> >>>
> >>> However, I am still not sure why my app leaks the connections. I use
> the
> >>> default Spring configuration...
> >>>
> >>> Sorry: it is slightly offtopic now. I guess this is no longer a Tomcat
> >>> question so I should post it elsewhere.
> >>>
> >>> Julien.
> >>>
> >>>
> >>> 2013/3/22 Caldarale, Charles R <Chuck.Caldarale@(protected)>
> >>>
> >>>>> From: Julien Martin [mailto:balteo@(protected)]
> >>>>> Subject: Re: My use of Spring MVC's DeferredResult class causes
> Tomcat
> >>>> 7.0.35 to crash silently
> >>>>
> >>>>> "http-bio-8080-exec-10" daemon prio=10 tid=0x00007f68840a2800
> >> nid=0x41b5
> >>>> in
> >>>>> Object.wait() [0x00007f690cc57000]
> >>>>>   java.lang.Thread.State: WAITING (on object monitor)
> >>>>> at java.lang.Object.wait(Native Method)
> >>>>> - waiting on <0x00000007e8fc4650> (a
> >>>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
> >>>>> at java.lang.Object.wait (Object.java:503)
> >>>>> at
> >>>>
> >>
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:1115)
> >>>>> - locked <0x00000007e8fc4650> (a
> >>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
> >>>>> at
> >>>>
> >>
> org.apache.commons.dbcp.PoolingDataSource.getConnection (PoolingDataSource.java:106)
> >>>>
> >>>> Looks like you're leaking database connections, likely by not
> returning
> >>>> them to the pool. Read Chris' article on how to do it right:
> >>>>
> >>>>
> >>>>
> >>
> http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/
> >>>>
> >>>> - 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-unsubscribe@(protected)
> >>>> For additional commands, e-mail: users-help@(protected)
> >>>>
> >>>>
> >>>
> >>
> >>
> >> --
> >>
> >> [key:62590808]
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@(protected)
> >> For additional commands, e-mail: users-help@(protected)
> >>
> >>
> >
>
>
> --
>
> [key:62590808]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment: users_240661.eml (zipped)
On 22/03/2013 15:08, Julien Martin wrote:
> You're right. I should set the result in another method/thread i.e. a post
> method...
> Is this related to the memory leaks?

It might be worth simplifying the method while you debug the connection
leak issue.


p


> J.
>
> 2013/3/22 Pid <pid@(protected)>
>
>> On 22/03/2013 14:56, Julien Martin wrote:
>>> Hi,
>>> You mean if I set maxActive to 1?
>>
>>
>>> J.
>>>
>>> 2013/3/22 Pid <pid@(protected)>
>>>
>>>> On 22/03/2013 14:42, Julien Martin wrote:
>>>>> @Chuck: thanks for the link. I have read it. Umm... the thing is I
>> don't
>>>>> close my connection manually. I use Spring. Here is my configuration:
>>>>>
>>>>> <bean class="org.apache.commons.dbcp.BasicDataSource"
>>>>> destroy-method="close" id="dataSource">
>>>>> <property name="driverClassName" value="${database.driverClassName}" />
>>>>> <property name="url" value="${database.url}" />
>>>>> <property name="username" value="${database.username}" />
>>>>> <property name="password" value="${database.password}" />
>>>>> <property name="testOnBorrow" value="true" />
>>>>> <property name="testOnReturn" value="true" />
>>>>> <property name="testWhileIdle" value="true" />
>>>>> <property name="timeBetweenEvictionRunsMillis" value="1800000" />
>>>>> <property name="numTestsPerEvictionRun" value="3" />
>>>>> <property name="minEvictableIdleTimeMillis" value="1800000" />
>>>>> <property name="validationQuery" value="SELECT 1" />
>>>>> <property name="maxActive" value="2"/>
>>>>> <property name="logAbandoned" value="true"/>
>>>>> <property name="removeAbandoned" value="true"/>
>>>>> </bean>
>>>>
>>>> What happens if you set it to 1?
>>
>>
>> Yes, I meant maxActive, sorry.
>>
>> Why use a DeferredResult here if you're just setting the result
>> synchronously and inline anyway? You may as well just remove the key
>> from the map manually. Am I missing something?
>>
>>
>> p
>>
>>>>> Any idea what I am getting wrong?
>>>>>
>>>>> @Daniel, I have configured jmx with Spring and I get a numIdle of 0 and
>>>>> numActive of 2 after the problem occurs. This confirms what you and
>> Chuck
>>>>> say: my app leaks db connections.
>>>>>
>>>>> However, I am still not sure why my app leaks the connections. I use
>> the
>>>>> default Spring configuration...
>>>>>
>>>>> Sorry: it is slightly offtopic now. I guess this is no longer a Tomcat
>>>>> question so I should post it elsewhere.
>>>>>
>>>>> Julien.
>>>>>
>>>>>
>>>>> 2013/3/22 Caldarale, Charles R <Chuck.Caldarale@(protected)>
>>>>>
>>>>>>> From: Julien Martin [mailto:balteo@(protected)]
>>>>>>> Subject: Re: My use of Spring MVC's DeferredResult class causes
>> Tomcat
>>>>>> 7.0.35 to crash silently
>>>>>>
>>>>>>> "http-bio-8080-exec-10" daemon prio=10 tid=0x00007f68840a2800
>>>> nid=0x41b5
>>>>>> in
>>>>>>> Object.wait() [0x00007f690cc57000]
>>>>>>>   java.lang.Thread.State: WAITING (on object monitor)
>>>>>>> at java.lang.Object.wait(Native Method)
>>>>>>> - waiting on <0x00000007e8fc4650> (a
>>>>>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
>>>>>>> at java.lang.Object.wait (Object.java:503)
>>>>>>> at
>>>>>>
>>>>
>> org.apache.commons.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:1115)
>>>>>>> - locked <0x00000007e8fc4650> (a
>>>>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
>>>>>>> at
>>>>>>
>>>>
>> org.apache.commons.dbcp.PoolingDataSource.getConnection (PoolingDataSource.java:106)
>>>>>>
>>>>>> Looks like you're leaking database connections, likely by not
>> returning
>>>>>> them to the pool. Read Chris' article on how to do it right:
>>>>>>
>>>>>>
>>>>>>
>>>>
>> http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/
>>>>>>
>>>>>> - 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-unsubscribe@(protected)
>>>>>> For additional commands, e-mail: users-help@(protected)
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> [key:62590808]
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>>>> For additional commands, e-mail: users-help@(protected)
>>>>
>>>>
>>>
>>
>>
>> --
>>
>> [key:62590808]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>>
>


--

[key:62590808]


Attachment: users_240662.eml (zipped)
On Mar 22, 2013, at 10:42 AM, Julien Martin wrote:

> @Chuck: thanks for the link. I have read it. Umm... the thing is I don't
> close my connection manually. I use Spring. Here is my configuration:
>
> <bean class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close" id="dataSource">
> <property name="driverClassName" value="${database.driverClassName}" />
> <property name="url" value="${database.url}" />
> <property name="username" value="${database.username}" />
> <property name="password" value="${database.password}" />
> <property name="testOnBorrow" value="true" />
> <property name="testOnReturn" value="true" />
> <property name="testWhileIdle" value="true" />
> <property name="timeBetweenEvictionRunsMillis" value="1800000" />
> <property name="numTestsPerEvictionRun" value="3" />
> <property name="minEvictableIdleTimeMillis" value="1800000" />
> <property name="validationQuery" value="SELECT 1" />
> <property name="maxActive" value="2"/>
> <property name="logAbandoned" value="true"/>
> <property name="removeAbandoned" value="true"/>

You might try adding in "removeAbandonedTimeout" and setting it really low. It defaults to 300 seconds.

Dan


> </bean>
>
> Any idea what I am getting wrong?
>
> @Daniel, I have configured jmx with Spring and I get a numIdle of 0 and
> numActive of 2 after the problem occurs. This confirms what you and Chuck
> say: my app leaks db connections.
>
> However, I am still not sure why my app leaks the connections. I use the
> default Spring configuration...
>
> Sorry: it is slightly offtopic now. I guess this is no longer a Tomcat
> question so I should post it elsewhere.
>
> Julien.
>
>
> 2013/3/22 Caldarale, Charles R <Chuck.Caldarale@(protected)>
>
>>> From: Julien Martin [mailto:balteo@(protected)]
>>> Subject: Re: My use of Spring MVC's DeferredResult class causes Tomcat
>> 7.0.35 to crash silently
>>
>>> "http-bio-8080-exec-10" daemon prio=10 tid=0x00007f68840a2800 nid=0x41b5
>> in
>>> Object.wait() [0x00007f690cc57000]
>>>  java.lang.Thread.State: WAITING (on object monitor)
>>> at java.lang.Object.wait(Native Method)
>>> - waiting on <0x00000007e8fc4650> (a
>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
>>> at java.lang.Object.wait (Object.java:503)
>>> at
>> org.apache.commons.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:1115)
>>> - locked <0x00000007e8fc4650> (a
>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
>>> at
>> org.apache.commons.dbcp.PoolingDataSource.getConnection (PoolingDataSource.java:106)
>>
>> Looks like you're leaking database connections, likely by not returning
>> them to the pool. Read Chris' article on how to do it right:
>>
>>
>> http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/
>>
>> - 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-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>>



Attachment: users_240663.eml (zipped)
On 22/03/2013 15:02, Julien Martin wrote:
> Hi Pid,
> Is there any other config I need to add (for instance to log4j.properties)
> in order for the logAbandoned logging to occur?

Actually, you're right this is DBCP inside your app - so you might need
to look in an app log if there is one.


> I see nothing in stdout nor in the tomcat logs...

Maybe you're not waiting long enough or there's no abandoned connections
to be logged.


p


> Regards,
> J.
>
> 2013/3/22 Pid <pid@(protected)>
>
>> On 22/03/2013 14:45, Julien Martin wrote:
>>> Hello,
>>>
>>> I have enabled the *logAbandoned* property as follows (in Spring):
>>>
>>> <property name="maxActive" value="2"/>
>>> <property name="logAbandoned" value="true"/>
>>> <property name="removeAbandoned" value="true"/>
>>>
>>> I know for certain it is taken into account by Tomcat but *I just can't
>>> figure out where the information is logged*.
>>
>> It will be logged to standard out, catalina.out or catalina.{date}.log
>>
>> In your case, the timeBetweenEvictionRunsMillis check will happen every
>> 1800000 millis, which is 1800 seconds, which is every 30 minutes for
>> connections that have been idle the same period, which may mean that
>> they don't qualify for eviction for over 30 mins, which in turn would
>> mean the next check - 30m later.
>>
>> Maybe you should reduce that number during testing.
>>
>>
>> p
>>
>>
>>> It seems to be a recurring question on the web but I was not able to find
>>> the answer to it.
>>>
>>> Can anyone please informed advice?
>>> Regards,
>>>
>>> Julien.
>>>
>>
>>
>> --
>>
>> [key:62590808]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>>
>


--

[key:62590808]


Attachment: users_240666.eml (zipped)
Any idea what the logs should look like? Any sample?
J.

2013/3/22 Pid <pid@(protected)>

> On 22/03/2013 15:02, Julien Martin wrote:
> > Hi Pid,
> > Is there any other config I need to add (for instance to
> log4j.properties)
> > in order for the logAbandoned logging to occur?
>
> Actually, you're right this is DBCP inside your app - so you might need
> to look in an app log if there is one.
>
>
> > I see nothing in stdout nor in the tomcat logs...
>
> Maybe you're not waiting long enough or there's no abandoned connections
> to be logged.
>
>
> p
>
>
> > Regards,
> > J.
> >
> > 2013/3/22 Pid <pid@(protected)>
> >
> >> On 22/03/2013 14:45, Julien Martin wrote:
> >>> Hello,
> >>>
> >>> I have enabled the *logAbandoned* property as follows (in Spring):
> >>>
> >>> <property name="maxActive" value="2"/>
> >>> <property name="logAbandoned" value="true"/>
> >>> <property name="removeAbandoned" value="true"/>
> >>>
> >>> I know for certain it is taken into account by Tomcat but *I just can't
> >>> figure out where the information is logged*.
> >>
> >> It will be logged to standard out, catalina.out or catalina.{date}.log
> >>
> >> In your case, the timeBetweenEvictionRunsMillis check will happen every
> >> 1800000 millis, which is 1800 seconds, which is every 30 minutes for
> >> connections that have been idle the same period, which may mean that
> >> they don't qualify for eviction for over 30 mins, which in turn would
> >> mean the next check - 30m later.
> >>
> >> Maybe you should reduce that number during testing.
> >>
> >>
> >> p
> >>
> >>
> >>> It seems to be a recurring question on the web but I was not able to
> find
> >>> the answer to it.
> >>>
> >>> Can anyone please informed advice?
> >>> Regards,
> >>>
> >>> Julien.
> >>>
> >>
> >>
> >> --
> >>
> >> [key:62590808]
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@(protected)
> >> For additional commands, e-mail: users-help@(protected)
> >>
> >>
> >
>
>
> --
>
> [key:62590808]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment: users_240682.eml (zipped)
On 22.03.2013 16:12, Pid wrote:
> On 22/03/2013 15:02, Julien Martin wrote:
>> Hi Pid,
>> Is there any other config I need to add (for instance to log4j.properties)
>> in order for the logAbandoned logging to occur?
>
> Actually, you're right this is DBCP inside your app - so you might need
> to look in an app log if there is one.
>
>
>> I see nothing in stdout nor in the tomcat logs...
>
> Maybe you're not waiting long enough or there's no abandoned connections
> to be logged.

AFAIR DBCP doesn't use a log framework and instead uses writing
System.out. So catalina.out is your friend in this case.

Regards,

Rainer



Attachment: users_240664.eml (zipped)
Caldarale, Charles R wrote:
>> From: Jeffrey Janner [mailto:Jeffrey.Janner@(protected)]
>> Subject: RE: [a bit, but not totally OT] Tomcat Behavior on Multiple HTTP requests from same browser
>
>>> You would need a fairly large, and well-disciplined team of pigeons to
>>> do that though. I don't think that this was a good metaphor, You should
>>> have chosen a bigger bird and/or a smaller load. Eagles and tennis
>>> balls maybe ?
>
>> Or swallows and coconuts.
>
> Someone had to bring that up. African or European?
>
> I think we can remove the "not" from the subject line now...
>
Done.
This all reminds me of this (locally) well-known Belgian bird : the oye-oye-oye bird.
For those who don't know the species :
It is a very strong, sturdy bird. Rather bad-tempered too, you shouldn't mess with it.
It is a bit the bird-equivalent of the Belgian horse really.
It has a big round head, with a strong beak, say oh a good 5 inches wide and 7 inches
long. A really strong beak, he can crush nuts or bones with it.
Then it has very strong wings too, strong enough to lift a small sheep for instance (or a
bowling ball for that matter).
And tough feathers, you can make brooms with them.
And also rather short, but very strong sturdy legs; like 2 inches thick and 2 inches long.
And then its balls, no kidding, they are the size of coconuts.
And each time it lands, it goes "oye oye oye".



Attachment: users_240665.eml (zipped)
On 3/22/2013 9:35 AM, André Warnier wrote:
> Caldarale, Charles R wrote:
>>> From: Jeffrey Janner [mailto:Jeffrey.Janner@(protected):
>>> RE: [a bit, but not totally OT] Tomcat Behavior on Multiple HTTP
>>> requests from same browser
>>
>>>> You would need a fairly large, and well-disciplined team of pigeons to
>>>> do that though. I don't think that this was a good metaphor, You should
>>>> have chosen a bigger bird and/or a smaller load. Eagles and tennis
>>>> balls maybe ?
>>
>>> Or swallows and coconuts.
>>
>> Someone had to bring that up. African or European?
>>
>> I think we can remove the "not" from the subject line now...
>>
> Done.
> This all reminds me of this (locally) well-known Belgian bird : the
> oye-oye-oye bird.
> For those who don't know the species :
> It is a very strong, sturdy bird. Rather bad-tempered too, you shouldn't
> mess with it.
> It is a bit the bird-equivalent of the Belgian horse really.
> It has a big round head, with a strong beak, say oh a good 5 inches wide
> and 7 inches long. A really strong beak, he can crush nuts or bones
> with it.
> Then it has very strong wings too, strong enough to lift a small sheep
> for instance (or a bowling ball for that matter).
> And tough feathers, you can make brooms with them.
> And also rather short, but very strong sturdy legs; like 2 inches thick
> and 2 inches long.
> And then its balls, no kidding, they are the size of coconuts.
> And each time it lands, it goes "oye oye oye".

Sounds very much like the African oomy-goomie bird.

There's a rugby song about that - something about going off to see a
wild west show . . . elephants and kangaroos.

Looks like at least one subspecies migrated north.

/mde/



Attachment: users_240672.eml (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chuck,

On 3/22/13 10:25 AM, Caldarale, Charles R wrote:
>> From: Jeffrey Janner [mailto:Jeffrey.Janner@(protected)]
>> Subject: RE: [a bit, but not totally OT] Tomcat Behavior on
>> Multiple HTTP requests from same browser
>
>>> You would need a fairly large, and well-disciplined team of
>>> pigeons to do that though. I don't think that this was a good
>>> metaphor, You should have chosen a bigger bird and/or a smaller
>>> load. Eagles and tennis balls maybe ?
>
>> Or swallows and coconuts.
>
> Someone had to bring that up. African or European?
>
> I think we can remove the "not" from the subject line now...

I think someone gets thrown off a bridge into an abyss if we keep
going. The Spring Generation probably doesn't have any idea what we're
tottering on about.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRTNxAAAoJEBzwKT+lPKRY3koQAIkmmGnn4SA1u1VeLkU8ZAre
8YWDktOOvf6J0xJQl8iRajoV2ZZT0EjoHSO9ODopS7BiYRcbuCfLROXaIYLSD/PR
nLiporwrtehxW7yTHxtpM3P599E/Gr2vvLhw3/9Wl7BcM1exnQrsDkmTa3bLEIxT
XvUaisgwhDquCyfFyPxV5fy46Fn128fyHa6E4ZUaeRGYYH4hcwkAJRc7lM1TaX+y
BOmNr0jR60Z2KfSMEWeXR2J4FpYoFUrkS3KDRWi7RruZp28BR7MPLX/49inioy3K
a+K7lgus9s6p0QySBREDEpi2oCXEO31m2gRYQ4O7iXOoKaKcOkMS7Vx2hKkbO2eq
unJ/pcjkTWYXVx5oahbi9VEOSf3PiXGV3xYA/JFFbG/xYkKeVReofTmCoeHIfVTh
H9GKbzGR0jQAWUkZpnuMumg+Dbra6/J3+Nau/ItDy5kQ1e1xIbLyYswEbzTjxnHa
0wNkQkfID/IfOpz9mnM5wkowE8cDrqVFO3YkWDzYo5GsIliGT8o6NapTf7y8ll1D
rVyVhPfMUJWMjq6QlJRcPJE3EuluOtRP+73UejZmqssL/V2RJCH+5f2sbBipB1gW
X+VwBRVuD0qCGgniDIrXYjLZqTKsp+Y/9d38H1SgZgdTdIOPtqMVJ8IwU1uYopTa
L2rZsjHHYmB7+eYyzvMf
=Ttie
-----END PGP SIGNATURE-----


Attachment: users_240673.eml (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André,

On 3/22/13 12:35 PM, André Warnier wrote:
> Caldarale, Charles R wrote:
>>> From: Jeffrey Janner [mailto:Jeffrey.Janner@(protected)]
>>> Subject: RE: [a bit, but not totally OT] Tomcat Behavior on
>>> Multiple HTTP requests from same browser
>>
>>>> You would need a fairly large, and well-disciplined team of
>>>> pigeons to do that though. I don't think that this was a good
>>>> metaphor, You should have chosen a bigger bird and/or a
>>>> smaller load. Eagles and tennis balls maybe ?
>>
>>> Or swallows and coconuts.
>>
>> Someone had to bring that up. African or European?
>>
>> I think we can remove the "not" from the subject line now...
>>
> Done. This all reminds me of this (locally) well-known Belgian bird
> : the oye-oye-oye bird. For those who don't know the species : It
> is a very strong, sturdy bird. Rather bad-tempered too, you
> shouldn't mess with it. It is a bit the bird-equivalent of the
> Belgian horse really. It has a big round head, with a strong beak,
> say oh a good 5 inches wide and 7 inches long. A really strong
> beak, he can crush nuts or bones with it. Then it has very strong
> wings too, strong enough to lift a small sheep for instance (or a
> bowling ball for that matter). And tough feathers, you can make
> brooms with them. And also rather short, but very strong sturdy
> legs; like 2 inches thick and 2 inches long. And then its balls, no
> kidding, they are the size of coconuts. And each time it lands, it
> goes "oye oye oye".

That sounds absolutely terrifying. A 7-inch-long beak that's 5-inches
wide? That's like an oil tunnel for a car.

I don't even want to hear about the Belgian Horse...

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRTNzSAAoJEBzwKT+lPKRY79EP/0xwu/G4cTHvKoJldQRdFYUX
cT9vBgr/xrdkNuV8gO/+cwBhiAGVAw2LOtkT6aF85zdv0Da6PALk6DOrvx4PLcnz
KVAGG2mp6KHngISB09ti1I/QycNfKFQUkA3ogHFB8N3LDxQoTc1ZfbcWm1+UcRYu
BMvXrzAcAapx0ZKYP4ZId7Z9vtIyB5mpGmCXu88x0bJs+D/shzLTPGiE7tYzZfpi
R/VJhE4TezajaRFvnCNLLooeHAGEx3qJ/FNLaynr1QB8X7QRhOomulr5tR4n5+Za
ELoGLkeIfcYCrXiSDANJAEGrLUf5/4ub/yZqPhXuL2dgSI5FvI4+Np7PfscfJ0xi
BtTZ8JYB6I0FQfJqRHnB0krpvnBhncmnyqdk+OKuxoSqYeHabaX8PlqGMQu6mlpR
ay71I8qrHYsBvOjTF+rexstcNEkzWeEON06Q+AzlWElp/NAyI+OT6lpHXAew7A5e
wX8RcVU7/5vC14RnpUVwaA4OSvqQpMH29hk9n0s5rEjR8zro+fm5ZFUCHxsg6j51
Xmgq0AwENY2hm6EVducDs2aFUK1n1xoz0z09Vc9Jb9dIiXuz0DgPW/Ls7YcoiRce
kh04Jn+M8oQl1nZsteb3egXasExm/S8EoCg/HrFpenLje30z+riW7mBPRpwx4v5p
WenLW/6m51hgZNpuccxx
=QmXY
-----END PGP SIGNATURE-----


Attachment: users_240680.eml (zipped)
> From: Christopher Schultz [mailto:chris@(protected)]
> Subject: Re: [totally OT] Tomcat Behavior on Multiple HTTP requests from same browser

> > > Or swallows and coconuts.

> > Someone had to bring that up. African or European?

> > I think we can remove the "not" from the subject line now...

> I think someone gets thrown off a bridge into an abyss if we keep
> going. The Spring Generation probably doesn't have any idea what we're
> tottering on about.

The rules say the Spring Generation goes over if they can't answer the questions...

Auuuuuuuugh.

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



Attachment: users_240667.eml (zipped)
When tomcat freezes silently, what is the best way to look inside the frozen tomcat or java instance and see the cause? We have 1500+ tomcat instances, and most of them run great most of the time. But a few times per week, an instance will become unresponsive. There is usually nothing suspicious in the tomcat or gc logs. There are no OOMEs and we don't see any full GC's that take more than 0.25 seconds. The process does not die. It stays running and the port is still listening, and you can even telnet to the port, but tomcat does not answer any requests until you restart it. Is there a way to peer into the frozen instance and see what's up? We use tomcat 6.0.16 and java 6.0.21 on RHEL 5 and RHEL 6.

--
Eric Robinson









Disclaimer - March 22, 2013
This email and any files transmitted with it are confidential and intended solely for users@(protected).
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

Attachment: users_240668.eml (zipped)
On 3/22/2013 1:36 PM, Robinson, Eric wrote:
> When tomcat freezes silently, what is the best way to look inside the
> frozen tomcat or java instance and see the cause? We have 1500+
> tomcat instances, and most of them run great most of the time. But a
> few times per week, an instance will become unresponsive. There is
> usually nothing suspicious in the tomcat or gc logs. There are no
> OOMEs and we don't see any full GC's that take more than 0.25
> seconds. The process does not die. It stays running and the port is
> still listening, and you can even telnet to the port, but tomcat does
> not answer any requests until you restart it. Is there a way to peer
> into the frozen instance and see what's up? We use tomcat 6.0.16 and
> java 6.0.21 on RHEL 5 and RHEL 6.
>

1. Upgrade - many important security fixes

2. Thread dumps

http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

. . . just my two cents.
/mde/


Attachment: users_240669.eml (zipped)
Take a full thread dump of the PID. Linux kill -3, if Windows CTRL+BREAK if you have a console window open.

This will allow you to see the state of all threads and see whether it's your own application class (likely), or Tomcat itself.

-----Original Message-----
From: Robinson, Eric [mailto:eric.robinson@(protected)]
Sent: Friday, March 22, 2013 1:37 PM
To: users@(protected)
Subject: Diagnosing Silently Frozen Tomcats

When tomcat freezes silently, what is the best way to look inside the frozen tomcat or java instance and see the cause? We have 1500+ tomcat instances, and most of them run great most of the time. But a few times per week, an instance will become unresponsive. There is usually nothing suspicious in the tomcat or gc logs. There are no OOMEs and we don't see any full GC's that take more than 0.25 seconds. The process does not die. It stays running and the port is still listening, and you can even telnet to the port, but tomcat does not answer any requests until you restart it. Is there a way to peer into the frozen instance and see what's up? We use tomcat 6.0.16 and java 6.0.21 on RHEL 5 and RHEL 6.

--
Eric Robinson









Disclaimer - March 22, 2013
This email and any files transmitted with it are confidential and intended solely for users@(protected).
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/



Attachment: users_240670.eml (zipped)
Dan said:
> Take a full thread dump of the PID. Linux kill -3, if
> Windows CTRL+BREAK if you have a console window open.
>

Mark said:
> 2. Thread dumps
>

So I tried kill -3 but it does nothing. The process ignores me like it owes me child support. I notice that it is in sleep state S1 if that matters. Below is the full output from 'ps ax'


18499 ?     Sl   1:45 /usr/java/jdk1.6.0_21/bin/java -Xms16M -Xmx192M -Djvm=tomcat6_003 -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Duser.timezone=US/Pacific -Xloggc:/alley/site003/tomcat6/logs/gc.log -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/alley/site003/tomcat6/conf/logging.properties -Djava.endorsed.dirs=/alley/site003/tomcat6/endorsed -classpath :/alley/site003/tomcat6/bin/bootstrap.jar -Dcatalina.base=/alley/site003/tomcat6 -Dcatalina.home=/alley/site003/tomcat6 -Djava.io.tmpdir=/alley/site003/tomcat6/temp org.apache.catalina.startup.Bootstrap start


Any thoughts on why kill won't kill it?

--Eric








Disclaimer - March 22, 2013
This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physicians' Managed Care or Physician Select Management. Warning: Although Physicians' Managed Care or Physician Select Management has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/


Attachment: users_240671.eml (zipped)
On 22/03/2013 22:22, Robinson, Eric wrote:
> Dan said:
>> Take a full thread dump of the PID. Linux kill -3, if
>> Windows CTRL+BREAK if you have a console window open.
>>
>
> Mark said:
>> 2. Thread dumps
>>
>
> So I tried kill -3 but it does nothing. The process ignores me like it owes me child support. I notice that it is in sleep state S1 if that matters. Below is the full output from 'ps ax'
>
>
> 18499 ?     Sl   1:45 /usr/java/jdk1.6.0_21/bin/java -Xms16M -Xmx192M -Djvm=tomcat6_003 -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Duser.timezone=US/Pacific -Xloggc:/alley/site003/tomcat6/logs/gc.log -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/alley/site003/tomcat6/conf/logging.properties -Djava.endorsed.dirs=/alley/site003/tomcat6/endorsed -classpath :/alley/site003/tomcat6/bin/bootstrap.jar -Dcatalina.base=/alley/site003/tomcat6 -Dcatalina.home=/alley/site003/tomcat6 -Djava.io.tmpdir=/alley/site003/tomcat6/temp org.apache.catalina.startup.Bootstrap start
>
>
> Any thoughts on why kill won't kill it?

RTFM

kill -3 doesn't kill the process it generates a thread dump to stdout.

Mark



Attachment: users_240674.eml (zipped)
On 3/22/2013 3:22 PM, Robinson, Eric wrote:
> Dan said:
>> Take a full thread dump of the PID. Linux kill -3, if Windows
>> CTRL+BREAK if you have a console window open.
>>
>
> Mark said:
>> 2. Thread dumps
>>
>
> So I tried kill -3 but it does nothing. The process ignores me like
> it owes me child support. I notice that it is in sleep state S1 if
> that matters. Below is the full output from 'ps ax'
>
>
> 18499 ?     Sl   1:45 /usr/java/jdk1.6.0_21/bin/java -Xms16M
> -Xmx192M -Djvm=tomcat6_003 -Djava.awt.headless=true
> -Djava.net.preferIPv4Stack=true -Duser.timezone=US/Pacific
> -Xloggc:/alley/site003/tomcat6/logs/gc.log -XX:+PrintGCDateStamps
> -XX:+PrintGCDetails
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.util.logging.config.file=/alley/site003/tomcat6/conf/logging.properties
> -Djava.endorsed.dirs=/alley/site003/tomcat6/endorsed -classpath
> :/alley/site003/tomcat6/bin/bootstrap.jar
> -Dcatalina.base=/alley/site003/tomcat6
> -Dcatalina.home=/alley/site003/tomcat6
> -Djava.io.tmpdir=/alley/site003/tomcat6/temp
> org.apache.catalina.startup.Bootstrap start
>
>
> Any thoughts on why kill won't kill it?
>
> --Eric

1. Make sure you have permissions

If you're not the owner of the process or root, you'll get a 'permission
denied'

2. look in the log files

$CATALINA_BASE/logs/catalina.out is the standard place for the thread
dump. Who knows where it is on rpm-managed installations . . . I always
install mine from scratch.

. . . . just my two cents.
/mde/


Attachment: users_240675.eml (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 3/22/13 6:26 PM, Mark Thomas wrote:
> On 22/03/2013 22:22, Robinson, Eric wrote:
>> Dan said:
>>> Take a full thread dump of the PID. Linux kill -3, if Windows
>>> CTRL+BREAK if you have a console window open.
>>>
>>
>> Mark said:
>>> 2. Thread dumps
>>>
>>
>> So I tried kill -3 but it does nothing. The process ignores me
>> like it owes me child support. I notice that it is in sleep state
>> S1 if that matters. Below is the full output from 'ps ax'
>>
>>
>> 18499 ?     Sl   1:45 /usr/java/jdk1.6.0_21/bin/java -Xms16M
>> -Xmx192M -Djvm=tomcat6_003 -Djava.awt.headless=true
>> -Djava.net.preferIPv4Stack=true -Duser.timezone=US/Pacific
>> -Xloggc:/alley/site003/tomcat6/logs/gc.log -XX:+PrintGCDateStamps
>> -XX:+PrintGCDetails
>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>> -Djava.util.logging.config.file=/alley/site003/tomcat6/conf/logging.properties
>> -Djava.endorsed.dirs=/alley/site003/tomcat6/endorsed -classpath
>> :/alley/site003/tomcat6/bin/bootstrap.jar
>> -Dcatalina.base=/alley/site003/tomcat6
>> -Dcatalina.home=/alley/site003/tomcat6
>> -Djava.io.tmpdir=/alley/site003/tomcat6/temp
>> org.apache.catalina.startup.Bootstrap start
>>
>>
>> Any thoughts on why kill won't kill it?
>
> RTFM
>
> kill -3 doesn't kill the process it generates a thread dump to
> stdout.

... and a link to TFM, if Eric didn't see [the other] Mark's response:
http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRTN3nAAoJEBzwKT+lPKRYlxwQAL9sJIW+RaxrI8J3rGwfArk/
Nyh0l7eiZvKBpKrpORrtjoNyc21kCerWYU5Bptt4S+X2gYaQh4tUlcyzrfd1jb9L
74jXxqr4zHkXhOZZWu9iZKefZvXwnohpb2HxAnD660W6SAhN0JEqrV5oyHSsW2tX
9rC9Mc0hOO7aFCFnal7G6GLTPLMbRSWcfWxV3zuidtv7WLmsIMju687F/CvuGR6t
oR0KF9SD3pMGHexJ7q7/U5VdfcVOBkyrteBJqrnHr6ydfhUzGIhOJZdx00b6yWmK
x1ssuzlSwIfr1Hx5YjeS0AKyUdDnXwqPEFoQIM1TJjb9bMshDRqkNu42w3GwiVsB
rcjpQayoQIWyJ1aPOb5B2JHHHQGU+DaPVKJHtZRc+C4BXDKgivW+BWJmDSlKi5tI
ph6YFKu0ESvJ5+EgIDz23gruZhh4fMTQkF9cRwa21fMiyycya31rYZg35+EpkKc0
C8e7v6mMHKmt7MxK3Jme4OxJcdwjL1e1yCLOIDlxHRq/r0flAaNkyesZn0atloDH
/366WTSAheHZrYngjyJ3mCO/pTttfqIYNJuFOUjv4YeaGLRV+61ec7np9KNImiCp
1PfeBlLSd7SZXWiKACDVCetqt5RWQr1OQcshCAKM8SKaB9SmuOUH2tW4FFU/6R4K
QP9LE5zCtD+5P+1KiUNX
=Rdgb
-----END PGP SIGNATURE-----


Attachment: users_240677.eml (zipped)
Just do "sudo kill -3 <PID>"
It will most likely work.

If sudo is not enable - just google it. You will find instructions how
to enable it.

-Michael

--- On Fri, 3/22/13, Mark Eggers <its_toasted@(protected):

> From: Mark Eggers <its_toasted@(protected)>
> Subject: Re: Diagnosing Silently Frozen Tomcats
> To: users@(protected)
> Date: Friday, March 22, 2013, 3:36 PM
> On 3/22/2013 3:22 PM, Robinson, Eric
> wrote:
> > Dan said:
> >> Take a full thread dump of the PID.  Linux
> kill -3, if Windows
> >> CTRL+BREAK if you have a console window open.
> >>
> >
> > Mark said:
> >> 2. Thread dumps
> >>
> >
> > So I tried kill -3 but it does nothing. The process
> ignores me like
> > it owes me child support. I notice that it is in sleep
> state S1 if
> > that matters. Below is the full output from 'ps ax'
> >
> >
> > 18499 ?        Sl 
>    1:45 /usr/java/jdk1.6.0_21/bin/java
> -Xms16M
> > -Xmx192M -Djvm=tomcat6_003 -Djava.awt.headless=true
> > -Djava.net.preferIPv4Stack=true
> -Duser.timezone=US/Pacific
> > -Xloggc:/alley/site003/tomcat6/logs/gc.log
> -XX:+PrintGCDateStamps
> > -XX:+PrintGCDetails
> >
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> >
> -Djava.util.logging.config.file=/alley/site003/tomcat6/conf/logging.properties
> > -Djava.endorsed.dirs=/alley/site003/tomcat6/endorsed
> -classpath
> > :/alley/site003/tomcat6/bin/bootstrap.jar
> > -Dcatalina.base=/alley/site003/tomcat6
> > -Dcatalina.home=/alley/site003/tomcat6
> > -Djava.io.tmpdir=/alley/site003/tomcat6/temp
> > org.apache.catalina.startup.Bootstrap start
> >
> >
> > Any thoughts on why kill won't kill it?
> >
> > --Eric
>
> 1. Make sure you have permissions
>
> If you're not the owner of the process or root, you'll get a
> 'permission
> denied'
>
> 2. look in the log files
>
> $CATALINA_BASE/logs/catalina.out is the standard place for
> the thread
> dump. Who knows where it is on rpm-managed installations . .
> . I always
> install mine from scratch.
>
> . . . . just my two cents.
> /mde/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>


Attachment: users_240678.eml (zipped)

> RTFM
>
> kill -3 doesn't kill the process it generates a thread dump to stdout.
>
> Mark

Ha! It's probably been 30 years since the last time anyone told me to RTFM. Fair enough, I suppose I deserved it, although in my defense I did check the man page first. :-)

Thanks!

--Eric





Disclaimer - March 22, 2013
This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physicians' Managed Care or Physician Select Management. Warning: Although Physicians' Managed Care or Physician Select Management has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/


Attachment: users_240679.eml (zipped)

>
> ... and a link to TFM, if Eric didn't see [the other] Mark's response:
> http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_d
> ump_of_my_running_webapp_.3F
>
> - -chris


I did see that and I even read it before posting. It said kill -3 sends a SIGQUIT. I guess I jumped to the conclusion that QUIT meant quit. :-)

--Eric




Disclaimer - March 22, 2013
This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physicians' Managed Care or Physician Select Management. Warning: Although Physicians' Managed Care or Physician Select Management has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/


Attachment: users_240676.eml (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Tommy,

On 3/21/13 5:00 PM, Tommy Pham wrote:
> Silly me... I figured out what was the issue. I didn't have the
> index page defined in Tomcat's web.xml within the D:\wwwroot. The
> eventual content of this folder will be images anyway. Would I
> need to code an interceptor to detect 404 error and path to
> redirect the visitor to another URL instead of Tomcat's default 404
> error?

I would just configure an <error-page> in web.xml like usual.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRTN40AAoJEBzwKT+lPKRYcYoP/18xFmCLD04KOyGoge2uhjYw
xB6TWT/VHf5pPGk9xY2TJp+nkkIfGiKwPqCovAemV/JdzAYXocsx3P/cbt0Jvzw7
ltVk+Y1non8o6KhrlxAsXpObLYcZzhnLpkefkHIp3awYIwzrgVi4k1GTIKucozzs
4/7QWAjCznxdL0WJln6eJ//pgwOfaSpuNGbXocjY00vy3R3cBveQ94YaxzoyTKvy
s85ubbMSZtvbufof2thvO3c+GWWRRyJpaYCrQZ2Sw0TpUBBj78D3jknenAHssfat
R1qtFi2K0HT2SNHfloYOzgmAyjnpbdOMU6QNXkdc4ckjQzRVO9PczOgj+VMx9h8c
gB4jFzBZFja9i/u9GwR2mBjHJBM1kCjDdfD7Oi0mgj4Mg17CHUGcU4DF9NWJ9Cfb
TMYbNHK53QxFm1Bjb4JiVERdPf1x9UfRg8uv7XResUXTmUHg3Rv/hoMdW4JPN+GZ
oPEc0VcGGz+qXexOoSdgvTqBEOOGvIhl0wcy5j9zh0O7p2fQFx8RcsFQj88hlkGq
UzY/DvWzviErDRGS1FIOCzALnZ2KeRI0uWdAW0nMqXq7X/gATfmnpVakfEtBILUH
Vag9KCQBWWcqynrOy1Svo5vwjuz31CU+Cb8hBruSzF1+9Ei+QG85HVdwjjAxEsTS
SEYdeu5+Y3QGeEi41zrN
=cdDP
-----END PGP SIGNATURE-----


Attachment: users_240681.eml (zipped)

On Mar 21, 2013, at 4:31 PM, Nick Williams wrote:

> I have built an executable Tomcat JAR file. It has all of the Tomcat classes and dependencies zipped into one big JAR. Inside that JAR is also a WAR file, the native DLL, and logging.properties. My com.ul.io.Bootstrap class creates an .extract directory in the CWD, extracts the native DLL, WAR file and logging.properties, configures Tomcat logging, configures a Tomcat class instance, adds the WAR file is a web app, starts the Tomcat class instance, and waits for it.
>
> If I run this JAR like this:
>
>> java -jar PeripheralProxy-1.0.0.SNAPSHOT.jar
>
> Everything works fine. It starts up, I can go to the application, no errors in the logs ... everything is perfect. The output from stdout is below if you're interested. Now, I take the same JAR file and sign it with the jar signer. To make sure nothing got messed up, I run the signed JAR file:
>
>> java -jar PeripheralProxy-1.0.0.SNAPSHOT-signed.jar
>
> This worked to. Exact same stdout output, application works fine. Perfect! Next I created a JNLP file with, among other things, <security> set to <all-permissions />. I open the JNLP file in my browser. It accepts the certificate and starts the JAR file. First problem is logging doesn't work. Not sure why. I had to enable the Java console in Java Control Panel to see what was going on.
>
> 1) It created the .extract directory, so the first step worked.
> 2) It extracted the WAR file, native DLL and logging.properties without a problem, so that worked, too.
> 3) It could not deploy the application. At this point it began getting class loading errors.
>
> The output from the Java console is also below. Anyone have a clue what went wrong? Obviously the classes ARE in the JAR file, otherwise it wouldn't work from the command line.
>
> <snip>

Well, I got this working. I'm not sure anyone has ever successfully done this before, because I didn't really find much of anything on Google that helped. Here's what I had to do:

1) Sign the JAR and use <all-permissions />. This was a given and I was already doing this.

2) Use tomcat-embed-logging-log4j instead of tomcat-embed-logging-juli. The Web Start deployer is NOT friendly to the way JULI deals with class loaders.

3) Don't put ANY classes in the WAR files included in the JAR file. ALL classes (Tomcat AND application AND dependency classes) must go in the root/embedded/same JAR. Otherwise the security manager detects that they were loaded differently and doesn't apply the <all-permissions /> rule to them. There IS an alternative to this: System.setSecurityManager(null). But that's not pretty, and discouraged.

4) After instantiating the Tomcat instance and before starting it, set the parent class loaders to the current thread context class loader. Otherwise Tomcat tries to use the System class loader. You cannot use the System class loader in Java Web Start. None of the application classes are loaded by it.

    Tomcat tomcat = new Tomcat();
    ClassLoader loader = Thread.currentThread().getContextClassLoader();
    tomcat.getEngine().setParentClassLoader(loader);
    tomcat.getHost().setParentClassLoader(loader);
    tomcat.getServer().setParentClassLoader(loader);
    tomcat.getService().setParentClassLoader(loader);

5) Patch JarScanner. The JarScanner only scans JARs at URLs starting with file: and jndi:. It ignores http: and https: URLs, and in Web Start, all JAR URLs start with http: or https:. I filed bug 54745 about this, because it's a noninvasive patch that I think improves Tomcat.
©2008 junlu.com - Jax Systems, LLC, U.S.A.