RE: asking advice for tomcat 7 config
Hi Guys, After that, I looked deeper into the database configuration, as I saw in the tests that non db relative actions were responding very fast (50ms for a 1000 users basis). I finally found an OracleDataSource in the Oracle Driver, which reacts far way better than the BasicDataSource I was using before (12s for 150 users for the basic data source, 1.5s for the oracle one, same test). I'd be interested to see the difference in configuration. I've never had problems with Tomcat's (really commons-dbcp's) BasicDataSource. Perhaps when you switched, you changed some essential configuration option? In fact, I do not use the datasource directly in the tomcat config, but as a Spring Bean. Maybe the difference is there. As point of comparisons, here are the new and old configurations: bean id=dataSource class=oracle.jdbc.pool.OracleDataSource destroy-method=close property name=URL value=${alea.cesardb.jdbc.url} / property name=user value=${alea.cesardb.jdbc.login}/ property name=password value=${alea.cesardb.jdbc.password} / property name=connectionCachingEnabled value=true / property name=connectionCacheProperties value MinLimit:5 MaxLimit:200 InitialLimit:5 ConnectionWaitTimeout:1200 InactivityTimeout:1080 ValidateConnection:true /value /property /bean bean id=dataSource class=org.apache.commons.dbcp.BasicDataSource destroy-method=close property name=driverClassName value=${alea.cesardb.jdbc.driver}/ property name=url value=${alea.cesardb.jdbc.url}/ property name=username value=${alea.cesardb.jdbc.login}/ property name=password value=${alea.cesardb.jdbc.password}/ property name=initialSize value=10 / property name=minIdle value=10 / property name=maxIdle value=20/ property name=maxActive value=150/ property name=maxWait value=1/ property name=validationQuery value=select * from dual/ property name=testOnBorrow value=false/ property name=testWhileIdle value=true/ property name=timeBetweenEvictionRunsMillis value=120/ property name=minEvictableIdleTimeMillis value=180/ property name=numTestsPerEvictionRun value=5/ property name=defaultAutoCommit value=true/ /bean I did the same tests with only that bean changed, and what I saw on an excel graphic with mean response time is speechless. I changed my test config to an Ubuntu 12.04 with latest JMeter version and OpenJDK 7. What I could see is that with the BasicDatasource, the load of the oracle database was a 5-6 (for a 128VProc solaris machine), and the response time was exponentially increasing. With the Oracle datasource, the response time is linearly increasing and the load of the database server is at 61 when I simulate 200 concurrent sessions. As previously mentioned by Mark (who is one of the Tomcat developers), I was wrong and the changes to timeouts and keepAlive that I recommended should not have made a difference, considering that you are using the NIO connector in your configuration. (My comments were only valid in the case of a BIO connector). Yet you seem to indicate 2-3 s. improvement over 15 s., which is about 20%. That is puzzling. Are you sure, and can you reproduce this consistently ? In fact, those changes were not the only ones :-) I also changed the acceptCount parameter (set it to 200), the executor configuration and the compression parameters (I removed the compression config). After those changes, what I also could see is that before, my JMeter graphic result was very chaotic. Now, response time is almost a straight line in charge, which is for me, a good sign of an healthy configuration... Maybe it's still not perfect, but it's much more better than before ... Romain.
Re: Context fails to load during start of Tomcat, and stalls tomcat startup
Hi! Yes, it does use other webservices on the same webserver - I'll try to investigate if some of these are attempted during startup - this should be easily tested via tcpdump I guess. /Steffen On 10/18/12 5:00 PM, Ben Souther b...@souther.us wrote: Is it possible that the context in question depends on another context in your setup for something during startup? Do you have something in a context listener (or a servlet that gets deployed on startup) that makes a web service call to another context in your system during initialization? If so, what happens if that context is not available? Does it wait and try again or does it just hang? On Thu, 2012-10-18 at 16:08 +0200, Steffen Schumacher wrote: Hi! Running apache-tomcat 7.0.26 on FreeBSD 8.1@vmware, I've spotted a really curious issue. We are hosting ~8 different contexts on 4 servers all matching the above setup, and in normal operation we have no beef at all, except when the server guys needs to reboot the servers for whatever reason. When this happens, the a specific context prevents tomcat from starting up it simply stops doing anything after these lines: server17# bin/catalina.sh run Using CATALINA_BASE: /usr/local/apache-tomcat-7.0 Using CATALINA_HOME: /usr/local/apache-tomcat-7.0 Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0/temp Using JRE_HOME:/usr/local Using CLASSPATH: /usr/local/apache-tomcat-7.0/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0/ bin/tomcat-juli.jar Oct 18, 2012 1:06:03 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/diablo-jdk1.6.0/jre/lib/i386/server:/usr/local/diablo-jdk1.6.0/jr e/lib/i386:/usr/local/diablo-jdk1.6.0/jre/../lib/i386:/usr/java/packages/lib /i386:/lib:/usr/lib:/usr/local/lib Oct 18, 2012 1:06:03 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [http-bio-8180] Oct 18, 2012 1:06:03 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [http-bio-8443] Oct 18, 2012 1:06:04 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [ajp-bio-8009] Oct 18, 2012 1:06:04 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1488 ms Oct 18, 2012 1:06:04 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Oct 18, 2012 1:06:04 PM org.apache.catalina.core.StandardEngine startInternalINFO: Starting Servlet Engine: Apache Tomcat/7.0.26 Oct 18, 2012 1:06:04 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/apache-tomcat-7.0/webapps/XXX##10.4b2.war Oct 18, 2012 1:06:04 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/apache-tomcat-7.0/webapps/.war Oct 18, 2012 1:06:12 PM com.sun.xml.ws.server.MonitorBase createRoot INFO: Metro monitoring rootname successfully set to: com.sun.metro:pp=/,type=WSEndpoint,name=/-RequestHandler-RequestHand lerPort Oct 18, 2012 1:06:12 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate init INFO: WSSERVLET14: JAX-WS servlet initializing Oct 18, 2012 1:06:12 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized INFO: WSSERVLET12: JAX-WS context listener initializing Oct 18, 2012 1:06:12 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized INFO: WSSERVLET12: JAX-WS context listener initializing Oct 18, 2012 1:06:12 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/apache-tomcat-7.0/webapps/##10.4b1.war Oct 18, 2012 1:06:15 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized INFO: WSSERVLET12: JAX-WS context listener initializing And nothing happens now, even if I leave it for 1+ hours Now the ZZ(culprit) context is a perhaps not ultra-simple, as it is both a SOAP service (using metro) and also a SOAP client, but beyond that I wouldn't call it that complex. I can then remove the .war file and folder from webapps, and it will come up just nicely, and I can deploy the context via the html interface with now complaints. At this point, when the ZZZ context is deployed and running and I'll be good until the next reboot/restart of tomcat. The issue occurs regardless if I only have the context folder in webapps, or I also have the .war file present. I've used most of the day searching the web for solutions, but it is kinda hard when there is no indication of what is stalling things.. Could this be a tomcat issue? It is kinda hard to setup other (specific) versions of tomcat to test this, and I've tried 7.0.28, but its a completely separate environment with other versions of java etc, but
Re: Context fails to load during start of Tomcat, and stalls tomcat startup
It attempts to initialize a port to a local soap service, which has not yet been deployed - this is detected by the fact that a HTTP GET is made locally for the wsdl of said service, which is never responded to (expectedly so). So I guess this is the smoking gun I've been looking for, and the only option for me is to implement better handling of this, so that timeout occurs reasonably fast, and an attempt is made later on if the wsdl wasn't available at the time of tomcat-startup. So thanks for now, I think this is most likely what I needed! /Steffen On 10/19/12 12:30 PM, Steffen Schumacher s...@tdc.net wrote: Hi! Yes, it does use other webservices on the same webserver - I'll try to investigate if some of these are attempted during startup - this should be easily tested via tcpdump I guess. /Steffen On 10/18/12 5:00 PM, Ben Souther b...@souther.us wrote: Is it possible that the context in question depends on another context in your setup for something during startup? Do you have something in a context listener (or a servlet that gets deployed on startup) that makes a web service call to another context in your system during initialization? If so, what happens if that context is not available? Does it wait and try again or does it just hang? On Thu, 2012-10-18 at 16:08 +0200, Steffen Schumacher wrote: Hi! Running apache-tomcat 7.0.26 on FreeBSD 8.1@vmware, I've spotted a really curious issue. We are hosting ~8 different contexts on 4 servers all matching the above setup, and in normal operation we have no beef at all, except when the server guys needs to reboot the servers for whatever reason. When this happens, the a specific context prevents tomcat from starting up it simply stops doing anything after these lines: server17# bin/catalina.sh run Using CATALINA_BASE: /usr/local/apache-tomcat-7.0 Using CATALINA_HOME: /usr/local/apache-tomcat-7.0 Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0/temp Using JRE_HOME:/usr/local Using CLASSPATH: /usr/local/apache-tomcat-7.0/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0/ bin/tomcat-juli.jar Oct 18, 2012 1:06:03 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/diablo-jdk1.6.0/jre/lib/i386/server:/usr/local/diablo-jdk1.6.0/jr e/lib/i386:/usr/local/diablo-jdk1.6.0/jre/../lib/i386:/usr/java/packages/lib /i386:/lib:/usr/lib:/usr/local/lib Oct 18, 2012 1:06:03 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [http-bio-8180] Oct 18, 2012 1:06:03 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [http-bio-8443] Oct 18, 2012 1:06:04 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [ajp-bio-8009] Oct 18, 2012 1:06:04 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1488 ms Oct 18, 2012 1:06:04 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Oct 18, 2012 1:06:04 PM org.apache.catalina.core.StandardEngine startInternalINFO: Starting Servlet Engine: Apache Tomcat/7.0.26 Oct 18, 2012 1:06:04 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/apache-tomcat-7.0/webapps/XXX##10.4b2.war Oct 18, 2012 1:06:04 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/apache-tomcat-7.0/webapps/.war Oct 18, 2012 1:06:12 PM com.sun.xml.ws.server.MonitorBase createRoot INFO: Metro monitoring rootname successfully set to: com.sun.metro:pp=/,type=WSEndpoint,name=/-RequestHandler-RequestHand lerPort Oct 18, 2012 1:06:12 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate init INFO: WSSERVLET14: JAX-WS servlet initializing Oct 18, 2012 1:06:12 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized INFO: WSSERVLET12: JAX-WS context listener initializing Oct 18, 2012 1:06:12 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized INFO: WSSERVLET12: JAX-WS context listener initializing Oct 18, 2012 1:06:12 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/apache-tomcat-7.0/webapps/##10.4b1.war Oct 18, 2012 1:06:15 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized INFO: WSSERVLET12: JAX-WS context listener initializing And nothing happens now, even if I leave it for 1+ hours Now the ZZ(culprit) context is a perhaps not ultra-simple, as it is both a SOAP service (using metro) and also a SOAP client, but beyond that I wouldn't call it that complex. I can then remove the .war file and folder from webapps, and it will come up just nicely, and I can deploy the context
Re: Context fails to load during start of Tomcat, and stalls tomcat startup
Glad you found it. Have a good weekend. -Ben On Fri, 2012-10-19 at 13:13 +0200, Steffen Schumacher wrote: It attempts to initialize a port to a local soap service, which has not yet been deployed - this is detected by the fact that a HTTP GET is made locally for the wsdl of said service, which is never responded to (expectedly so). So I guess this is the smoking gun I've been looking for, and the only option for me is to implement better handling of this, so that timeout occurs reasonably fast, and an attempt is made later on if the wsdl wasn't available at the time of tomcat-startup. So thanks for now, I think this is most likely what I needed! /Steffen On 10/19/12 12:30 PM, Steffen Schumacher s...@tdc.net wrote: Hi! Yes, it does use other webservices on the same webserver - I'll try to investigate if some of these are attempted during startup - this should be easily tested via tcpdump I guess. /Steffen On 10/18/12 5:00 PM, Ben Souther b...@souther.us wrote: Is it possible that the context in question depends on another context in your setup for something during startup? Do you have something in a context listener (or a servlet that gets deployed on startup) that makes a web service call to another context in your system during initialization? If so, what happens if that context is not available? Does it wait and try again or does it just hang? On Thu, 2012-10-18 at 16:08 +0200, Steffen Schumacher wrote: Hi! Running apache-tomcat 7.0.26 on FreeBSD 8.1@vmware, I've spotted a really curious issue. We are hosting ~8 different contexts on 4 servers all matching the above setup, and in normal operation we have no beef at all, except when the server guys needs to reboot the servers for whatever reason. When this happens, the a specific context prevents tomcat from starting up it simply stops doing anything after these lines: server17# bin/catalina.sh run Using CATALINA_BASE: /usr/local/apache-tomcat-7.0 Using CATALINA_HOME: /usr/local/apache-tomcat-7.0 Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0/temp Using JRE_HOME:/usr/local Using CLASSPATH: /usr/local/apache-tomcat-7.0/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0/ bin/tomcat-juli.jar Oct 18, 2012 1:06:03 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/diablo-jdk1.6.0/jre/lib/i386/server:/usr/local/diablo-jdk1.6.0/jr e/lib/i386:/usr/local/diablo-jdk1.6.0/jre/../lib/i386:/usr/java/packages/lib /i386:/lib:/usr/lib:/usr/local/lib Oct 18, 2012 1:06:03 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [http-bio-8180] Oct 18, 2012 1:06:03 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [http-bio-8443] Oct 18, 2012 1:06:04 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [ajp-bio-8009] Oct 18, 2012 1:06:04 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1488 ms Oct 18, 2012 1:06:04 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Oct 18, 2012 1:06:04 PM org.apache.catalina.core.StandardEngine startInternalINFO: Starting Servlet Engine: Apache Tomcat/7.0.26 Oct 18, 2012 1:06:04 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/apache-tomcat-7.0/webapps/XXX##10.4b2.war Oct 18, 2012 1:06:04 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/apache-tomcat-7.0/webapps/.war Oct 18, 2012 1:06:12 PM com.sun.xml.ws.server.MonitorBase createRoot INFO: Metro monitoring rootname successfully set to: com.sun.metro:pp=/,type=WSEndpoint,name=/-RequestHandler-RequestHand lerPort Oct 18, 2012 1:06:12 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate init INFO: WSSERVLET14: JAX-WS servlet initializing Oct 18, 2012 1:06:12 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized INFO: WSSERVLET12: JAX-WS context listener initializing Oct 18, 2012 1:06:12 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized INFO: WSSERVLET12: JAX-WS context listener initializing Oct 18, 2012 1:06:12 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/apache-tomcat-7.0/webapps/##10.4b1.war Oct 18, 2012 1:06:15 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized INFO: WSSERVLET12: JAX-WS context listener initializing And nothing happens now, even if I leave it for 1+ hours Now the ZZ(culprit) context is a perhaps not ultra-simple, as it is both
Catalina.out log level
Hi All, Can you please suggest how to change the log level of tomcat catalina.out file. I did change in the logging.properties for all handlers to finest but still catalina.out showing log levels with Info level only whereas all other log files have finest log level set (e.g. Host-manager.log/manager.log) Kindly help Thanks, Vicky - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat jdbc
On 10/18/2012 02:51 PM, S Ahmed wrote: Hi, When using the jdbc connection pool library, would it be possible to somehow record the # of connections that are being used, when the # of connections in the pool are being saturated etc., or is that something that would have to be modified in the library itself? You can see the connections by doing an appropriate select on your database. For oracle select v$session like select username, program, machine, client_identifier, osuser,logon_time, sid, serial# from v$session where osuser != 'oracle' order by program, machine, client_identifier, logon_time There is also a simple way to see the connections in mysql but I can't remember it i.e. assuming I have can keep track of these counters, is there a way to monitor these events in the library or would the jdbc library itself need to be modified to expose these events? -- Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 mark.shif...@yale.edu - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Catalina.out log level
Am 19.10.2012 14:49, schrieb vicky007aggar...@yahoo.co.in: Hi All, Can you please suggest how to change the log level of tomcat catalina.out file. I did change in the logging.properties for all handlers to finest but still catalina.out showing log levels with Info level only whereas all other log files have finest log level set (e.g. Host-manager.log/manager.log) Kindly help Thanks, Vicky Hi Vicky, you need to add: org.apache.catalina.level=FINEST Regards, Ralph - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat jdbc
Thanks. But this doesn't give me information like, say my pool is 10 connections, and my application is getting more traffic and those connections are all used up and there are 5 other callers waiting for a free connection, that informaiton isn't exposed and I want to create counters somehow to monitor this. On Fri, Oct 19, 2012 at 8:53 AM, Mark Shifman mark.shif...@yale.edu wrote: On 10/18/2012 02:51 PM, S Ahmed wrote: Hi, When using the jdbc connection pool library, would it be possible to somehow record the # of connections that are being used, when the # of connections in the pool are being saturated etc., or is that something that would have to be modified in the library itself? You can see the connections by doing an appropriate select on your database. For oracle select v$session like select username, program, machine, client_identifier, osuser,logon_time, sid, serial# from v$session where osuser != 'oracle' order by program, machine, client_identifier, logon_time There is also a simple way to see the connections in mysql but I can't remember it i.e. assuming I have can keep track of these counters, is there a way to monitor these events in the library or would the jdbc library itself need to be modified to expose these events? -- Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 mark.shif...@yale.edu --**--**- To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.orgusers-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat jdbc
On Oct 18, 2012, at 2:51 PM, S Ahmed wrote: Hi, When using the jdbc connection pool library, would it be possible to somehow record the # of connections that are being used, when the # of connections in the pool are being saturated etc., or is that something that would have to be modified in the library itself? The connection pool publishes some statistics to JMX. An easy way to see them is connect with jconsole. If you need more advanced statistics, you could check / monitor them programmatically or use an existing monitoring tool. Dan i.e. assuming I have can keep track of these counters, is there a way to monitor these events in the library or would the jdbc library itself need to be modified to expose these events? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Get active session list
Anyone? 2012/10/18 Felipe Jaekel fkjae...@gmail.com Found the following: context = (Context) wrapper.getParent(); host = (Host) context.getParent(); Context ctx = (Context) host.findChild(name); Manager manager = ctx.getManager(); Session [] sessions = manager.findSessions(); Had the same doubt I had when I looked at the PSI Probe code some days ago: how to handle the wrapper property? As a alternative I tried to implement *HttpSessionActivationListener*, but the methods aren't called when I restart the server. Thanks again for the help, Phillip 2012/10/18 Christopher Schultz ch...@christopherschultz.net -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Felipe, On 10/18/12 9:34 AM, Felipe Jaekel wrote: I need to get the active session list. Searching about I saw a lot of people with the same question, but no answer. I don't want to write a list inside a HttpSessionListener and keep the session list there, because I use session serialization and the list inside the listener would be destroyed in case the server is restarted. You *can* get notification of sessions being de-serialized from the disk to maintain your list. Look at the other session-related listeners in the servlet API. You could also use JMX to get a list of sessions. Use JConsole to poke-around in Tomcat's JMX beans and find the one(s) that expose sessions. You may have to make your webapp privileged in order to make JMX calls. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCAEgwACgkQ9CaO5/Lv0PARBACfZ+EG7KJWXt+49sbB1kVsLunF A4MAoKv1hM4KBlaAS4a1UaP0ePqfRr3W =n3WU -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Get active session list
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 19/10/2012 19:17, Felipe Jaekel wrote: Anyone? Again, look at the source code to see how the Tomcat Manager servlet does it. Mark 2012/10/18 Felipe Jaekel fkjae...@gmail.com Found the following: context = (Context) wrapper.getParent(); host = (Host) context.getParent(); Context ctx = (Context) host.findChild(name); Manager manager = ctx.getManager(); Session [] sessions = manager.findSessions(); Had the same doubt I had when I looked at the PSI Probe code some days ago: how to handle the wrapper property? As a alternative I tried to implement *HttpSessionActivationListener*, but the methods aren't called when I restart the server. Thanks again for the help, Phillip 2012/10/18 Christopher Schultz ch...@christopherschultz.net Felipe, On 10/18/12 9:34 AM, Felipe Jaekel wrote: I need to get the active session list. Searching about I saw a lot of people with the same question, but no answer. I don't want to write a list inside a HttpSessionListener and keep the session list there, because I use session serialization and the list inside the listener would be destroyed in case the server is restarted. You *can* get notification of sessions being de-serialized from the disk to maintain your list. Look at the other session-related listeners in the servlet API. You could also use JMX to get a list of sessions. Use JConsole to poke-around in Tomcat's JMX beans and find the one(s) that expose sessions. You may have to make your webapp privileged in order to make JMX calls. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQgaamAAoJEBDAHFovYFnnXC8P/2YMIuVEYDOs2xWtzA8brB2X WAMoqu8eP3qVCxRxmilImnnmCSum7jV0yXEhwDaYfC71hPni7LLDNU69oEnfg19d gR43m84v1VENIpZimlij6ZPZBpV5P+0VlyVgfoOm5sVppsERXKvn/B1XUCzyD7YR mAbbrwbRa+c1NiMfFf0XMHrb9+BoYfQ1aUDJ3BaK/vzplCrzBgDSygBYPOozwva+ GlHn76MkAE86ojeYvmJN0yIF9ahuwfNXm/NK5wdOKf78BD23NrRW23j+Y80xz15N mHI/8F1kX6A8bVdaUeJzEsvpZodKP3AhkqX5bhKh1E4HmKuoYU0s5dqDqTnbyuJA eN/BFQDBPYK7R4p4VJkADu3yCORRkkpp8l//TwYZO9ylddNZpd7eSDkmX7qlC8DJ Usa77xCV5g1nZvrAuJYWYtfFWqMtXtTBfQMw809170Ugh821ruPvTi23YFZSYYFL LkZBBbKkatnjeU/jE7QXmWwQrEop6ZF8rGZjlSMFYAsLRR75+qdf9A5+wl/HKfKh 3eLZT5frkOmqhWrmb35aMA4sxUlJAhc+UhudbHjp3twUX2U1ki59QW/EMOJAtsvr G3FFY0/Ui1dxmuzeA+tzB1Eiypq6RU+34ZTjZ9XjHqKfV/ydNwczhc3fSYk4l4N7 FH5cLf3tldLqP35Wj7mg =h6w0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Catalina.out log level
Thanks ralph for responding Just only below line is enough?? No need to configure/alter anything else u mean ? org.apache.catalina.level=FINEST Thanks, Vicky Sent from my iPhone On Oct 19, 2012, at 7:06 PM, Ralph Plawetzki ra...@purejava.org wrote: Am 19.10.2012 14:49, schrieb vicky007aggar...@yahoo.co.in: Hi All, Can you please suggest how to change the log level of tomcat catalina.out file. I did change in the logging.properties for all handlers to finest but still catalina.out showing log levels with Info level only whereas all other log files have finest log level set (e.g. Host-manager.log/manager.log) Kindly help Thanks, Vicky Hi Vicky, you need to add: org.apache.catalina.level=FINEST Regards, Ralph - 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: Help on Windows 2008(64 bit)\Tomcat
Thanks for all the suggestions Andrew, let see if this round is a little better. McDaniel, Jace wrote: I am new to the Tomcat and IIs 7 world and I am having issues getting mine app to work beyond the default port 8080. -- So what you are saying is that your application does work, when you access Tomcat directly through port 8080 ? -- And it doesn't work when you try to access it through IIS (presumably port 80) and the Isapi_redirector module ? Correct, I can get to Tomcat on Port 8080 and also to the URL for our application when using port 8080. When I take the port out of the URL and use port 80, and redirector, it does not work. I am building a new server with those specs. I tried to keep this short but still include details of what I have done. If anyone has any ideas of items I can research or try, it would be greatly appreciated. I installed apache-tomcat-6.0.35.exe and tomcat-connectors-1.2.37-windows-x86_64-iis.zip from Tomcat site. I followed the following site, as much as I could. I had to find other guides for help with the IIS7 parts. http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html I do not have my Application Pools enabling 32 bit applications. I then ran a axis2.war I had from our old server (?) to install a new webapp (?) and it works also (?), when on port 8080. At this time, when I do not use port 8080, it asks if I want to download a file, ... -- And when you use port 8080, what does it (?) do ? It gives me a HTTP 500 Internal Server Error, which is ok because I am not sending a correctly formatted message. but no matter what name I put it asks me that same thing. It is not even a real file. -- You know, this is a bit obscure as an explanation. Yes, I do. I will put links below. Nothing is jumping out at me within the log files. Main 2 errors I see are below, but research shows the second one should not matter. [ERROR] Missing wsse:Security header in request org.apache.axis2.AxisFault: Missing wsse:Security header in request -- This looks like an Axis problem, not a Tomcat one. Did you ask on the Axis list what it means ? No, I have not. I assumed since I did not install Axis 2, I just installed the Web Application by dropping in the axis2.war file. I also cannot find any axis2 files on the old server so I am not sure it is installed there either. SEVERE: Error, processing connection java.lang.IndexOutOfBoundsException at java.io.BufferedInputStream.read(Unknown Source) -- and the rest ? (the log lines after that one) In general, about the above message : - you indicated which versions of Tomcat and the Isapi_redirector you have downloaded and installed. That's good. - you are telling us which version of IIS you are using, and which instructions you followed. That's good too. - but the rest of your explanations are not very clear, and make it difficult to figure out what kind of problem you may have, and how to help you. That's not good. Can you : - give us an example of a URL that you are using with the port 8080 and which works, and tell us precisely what happens in the browser when you use that URL Tomcat - http://pbcomm.pilot.principal.com:8080/ Our Web Application - http://pbcomm.pilot.principal.com:8080/axis2/services/BankSignatureWebService - and then another example of (preferably) the same URL that you are using with not-port-8080 and which does not work, and tell us precisely what happens in the browser when you use that URL Our Web Application , port 80 - http://pbcomm.pilot.principal.com/axis2/services/BankSignatureWebService When I do this, IE tries to download a file called BankSignatureWebService, with type unknown. When I look at the file, I think it is the isapi_redirect.dll file downloading rather than running. The Handler Mappings part of IIS 7 has Execute permissions on the ISAPI-dll entry. - and then tell us what you mean by I then ran a axis2.war ? What did you do with that axis2.war file ? In which directory did you copy it ? I put it in the Tomcat 6.0\webapps folder while Tomcat was stopped, then started Tomcat to allow it to unpack. I have not installed Adobe Axis2 as I cannot find any part of it on the old servers. If you feel like you have any suggestions to pass on still I would appreciate it however I understand if you do not. Unfortunately due to my timeframe I was given, 2 week, management has decided to just edit the application to use the port 8080. We will determine at a later date if we need to continue to effort to get the redirect to work or not. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -Message Disclaimer- This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is
Re: Context fails to load during start of Tomcat, and stalls tomcat startup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steffen, On 10/19/12 7:13 AM, Steffen Schumacher wrote: It attempts to initialize a port to a local soap service, which has not yet been deployed - this is detected by the fact that a HTTP GET is made locally for the wsdl of said service, which is never responded to (expectedly so). So I guess this is the smoking gun I've been looking for, and the only option for me is to implement better handling of this, so that timeout occurs reasonably fast, and an attempt is made later on if the wsdl wasn't available at the time of tomcat-startup. Right. This is kind of a perennial problem for folks who have services that rely on each other: you end up having to orchestrate the startup ordering of all the services in order to get it all working. Of course that doesn't work in the real world when services can go down unexpectedly, etc. You might want to lazily-initialize your service, though it is likely to diminish performance ever so slightly for the non-startup cases. Also, if this is just a WSDL document that you need to load, perhaps you could use a non-HTTP URL -- say, a file: URL that doesn't require a loopback HTTP connection. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCBrv8ACgkQ9CaO5/Lv0PA7UgCfVQv/B+USL1N02KXXly7AqnmD 54MAoLHGMcSOmh6YrA/epdZyowfid/XK =oALF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat jdbc
On 19/10/2012 16:18, Daniel Mikusa wrote: On Oct 18, 2012, at 2:51 PM, S Ahmed wrote: Hi, When using the jdbc connection pool library, would it be possible to somehow record the # of connections that are being used, when the # of connections in the pool are being saturated etc., or is that something that would have to be modified in the library itself? The connection pool publishes some statistics to JMX. An easy way to see them is connect with jconsole. If you need more advanced statistics, you could check / monitor them programmatically or use an existing monitoring tool. +1 Use VisualVM with the MBeans plugin or JConsole. p Dan i.e. assuming I have can keep track of these counters, is there a way to monitor these events in the library or would the jdbc library itself need to be modified to expose these events? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Thread related MBean questions
On 18/10/2012 14:39, Shanti Suresh wrote: Hi Pid, Thanks for your comments! I would like a representative metric of how many active threads are in Tomcat at a given time. currentBusyThreads may or may not be a good counter because at the time of poll, there is one current operation or none - giving me a value or 1 or 0 consistently. And again, that may just be the case. In the middle of the night, though, I sometimes get a currentBusyThreads=50 value, perhaps due to a spidering of the site or another batch operation on the server. What is DaemonThreadCount=85 please? Which MBean are you reading that on? Is that the current size of the ThreadPool? Tomcat has lots of MBeans and more than one way to create a thread pool. The JVM has threads and can contain multiple thread pools. I looked at our server.xml, and an Executor ThreadPool is not in use for the 8080 and 8443 HTTP connectors. Could that mean that idle threads are not expired properly? So at one point, the thread pool size could have gone up to 85. Yes, as of Tomcat 6.0.x, without an Executor the Connectors will have a pool each, and this will not decrease in size when idle. --server.xml snippet:--- Connector port=8443 clientAuth=false connectionTimeout=6 disableUploadTimeout=true emptySessionPath=true enableLookups=false maxHttpHeaderSize=8192 maxSpareThreads=75 maxThreads=256 minSpareThreads=25 protocol=HTTP/1.1 scheme=https secure=true SSLEnabled=true sslProtocol=TLS URIEncoding=UTF-8 acceptCount=100 SSLCertificateFile=cert.cer SSLCertificateKeyFile=cert_key.key / --end of snippet-- A quick browse on Google showed up the following discussion: http://tomcat.10.n6.nabble.com/Managing-Tomcat-6-threads-How-to-make-tomcat-destroy-threads-when-idle-td2114714.html I might need to change the server.xml to use the executor Thread Pool, I think. Enable the Executor to manage the thread pool size when idle, yes. p Thanks. -Shanti On Wed, Oct 17, 2012 at 9:07 AM, Pid p...@pidster.com wrote: On 16/10/2012 17:52, Shanti Suresh wrote: Greetings. I have some questions on finding the number of active threads in Tomcat. (1) On our QA system, I notice that the currenthreadsBusy MBean is either zero or one for the 8443 and 8080 connectors. ThreadCount != currentThreadsBusy One is the count of threads, one is the threads that are doing work. Why then is ThreadCount = 93 when there is not much going on on QA? Because you've previously done enough work for Tomcat to maintain 93 threads. (2) When I want to graph the thread activity in Tomcat (the thread Pool usage), which is a better counter to look at - currentThreadsBusy or ThreadCount? Depends what you want know. It seems like ThreadCount is what JConsole displays as Live Threads. (3) Why is TotalStartedThreadCount: 264? Is that a cumulative total since Tomcat was restarted? Yes. p --Thread-related MBean snippet:- Name: Catalina:type=ThreadPool,name=http-apr-8443 currentThreadsBusy: 1 ... Name: Catalina:type=ThreadPool,name=http-apr-8080 currentThreadsBusy: 0 ... Name: java.lang:type=Threading DaemonThreadCount: 85 PeakThreadCount: 99 AllThreadIds: Array[long] of length 93 135 119 118 117 ... CurrentThreadCpuTime: 46 CurrentThreadUserTime: 402000 ThreadCount: 93 TotalStartedThreadCount: 264 ThreadCpuTimeSupported: true ... ---end of snippet Thanks! -Shanti -- [key:62590808] -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: question about krb5.conf file
On 18/10/2012 21:15, Mead, Jen L wrote: Hi, I am trying to get my AIX box configured to use Windows Authentication from the tomcat server (web browser). I have been relying on the example that is at http://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html#Tomcat_instance. Here is my question. The example is using all windows and not unix, so I am not 100% sure on my syntax AND I have two domains I am working with. One for the tomcat server and one for the windows domain controller. The example shows them all on the same domain and I have tried a few different configurations and they haven't worked. So I am hoping to get an answer here. New topic; new thread please. Don't just edit your previous one. p This is my info: AIX 6100-04-11-1140 apache-tomcat-7.0.27 tomcat server domain: CON-WAY.COM windows AD domain: CONWAY.PROD.CON-WAY.COM Here is what I currently have in the krb5.conf file (it has changed many times LOL): [libdefaults] default_realm = CONWAY.PROD.CON-WAY.COM default_keytab_name = FILE:/opt/apache-tomcat-7.0.27/conf/tomcat.keytab default_tkt_enctypes = des-cbc-md5 des-cbc-crc default_tgs_enctypes = des-cbc-md5 des-cbc-crc forwardable=true [realms] CONWAY.PROD.CON-WAY.COM = { kdc = ciits003.conway.prod.con-way.com:88 } [domain_realm] con-way.com = CONWAY.PROD.CON-WAY.COM .con-way.com = CONWAY.PROD.CON-WAY.COM [logging] kdc = FILE:/var/krb5/log/krb5kdc.log admin_server = FILE:/var/krb5/log/kadmin.log default = FILE:/var/krb5/log/krb5lib.log Anyone see any blaring errors? I am not sure I need to put the word FILE in front of all file locations, but it was in the Windows example Jen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: asking advice for tomcat 7 config
On 19/10/2012 08:43, Romain Van der Keilen wrote: Hi Guys, After that, I looked deeper into the database configuration, as I saw in the tests that non db relative actions were responding very fast (50ms for a 1000 users basis). I finally found an OracleDataSource in the Oracle Driver, which reacts far way better than the BasicDataSource I was using before (12s for 150 users for the basic data source, 1.5s for the oracle one, same test). I'd be interested to see the difference in configuration. I've never had problems with Tomcat's (really commons-dbcp's) BasicDataSource. Perhaps when you switched, you changed some essential configuration option? In fact, I do not use the datasource directly in the tomcat config, but as a Spring Bean. Maybe the difference is there. As point of comparisons, here are the new and old configurations: bean id=dataSource class=oracle.jdbc.pool.OracleDataSource destroy-method=close property name=URL value=${alea.cesardb.jdbc.url} / property name=user value=${alea.cesardb.jdbc.login}/ property name=password value=${alea.cesardb.jdbc.password} / property name=connectionCachingEnabled value=true / property name=connectionCacheProperties value MinLimit:5 MaxLimit:200 InitialLimit:5 ConnectionWaitTimeout:1200 InactivityTimeout:1080 ValidateConnection:true /value /property /bean bean id=dataSource class=org.apache.commons.dbcp.BasicDataSource destroy-method=close Exactly which version of commons DBCP are you using? That class is not one shipped with Tomcat - it's a dependency of your application. If it's an old version, it's probably the heavily synchronised DBCP this might account in part for the difference in performance. property name=driverClassName value=${alea.cesardb.jdbc.driver}/ property name=url value=${alea.cesardb.jdbc.url}/ property name=username value=${alea.cesardb.jdbc.login}/ property name=password value=${alea.cesardb.jdbc.password}/ property name=initialSize value=10 / property name=minIdle value=10 / property name=maxIdle value=20/ property name=maxActive value=150/ Not the same 150 != 200. property name=maxWait value=1/ property name=validationQuery value=select * from dual/ property name=testOnBorrow value=false/ property name=testWhileIdle value=true/ property name=timeBetweenEvictionRunsMillis value=120/ property name=minEvictableIdleTimeMillis value=180/ property name=numTestsPerEvictionRun value=5/ property name=defaultAutoCommit value=true/ /bean I did the same tests with only that bean changed, and what I saw on an excel graphic with mean response time is speechless. I changed my test config to an Ubuntu 12.04 with latest JMeter version and OpenJDK 7. What I could see is that with the BasicDatasource, the load of the oracle database was a 5-6 (for a 128VProc solaris machine), and the response time was exponentially increasing. With the Oracle datasource, the response time is linearly increasing and the load of the database server is at 61 when I simulate 200 concurrent sessions. As previously mentioned by Mark (who is one of the Tomcat developers), I was wrong and the changes to timeouts and keepAlive that I recommended should not have made a difference, considering that you are using the NIO connector in your configuration. (My comments were only valid in the case of a BIO connector). Yet you seem to indicate 2-3 s. improvement over 15 s., which is about 20%. That is puzzling. Are you sure, and can you reproduce this consistently ? In fact, those changes were not the only ones :-) I also changed the acceptCount parameter (set it to 200), the executor configuration and the compression parameters (I removed the compression config). Good plan, change a bunch of things then compare the results... p After those changes, what I also could see is that before, my JMeter graphic result was very chaotic. Now, response time is almost a straight line in charge, which is for me, a good sign of an healthy configuration... Maybe it's still not perfect, but it's much more better than before ... Romain. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Context fails to load during start of Tomcat, and stalls tomcat startup
On 19/10/2012 20:50, Christopher Schultz wrote: Steffen, On 10/19/12 7:13 AM, Steffen Schumacher wrote: It attempts to initialize a port to a local soap service, which has not yet been deployed - this is detected by the fact that a HTTP GET is made locally for the wsdl of said service, which is never responded to (expectedly so). So I guess this is the smoking gun I've been looking for, and the only option for me is to implement better handling of this, so that timeout occurs reasonably fast, and an attempt is made later on if the wsdl wasn't available at the time of tomcat-startup. Right. This is kind of a perennial problem for folks who have services that rely on each other: you end up having to orchestrate the startup ordering of all the services in order to get it all working. Of course that doesn't work in the real world when services can go down unexpectedly, etc. You might want to lazily-initialize your service, though it is likely to diminish performance ever so slightly for the non-startup cases. Also, if this is just a WSDL document that you need to load, perhaps you could use a non-HTTP URL -- say, a file: URL that doesn't require a loopback HTTP connection. Multi-threaded deployment might help: http://tomcat.apache.org/tomcat-7.0-doc/config/host.html @see startStopThreads p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature