Error in DBCP Connection Pool with tomcat 6.x
Hi Tomcat Team, Please help me out in solving below error. Below is the details : Configuration in my context.xml Resource name=jdbc/ABC auth=Container type=javax.sql.DataSource maxActive=50 maxIdle=10 maxWait=1 username=ABC password=ABC removeAbandoned=true logAbandoned=true testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=3 validationQuery=SELECT 1 FROM dual driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@MY_DB / ==Error Message at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:679) Caused by: org.springframework.transaction.TransactionSystemException: Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:486) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777) at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at sun.proxy.$Proxy185.selectPharmaUser(Unknown Source) at com.aptilon.axcelrx.server.service.impl.AuthenticationServiceImpl.login(AuthenticationServiceImpl.java:170) at com.aptilon.axcelrx.server.ws.endpoint.AuthenticationEndpoint.login_aroundBody0(AuthenticationEndpoint.java:110) ... 45 more Caused by: javax.persistence.PersistenceException: unexpected error when rollbacking at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:88) at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:482) ... 54 more Caused by: org.hibernate.exception.GenericJDBCException: Cannot release connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:478) at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429) at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:316) at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:248) at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:208) at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:85) ... 55 more Caused by: java.sql.SQLException: Already closed. at org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:114) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191) at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97) at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474) ... 60 more === Your help in this regard is highly appreciated. Thanks Regards, Vijendra - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Apache Tomcat7 service start randomly after the installation of McAfee antivirus.
Good morning, We have 4 identical servers with a scheduled task running every night on each of them. This task Stop Tomcat - Update some data - Start Tomcat. This worked fine for months. We have installed a new antivirus McAfee 3 weeks ago. Now the Tomcat7 service starts randomly. At least 1 of the 4 server needs a manual start of the Tomcat7 service every morning. Do you know if there is specifics problems between Tomcat and Mc Afee ? We have already tried to exclude Tomcat.exe from McAfee scanning. Is there other thing we could exclude without compromising the security ? Configuration: Windows server 2008 R2 Standard - SP1 Apache Tomcat 7.0.29 Server McAffee Agent 4.8.0.1500 Mcafee VirusScan Enterprise 8.8.04001 Thanks, have a nice day, Philippe Blachon. Please consider the environment before printing this email or its attachment(s). Please note that this message may contain confidential information. If you have received this message in error, please notify me and then delete it from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Release schedule for 7.0.55?
Hi, Is there any schedule to release 7.0.55? I hope to have a fix for 56529 in my project deployment. Thanks in advance, Woonsan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat7 service start randomly after the installation of McAfee antivirus.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Philipe, On 7/1/14, 3:57 AM, Blachon, Philippe wrote: We have 4 identical servers with a scheduled task running every night on each of them. This task Stop Tomcat - Update some data - Start Tomcat. This worked fine for months. We have installed a new antivirus McAfee 3 weeks ago. Now the Tomcat7 service starts randomly. At least 1 of the 4 server needs a manual start of the Tomcat7 service every morning. So the service starts randomly (spontaneously), or there are random occasions where Tomcat appears not to re-start after the scheduled stop/start dance? It sounds like the latter. Anything in the log files indicating that Tomcat even /tried/ to start? Do you know if there is specifics problems between Tomcat and McAfee? None that I know of. We have already tried to exclude Tomcat.exe from McAfee scanning. Is there other thing we could exclude without compromising the security? Configuration: Windows server 2008 R2 Standard - SP1 Apache Tomcat 7.0.29 Server McAffee Agent 4.8.0.1500 Mcafee VirusScan Enterprise 8.8.04001 You should check the log files -- likely something like catalina* in your logs directory. The filename can be changed in the service runner, so the file does not necessarily have a predictable name. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTsrwCAAoJEBzwKT+lPKRYIz8QAK3Z5+/7KQdSvtGKNuAC8+Zb 27FCOb6yQfE1YgYW0bw7GFER49asPis1WSBi/NzTPFVlnoaq3WUB+jUyASUtWZj6 pLllaVgHP2TSAQd90K6MJb83Iva+Oszas85jR2H/eNAitJRD0u3YePkllF+bBkPb yI8pGY4qWkCCV+0m/cdscaj4EmzH0cI7HIc0fvxQw4aluDXmcDi8WoyEU2WV95wW 30h82BUs4aeuUb7LY6v+HNfwqPfhbiiPVhRW7q0u17PXk/FCOhIfLLG31FaYqpkO Md56Sbh4xQ6KRSTSZG19Kls18LxM0qcHHk5CZtUtuBryk1PlcdMvKq9G/dDjUT5W dKPs6nff/Cg/0O/16mMTp7HsxZl8choBUPy/hXAD4hyPWM5FPweGmGSg0rF1dhH2 M8v76Cdl2uwjuXlLH6qD6wmTEKh+00n1eGLLYTOX4bOGPS1+ugtdnD/NM1R7ean3 77kO5st+w2X/NeziBzhPNW9QJ1UJ7fGE/wZjR5U8aj/+XulUpTY9uoqi6TisBLvt nP4JAXsh+SosCFK3NJgECJ02dMwbgnE5Dnk0g4uZ708MxotZQYNY71l1qJMCRHhz cuRgywJF14suO3UhYVcgbsmO3uFchrf4bZFXk5m8UeIbzJytgZbvCnjo61FuTHz3 VOM85Bsk81WU5MQpL2Vu =wBcZ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Error in DBCP Connection Pool with tomcat 6.x
-Original Message- From: Vijendra Pachoriya [mailto:vijendra.pachor...@indegene.com] Sent: Tuesday, July 01, 2014 2:31 AM To: users@tomcat.apache.org Cc: Alok Roy Subject: Error in DBCP Connection Pool with tomcat 6.x Hi Tomcat Team, Please help me out in solving below error. Below is the details : Configuration in my context.xml Resource name=jdbc/ABC auth=Container type=javax.sql.DataSource maxActive=50 maxIdle=10 maxWait=1 username=ABC password=ABC removeAbandoned=true logAbandoned=true testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=3 validationQuery=SELECT 1 FROM dual driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@MY_DB / ==Error Message at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:679) Caused by: org.springframework.transaction.TransactionSystemException: Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:486) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777) at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at sun.proxy.$Proxy185.selectPharmaUser(Unknown Source) at com.aptilon.axcelrx.server.service.impl.AuthenticationServiceImpl.login(AuthenticationServiceImpl.java:170) at com.aptilon.axcelrx.server.ws.endpoint.AuthenticationEndpoint.login_aroundBody0(AuthenticationEndpoint.java:110) ... 45 more Caused by: javax.persistence.PersistenceException: unexpected error when rollbacking at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:88) at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:482) ... 54 more Caused by: org.hibernate.exception.GenericJDBCException: Cannot release connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:478) at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429) at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:316) at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:248) at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:208) at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:85) ... 55 more Caused by: java.sql.SQLException: Already closed. at org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:114) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191) at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97) at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474) ... 60 more === Your help in this regard is highly appreciated. Thanks Regards, Vijendra --- I've also got these attributes in my xml file, FWIW. name=jdbc/myoracle timeBetweenEvictionRunsMillis=-1 (you show 3) - I think I had to move it to this to avoid some faulty issue, per Konstantin minEvictableIdleTimeMillis=28800 removeAbandonedTimeout=300 logAbandoned=false I say this, because I, too, was
Re: Release schedule for 7.0.55?
Hi, 2014-07-01 16:26 GMT+03:00 Woonsan Ko woon_...@yahoo.com.invalid: Hi, Is there any schedule to release 7.0.55? Follow http://marc.info/?t=14032945371r=1w=2 Regards Violeta I hope to have a fix for 56529 in my project deployment. Thanks in advance, Woonsan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where can I store data files in a tomcat war
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 6/30/14, 4:23 PM, Mark Eggers wrote: Chris, On 6/30/2014 12:10 PM, Christopher Schultz wrote: Mark, On 6/27/14, 4:40 PM, Mark Eggers wrote: Paul, On 6/27/2014 1:25 PM, Paul Taylor wrote: On 27/06/2014 19:59, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Paul, On 6/27/14, 8:34 AM, Paul Taylor wrote: I have a simple WAR based web application that uses lucene created indexes to provide search results in a xml format, the location of the indexes (outside of the war) are referred in the web.xml. It works fine locally but I want to deploy it using Elastic Beanstalk within Amazon Webservices but for it to work I need the data files within the war, then I can allow EB to create new instances when load balancing/scaling and it will work because the data fields are included in the war at deployment time. I have checked that EB does unjar the war so that when my code comes to use the files they will be real files not still contained within the War. With that in mind where could i put the data files so they not considered by tomcat as java classes , and supplementary question how do I modify my pom file to do this with maven What? Java won't try to load random files as .class files. I tried putting the files into the resources directory of my maven project, when I deployed the resulting war it would start (did previously) and opening the war found the files were added under WEB-INF/classes, that is what I meant. So I need to put them somewhere else. It sounds like you're not building these within the deployed application, but adding them at build time. Why can't your application read the files from WEB-INF/classes with getResourceAsStream? I think the issue is that Lucene reads a bunch of files to manage its index, and there is not (currently) an implementation that can ready them out of a ZIP archive. So I think Paul needs to expand the assets to the disk and then use the Lucene classes that do understand the disk. I know you can use a RDBMS to back a Lucene index, so I'm surprised there isn't anything (that I could see on my quick review) to support loading from a ZIP resource. -chris I guess I'm a little confused as to what this means. I have a simple WAR based web application that uses Lucene created indexes to provide search results in a xml format. Especially given the following context: and supplementary question how do I modify my pom file to do this with maven I was under the impression that Paul was building a separate application using Lucene during the build stage to create the indexes, but then using an application - specific mechanism to use those indexes. That's what I thought, too. If Paul is using Lucene API (Document, DirectoryReader, etc.), then accessing them if they're packed in a JAR or WAR will be a bit difficult. Apparently Lucene requires random access to the directory listing, which isn't available (I think) with the normal JAR utilities. Right: that's why I suggested that his application extract the indexes to regular files on the disk in order to read them using Lucene. If the Lucene API is used, then writing a servlet context listener that digs out the initial indexes and places them in java.io.tmpdir in a known subdirectory is probably the way to go. This ensures that even if a WAR file is not exploded, the Lucene DirectoryReader API can get to the files. That's precisely what I was suggesting. Another way to approach this is to extend DirectoryReader and implement something like TrueVFS, but that seems to be way more work than it's worth. Yes, I think it is more work than necessary. Extracting to the fs will be the simplest solution IMO. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTstC7AAoJEBzwKT+lPKRYoKAQAKLAzj3hway9z6jhDvt1XCP1 dGk7h5/6iO4p6Rn49GYZzQmkMEQ1rVqYcmj4L/PX10UP18A3D6nAmEVCoZDCEl8H khCXkLUPsWU/zNe175eC9OLidoKuCsgDlypNR/6x2WltbEK8Vcv13XfJocCPf2Qw wSGp0+C7/bKljDg59uDmM/zMQH6kDT/n0uMiz2Y8TO7vi9rD1el0TcMg5t/ZcXqO qctXB6oWCXixdWp45U8PkZEEQML7m7bh/AbrXq9CtahVTdX2QHvEP4SzFPhoFpTC SIiGfs01B7shWMTgr0yoUVPr9BYYtxU2u1YhQM1dGCYLvQvd12gqoVo5uHQS9506 fEKGuIiLZkDDWNCQXqK7o3R6mJnThrvy8f0EPy4KSI9Glfnb42FrFkFn+W0PGBjc VDs2iJX6Bp/4Bk0YWvJyPQPAfCbnYSQow0SqK+hlraK6tMh6wRZLkqgkRAErd6h/ 5eQOg4oCrJXBm3+GZlqYl1FUUgzY9TmCoptV2G5L0Sjo7ieAkBDz6ZdE+DNJQnjV lL+JkfeHlK/zcGYr9eNP32dWglATIFw8HFUku4dgsVjecP5frPC1dVHf868RQDLt 1JxccdedEp+gYOPRCyDb8+NlQqmcTpF7gafjzr54mYrLU2MFvOGaSEXX02Ore1XG 949GyjZ3wloBB3aD3Js1 =wvlO -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error in DBCP Connection Pool with tomcat 6.x
Looks like your code already called java.sql.Connection.close() and then attempts to use the connection again Filip On Tue, Jul 1, 2014 at 8:09 AM, Propes, Barry L barry.l.pro...@citi.com wrote: -Original Message- From: Vijendra Pachoriya [mailto:vijendra.pachor...@indegene.com] Sent: Tuesday, July 01, 2014 2:31 AM To: users@tomcat.apache.org Cc: Alok Roy Subject: Error in DBCP Connection Pool with tomcat 6.x Hi Tomcat Team, Please help me out in solving below error. Below is the details : Configuration in my context.xml Resource name=jdbc/ABC auth=Container type=javax.sql.DataSource maxActive=50 maxIdle=10 maxWait=1 username=ABC password=ABC removeAbandoned=true logAbandoned=true testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=3 validationQuery=SELECT 1 FROM dual driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@MY_DB / ==Error Message at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:679) Caused by: org.springframework.transaction.TransactionSystemException: Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:486) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777) at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at sun.proxy.$Proxy185.selectPharmaUser(Unknown Source) at com.aptilon.axcelrx.server.service.impl.AuthenticationServiceImpl.login(AuthenticationServiceImpl.java:170) at com.aptilon.axcelrx.server.ws.endpoint.AuthenticationEndpoint.login_aroundBody0(AuthenticationEndpoint.java:110) ... 45 more Caused by: javax.persistence.PersistenceException: unexpected error when rollbacking at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:88) at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:482) ... 54 more Caused by: org.hibernate.exception.GenericJDBCException: Cannot release connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:478) at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429) at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:316) at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:248) at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:208) at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:85) ... 55 more Caused by: java.sql.SQLException: Already closed. at org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:114) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191) at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97) at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474) ... 60 more === Your help in this regard is highly appreciated. Thanks Regards, Vijendra --- I've also got these attributes in my xml file,
Re: jkmanager: how to interpret Current number of backend connections
On Mon, Jun 30, 2014 at 5:18 PM, Martin Knoblauch knobis...@gmail.com wrote: Hi, our environment is (I know, some are old ...): Apache 2.2.21 mod_jk-1.2.40 Tomcat 7.0.42 My question is how to interpret the numbers from jkmanager, expecially the Busy/Max/Con numbers. Busy and Max make sense to me. Busy is always less than Max and Max gets bumped up from time to time. Matches the description. Now, Con seems to grow steadily over time and is not reset when we do a manual Reset of the worker status. Somehow this does not match the description of Current number of backend connections. At least not for me :-) Cheers Martin OK, seems the continuous growing of the Current number of backend connections numbers is related to having timeouts configured. It also seems to have started between mod_jk-1.2.32 and mod_jk-1.2.37. I can see some heavy redo of the handling of the connected counter. In any case, the following configuration seems to trigger the behaviour: worker.template.type=ajp13 worker.template.lbfactor=1 worker.template.prepost_timeout=15000 worker.template.connect_timeout=15000 worker.template.ping_timeout=15000 worker.template.ping_mode=A worker.template.connection_ping_interval=180 worker.template.retries=3 worker.template.connection_pool_timeout=30 Without setting the timeout values, the displayed number of backend connections seems to be stable. I suspect a missing decrement somewhere, just hard to say where. Cheers Martin -- -- Martin Knoblauch email: k n o b i AT knobisoft DOT de www: http://www.knobisoft.de
Re: Stop Tomcat8 Service Gracefully on Windows
Hi Mark -- Thank you for replying. Here is a thread dump from about 30 seconds after I request to stop the service. Can you tell which thread is preventing the JVM from exiting? Thanks again! 2014-07-01 09:09:00 Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode): DestroyJavaVM - Thread t@78 java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None Thread-24 - Thread t@61 java.lang.Thread.State: RUNNABLE at sun.net.dns.ResolverConfigurationImpl.notifyAddrChange0(Native Method) at sun.net.dns.ResolverConfigurationImpl$AddressChangeListener.run(Unknown Source) Locked ownable synchronizers: - None RMI TCP Connection(4)-192.168.0.7 - Thread t@48 java.lang.Thread.State: RUNNABLE at sun.management.ThreadImpl.dumpThreads0(Native Method) at sun.management.ThreadImpl.dumpAllThreads(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.Trampoline.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.MethodUtil.invoke(Unknown Source) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source) at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source) at javax.management.StandardMBean.invoke(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - locked 6cb0e9eb (a java.util.concurrent.ThreadPoolExecutor$Worker) RMI TCP Connection(3)-192.168.0.7 - Thread t@47 java.lang.Thread.State: TIMED_WAITING at java.lang.Object.wait(Native Method) - waiting on 18e5eaed (a com.sun.jmx.remote.internal.ArrayNotificationBuffer) at com.sun.jmx.remote.internal.ArrayNotificationBuffer.fetchNotifications(Unknown Source) at com.sun.jmx.remote.internal.ArrayNotificationBuffer$ShareBuffer.fetchNotifications(Unknown Source) at com.sun.jmx.remote.internal.ServerNotifForwarder.fetchNotifs(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$3.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$3.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.fetchNotifications(Unknown Source) at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
Re: Embedded Tomcat question
I looked for the source code, at least on github, there's no tag for 7.0.55 defined (see [1]) How do I get access to a StandardContext? CAn I cast the Context object? [1]: https://github.com/apache/tomcat On Mon, Jun 30, 2014 at 4:51 AM, Mark Thomas ma...@apache.org wrote: On 30/06/2014 01:27, John D. Ament wrote: I spoke a little too quickly, ServletContext is avilable from ctx (just didn't search hard enough). Adding the request listener here though results in: java.lang.NullPointerException at org.apache.catalina.core.ApplicationContext.createListener(ApplicationContext.java:1402) at org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1307) at org.apache.catalina.core.ApplicationContextFacade.addListener(ApplicationContextFacade.java:636) A quick look in the source code will tell you why you are getting an NPE here. You can't add a ServletRequestListener directly. There are a couple of ways to do this. Probably the simplest is to create a ServletContextListener, add that directly to Tomcat's StandardContext with addApplicationLifecycleListener() and then from that ServletContextListener add and request and/or session listeners from the contextInitialized() event. You could also do this with a ServletContainerInitializer. Mark On Sun, Jun 29, 2014 at 8:21 PM, John D. Ament john.d.am...@gmail.com wrote: Hi, I'm on Tomcat 7.0.54, though I would hope your APIs aren't volatile enough that your internals should matter.. I tried this: Wrapper wrapper = Tomcat.addServlet(ctx,Greeter,GreeterServlet.class.getName()); wrapper.addMapping(/*); wrapper.getServlet().getServletConfig().getServletContext().addListener(MyListener.class); This results in a NPE. This makes me think I don't have access to the context yet. I would actually think it's somewhere in this chain: tomcat = new Tomcat(); tomcat.setPort(8080); File base = new File(target/webapp-runner); if(!base.exists()) { base.mkdirs(); } Context ctx = tomcat.addContext(/,base.getAbsolutePath()); however, it doesn't look like Context here is a ServletContext. On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: John D. Ament [mailto:john.d.am...@gmail.com] Subject: Embedded Tomcat question Playing around a bit with embedded tomcat. It looks like there are APIs to add all of the tomcat specific listeners, however how would I add a ServletRequestListener? Look in the servlet spec for the version of Tomcat you're using (which you didn't mention), and the JavaDoc for ServletContext (e.g., addListener). - 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 - 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: Embedded Tomcat question
On 01/07/2014 17:16, John D. Ament wrote: I looked for the source code, at least on github, there's no tag for 7.0.55 defined (see [1]) Given you are using 7.0.54, why would you look for a tag for 7.0.55? How do I get access to a StandardContext? CAn I cast the Context object? Yes. It would have taken less time to try that than it did to type the question. Mark [1]: https://github.com/apache/tomcat On Mon, Jun 30, 2014 at 4:51 AM, Mark Thomas ma...@apache.org wrote: On 30/06/2014 01:27, John D. Ament wrote: I spoke a little too quickly, ServletContext is avilable from ctx (just didn't search hard enough). Adding the request listener here though results in: java.lang.NullPointerException at org.apache.catalina.core.ApplicationContext.createListener(ApplicationContext.java:1402) at org.apache.catalina.core.ApplicationContext.addListener(ApplicationContext.java:1307) at org.apache.catalina.core.ApplicationContextFacade.addListener(ApplicationContextFacade.java:636) A quick look in the source code will tell you why you are getting an NPE here. You can't add a ServletRequestListener directly. There are a couple of ways to do this. Probably the simplest is to create a ServletContextListener, add that directly to Tomcat's StandardContext with addApplicationLifecycleListener() and then from that ServletContextListener add and request and/or session listeners from the contextInitialized() event. You could also do this with a ServletContainerInitializer. Mark On Sun, Jun 29, 2014 at 8:21 PM, John D. Ament john.d.am...@gmail.com wrote: Hi, I'm on Tomcat 7.0.54, though I would hope your APIs aren't volatile enough that your internals should matter.. I tried this: Wrapper wrapper = Tomcat.addServlet(ctx,Greeter,GreeterServlet.class.getName()); wrapper.addMapping(/*); wrapper.getServlet().getServletConfig().getServletContext().addListener(MyListener.class); This results in a NPE. This makes me think I don't have access to the context yet. I would actually think it's somewhere in this chain: tomcat = new Tomcat(); tomcat.setPort(8080); File base = new File(target/webapp-runner); if(!base.exists()) { base.mkdirs(); } Context ctx = tomcat.addContext(/,base.getAbsolutePath()); however, it doesn't look like Context here is a ServletContext. On Sun, Jun 29, 2014 at 6:30 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: John D. Ament [mailto:john.d.am...@gmail.com] Subject: Embedded Tomcat question Playing around a bit with embedded tomcat. It looks like there are APIs to add all of the tomcat specific listeners, however how would I add a ServletRequestListener? Look in the servlet spec for the version of Tomcat you're using (which you didn't mention), and the JavaDoc for ServletContext (e.g., addListener). - 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat8: delayed file operations with webdav
Hi, I'm about to set up a webdav server on a stock Tomcat 8.0.9 (RHEL 6.5 x86_64). To do so, I installed a dummy application with the web.xml attached to this message, altered the conf/tomcat-users.xml and started the tomcat server. Now when uploading a file it doesn't show up immediately. Which is quite confusing for an application that does a PROPFIND right after PUTting the file, which results in a 404. Or, even worse, in a 500 when trying to MOVE or COPY the file. Example: (1) dav:/webdav/ ls Listing collection `/webdav/': collection is empty. dav:/webdav/ put testfile.bin Uploading testfile.bin to `/webdav/testfile.bin': Progress: [=] 100,0% of 102400 bytes succeeded. dav:/webdav/ propget testfile.bin Fetching properties for `testfile.bin': failed: 404 Not Found [now I'm waiting for a couple of seconds] dav:/webdav/ propget testfile.bin Fetching properties for `testfile.bin': DAV: creationdate = 2014-07-01T16:29:35Z DAV: displayname = testfile.bin DAV: getlastmodified = Tue, 01 Jul 2014 16:29:35 GMT DAV: getcontentlength = 102400 DAV: getcontenttype = application/octet-stream DAV: getetag = W/102400-1404232175000 DAV: resourcetype = DAV: source = DAV: supportedlock = DAV:lockentryDAV:lockscopeDAV:exclusive/DAV:exclusive/DAV:lockscopeDAV:locktypeDAV:write/DAV:write/DAV:locktype/DAV:lockentryDAV:lockentryDAV:lockscopeDAV:shared/DAV:shared/DAV:lockscopeDAV:locktypeDAV:write/DAV:write/DAV:locktype/DAV:lockentry (2) dav:/webdav/ rm testfile.bin Deleting `testfile.bin': succeeded. dav:/webdav/ ls Listing collection `/webdav/': collection is empty. dav:/webdav/ put testfile.bin testfile.bin.tmp Uploading testfile.bin to `/webdav/testfile.bin.tmp': Progress: [=] 100,0% of 102400 bytes succeeded. dav:/webdav/ move testfile.bin.tmp testfile.bin Moving `/webdav/testfile.bin.tmp' to `/webdav/testfile.bin': failed: 500 Internal Server Error [again, waiting for a couple of seconds] dav:/webdav/ move testfile.bin.tmp testfile.bin Moving `/webdav/testfile.bin.tmp' to `/webdav/testfile.bin': succeeded. Why is tomcat behaving like this and how do I configure it to allow immediate file operations after upload? AFAICT this is not a client issue. I've tested with cadaver, the Gnome and KDE file browsers and owncloud. Kind regards, Philippe ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.5 display-namewebdav/display-name descriptionwebdav access/description servlet servlet-namewebdav/servlet-name servlet-classorg.apache.catalina.servlets.WebdavServlet/servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param init-param param-namelistings/param-name param-valuetrue/param-value /init-param init-param param-namereadonly/param-name param-valuefalse/param-value /init-param !-- allow access to WEB-INF and META-INF -- !-- init-param param-nameallowSpecialPaths/param-name param-valuetrue/param-value /init-param -- /servlet !-- change to /foo/* to enable webdav only in /foo -- servlet-mapping servlet-namewebdav/servlet-name url-pattern/*/url-pattern /servlet-mapping security-constraint web-resource-collection web-resource-nameWebDAV/web-resource-name url-pattern/*/url-pattern http-methodCANCELUPLOAD/http-method http-methodCHECKIN/http-method http-methodCHECKOUT/http-method http-methodCOPY/http-method http-methodDELETE/http-method http-methodGET/http-method http-methodGETLIB/http-method http-methodHEAD/http-method http-methodLOCK/http-method http-methodMKCOL/http-method http-methodMOVE/http-method http-methodPROPFIND/http-method http-methodPROPPATCH/http-method http-methodPUT/http-method http-methodREPORT/http-method http-methodUNCHECKOUT/http-method http-methodUNLOCK/http-method http-methodUPDATE/http-method http-methodVERSION-CONTROL/http-method /web-resource-collection !-- force https -- !-- user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint -- auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method !-- auth-methodDIGEST/auth-method -- realm-nameWebDAV/realm-name /login-config security-role descriptionWebDAV User/description role-namewebdav/role-name /security-role distributable / /web-app - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat8: delayed file operations with webdav
On 01/07/2014 17:37, Philippe wrote: Hi, I'm about to set up a webdav server on a stock Tomcat 8.0.9 (RHEL 6.5 x86_64). To do so, I installed a dummy application with the web.xml attached to this message, altered the conf/tomcat-users.xml and started the tomcat server. Now when uploading a file it doesn't show up immediately. Which is quite confusing for an application that does a PROPFIND right after PUTting the file, which results in a 404. Or, even worse, in a 500 when trying to MOVE or COPY the file. Try disabling static resource caching on the context. Mark Example: (1) dav:/webdav/ ls Listing collection `/webdav/': collection is empty. dav:/webdav/ put testfile.bin Uploading testfile.bin to `/webdav/testfile.bin': Progress: [=] 100,0% of 102400 bytes succeeded. dav:/webdav/ propget testfile.bin Fetching properties for `testfile.bin': failed: 404 Not Found [now I'm waiting for a couple of seconds] dav:/webdav/ propget testfile.bin Fetching properties for `testfile.bin': DAV: creationdate = 2014-07-01T16:29:35Z DAV: displayname = testfile.bin DAV: getlastmodified = Tue, 01 Jul 2014 16:29:35 GMT DAV: getcontentlength = 102400 DAV: getcontenttype = application/octet-stream DAV: getetag = W/102400-1404232175000 DAV: resourcetype = DAV: source = DAV: supportedlock = DAV:lockentryDAV:lockscopeDAV:exclusive/DAV:exclusive/DAV:lockscopeDAV:locktypeDAV:write/DAV:write/DAV:locktype/DAV:lockentryDAV:lockentryDAV:lockscopeDAV:shared/DAV:shared/DAV:lockscopeDAV:locktypeDAV:write/DAV:write/DAV:locktype/DAV:lockentry (2) dav:/webdav/ rm testfile.bin Deleting `testfile.bin': succeeded. dav:/webdav/ ls Listing collection `/webdav/': collection is empty. dav:/webdav/ put testfile.bin testfile.bin.tmp Uploading testfile.bin to `/webdav/testfile.bin.tmp': Progress: [=] 100,0% of 102400 bytes succeeded. dav:/webdav/ move testfile.bin.tmp testfile.bin Moving `/webdav/testfile.bin.tmp' to `/webdav/testfile.bin': failed: 500 Internal Server Error [again, waiting for a couple of seconds] dav:/webdav/ move testfile.bin.tmp testfile.bin Moving `/webdav/testfile.bin.tmp' to `/webdav/testfile.bin': succeeded. Why is tomcat behaving like this and how do I configure it to allow immediate file operations after upload? AFAICT this is not a client issue. I've tested with cadaver, the Gnome and KDE file browsers and owncloud. Kind regards, Philippe - 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: Stop Tomcat8 Service Gracefully on Windows
On 01/07/2014 17:13, Igal @ getRailo.org wrote: Hi Mark -- Thank you for replying. Here is a thread dump from about 30 seconds after I request to stop the service. Can you tell which thread is preventing the JVM from exiting? No, because the thread dump doesn't show whether a thread is a daemon thread or not (which is odd - I thought the standard thread dump did show that). My guess would be the timer threads. Use one of the many tools that come with the JDK (or a profiler) to look at the threads and see which non-daemon threads are still running. Mark Thanks again! 2014-07-01 09:09:00 Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode): DestroyJavaVM - Thread t@78 java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None Thread-24 - Thread t@61 java.lang.Thread.State: RUNNABLE at sun.net.dns.ResolverConfigurationImpl.notifyAddrChange0(Native Method) at sun.net.dns.ResolverConfigurationImpl$AddressChangeListener.run(Unknown Source) Locked ownable synchronizers: - None RMI TCP Connection(4)-192.168.0.7 - Thread t@48 java.lang.Thread.State: RUNNABLE at sun.management.ThreadImpl.dumpThreads0(Native Method) at sun.management.ThreadImpl.dumpAllThreads(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.Trampoline.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.MethodUtil.invoke(Unknown Source) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source) at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source) at javax.management.StandardMBean.invoke(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - locked 6cb0e9eb (a java.util.concurrent.ThreadPoolExecutor$Worker) RMI TCP Connection(3)-192.168.0.7 - Thread t@47 java.lang.Thread.State: TIMED_WAITING at java.lang.Object.wait(Native Method) - waiting on 18e5eaed (a com.sun.jmx.remote.internal.ArrayNotificationBuffer) at com.sun.jmx.remote.internal.ArrayNotificationBuffer.fetchNotifications(Unknown Source) at com.sun.jmx.remote.internal.ArrayNotificationBuffer$ShareBuffer.fetchNotifications(Unknown Source) at com.sun.jmx.remote.internal.ServerNotifForwarder.fetchNotifs(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$3.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$3.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.fetchNotifications(Unknown Source) at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source) at
Re: Stop Tomcat8 Service Gracefully on Windows
I generated this with VisualVM. I will try to generate in a different way, or to inspect the threads within the 60 seconds window as you suggested. Thank you, Igal On Jul 1, 2014 9:42 AM, Mark Thomas ma...@apache.org wrote: On 01/07/2014 17:13, Igal @ getRailo.org wrote: Hi Mark -- Thank you for replying. Here is a thread dump from about 30 seconds after I request to stop the service. Can you tell which thread is preventing the JVM from exiting? No, because the thread dump doesn't show whether a thread is a daemon thread or not (which is odd - I thought the standard thread dump did show that). My guess would be the timer threads. Use one of the many tools that come with the JDK (or a profiler) to look at the threads and see which non-daemon threads are still running. Mark Thanks again! 2014-07-01 09:09:00 Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode): DestroyJavaVM - Thread t@78 java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None Thread-24 - Thread t@61 java.lang.Thread.State: RUNNABLE at sun.net.dns.ResolverConfigurationImpl.notifyAddrChange0(Native Method) at sun.net.dns.ResolverConfigurationImpl$AddressChangeListener.run(Unknown Source) Locked ownable synchronizers: - None RMI TCP Connection(4)-192.168.0.7 - Thread t@48 java.lang.Thread.State: RUNNABLE at sun.management.ThreadImpl.dumpThreads0(Native Method) at sun.management.ThreadImpl.dumpAllThreads(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.Trampoline.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.MethodUtil.invoke(Unknown Source) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source) at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source) at javax.management.StandardMBean.invoke(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - locked 6cb0e9eb (a java.util.concurrent.ThreadPoolExecutor$Worker) RMI TCP Connection(3)-192.168.0.7 - Thread t@47 java.lang.Thread.State: TIMED_WAITING at java.lang.Object.wait(Native Method) - waiting on 18e5eaed (a com.sun.jmx.remote.internal.ArrayNotificationBuffer) at com.sun.jmx.remote.internal.ArrayNotificationBuffer.fetchNotifications(Unknown Source) at com.sun.jmx.remote.internal.ArrayNotificationBuffer$ShareBuffer.fetchNotifications(Unknown Source) at com.sun.jmx.remote.internal.ServerNotifForwarder.fetchNotifs(Unknown Source) at
Re: tomcat8: delayed file operations with webdav
Hi Mark, On 01.07.2014 18:40, Mark Thomas wrote: Try disabling static resource caching on the context. thanks, but that didn't help. conf/context.xml: Context cachingAllowed=false ... Kind regards, Philippe - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Stop Tomcat8 Service Gracefully on Windows
The offending thread was: ehcache.data Thank you for your help and insight, Igal On 7/1/2014 9:46 AM, Igal Sapir wrote: I generated this with VisualVM. I will try to generate in a different way, or to inspect the threads within the 60 seconds window as you suggested. Thank you, Igal On Jul 1, 2014 9:42 AM, Mark Thomas ma...@apache.org mailto:ma...@apache.org wrote: On 01/07/2014 17:13, Igal @ getRailo.org wrote: Hi Mark -- Thank you for replying. Here is a thread dump from about 30 seconds after I request to stop the service. Can you tell which thread is preventing the JVM from exiting? No, because the thread dump doesn't show whether a thread is a daemon thread or not (which is odd - I thought the standard thread dump did show that). My guess would be the timer threads. Use one of the many tools that come with the JDK (or a profiler) to look at the threads and see which non-daemon threads are still running. Mark Thanks again! 2014-07-01 09:09:00 Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode): DestroyJavaVM - Thread t@78 java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None Thread-24 - Thread t@61 java.lang.Thread.State: RUNNABLE at sun.net.dns.ResolverConfigurationImpl.notifyAddrChange0(Native Method) at sun.net.dns.ResolverConfigurationImpl$AddressChangeListener.run(Unknown Source) Locked ownable synchronizers: - None RMI TCP Connection(4)-192.168.0.7 - Thread t@48 java.lang.Thread.State: RUNNABLE at sun.management.ThreadImpl.dumpThreads0(Native Method) at sun.management.ThreadImpl.dumpAllThreads(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.Trampoline.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.MethodUtil.invoke(Unknown Source) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source) at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source) at javax.management.StandardMBean.invoke(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - locked 6cb0e9eb (a java.util.concurrent.ThreadPoolExecutor$Worker) RMI TCP
RE: Error in DBCP Connection Pool with tomcat 6.x
Hi Filip, This error comes at some point of time on production, when the server is on load. I am using hibernate and not closing any connection manually, its all managed by hibernate and tomcat dbcp connection pool. For me it seems like DBCP is trying to close the connection which is already closed by the database server. Please refer below related links. https://issues.apache.org/jira/browse/DBCP-329 http://markmail.org/message/c2gx2xuzum4pv743#query:+page:1+mid:ncvixx4ewe7pho2x+state:results Regards, Vijendra -Original Message- From: Filip Hanik [mailto:fi...@hanik.com] Sent: 01 July 2014 21:06 To: Tomcat Users List Subject: Re: Error in DBCP Connection Pool with tomcat 6.x Looks like your code already called java.sql.Connection.close() and then attempts to use the connection again Filip On Tue, Jul 1, 2014 at 8:09 AM, Propes, Barry L barry.l.pro...@citi.com wrote: -Original Message- From: Vijendra Pachoriya [mailto:vijendra.pachor...@indegene.com] Sent: Tuesday, July 01, 2014 2:31 AM To: users@tomcat.apache.org Cc: Alok Roy Subject: Error in DBCP Connection Pool with tomcat 6.x Hi Tomcat Team, Please help me out in solving below error. Below is the details : Configuration in my context.xml Resource name=jdbc/ABC auth=Container type=javax.sql.DataSource maxActive=50 maxIdle=10 maxWait=1 username=ABC password=ABC removeAbandoned=true logAbandoned=true testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=3 validationQuery=SELECT 1 FROM dual driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@MY_DB / ==Error Message at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:679) Caused by: org.springframework.transaction.TransactionSystemException: Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:486) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777) at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at sun.proxy.$Proxy185.selectPharmaUser(Unknown Source) at com.aptilon.axcelrx.server.service.impl.AuthenticationServiceImpl.login(AuthenticationServiceImpl.java:170) at com.aptilon.axcelrx.server.ws.endpoint.AuthenticationEndpoint.login_aroundBody0(AuthenticationEndpoint.java:110) ... 45 more Caused by: javax.persistence.PersistenceException: unexpected error when rollbacking at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:88) at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:482) ... 54 more Caused by: org.hibernate.exception.GenericJDBCException: Cannot release connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:478) at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429) at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:316) at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:248) at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:208) at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:85) ... 55 more Caused by: