reload no use?
Hi, When I reload an app for the third time, Tomcat hangs, and I have to stop and start it - which is slow as the CPU is being used at close to 100%. This has been the case with Tomcat 5 and 6, Windows 2000, XP and Vista. I have to remember to stop/start Tomcat after the second reload. Is there a better way? Thanks, John
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException : Cannot get a connection, pool error Timeout waiting for idle object
The log of error is as under : org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 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 bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHAssignment.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHTryStatement.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BshMethod.invokeImpl(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.Name.invokeLocalMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:80) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:283) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:727) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:170) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:452) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:370) Caused by: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:825) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) ... 35 more Data Source : [EMAIL PROTECTED] Conn before : null org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 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 bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHAssignment.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHTryStatement.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BshMethod.invokeImpl(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.Name.invokeLocalMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:80) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:283) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:727) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:170) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) at
Re: reload no use?
John Pedersen wrote: When I reload an app for the third time, Tomcat hangs, and I have to stop and start it - which is slow as the CPU is being used at close to 100%. This has been the case with Tomcat 5 and 6, Windows 2000, XP and Vista. I have to remember to stop/start Tomcat after the second reload. Is there a better way? I regularly re-load apps and the only time I have a problem is when the app leaks memory. I would guess your app has a memory leak. Is there anything in the logs? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and path with pound sign (#) - ClassNotFoundException
Hi, Len Popp wrote: I'm not sure the topic is ready to be nailed shut just yet... Oh, i have no objections keeping it alive. Unfortunately my java skills are limited so reporting and testing is the best i can do to help. The problem is due to the way Tomcat converts pathnames to URLs when it uses URLClassLoader. Tomcat calls the method File.toURL and that fails when there's a # in the pathname. But the Javadoc for File.toURL suggests a workaround: Convert the pathname to a URI first, then to a URL. thanks for your confirmation. Looking through bugs.sun.com this seems to be an inherent behaviour with reports starting in 1999. So fixing it in Tomcat would be great, but i'm hesitating calling it a bug from Tomcats POV - more a feature request. @Len: Do you have a (javadoc)link for this workaround/suggestion? thx! I tried that (in ClassLoaderFactory) and it seem to fix the classloader problem. Tomcat starts up fine - but it can't compile any JSPs. So there are other components of Tomcat that have similar problems. I tried something with a similar result. Just moved CATALINA_HOME to some non-#-directory but left CATALINA_BASE as it was. This way Tomcat started but webapplications could not be deployed/did not work. So, my advice is to see how hard it would be for you to get the #s out of your pathnames. That may be easier than fixing Tomcat. I'm just waiting for some feedback from sun but avoiding #s in directory and file names in the java world is probably the way to go. Otherwise every java application must be forced to workaround this problem. And the latter is more work - if possible at all - than getting rid of #s. kind regards, Markus - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk with jetty strange behaviour
Hello, Until a recent upgrade I've been using Apache2 with Jetty and mod_jk2 just fine. Now, after I upgraded Apache to 2.2.3 and switched to mod_jk 1.2.18 and having the same version of Jetty (4.2.24) I find the following in the mod_jk.log: [Sun Aug 12 15:53:13 2007] [9685:3078895296] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (worker1) can't receive the response message from tomcat, network problems or tomcat (127.0.0.1:8019) is down (errno=104) [Sun Aug 12 15:53:13 2007] [9685:3078895296] [error] ajp_get_reply::jk_ajp_common.c (1658): (worker1) Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Aug 12 15:53:13 2007] [9685:3078895296] [info] ajp_service::jk_ajp_common.c (2046): (worker1) receiving from tomcat failed, recoverable operation attempt=0 [Sun Aug 12 15:53:13 2007] [9685:3078895296] [info] ajp_service::jk_ajp_common.c (2085): (worker1) sending request to tomcat failed, recoverable operation attempt=1 [Sun Aug 12 15:53:13 2007] [9685:3078895296] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (worker1) can't receive the response message from tomcat, network problems or tomcat (127.0.0.1:8019) is down (errno=104) [Sun Aug 12 15:53:13 2007] [9685:3078895296] [error] ajp_get_reply::jk_ajp_common.c (1658): (worker1) Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Aug 12 15:53:13 2007] [9685:3078895296] [info] ajp_service::jk_ajp_common.c (2046): (worker1) receiving from tomcat failed, recoverable operation attempt=1 [Sun Aug 12 15:53:13 2007] [9685:3078895296] [info] ajp_service::jk_ajp_common.c (2085): (worker1) sending request to tomcat failed, recoverable operation attempt=2 [Sun Aug 12 15:53:13 2007] [9685:3078895296] [error] ajp_service::jk_ajp_common.c (2097): (worker1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Sun Aug 12 15:53:13 2007] [9685:3078895296] [info] jk_handler::mod_jk.c (2277): Service error=0 for worker=worker1 Both Apache and Jetty are running on the same box. mod_jk.conf looks like this: JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevelinfo JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkShmFile /var/log/apache2/jk.shm workers.properties: worker.list=worker1 worker.worker1.port=8019 worker.worker1.host=127.0.0.1 worker.worker1.type=ajp13 worker.worker1.local_worker=1 worker.worker1.retries=2 worker.worker1.lbfactor=1 worker.worker1.socket_timeout=500 worker.worker1.socket_keepalive=1 Server behaviour: everything seems to be working fine except the admin module of a certain servlet, which gives an http error (don't know exactly as I don't have access to it) but after 1-2 refreshes workes fine. I've also tried to switch to latest mod_jk, 1.2.25 (above logs are from 1.2.25) but same thing. What I can be sure of is that jetty's running just fine, regular requests are served without ANY problems. I've browsed through a servlet for at least half an hour and no error. Client feedback also confirms no weird behavior. After googleing for a couple of days and trying different workers.properties settings, I still have no clue on what might be the cause of those log entries. Any suggestion is appreciated. Thanks, -- Andrei Neagoe
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException : Cannot get a connection, pool error Timeout waiting for idle object
Are you closing the ResultSet, Statement and Connection in a finally block immediately after they're used? -Rashmi On 8/12/07, fusion35 [EMAIL PROTECTED] wrote: context.xml : ?xml version=1.0 encoding=UTF-8? !-- The contents of this file will be loaded for each web application -- Context path=/PAF reloadable=true crossContext=true Resource auth=Container defaultAutoCommit=false driverClassName=com.mysql.jdbc.Driver maxActive=0 maxWait=1000 name=jdbc/PAFDB password=root timeBetweenEvictionRunsMillis=6 type=javax.sql.DataSource url=jdbc:mysql://localhost:3306/pafdb username=root/ /Context The log of error is as under : org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 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 bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHAssignment.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHTryStatement.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BshMethod.invokeImpl(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.Name.invokeLocalMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:80) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:283) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:727) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:170) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:452) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:370) Caused by: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:825) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) ... 35 more Data Source : [EMAIL PROTECTED] Conn before : null org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 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 bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHAssignment.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHTryStatement.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BshMethod.invokeImpl(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.Name.invokeLocalMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException : Cannot get a connection, pool error Timeout waiting for idle object
Just for laughs and giggles could you set maxActive to anything other than zero? A negative number means no limit if that's what you're after. I'm not sure how zero is evaluated and the javadocs for DBCP's BasicDataSource aren't 100% clear. --David fusion35 wrote: context.xml : ?xml version=1.0 encoding=UTF-8? !-- The contents of this file will be loaded for each web application -- Context path=/PAF reloadable=true crossContext=true Resource auth=Container defaultAutoCommit=false driverClassName=com.mysql.jdbc.Driver maxActive=0 maxWait=1000 name=jdbc/PAFDB password=root timeBetweenEvictionRunsMillis=6 type=javax.sql.DataSource url=jdbc:mysql://localhost:3306/pafdb username=root/ /Context The log of error is as under : org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 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 bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHAssignment.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHTryStatement.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BshMethod.invokeImpl(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.Name.invokeLocalMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:80) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:283) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:727) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:170) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:452) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:370) Caused by: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:825) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) ... 35 more Data Source : [EMAIL PROTECTED] Conn before : null org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 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 bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHAssignment.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHTryStatement.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BshMethod.invokeImpl(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.Name.invokeLocalMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException : Cannot get a connection, pool error Timeout waiting for idle object
Setting the maxactive other than 0 did the trick. Thanks David. You were right, I was after no limit (which I have now set to -1) regards Devinder -- View this message in context: http://www.nabble.com/org.apache.tomcat.dbcp.dbcp.SQLNestedException-%3A-Cannot-get-a-connection%2C-pool-error-Timeout-waiting-for-idle-object-tf4253064.html#a12114714 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reload no use?
Nothing that suggests a memory leak. Do you have any suggestions how I might go about finding where this might be happening? It only seems to happen on reload - otherwise, the app runs and runs. On 12/08/07, Mark Thomas [EMAIL PROTECTED] wrote: John Pedersen wrote: When I reload an app for the third time, Tomcat hangs, and I have to stop and start it - which is slow as the CPU is being used at close to 100%. This has been the case with Tomcat 5 and 6, Windows 2000, XP and Vista. I have to remember to stop/start Tomcat after the second reload. Is there a better way? I regularly re-load apps and the only time I have a problem is when the app leaks memory. I would guess your app has a memory leak. Is there anything in the logs? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk with jetty strange behaviour
No idea, what's happening, but if you can reproduce very easily, then you could increase the jk log level to debug or even trace. That way we will see more precisely, at what point the communication breaks. You error code 104 on many platforms is Connection reset by peer. So there might be additional log information in some jetty log. Concerning the config (remarks meant for 1.2.25): JkLogStampFormat [%a %b %d %H:%M:%S %Y] I think that's the default. If you simply delete it, you profit from the additional logging of milliseconds starting with 1.2.25. JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories Only use those, if you know you need them. Don't just copy tghem over from older configs, even if they used to be recommended. workers.properties: worker.worker1.local_worker=1 Doesn't exist any more. Only useful when used in combination with a load balancer. Replaced by distance, but since you don't use a JK load balancer simply delete it. worker.worker1.lbfactor=1 Default value and only useful in combination with a JK load balancer. worker.worker1.socket_timeout=500 500 seconds seems to be a relatively high timeout. No problem per se. Regards, Rainer Andrei Neagoe wrote: Hello, Until a recent upgrade I've been using Apache2 with Jetty and mod_jk2 just fine. Now, after I upgraded Apache to 2.2.3 and switched to mod_jk 1.2.18 and having the same version of Jetty (4.2.24) I find the following in the mod_jk.log: [Sun Aug 12 15:53:13 2007] [9685:3078895296] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (worker1) can't receive the response message from tomcat, network problems or tomcat (127.0.0.1:8019) is down (errno=104) [Sun Aug 12 15:53:13 2007] [9685:3078895296] [error] ajp_get_reply::jk_ajp_common.c (1658): (worker1) Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Aug 12 15:53:13 2007] [9685:3078895296] [info] ajp_service::jk_ajp_common.c (2046): (worker1) receiving from tomcat failed, recoverable operation attempt=0 [Sun Aug 12 15:53:13 2007] [9685:3078895296] [info] ajp_service::jk_ajp_common.c (2085): (worker1) sending request to tomcat failed, recoverable operation attempt=1 [Sun Aug 12 15:53:13 2007] [9685:3078895296] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (966): (worker1) can't receive the response message from tomcat, network problems or tomcat (127.0.0.1:8019) is down (errno=104) [Sun Aug 12 15:53:13 2007] [9685:3078895296] [error] ajp_get_reply::jk_ajp_common.c (1658): (worker1) Tomcat is down or refused connection. No response has been sent to the client (yet) [Sun Aug 12 15:53:13 2007] [9685:3078895296] [info] ajp_service::jk_ajp_common.c (2046): (worker1) receiving from tomcat failed, recoverable operation attempt=1 [Sun Aug 12 15:53:13 2007] [9685:3078895296] [info] ajp_service::jk_ajp_common.c (2085): (worker1) sending request to tomcat failed, recoverable operation attempt=2 [Sun Aug 12 15:53:13 2007] [9685:3078895296] [error] ajp_service::jk_ajp_common.c (2097): (worker1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port [Sun Aug 12 15:53:13 2007] [9685:3078895296] [info] jk_handler::mod_jk.c (2277): Service error=0 for worker=worker1 Both Apache and Jetty are running on the same box. mod_jk.conf looks like this: JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevelinfo JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkShmFile /var/log/apache2/jk.shm workers.properties: worker.list=worker1 worker.worker1.port=8019 worker.worker1.host=127.0.0.1 worker.worker1.type=ajp13 worker.worker1.local_worker=1 worker.worker1.retries=2 worker.worker1.lbfactor=1 worker.worker1.socket_timeout=500 worker.worker1.socket_keepalive=1 Server behaviour: everything seems to be working fine except the admin module of a certain servlet, which gives an http error (don't know exactly as I don't have access to it) but after 1-2 refreshes workes fine. I've also tried to switch to latest mod_jk, 1.2.25 (above logs are from 1.2.25) but same thing. What I can be sure of is that jetty's running just fine, regular requests are served without ANY problems. I've browsed through a servlet for at least half an hour and no error. Client feedback also confirms no weird behavior. After googleing for a couple of days and trying different workers.properties settings, I still have no clue on what might be the cause of those log entries. Any suggestion is appreciated. Thanks, - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.tomcat.dbcp.dbcp.SQLNest edException : Cannot get a connection, pool error Timeout waiting for idle obj ect
who can explain me the use of parameters: maxWait and timeBetweenEvictionRunsMillis, maybe with an example please? I read the api of it but can't understand the use of them... thanks On 8/12/07, fusion35 [EMAIL PROTECTED] wrote: context.xml : ?xml version=1.0 encoding=UTF-8? !-- The contents of this file will be loaded for each web application -- Context path=/PAF reloadable=true crossContext=true Resource auth=Container defaultAutoCommit=false driverClassName=com.mysql.jdbc.Driver maxActive=0 maxWait=1000 name=jdbc/PAFDB password=root timeBetweenEvictionRunsMillis=6 type=javax.sql.DataSource url=jdbc:mysql://localhost:3306/pafdb username=root/ /Context The log of error is as under : org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 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 bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHAssignment.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHTryStatement.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BshMethod.invokeImpl(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.Name.invokeLocalMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:80) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:283) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:727) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:170) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:452) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:370) Caused by: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:825) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) ... 35 more Data Source : [EMAIL PROTECTED] Conn before : null org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 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 bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHAssignment.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHTryStatement.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BshMethod.invokeImpl(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at
Re: reload no use?
We have a similar problem with our app. We narrowed the problem down to the way we have constructed/used our connection pooling. Our solution for the short term is to restart the server each time we update the app. At some point, we will get time to restructure the connection pooling process so that we are not holding onto objects that can't be freed. Thanks, Carl - Original Message - From: John Pedersen [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, August 12, 2007 10:52 AM Subject: Re: reload no use? Nothing that suggests a memory leak. Do you have any suggestions how I might go about finding where this might be happening? It only seems to happen on reload - otherwise, the app runs and runs. On 12/08/07, Mark Thomas [EMAIL PROTECTED] wrote: John Pedersen wrote: When I reload an app for the third time, Tomcat hangs, and I have to stop and start it - which is slow as the CPU is being used at close to 100%. This has been the case with Tomcat 5 and 6, Windows 2000, XP and Vista. I have to remember to stop/start Tomcat after the second reload. Is there a better way? I regularly re-load apps and the only time I have a problem is when the app leaks memory. I would guess your app has a memory leak. Is there anything in the logs? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.11.13/947 - Release Date: 8/11/2007 2:29 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException : Cannot get a connection, pool error Timeout waiting for idle object
fusion35 wrote: Setting the maxactive other than 0 did the trick. Thanks David. You were right, I was after no limit (which I have now set to -1) regards Devinder FYI including a path attribute in the default context.xml is pointless, as that attribute is ignored when a Context is defined outside of the server.xml. p smime.p7s Description: S/MIME Cryptographic Signature
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException : Cannot get a connection, pool error Timeout waiting for idle object
Oddly enough these are probably best explained in the commons-pool project (http://jakarta.apache.org/commons/pool) which was a spin-off of DBCP. maxWait is the maximum amount of time to wait for an object if the pool is full and there are no more objects (connections) to borrow. Essentially you're making a thread wait for an object to return to the pool from another borrow. timeBetweenEvictionRunsMillis is the number of milliseconds to wait between runs of a background thread that tests all the object in the pool, removing those that aren't valid anymore. In a connection pool it runs the validationQuery, removing the connection if the query fails. You can look at this page for an official explanation: http://commons.apache.org/pool/api-1.3/org/apache/commons/pool/impl/GenericObjectPool.html --David [EMAIL PROTECTED] wrote: who can explain me the use of parameters: maxWait and timeBetweenEvictionRunsMillis, maybe with an example please? I read the api of it but can't understand the use of them... thanks On 8/12/07, fusion35 [EMAIL PROTECTED] wrote: context.xml : ?xml version=1.0 encoding=UTF-8? !-- The contents of this file will be loaded for each web application -- Context path=/PAF reloadable=true crossContext=true Resource auth=Container defaultAutoCommit=false driverClassName=com.mysql.jdbc.Driver maxActive=0 maxWait=1000 name=jdbc/PAFDB password=root timeBetweenEvictionRunsMillis=6 type=javax.sql.DataSource url=jdbc:mysql://localhost:3306/pafdb username=root/ /Context The log of error is as under : org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 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 bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHAssignment.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BSHTryStatement.eval(Unknown Source) at bsh.BSHBlock.evalBlock(Unknown Source) at bsh.BSHBlock.eval(Unknown Source) at bsh.BshMethod.invokeImpl(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.BshMethod.invoke(Unknown Source) at bsh.Name.invokeLocalMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:80) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:283) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:727) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:170) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:452) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:370) Caused by: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:825) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) ... 35 more Data Source : [EMAIL PROTECTED] Conn before : null org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 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 bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source)
Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException : Cannot get a connection, pool error Timeout waiting for idle object
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Devinder, fusion35 wrote: Setting the maxactive other than 0 did the trick. Thanks David. You were right, I was after no limit (which I have now set to -1) I would highly recommend /against/ no limit connection pools. Even if you set the connection pool size to be the same as the request handler pool size (which should be equivalent a long as you don't have DB connection leaks), you shouldn't set it to no limit. You could bring down your database server if you have a connection leak on an app server. It's best to set your limit to something reasonable, but firm. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGv0eA9CaO5/Lv0PARAqroAJ9XOk3PKUob03PYV6+iNJqPcaOG9wCfZeeD MGJT+OvHtsUWQFMt/W6xRZc= =Rx2N -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.net.BindException: Address already in use
On 8/11/07, Susan Richards [EMAIL PROTECTED] wrote: First, I just want to say that I sure appreciate all the help I am getting on this list and I don't deserve to even associate with highly intelligent beings such as yourselves. We shutdown and restart our tomcat 5.5.23 server nightly. Initially, a maintenance page for system backup gets copied and then it gets bounced with the shutdown.sh and startup.sh scripts. Since we upgraded last Friday, it's not always starting up. I see this message in the log: SEVERE: Error initializing endpoint java.net.BindException: Address already in use (errno:226):80 I've checked server.xml and I only have one connector using this port. Perhaps all the connections are not getting terminated when it shuts down? How do I fix this problem? How do I figure out what is the cause? Sometimes, I too faced this prob. I did a work around. Just grep for the tomcat process id. some thing like, ps -ax | grep 'endorsed' //an ugly grep to fetch tomcat process as you have got the process id now, kill the tomcat as, kill -9 [pid] Now start the tomcat. [also, make sure, you are not running a webserver already on port 80. if you are running any oracle server, probably it might be starting a apache webserver on 80, pl check] -- Manivannan.Palanichamy (@) Oracle.com http://mani.gw.googlepages.com/index.html
Re: java.net.BindException: Address already in use
Most linux systems (probably *nix in general) store the pid in a file named after the service in /var/run. Your restart script could pick up that pid and then loop through checking for it's existance about once a second until it's gone before continuing with a new startup. That at least is dynamic enough to accommodate long and short shutdown times. Keep track of the wait and if it takes too long, log an error. --David Manivannan Palanichamy wrote: On 8/11/07, Susan Richards [EMAIL PROTECTED] wrote: First, I just want to say that I sure appreciate all the help I am getting on this list and I don't deserve to even associate with highly intelligent beings such as yourselves. We shutdown and restart our tomcat 5.5.23 server nightly. Initially, a maintenance page for system backup gets copied and then it gets bounced with the shutdown.sh and startup.sh scripts. Since we upgraded last Friday, it's not always starting up. I see this message in the log: SEVERE: Error initializing endpoint java.net.BindException: Address already in use (errno:226):80 I've checked server.xml and I only have one connector using this port. Perhaps all the connections are not getting terminated when it shuts down? How do I fix this problem? How do I figure out what is the cause? Sometimes, I too faced this prob. I did a work around. Just grep for the tomcat process id. some thing like, ps -ax | grep 'endorsed' //an ugly grep to fetch tomcat process as you have got the process id now, kill the tomcat as, kill -9 [pid] Now start the tomcat. [also, make sure, you are not running a webserver already on port 80. if you are running any oracle server, probably it might be starting a apache webserver on 80, pl check] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk with jetty strange behaviour
Thanks for your reply. I've tried looking around in jetty logs (also in webapps logs) but nothing related to the errors in mod_jk. Also I've tried to increase the log level... and I did not find anything (from my point of view): [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] map_uri_to_worker::jk_uri_worker_map.c (597): Attempting to map URI '/craiova/images/utils/topnou.jpg' from 2 maps [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] map_uri_to_worker::jk_uri_worker_map.c (609): Attempting to map context URI '/craiova/*=worker1' source 'JkMount' [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] map_uri_to_worker::jk_uri_worker_map.c (624): Found a wildchar match '/craiova/*=worker1' [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] jk_handler::mod_jk.c (2131): Into handler jakarta-servlet worker=worker1 r-proxyreq=0 [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] wc_get_worker_for_name::jk_worker.c (115): found a worker worker1 [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] wc_get_name_for_type::jk_worker.c (292): Found worker type 'ajp13' [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] init_ws_service::mod_jk.c (811): Service protocol=HTTP/1.1 method=GET host=(null) addr=194.102.125.46 name=www.craiova.ro port=80 auth=(null) user=(null) laddr=217.156.64.186 raddr=194.102.125.46 uri=/craiova/images/utils/topnou.jpg [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_get_endpoint::jk_ajp_common.c (2498): acquired connection pool slot=0 [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_marshal_into_msgb::jk_ajp_common.c (551): ajp marshaling done [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_service::jk_ajp_common.c (1935): processing worker1 with 2 retries [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_send_request::jk_ajp_common.c (1199): (worker1) socket 79 is not connected any more (errno=11) [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_send_request::jk_ajp_common.c (1231): (worker1) failed sending request. Will try another pooled connection [Sun Aug 12 22:15:49 2007] [22077:3079018176] [info] ajp_send_request::jk_ajp_common.c (1265): (worker1) all endpoints are disconnected [Sun Aug 12 22:15:49 2007] [22077:3079018176] [info] ajp_service::jk_ajp_common.c (2085): (worker1) sending request to tomcat failed, recoverable operation attempt=1 [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] jk_open_socket::jk_connect.c (357): socket TCP_NODELAY set to On [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] jk_open_socket::jk_connect.c (370): socket SO_KEEPALIVE set to On [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] jk_open_socket::jk_connect.c (420): timeout 500 set for socket=79 [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] jk_open_socket::jk_connect.c (455): trying to connect socket 79 to 127.0.0.1:8019 [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] jk_open_socket::jk_connect.c (481): socket 79 connected to 127.0.0.1:8019 [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_connect_to_endpoint::jk_ajp_common.c (865): Connected socket 79 to (127.0.0.1:8019) [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (911): sending to ajp13 pos=4 len=514 max=8192 [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (911): 12 34 01 FE 02 02 00 08 48 54 54 50 2F 31 2E 31 - .4..HTTP/1.1 Thanks again, Andrei Neagoe Rainer Jung wrote: No idea, what's happening, but if you can reproduce very easily, then you could increase the jk log level to debug or even trace. That way we will see more precisely, at what point the communication breaks. You error code 104 on many platforms is Connection reset by peer. So there might be additional log information in some jetty log. Concerning the config (remarks meant for 1.2.25): JkLogStampFormat [%a %b %d %H:%M:%S %Y] I think that's the default. If you simply delete it, you profit from the additional logging of milliseconds starting with 1.2.25. JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories Only use those, if you know you need them. Don't just copy tghem over from older configs, even if they used to be recommended. workers.properties: worker.worker1.local_worker=1 Doesn't exist any more. Only useful when used in combination with a load balancer. Replaced by distance, but since you don't use a JK load balancer simply delete it. worker.worker1.lbfactor=1 Default value and only useful in combination with a JK load balancer. worker.worker1.socket_timeout=500 500 seconds seems to be a relatively high timeout. No problem per se. Regards, Rainer Andrei Neagoe wrote: Hello, Until a recent upgrade I've been using Apache2 with Jetty and mod_jk2 just fine. Now, after I upgraded Apache to 2.2.3 and switched to mod_jk 1.2.18 and having the
Re: mod_jk with jetty strange behaviour
Your log excerpt stops exactly, when it's getting interesting. mod_jk connects and starts to send the request, no error until that point... We would like to check, at what point in the communication the problems appears, and what happened immediately before etc. Andrei Neagoe wrote: Thanks for your reply. I've tried looking around in jetty logs (also in webapps logs) but nothing related to the errors in mod_jk. Also I've tried to increase the log level... and I did not find anything (from my point of view): ... [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_connect_to_endpoint::jk_ajp_common.c (865): Connected socket 79 to (127.0.0.1:8019) [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (911): sending to ajp13 pos=4 len=514 max=8192 [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (911): 12 34 01 FE 02 02 00 08 48 54 54 50 2F 31 2E 31 - .4..HTTP/1.1 Thanks again, Andrei Neagoe - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk with jetty strange behaviour
I've archived a portion of the log containing 2 instances of the error. You can download it at http://www.craiova.ro/mod_jk.log.bz2 I've tried sending it via mail but there's a limit on mail size. Thanks, Andrei Neagoe Rainer Jung wrote: Your log excerpt stops exactly, when it's getting interesting. mod_jk connects and starts to send the request, no error until that point... We would like to check, at what point in the communication the problems appears, and what happened immediately before etc. Andrei Neagoe wrote: Thanks for your reply. I've tried looking around in jetty logs (also in webapps logs) but nothing related to the errors in mod_jk. Also I've tried to increase the log level... and I did not find anything (from my point of view): ... [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_connect_to_endpoint::jk_ajp_common.c (865): Connected socket 79 to (127.0.0.1:8019) [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (911): sending to ajp13 pos=4 len=514 max=8192 [Sun Aug 12 22:15:49 2007] [22077:3079018176] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (911): 12 34 01 FE 02 02 00 08 48 54 54 50 2F 31 2E 31 - .4..HTTP/1.1 Thanks again, Andrei Neagoe - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk with jetty strange behaviour
Andrei Neagoe wrote: I've archived a portion of the log containing 2 instances of the error. You can download it at http://www.craiova.ro/mod_jk.log.bz2 I've tried sending it via mail but there's a limit on mail size. I downloaded this file, uncompressed and untarred. The resulting log file was -rw-r- 1 jung kippdata 9454912 Aug 12 21:39 mod_jk.log with md5 sum 4b880aa29a4a9baa478c543cd65dde3a. It does not contain any error! All log lines are info or debug. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk with jetty strange behaviour
Yes, they are. It was my mistake referring to it as an error. I was talking about: [Sun Aug 12 22:38:53 2007] [22781:3079018176] [debug] ajp_get_endpoint::jk_ajp_common.c (2498): acquired connection pool slot=0 [Sun Aug 12 22:38:53 2007] [22781:3079018176] [debug] ajp_marshal_into_msgb::jk_ajp_common.c (551): ajp marshaling done [Sun Aug 12 22:38:53 2007] [22781:3079018176] [debug] ajp_service::jk_ajp_common.c (1935): processing worker1 with 2 retries [Sun Aug 12 22:38:53 2007] [22781:3079018176] [debug] ajp_send_request::jk_ajp_common.c (1199): (worker1) socket 79 is not connected any more (errno=11) [Sun Aug 12 22:38:53 2007] [22781:3079018176] [debug] ajp_send_request::jk_ajp_common.c (1231): (worker1) failed sending request. Will try another pooled connection which I sent in the previous mail and you said it stopped right before something interesting. That's why I've attached the whole log. It doesn't seem anything suspicious to me around those log entries tough... Andrei Neagoe Rainer Jung wrote: Andrei Neagoe wrote: I've archived a portion of the log containing 2 instances of the error. You can download it at http://www.craiova.ro/mod_jk.log.bz2 I've tried sending it via mail but there's a limit on mail size. I downloaded this file, uncompressed and untarred. The resulting log file was -rw-r- 1 jung kippdata 9454912 Aug 12 21:39 mod_jk.log with md5 sum 4b880aa29a4a9baa478c543cd65dde3a. It does not contain any error! All log lines are info or debug. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk with jetty strange behaviour
OK: you started with an error log entry referring to errno 104 as your original problem. I had the impression, you can easily reproduce this problem. In the logs you presented - even in the full log download - this problem is not present. The lines you referred to below are normal. They only tell us, that a new connection to the backend had to be established. Those log lines themselves do not indicate any problem. Regards, Rainer Andrei Neagoe wrote: Yes, they are. It was my mistake referring to it as an error. I was talking about: [Sun Aug 12 22:38:53 2007] [22781:3079018176] [debug] ajp_get_endpoint::jk_ajp_common.c (2498): acquired connection pool slot=0 [Sun Aug 12 22:38:53 2007] [22781:3079018176] [debug] ajp_marshal_into_msgb::jk_ajp_common.c (551): ajp marshaling done [Sun Aug 12 22:38:53 2007] [22781:3079018176] [debug] ajp_service::jk_ajp_common.c (1935): processing worker1 with 2 retries [Sun Aug 12 22:38:53 2007] [22781:3079018176] [debug] ajp_send_request::jk_ajp_common.c (1199): (worker1) socket 79 is not connected any more (errno=11) [Sun Aug 12 22:38:53 2007] [22781:3079018176] [debug] ajp_send_request::jk_ajp_common.c (1231): (worker1) failed sending request. Will try another pooled connection which I sent in the previous mail and you said it stopped right before something interesting. That's why I've attached the whole log. It doesn't seem anything suspicious to me around those log entries tough... Andrei Neagoe Rainer Jung wrote: Andrei Neagoe wrote: I've archived a portion of the log containing 2 instances of the error. You can download it at http://www.craiova.ro/mod_jk.log.bz2 I've tried sending it via mail but there's a limit on mail size. I downloaded this file, uncompressed and untarred. The resulting log file was -rw-r- 1 jung kippdata 9454912 Aug 12 21:39 mod_jk.log with md5 sum 4b880aa29a4a9baa478c543cd65dde3a. It does not contain any error! All log lines are info or debug. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reload no use?
John Pedersen wrote: Nothing that suggests a memory leak. Do you have any suggestions how I might go about finding where this might be happening? It only seems to happen on reload - otherwise, the app runs and runs. Get a profiler - I use YourKit since they have free license for open source development - and test your application with it. There are lots of things that can catch you out on re-load and not at other times as the application gets a new classloader. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]