Re: I need help in configuring windows authentication in tomcat 7.0

2013-03-22 Thread Mark Thomas
On 21/03/2013 23:49, chris derham wrote:
 Context
 RealmclassName=org.apache.catalina.realm.JNDIRealm
   adCompat=true
allRolesMode=authOnly
   referrals=follow
  connectionURL=ldap://dc01.mydom.local:389;
 connectionName=mydom\tcuser
 connectionPassword=Pa55w0rd
   userBase=dc=mydom,dc=local
userSubtree=true
 userSearch=(sAMAccountName={0})
   roleBase=ou=groups,ou=myappl,dc=mydom,dc=local
   roleName=cn
 roleSearch=(member={0})
roleSubtree=true
 /
 /Context
 
 This has come up multiple times on the mailing list - essentially it
 can not/should not be done. Please see
 http://wiki.apache.org/tomcat/FAQ/Password for details

While generally that is correct, JNDIRealm plus Windows authentication
is a special case.

It should be possible to remove the connectionName and
connectionPassword attributes from the above configuration. See the JNDI
docs and the useDelegatedCredential attribute in particular.

Mark


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



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Julien Martin
Hi Chuck,
Thanks for the tip. Can you please confirm it is not a deadlock? All
threads appear to be waiting. I have run jstack and it did not find any
deadlock...
Regards,
Julien.

2013-03-22 08:52:59
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode):

Attach Listener daemon prio=10 tid=0x7f68e8001000 nid=0x41bd waiting
on condition [0x]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
- None

http-bio-8080-exec-10 daemon prio=10 tid=0x7f68840a2800 nid=0x41b5 in
Object.wait() [0x7f690cc57000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x0007e8fc4650 (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 0x0007e8fc4650 (a
org.apache.commons.pool.impl.GenericObjectPool$Latch)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:70)
at
org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:292)
at
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297)
at
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
at
org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
at
org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
at
org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1395)
at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:59)
at
org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:71)
at
org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:378)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:273)
at
org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$before$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)
at
com.bignibou.service.MemberServiceImpl.retrieveCurrentMember(MemberServiceImpl.java:15)
at
com.bignibou.controller.MessageController.getMessages(MessageController.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
at
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
at
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:920)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:816)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:801)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
at

Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Daniel Mikusa
On Mar 22, 2013, at 4:47 AM, Julien Martin wrote:

 Hi Chuck,
 Thanks for the tip. Can you please confirm it is not a deadlock? All
 threads appear to be waiting. I have run jstack and it did not find any
 deadlock…

At what point did you run this thread dump?  What was the state of your 
application?  How many request were sent to the server?  How many responded OK, 
how many failed?

 Regards,
 Julien.
 
 2013-03-22 08:52:59
 Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode):
 
 Attach Listener daemon prio=10 tid=0x7f68e8001000 nid=0x41bd waiting
 on condition [0x]
   java.lang.Thread.State: RUNNABLE
 
   Locked ownable synchronizers:
 - None
 
 http-bio-8080-exec-10 daemon prio=10 tid=0x7f68840a2800 nid=0x41b5 in

This thread looks suspicious.  Seems like you could be having a problem getting 
a database connection.  Can you include your Resource / tags?  Also, you 
might want to connect with a tool like jconsole or jvisualvm and watch the 
stats for the connection pool.  Look at the active, idle counts.

Dan 

 Object.wait() [0x7f690cc57000]
   java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x0007e8fc4650 (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 0x0007e8fc4650 (a
 org.apache.commons.pool.impl.GenericObjectPool$Latch)
 at
 org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
 at
 org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
 at
 org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:70)
 at
 org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:292)
 at
 org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297)
 at
 org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
 at
 org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
 at
 org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
 at
 org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1395)
 at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:59)
 at
 org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:71)
 at
 org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:378)
 at
 org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
 at
 org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
 at
 org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:273)
 at
 org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$before$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)
 at
 com.bignibou.service.MemberServiceImpl.retrieveCurrentMember(MemberServiceImpl.java:15)
 at
 com.bignibou.controller.MessageController.getMessages(MessageController.java:51)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:601)
 at
 org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
 at
 org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
 at
 org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
 at
 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
 at
 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
 at
 org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
 at
 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
 at
 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
 at
 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:920)
 at
 org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:816)
 at 

RE: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Caldarale, Charles R
 From: Julien Martin [mailto:bal...@gmail.com] 
 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=0x7f68840a2800 nid=0x41b5 in
 Object.wait() [0x7f690cc57000]
java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x0007e8fc4650 (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 0x0007e8fc4650 (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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: [a bit, but not totally OT] Tomcat Behavior on Multiple HTTP requests from same browser

2013-03-22 Thread Jeffrey Janner
 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com]
 Sent: Thursday, March 21, 2013 8:51 AM
 To: Tomcat Users List
 Subject: Re: [a bit, but not totally OT] Tomcat Behavior on Multiple
 HTTP requests from same browser
 
 Christopher Schultz wrote:
  HTTP connections for long periods of time, but that's really abuse of
  the protocol IMO. You can send bowling balls via carrier pigeon, but
  there are better ways to send bowling balls.
 
 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.

Jeff
(sorry, couldn't resist.)

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



Re: [a bit, but not totally OT] Tomcat Behavior on Multiple HTTP requests from same browser

2013-03-22 Thread Howard W. Smith, Jr.
On Fri, Mar 22, 2013 at 10:04 AM, Jeffrey Janner 
jeffrey.jan...@polydyne.com wrote:

  -Original Message-
  From: André Warnier [mailto:a...@ice-sa.com]
  Sent: Thursday, March 21, 2013 8:51 AM
  To: Tomcat Users List
  Subject: Re: [a bit, but not totally OT] Tomcat Behavior on Multiple
  HTTP requests from same browser
 
  Christopher Schultz wrote:
   HTTP connections for long periods of time, but that's really abuse of
   the protocol IMO. You can send bowling balls via carrier pigeon, but
   there are better ways to send bowling balls.
 
  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.

 Jeff
 (sorry, couldn't resist.)


Wow, you all are funny! LOL


RE: [a bit, but not totally OT] Tomcat Behavior on Multiple HTTP requests from same browser

2013-03-22 Thread Caldarale, Charles R
 From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 
 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...

 - 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: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Julien Martin
@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=180 /
property name=numTestsPerEvictionRun value=3 /
property name=minEvictableIdleTimeMillis value=180 /
property name=validationQuery value=SELECT 1 /
property name=maxActive value=2/
property name=logAbandoned value=true/
property name=removeAbandoned value=true/
/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.caldar...@unisys.com

  From: Julien Martin [mailto:bal...@gmail.com]
  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=0x7f68840a2800 nid=0x41b5
 in
  Object.wait() [0x7f690cc57000]
 java.lang.Thread.State: WAITING (on object monitor)
  at java.lang.Object.wait(Native Method)
  - waiting on 0x0007e8fc4650 (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 0x0007e8fc4650 (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-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Where does Tomcat log the logAbandoned information?

2013-03-22 Thread Julien Martin
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 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.


Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Pid
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=180 /
 property name=numTestsPerEvictionRun value=3 /
 property name=minEvictableIdleTimeMillis value=180 /
 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?


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.caldar...@unisys.com
 
 From: Julien Martin [mailto:bal...@gmail.com]
 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=0x7f68840a2800 nid=0x41b5
 in
 Object.wait() [0x7f690cc57000]
java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x0007e8fc4650 (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 0x0007e8fc4650 (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-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


 


-- 

[key:62590808]

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



Re: Where does Tomcat log the logAbandoned information?

2013-03-22 Thread Pid
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
180 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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Julien Martin
Hi,
You mean if I set maxActive to 1?
J.

2013/3/22 Pid p...@pidster.com

 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=180 /
  property name=numTestsPerEvictionRun value=3 /
  property name=minEvictableIdleTimeMillis value=180 /
  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?


 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.caldar...@unisys.com
 
  From: Julien Martin [mailto:bal...@gmail.com]
  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=0x7f68840a2800
 nid=0x41b5
  in
  Object.wait() [0x7f690cc57000]
 java.lang.Thread.State: WAITING (on object monitor)
  at java.lang.Object.wait(Native Method)
  - waiting on 0x0007e8fc4650 (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 0x0007e8fc4650 (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-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 


 --

 [key:62590808]

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




Re: Where does Tomcat log the logAbandoned information?

2013-03-22 Thread Julien Martin
Hi Pid,
Is there any other config I need to add (for instance to log4j.properties)
in order for the logAbandoned logging to occur?
I see nothing in stdout nor in the tomcat logs...
Regards,
J.

2013/3/22 Pid p...@pidster.com

 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
 180 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-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Pid
On 22/03/2013 14:56, Julien Martin wrote:
 Hi,
 You mean if I set maxActive to 1?


 J.
 
 2013/3/22 Pid p...@pidster.com
 
 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=180 /
 property name=numTestsPerEvictionRun value=3 /
 property name=minEvictableIdleTimeMillis value=180 /
 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.caldar...@unisys.com

 From: Julien Martin [mailto:bal...@gmail.com]
 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=0x7f68840a2800
 nid=0x41b5
 in
 Object.wait() [0x7f690cc57000]
java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x0007e8fc4650 (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 0x0007e8fc4650 (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-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org





 --

 [key:62590808]

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


 


-- 

[key:62590808]

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



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Julien Martin
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 p...@pidster.com

 On 22/03/2013 14:56, Julien Martin wrote:
  Hi,
  You mean if I set maxActive to 1?


  J.
 
  2013/3/22 Pid p...@pidster.com
 
  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=180 /
  property name=numTestsPerEvictionRun value=3 /
  property name=minEvictableIdleTimeMillis value=180 /
  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.caldar...@unisys.com
 
  From: Julien Martin [mailto:bal...@gmail.com]
  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=0x7f68840a2800
  nid=0x41b5
  in
  Object.wait() [0x7f690cc57000]
 java.lang.Thread.State: WAITING (on object monitor)
  at java.lang.Object.wait(Native Method)
  - waiting on 0x0007e8fc4650 (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 0x0007e8fc4650 (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-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 
  --
 
  [key:62590808]
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 


 --

 [key:62590808]

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




Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Pid
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 p...@pidster.com
 
 On 22/03/2013 14:56, Julien Martin wrote:
 Hi,
 You mean if I set maxActive to 1?


 J.

 2013/3/22 Pid p...@pidster.com

 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=180 /
 property name=numTestsPerEvictionRun value=3 /
 property name=minEvictableIdleTimeMillis value=180 /
 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.caldar...@unisys.com

 From: Julien Martin [mailto:bal...@gmail.com]
 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=0x7f68840a2800
 nid=0x41b5
 in
 Object.wait() [0x7f690cc57000]
java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x0007e8fc4650 (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 0x0007e8fc4650 (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-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org





 --

 [key:62590808]

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





 --

 [key:62590808]

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


 


-- 

[key:62590808]

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



Re: My use of Spring MVC's DeferredResult class causes Tomcat 7.0.35 to crash silently

2013-03-22 Thread Daniel Mikusa
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=180 /
 property name=numTestsPerEvictionRun value=3 /
 property name=minEvictableIdleTimeMillis value=180 /
 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.caldar...@unisys.com
 
 From: Julien Martin [mailto:bal...@gmail.com]
 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=0x7f68840a2800 nid=0x41b5
 in
 Object.wait() [0x7f690cc57000]
   java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on 0x0007e8fc4650 (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 0x0007e8fc4650 (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-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: Where does Tomcat log the logAbandoned information?

2013-03-22 Thread Pid
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 p...@pidster.com
 
 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
 180 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-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


 


-- 

[key:62590808]

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



Re: [totally OT] Tomcat Behavior on Multiple HTTP requests from same browser

2013-03-22 Thread André Warnier

Caldarale, Charles R wrote:
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 
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.


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



Re: [totally OT] Tomcat Behavior on Multiple HTTP requests from same browser

2013-03-22 Thread Mark Eggers

On 3/22/2013 9:35 AM, André Warnier wrote:

Caldarale, Charles R wrote:

From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 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.


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/


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



Re: Where does Tomcat log the logAbandoned information?

2013-03-22 Thread Julien Martin
Any idea what the logs should look like? Any sample?
J.

2013/3/22 Pid p...@pidster.com

 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 p...@pidster.com
 
  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
  180 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-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 


 --

 [key:62590808]

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




Diagnosing Silently Frozen Tomcats

2013-03-22 Thread Robinson, Eric
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@tomcat.apache.org. 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/


Re: Diagnosing Silently Frozen Tomcats

2013-03-22 Thread Mark Eggers

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/

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



RE: Diagnosing Silently Frozen Tomcats

2013-03-22 Thread Carrillo, Dan
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.robin...@psmnv.com] 
Sent: Friday, March 22, 2013 1:37 PM
To: users@tomcat.apache.org
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@tomcat.apache.org. 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/


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



RE: Diagnosing Silently Frozen Tomcats

2013-03-22 Thread Robinson, Eric
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/

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



Re: Diagnosing Silently Frozen Tomcats

2013-03-22 Thread Mark Thomas
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


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



Re: [totally OT] Tomcat Behavior on Multiple HTTP requests from same browser

2013-03-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chuck,

On 3/22/13 10:25 AM, Caldarale, Charles R wrote:
 From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 
 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-

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



Re: [totally OT] Tomcat Behavior on Multiple HTTP requests from same browser

2013-03-22 Thread Christopher Schultz
-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.jan...@polydyne.com]
 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-

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



Re: Diagnosing Silently Frozen Tomcats

2013-03-22 Thread Mark Eggers

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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Diagnosing Silently Frozen Tomcats

2013-03-22 Thread Christopher Schultz
-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-

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



Re: virtual directory

2013-03-22 Thread Christopher Schultz
-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-

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



Re: Diagnosing Silently Frozen Tomcats

2013-03-22 Thread Michael Gesundheit
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_toas...@yahoo.com wrote:

 From: Mark Eggers its_toas...@yahoo.com
 Subject: Re: Diagnosing Silently Frozen Tomcats
 To: users@tomcat.apache.org
 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-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: Diagnosing Silently Frozen Tomcats

2013-03-22 Thread Robinson, Eric

 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/

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



RE: Diagnosing Silently Frozen Tomcats

2013-03-22 Thread Robinson, Eric

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

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



RE: [totally OT] Tomcat Behavior on Multiple HTTP requests from same browser

2013-03-22 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 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...

Agh.

 - 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: Executable Tomcat JAR/WAR executes fine standalone, classloading errors in JNLP

2013-03-22 Thread Nick Williams

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.
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org