[ANN] Apache Tomcat 7.0.19 released
The Apache Tomcat team announces the immediate availability of Apache Tomcat 7.0.19 Apache Tomcat 7.0.19 includes security fixes, bug fixes and the following new features compared to version 7.0.16: - JSP recompilation is now triggered by any change (backwards as well as forwards) in the last modified time of the JSP or any of its dependencies - Support for installing multiple instances with the Windows Installer - Include jdbc-pool (an alternative database connection pool) Please refer to the change log for the complete list of changes: http://tomcat.apache.org/tomcat-7.0-doc/changelog.html The following known issues in 7.0.19 are noteworthy: - The AJP NIO connector does not use persistent connections. To workaround this, use a large value for connectionTimeout - There is a typo in the list of JARs to skip in catalina.properties Apply http://s.apache.org/catalina.properties-r1146623 to fix it Note that this version has 4 zip binaries: a generic one and three bundled with Tomcat native binaries for Windows operating systems running on different CPU architectures. Downloads: http://tomcat.apache.org/download-70.cgi Migration guide from Apache Tomcat 5.5.x and 6.0.x: http://tomcat.apache.org/migration.html Thank you, -- The Apache Tomcat Team - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Running Tomcat on a webserver that is on a workgroup
Leo Donahue - PLANDEVX wrote: André, -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Running Tomcat on a webserver that is on a workgroup There is probably more to it than that. All they are going to do is join it to a workgroup. I don't understand how Tomcat will be able to access resources from our domain, and vice versa, unless I'm running Tomcat as a local account, and that same local account is created on the other servers on the domain. It all depends what you mean by resources. It will still be able to access other hosts via TCP (through the firewall, if the firewall allows it). But it will no longer be able to access shares or windows network printers e.g. What kind of network resources does your webserver need ? Windows shares. Otherwise the size of the vm that is my current web server needs to grow in order to support access to certain files, mostly images (over 500 GB), or I add the local account from the workgroup to the domain server containing the file share. That, as far as I know, is not possible. Ot let's say that it is at least self-defeating (or self-contradictory) : if you add that account to the DC, then it becomes a domain account, no ? (And then of course the rightful question to ask would be what that changes, as compared to the current situation). ... What is the security issue that this change is supposed to cure ? Other than making administration more difficult, I was hoping someone could tell me. Tomcat runs with a least privilege account anyway. Is this a feel good thing? On the base of the provided information, it can only give soothing feelings to someone who does not really know what they are doing. Or someone who got some instructions from others who do not know what they are talking about (or don't care). I'm thinking of some global diktat like no server than can be accessed from outside should be part of the domain, period. Of course, you can always - create a local account on the other fileserver which contains the files which you need to access - give that local account permissions to access those files - and then from your local Tomcat host, net mount that directory, providing the username and password of the local account on the fileserver. (And of course vice-versa if other systems need to access resources on the Tomcat host). But, other than the fact that this is not easy to do if your Tomcat runs as a service, it does indeed create a very confusing situation in terms of management, and more security holes to boot. (Like the fact that the password would need to be in clear somewhere). Perhaps you should just wrap up these various considerations and questions and send a memo to the responsible people asking if that is really what they want ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Invalid command 'SHUTDOW' received
Hi! I'm having problems shutting down Tomcat on my Windows 7 Home Premium laptop. I tried Tomcat 6.0.29, 6.0.32, 7.0.14, 7.0.16 and 7.0.19 (just released today) and all give the same result. Basically, Tomcat starts fine, either from the DOS command line (startup.bat) or from Eclipse. The problem is when I shutdown (shutdown.bat) the server, I receive WARNING: StandardServer.await: Invalid command 'SHUTDOW' received. This happens from a default Tomcat installation (unzipped the package), no changes to the server.xml file or any other files. Seems that there is something trimming the last byte from the command. If I run the server in DOS, I can execute shutdown.bat over and over again until the server catches the command properly (See catalina log, the server responded on the 14th shutdown command). It's intermittent too. Sometimes, the server responds properly on the second or third shutdown but never on the first one. I tried the following: - changed the admin port (8005) to something else, 1 for example, but still gives the problem. - I turned off my Avast (AntiVirus) resident shields and Comodo firewall to no avail. - Using Putty telnet, if I connect to port 8005 (or whatever I changed it to) in raw mode and type SHUTDOWN, it works just fine. - I used netstat -an | find 8005 and only see one process LISTENING - Tried using JDK1.5.0_22 instead of JDK1.6.0_25 to no avail. - Cleaned out event viewer and don't see any new entries appearing. I tried the same tomcat releases on two different Windows XP desktops and a Mac and there is no such problems. I'm thinking it has to do with Windows 7 or something else running on my laptop. Anyone else has this kind of problem or could someone provide me with some tips on how I could solve this? I've tried Geronimo-Jetty and Glassfish and don't have any problems shutting those down. Thanks for your help! Fred. Catalina.log: 2-Jul-2011 9:41:10 PM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.20. 2-Jul-2011 9:41:10 PM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 2-Jul-2011 9:41:11 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [http-apr-8080] 2-Jul-2011 9:41:11 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [ajp-apr-8009] 2-Jul-2011 9:41:11 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1588 ms 2-Jul-2011 9:41:11 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina 2-Jul-2011 9:41:11 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.16 2-Jul-2011 9:41:11 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory docs 2-Jul-2011 9:41:12 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory examples 2-Jul-2011 9:41:12 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory host-manager 2-Jul-2011 9:41:12 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory manager 2-Jul-2011 9:41:12 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT 2-Jul-2011 9:41:12 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler [http-apr-8080] 2-Jul-2011 9:41:12 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler [ajp-apr-8009] 2-Jul-2011 9:41:12 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 942 ms 2-Jul-2011 9:41:19 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:24 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:26 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:28 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:29 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:30 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:31 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:32 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:34 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command
Re: Error dialog with the word environment misspelled as envionment
On 18/07/2011 23:59, Eric Hawkes wrote: Hi, I am running tomcat as a windows service. The service starts automatically after the machine is rebooted. The Path to executable in the tomcat service properties dialog is C:\Program Files (x86)\SonicWallES\Apache Software Foundation\Tomcat 6.0\bin\tomcat6.exe //RS//Tomcat6 It is highly likely that our current build is failing to upgrade tomcat due to some foolish errors in our own code. If I were looking in my own product's source tree, I might do something like grep the appropriate part of the source base for the misspelled word envionment but I'm not familiar with the tomcat source tree. I've done that for Tomcat and Commons Daemon (including the source history) and can find no such mis-spelling. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error dialog with the word environment misspelled as envionment
Mark Thomas wrote: On 18/07/2011 23:59, Eric Hawkes wrote: Hi, I am running tomcat as a windows service. The service starts automatically after the machine is rebooted. The Path to executable in the tomcat service properties dialog is C:\Program Files (x86)\SonicWallES\Apache Software Foundation\Tomcat 6.0\bin\tomcat6.exe //RS//Tomcat6 It is highly likely that our current build is failing to upgrade tomcat due to some foolish errors in our own code. If I were looking in my own product's source tree, I might do something like grep the appropriate part of the source base for the misspelled word envionment but I'm not familiar with the tomcat source tree. I've done that for Tomcat and Commons Daemon (including the source history) and can find no such mis-spelling. Maybe this is to cross-reference with the other recent post Invalid command 'SHUTDOW' received ? There may be a new type of malware affecting Windows PCs, which just randomly drops Tomcat-relevant letters from time to time... ;-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Invalid command 'SHUTDOW' received
Frederick Ouimet wrote: ... (all noted, and thanks for the detailed info and the homework) ... Catalina.log: ... 2-Jul-2011 9:41:12 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 942 ms 2-Jul-2011 9:41:19 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:24 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:26 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:28 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:29 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:30 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:31 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:32 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:34 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:35 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:36 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:37 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:39 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:40 PM org.apache.catalina.core.StandardServer await INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance. ... Looking at the above log, I see that (apparently) Tomcat receives a succession of shutdown commands, at more or less 1 second interval. How do you do that ? (I am asking because as far as I understand what is happening, each invocation of a shutdown.bat starts a separate instance of a Java JVM, and at least a part of Tomcat within it. Isn't the fact of starting those multiple JVMs in such a short time, on a Windows laptop, by itself a possible cause of the issue ?) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Error dialog with the word environment misspelled as envionment
Hi Mark, Thanks for looking into this. Dismissing the original dialog results in a series of additional dialogs which seem to imply that something called exe4j is the source. According to their website's help document, exe4j creates Windows executables that invoke your Java applications and integrates them into the Windows environment. I had never heard of exe4j, and I'm not sure what application I have installed that uses it. My best guess now is that exe4j has the typo in their code base. Thanks again, Eric -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Tuesday, July 19, 2011 11:35 AM To: Tomcat Users List Subject: Re: Error dialog with the word environment misspelled as envionment On 18/07/2011 23:59, Eric Hawkes wrote: Hi, I am running tomcat as a windows service. The service starts automatically after the machine is rebooted. The Path to executable in the tomcat service properties dialog is C:\Program Files (x86)\SonicWallES\Apache Software Foundation\Tomcat 6.0\bin\tomcat6.exe //RS//Tomcat6 It is highly likely that our current build is failing to upgrade tomcat due to some foolish errors in our own code. If I were looking in my own product's source tree, I might do something like grep the appropriate part of the source base for the misspelled word envionment but I'm not familiar with the tomcat source tree. I've done that for Tomcat and Commons Daemon (including the source history) and can find no such mis-spelling. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.orgmailto:users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.orgmailto: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: Invalid command 'SHUTDOW' received
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Frederick, On 7/19/2011 1:43 PM, Frederick Ouimet wrote: WARNING: StandardServer.await: Invalid command 'SHUTDOW' received I would ask if that's a copy/paste error, but I can see you have many of them in the log file: 2-Jul-2011 9:41:19 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:24 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:26 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received SHUTDOW is not the expected shutdown string in a default install (it should be SHUTDOWN - note the final N). I can see that it eventually works: 2-Jul-2011 9:41:39 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'SHUTDOW' received 2-Jul-2011 9:41:40 PM org.apache.catalina.core.StandardServer await INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance. How is it that you got a string of invalid ones, and then a valid one? Are you using a default server.xml file, or have you modified it in any way? You might want to post server.xml, minus anything sensitive (passwords, etc.). I don't use Tomcat on Windows but I believe that under all configurations, Tomcat reads it's own server.xml to determine the shutdown string to send to the local process, so everything should be fine. Is it possible that you are using more than one server.xml file and that one of them has shutdown=SHUTDOW set. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4l36gACgkQ9CaO5/Lv0PDjBgCeJKivpXSE4lw7AVe5vG/eqRjH 6cIAoLSI2MF1QWUNm/XZNMjqwkZ+6v4G =It8u -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 7 Performance Issues when retriving JAR files during TLD file parsing.
Hi, We recently updated our development environment from Tomcat 6.0.29 to 7.0.19 and noticed a large decrease in performance where pages that would load in 1 second now taking 5 seconds to load. Profiling the webapp through Netbeans, we narrowed down the problem to a method retrieving a JarFile object inside org.apache.jasper.compiler.ParseController when parsing TLD files. Screenshots of the Profiler Hotspots and Call Tree from both versions of Tomcat are available here: http://imgur.com/a/ZmeWM A comparison of the getJarFile() methods shows few differences: Tomcat 7: org.apache.jasper.compiler.JarURLResource public JarFile getJarFile() throws IOException { URL jarFileUrl = new URL(jar: + jarUrl + !/); JarURLConnection conn = (JarURLConnection) jarFileUrl.openConnection(); conn.setUseCaches(false); conn.connect(); return conn.getJarFile(); } Tomcat 6: org.apache.japser.compiler.ParserController private JarFile getJarFile(URL jarFileUrl) throws IOException { JarFile jarFile = null; if (jarFileUrl != null) { JarURLConnection conn = (JarURLConnection) jarFileUrl.openConnection(); conn.setUseCaches(false); conn.connect(); jarFile = conn.getJarFile(); } return jarFile; } From the call trees, Tomcat 7's instantiation of a URL object on each invocation is not the cause of the problem. Extracting the URL paths with a debugger gave the following results: Tomcat 6: file:/C:/svn/[PATH_TO_PROJECT]/server/target/snapshot/WEB-INF/lib/[OUR_JAR].jar!/ Tomcat 7: jndi:/localhost/snapshot/WEB-INF/lib/[OUR_JAR].jar!/ Our best guess is that the different handlers for the URL objects are causing our performance issues. Has anyone else experienced this issue under Tomcat 7 or knows how we could go about resolving this problem? Thanks,
Re: Invalid command 'SHUTDOW' received
Chris, Christopher Schultz wrote: ... How is it that you got a string of invalid ones, and then a valid one? I believe that this is the exact question which the OP was himself submitting... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: RedHat and mod_jk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 7/18/2011 11:33 AM, André Warnier wrote: The basic point is : mod_jk is not included in the RedHat standard Apache/Tomcat packages. But maybe this is just an oversight of RedHat, and maybe with a little nudge, they may be persuaded to include it again. Does anyone know how one would go about trying to nudge them in this direction ? There are a few Tomcat committers who work directly for RedHat. Perhaps they could advocate. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4l9S8ACgkQ9CaO5/Lv0PAjFwCgpaHDpbGtmFMKfvHFKhbLwQqi E/8An2MzsFepWsGEPJ3UV0WmrNXpH6b9 =Li54 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 7 Performance Issues when retriving JAR files during TLD file parsing.
On 19/07/2011 21:25, Robert Stoski wrote: Our best guess is that the different handlers for the URL objects are causing our performance issues. That looks familiar. Tomcat 7 re-factored the Jar scanning so that consistent code (that fixed some edge case bugs) was used for annotation scanning, TLD scanning etc as well as making the whole process extensible. Along the way, a few places that used file URLs switched to JNDI urls and in some cases that triggered a performance hit. Looks liek you have found another one. Open a bugzilla issue and soemone should take a look for the 7.0.20 release. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Invalid command 'SHUTDOW' received
?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- Note: A Server is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/server.html -- Server port=8005 shutdown=SHUTDOWN !-- Security listener. Documentation at /docs/config/listeners.html Listener className=org.apache.catalina.security.SecurityListener / -- !--APR library loader. Documentation at /docs/apr.html -- Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -- Listener className=org.apache.catalina.core.JasperListener / !-- Prevent memory leaks due to use of particular java/javax APIs-- Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.core.ThreadLocalLeakPreventionListener / !-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html -- GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container Note: A Service is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/service.html -- Service name=Catalina !--The connectors can use a shared executor, you can define one or more named thread pools-- !-- Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=150 minSpareThreads=4/ -- !-- A Connector represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / !-- A Connector using the shared thread pool-- !-- Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / -- !-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation -- !-- Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=150 scheme=https secure=true clientAuth=false sslProtocol=TLS / -- !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 protocol=AJP/1.3 redirectPort=8443 / !-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html -- !-- You should set jvmRoute to support load-balancing via AJP ie : Engine name=Catalina defaultHost=localhost jvmRoute=jvm1 -- Engine name=Catalina defaultHost=localhost !--For clustering, please take a look at documentation at: /docs/cluster-howto.html (simple how to) /docs/config/cluster.html (reference documentation) -- !-- Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/ -- !-- Use the LockOutRealm to prevent attempts to guess user passwords
RE: Tomcat 7 Performance Issues when retriving JAR files during TLD file parsing.
Thanks, Mark. We found some information regarding performance issues in Tomcat 7 but could not relate them to the problem we were seeing. This has been raised as bug 51532 (http://issues.apache.org/bugzilla/show_bug.cgi?id=51532). -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: July-19-11 3:32 PM To: Tomcat Users List Subject: Re: Tomcat 7 Performance Issues when retriving JAR files during TLD file parsing. On 19/07/2011 21:25, Robert Stoski wrote: Our best guess is that the different handlers for the URL objects are causing our performance issues. That looks familiar. Tomcat 7 re-factored the Jar scanning so that consistent code (that fixed some edge case bugs) was used for annotation scanning, TLD scanning etc as well as making the whole process extensible. Along the way, a few places that used file URLs switched to JNDI urls and in some cases that triggered a performance hit. Looks liek you have found another one. Open a bugzilla issue and soemone should take a look for the 7.0.20 release. Mark - 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: Invalid command 'SHUTDOW' received
2011/7/19 Frederick Ouimet foui...@gmail.com: - Tried using JDK1.5.0_22 instead of JDK1.6.0_25 to no avail. 1. Is your system 32-bit or 64-bit? Do you use 64-bit JDK or 32-bit JDK? 2. What is language and default character set in your system? 3. I wonder what will happen if you edit shutdown command value in your system.xml. Does it trim last character, any characters after 7th one, or character 'N' specifically? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat and comp jndi context
Hi, where can i get more information on the way tomcat manage its jndi tree? Pratically i need the get java:comp context but i don't know when/where to look up it. I didn't find it in ContextBindings.getClassLoader() in start or after_start lifecycle event. any link or doc is appreciated ;) - Romain
Tomcat 7 parallel deployment and PermGen Heap Space
Hi, I was checking out the parallel deployment feature of tomcat 7 and encountered an issue with PermGen space of JVM. After the initial deployment (xyz##001.war), PermGen space reaches ~120mb of space and after parallel deployment (xyz##002.war) it almost doubles (~205mb) which make sense. Now if i remove the old war file (xyz##001.war) by removing xyz##001.xml ($catalina_home/conf/Catalina/locahost/xyz##001.xml), PermGen space doesn't come down. I have waited upto 4 hrs but no luck. Once i restart the JVM then only it comes down to ~120 range. Is anybody else faced this issue? I would hate to restart the JVM after deployment which totally defeats the purpose of parallel deployment. Setup details: OS -- RHEL - 5.5 (64 Bit) Tomcat -- 7.0.14 Java -- jre1.6.0_25 (64 bit) Tomcat APR -- apr-1.4.5 (64 bit) java service wrapper -- 3.5.9 (64 bit) Attached are server.xml and wrapper.conf files. Thanks in advance Kapil ?xml version='1.0' encoding='utf-8'? Server port=8005 shutdown=tomcat7shutdown Listener className=org.apache.catalina.security.SecurityListener / Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.core.ThreadLocalLeakPreventionListener / !-- Global JNDI resources -- GlobalNamingResources Environment name=config/envType override=false type=java.lang.String value=DEV2/ Environment name=config/envLocation override=false type=java.lang.String value=SD/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / JNDI Detail /GlobalNamingResources Service name=Catalina Connector protocol=org.apache.coyote.http11.Http11AprProtocol port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=15 maxSpareThreads=50 enableLookups=false disableUploadTimeout=true maxPostSize=8388608 acceptCount=100 connectionTimeout=2 / Connector protocol=org.apache.coyote.http11.Http11AprProtocol port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=15 maxSpareThreads=50 enableLookups=false disableUploadTimeout=true maxPostSize=8388608 acceptCount=100 connectionTimeout=2 scheme=https secure=true clientAuth=false sslProtocol=TLS SSLEnabled=true SSLCertificateFile=${catalina.base}/conf/default.cert SSLCertificateKeyFile=${catalina.base}/conf/default.key / Engine name=Catalina defaultHost=localhost jvmRoute=jvm1 Realm className=org.apache.catalina.realm.LockOutRealm Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ /Realm Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=access suffix=.log rotatable=false pattern=%h %l %u %t %r %s %b %m %T %I resolveHosts=false/ /Host /Engine /Service /Server #encoding=UTF-8 # # Wrapper Java Properties # # Java Application # Locate the java binary on the system PATH: wrapper.java.command=/local/mnt/java/jre1.6.0_25/bin/java # Tell the Wrapper to log the full generated Java command line. #wrapper.java.command.loglevel=INFO # Java Main class. This class must implement the WrapperListener interface # or guarantee that the WrapperManager class is initialized. Helper # classes are provided to do this for you. See the Integration section # of the documentation for details. wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp #wrapper.java.mainclass=org.tanukisoftware.wrapper.test.Main # Java Classpath (include wrapper.jar) Add class path elements as # needed starting from 1 wrapper.java.classpath.1=../lib/wrappertest.jar wrapper.java.classpath.2=../lib/wrapper.jar wrapper.java.classpath.3=../bin/tomcat-juli.jar
Re: Tomcat 7 parallel deployment and PermGen Heap Space
On 20.07.2011 01:32, Monsieur fsfu wrote: Hi, I was checking out the parallel deployment feature of tomcat 7 and encountered an issue with PermGen space of JVM. After the initial deployment (xyz##001.war), PermGen space reaches ~120mb of space and after parallel deployment (xyz##002.war) it almost doubles (~205mb) which make sense. Now if i remove the old war file (xyz##001.war) by removing xyz##001.xml ($catalina_home/conf/Catalina/locahost/xyz##001.xml), PermGen space doesn't come down. I have waited upto 4 hrs but no luck. Once i restart the JVM then only it comes down to ~120 range. Is anybody else faced this issue? I would hate to restart the JVM after deployment which totally defeats the purpose of parallel deployment. Setup details: OS -- RHEL - 5.5 (64 Bit) Tomcat -- 7.0.14 Java -- jre1.6.0_25 (64 bit) Tomcat APR -- apr-1.4.5 (64 bit) java service wrapper -- 3.5.9 (64 bit) Attached are server.xml and wrapper.conf files. Look for the word leak in the Tomcat log files after undeploying one version. Those log lines give you hints, why Tomcat could not unload the classes. Unfortunately the solutions can be tricky, so for complex web applications it is not uncommon, that you migt have to live with those leaks, in other words provide more perm gen space and still restart every now and then. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 7 parallel deployment and PermGen Heap Space
2011/7/20 Monsieur fsfu monsieurf...@gmail.com: I was checking out the parallel deployment feature of tomcat 7 and encountered an issue with PermGen space of JVM. After the initial deployment (xyz##001.war), PermGen space reaches ~120mb of space and after parallel deployment (xyz##002.war) it almost doubles (~205mb) which make sense. Now if i remove the old war file (xyz##001.war) by removing xyz##001.xml ($catalina_home/conf/Catalina/locahost/xyz##001.xml), PermGen space doesn't come down. I have waited upto 4 hrs but no luck. PermGen usage is caused by classloader of the old webapp that is still present in memory. There can be many causes of that. You would have to take a heap dump and analyze it using a tool like MAT from Eclipse IDE. You may read http://wiki.apache.org/tomcat/MemoryLeakProtection Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 7 parallel deployment and PermGen Heap Space
From: Monsieur fsfu [mailto:monsieurf...@gmail.com] Subject: Tomcat 7 parallel deployment and PermGen Heap Space Now if i remove the old war file (xyz##001.war) by removing xyz##001.xml ($catalina_home/conf/Catalina/locahost/xyz##001.xml), PermGen space doesn't come down. First, verify that the first instance really has been undeployed. Second, unless you insure that at least two full GCs happen after undeploying the first .war file, class unloading will not occur. Even then, it's a bit of guess whether or not the JVM will choose to unload classes in the absence of pressure on PermGen. Regardless, as others suggested, running some heap analysis tool will find out if you've got a leak built into your webapp, or if the JVM has simply decided not to bother with class unloading yet. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Servlet 3.0 Specific Error: Invalid byte tag in constant pool
Hey guys, tomcat 7.0.19 Java 1.6.0_22 CentOS 5.6 I just switched the web.xml to servlet 3.0 (from a app running servlet 2.4 previously without issue) and now I'm seeing the following error (turned on fine logging in the util class): FINE: Scanning JAR [file:/usr/java/jdk1.6.0_22/jre/lib/ext/jcharset.jar] from classpath Jul 19, 2011 10:04:40 AM org.apache.catalina.startup.HostConfig deployDirectory SEVERE: Error deploying web application directory ROOT org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 60 Thanks, Matt
Re: Tomcat 7 parallel deployment and PermGen Heap Space
@Chuck -- The moment I remove context xml (xyz##001.xml) file, tomcat automagically removes the corresponding dir from webapps. So that's not an issue. In my log file i see the following message INFO | jvm 1| 2011/07/19 16:11:07 | Jul 19, 2011 4:11:07 PM org.apache.catalina.startup.HostConfig checkResources INFO | jvm 1| 2011/07/19 16:11:07 | INFO: Undeploying context [##001] INFO | jvm 1| 2011/07/19 16:11:07 | Jul 19, 2011 4:11:07 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc INFO | jvm 1| 2011/07/19 16:11:07 | SEVERE: The web application [##001] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. Currently i am using commons-dbcp connection pooling. I will switch to Tomcat-JDBC connection pool and see if memory leak message goes away or not. I will update this thread with my findings. Thanks all you guys with your suggestion... On Tue, Jul 19, 2011 at 5:33 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Monsieur fsfu [mailto:monsieurf...@gmail.com] Subject: Tomcat 7 parallel deployment and PermGen Heap Space Now if i remove the old war file (xyz##001.war) by removing xyz##001.xml ($catalina_home/conf/Catalina/locahost/xyz##001.xml), PermGen space doesn't come down. First, verify that the first instance really has been undeployed. Second, unless you insure that at least two full GCs happen after undeploying the first .war file, class unloading will not occur. Even then, it's a bit of guess whether or not the JVM will choose to unload classes in the absence of pressure on PermGen. Regardless, as others suggested, running some heap analysis tool will find out if you've got a leak built into your webapp, or if the JVM has simply decided not to bother with class unloading yet. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org