solved: helloword tomcat w3schools
Hi guys- I solved the castiing problem with jakarta. The jakarta is used instead of javax now. I needed to update my pom and then run mvn install -U. The servlet runs correctly on tomcat now. thanks all, jim Sent with Proton Mail secure email. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
additional pom to go with w3schools helloworld question (formatted)
Hi - Here is my formatted pom. thanks http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; xmlns="http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> 4.0.0 local NewJavaMavenProject NewJavaMavenProject 0.1.0-SNAPSHOT war 3.8.1 17 17 javax.servlet javax.servlet-api 4.0.0 provided exclude-central-repo true central https://repo.maven.apache.org/maven2 true true src/main/java maven-compiler-plugin true org.apache.maven.plugins maven-war-plugin 3.4.0 org.apache.maven.plugins maven-jar-plugin Sent with Proton Mail secure email. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
plaint text version of question: hello world w3schools (tomcat)
Hi- I am resending my msg. in plain text wondering how to get tomcat to render my servlet for hellworld from code I got at w3schools. I am trying to follow the guidelines: TOMCAT 10.1.10 + plain text email! THANKS code and configuration files: import java.io.IOException; import java.io.PrintWriter; import javax.servlet.Servlet; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; /** * This servlet program is used to print "Hello World" on * client browser by implementing servlet interface. * @author w3spoint */ public class HelloWorld implements Servlet { private static final long serialVersionUID = 1L; //no-argument constructor. public HelloWorld() { } ServletConfig config=null; @Override public void init(ServletConfig config) throws ServletException { this.config = config; System.out.println("Do initialization here."); } @Override public void destroy() { System.out.println("Do clean-up process here."); } @Override public ServletConfig getServletConfig() { return config; } @Override public String getServletInfo() { return "w3spoint.com"; } @Override public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("Hello World example using " + "servlet interface."); out.close(); } } http://java.sun.com/xml/ns/j2ee; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;> HelloWorld HelloWorld HelloWorld /HelloWorld url: http://localhost:8080/examples/HelloWorld error msg: Root Cause java.lang.ClassCastException: class HelloWorld cannot be cast to class jakarta.servlet.Servlet Sent with Proton Mail secure email. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
new user trying to get a sample servlet to run from w3school
Hi- I get the following error msg on tomcat at this URL: http://localhost:8080/examples/HelloWorld I am wondering it seems like I am getting the maven project to build in Moonshine IDE. then I put a new web.xml file in the examples directory in the tomcat server unzipped files. Then, I try to copy my class over and run the example, and I get this error msg. listed below. I just want to try to deploy one or two servlets which I know little about, so I can switch to blazeds and use tomcat. It's kind of like a helloworld to tomcat intro. I am hoping to use apache royale with blazeds. Any help is greatly appreciated. THANKS. j. mcnamara Root Cause java.lang.ClassCastException: class HelloWorld cannot be cast to class jakarta.servlet.Servlet import java.io.IOException; import java.io.PrintWriter; import javax.servlet.Servlet; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; /** * This servlet program is used to print "Hello World" on * client browser by implementing servlet interface. * @author w3spoint */ public class HelloWorld implements Servlet { private static final long serialVersionUID = 1L; //no-argument constructor. public HelloWorld() { } ServletConfig config=null; @Override public void init(ServletConfig config) throws ServletException { this.config = config; System.out.println("Do initialization here."); } @Override public void destroy() { System.out.println("Do clean-up process here."); } @Override public ServletConfig getServletConfig() { return config; } @Override public String getServletInfo() { return "w3spoint.com"; } @Override public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("Hello World example using " + "servlet interface."); out.close(); }} // the sample code taken from w3schools builds right the web.xml reads from conf/server.xml my pom.xml looks like this: http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; xmlns="http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> 4.0.0 local NewJavaMavenProject NewJavaMavenProject 0.1.0-SNAPSHOT war 3.8.1 17 17 javax.servlet javax.servlet-api 4.0.0 provided exclude-central-repo true central https://repo.maven.apache.org/maven2 true true src/main/java maven-compiler-plugin true org.apache.maven.plugins maven-war-plugin 3.4.0 org.apache.maven.plugins maven-jar-plugin Sent with [Proton Mail](https://proton.me/) secure email.
Re: connecting tomcat server to eclipse java ee
Well…. When you see that message, Eclipse has gone through it’s table of Tomcat version possibilities known at the time your version of Eclipse was published, and hasn't found it. Must’ve come *after*. Therefore, The version of Eclipse you need to use has got to have been released *after* the version of Tomcat that you’ve got installed. That way, it will have that version of Tomcat in it’s table of known Tomcat versions it can choose from. Folks, do you concur, or am I wrong here? - Jim Henk > On Mar 9, 2023, at 6:36 PM, Stephanie Panah wrote: > > Help please. I have installed: Java EE, Eclipse and Tomcat. > When I try to connect the server, I encounter: > Unknown version of Tomcat was specified. > I am looking all over. please help > > Java EE for web developers > C:\Users\steph> java -fullversion > java full version "17.0.6+9-LTS-190" > > and > Eclipse IDE for Enterprise Java and Web Developers > Version: 2022-12 (4.26.0) > Build id: 20221201-1913 > > and > http://localhost:8080/ > Apache Tomcat/10.1.7 > If you're seeing this, you've successfully installed Tomcat. > Congratulations! > C:\Program Files\Apache Software Foundation\Tomcat 10.1 > and Tomcat is running in Services - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: configuring Tomcat on ASUSTOR NAS???
Found it! If anybody is wondering, it’s at /volume1/.@plugins/AppCentral/tomcat/conf Sorry to bother you. - Head no longer itching. > On Feb 14, 2023, at 12:47 AM, JIM HENK wrote: > > Hi. > > I’ve got an ASUSTOR NAS drive, and have used their utility to install their > port of Tomcat. Yes, it *does* come up successfully. However, when I use > their folder browser to go to the Tomcat directory, I see a *very strange* > folder tree, and I can’t find the conf directory anywhere to assign users to > groups, so I can get into the Manager app, for instance. Does anybody know > how I’m supposed to get in to configure Tomcat on the ASUSTOR NAS? Where the > heck is the conf directory? And no, there doesn’t seem to be anywhere to > access env vars, including CATALINA_HOME, so there’s that, as well. > > - Scratching head in San Diego. > - > 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
configuring Tomcat on ASUSTOR NAS???
Hi. I’ve got an ASUSTOR NAS drive, and have used their utility to install their port of Tomcat. Yes, it *does* come up successfully. However, when I use their folder browser to go to the Tomcat directory, I see a *very strange* folder tree, and I can’t find the conf directory anywhere to assign users to groups, so I can get into the Manager app, for instance. Does anybody know how I’m supposed to get in to configure Tomcat on the ASUSTOR NAS? Where the heck is the conf directory? And no, there doesn’t seem to be anywhere to access env vars, including CATALINA_HOME, so there’s that, as well. - Scratching head in San Diego. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat is hanging up when I try to access local host:8080
I am having a problem when I am in my browser trying to access html documents on my localhost. I am running apache-tomcat-8.0.50 on Bunsen Labs Lithium release, which is a derivative of the Debian "buster" release. I have tried accessing localhost:8080 in both Firefox and Opera with the same results, so I suspect the problem is either with the Tomcat server or the OS support of port 8080 is failing somehow. I ran into this problem several days ago. I had no idea how to fix the failure of port 8080, so I reinstalled the operating system. A few days have gone by, but I have now run into the same problem. I can't keep re-installing the O/S, so it is time to try to figure the root cause of the problem and try to fix it. The problem occurs when I enter "localhost:8080/someURL" or just "localhost:8080" in a browser search bar. If I do this, the browser window tab hangs up and indicates that it is searching, but nothing comes up in the tab. It just hangs there. I think the browser is searching because in the window tab where the tab name is, a small dot bounces back-and-forth, indication the widow has begun the search. Note that if I try to enter a URL to the outside world, e.g. www.ebay.com, the browser will work properly and the requested page will be displayed. If I ping my local host at 127.0.1.1, I do get the expected response. If I look at the Firefox Web Console, no errors are indicated. If I try to access a URL other than at port 8080 of the localhost, everything works fine. I tried stopping and starting tomcat a number of times and the behavior did not change. I then decided to look at the catalina.out log file. I found that when I shutdown tomcat, nothing was sent to the log. But when I restarted tomcat, the catalina.out file was appended with the information that I am attaching as "catalina.append.txt". This looks suspicious to me, but I don't know how to interpret the information. Can someone tell me what, if anything, the log indicates? I am fairly experienced with Linux system administraion, but this is a case I am stumped on what testing can be done or where or what I should examine. Any suggestions on what look for on the PC will be appreciated. Jim A25-Jan-2022 12:42:20.410 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.50 25-Jan-2022 12:42:20.411 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 7 2018 20:06:05 UTC 25-Jan-2022 12:42:20.412 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.50.0 25-Jan-2022 12:42:20.412 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux 25-Jan-2022 12:42:20.412 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.19.0-17-amd64 25-Jan-2022 12:42:20.412 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64 25-Jan-2022 12:42:20.412 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/share/jdk1.8.0_301/jre 25-Jan-2022 12:42:20.412 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_301-b09 25-Jan-2022 12:42:20.412 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation 25-Jan-2022 12:42:20.412 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/share/apache-tomcat-8.0.50 25-Jan-2022 12:42:20.412 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/share/apache-tomcat-8.0.50 25-Jan-2022 12:42:20.413 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties 25-Jan-2022 12:42:20.413 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 25-Jan-2022 12:42:20.413 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 25-Jan-2022 12:42:20.413 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources 25-Jan-2022 12:42:20.413 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs= 25-Jan-2022 12:42:20.413 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/share/tomcat 25-Jan-2022 12:42:20.413 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/share/tomcat 25-Jan-2022 12:42:20.413 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log
Tomcat JSP error message: Syntax error on token ";"
I'm using Tomcat 8.5.63 and in the last few days I started getting an error message in a few of my JSP files. The error message is: START ERROR Type Exception Report Message Unable to compile class for JSP: Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [1] in the jsp file: [/pages/list.jsp] Syntax error on token ";", enum expected after this token 1: <%@ page language="java" contentType="text/html" %> 2: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core <http://java.sun.com/jsp/jstl/core>" %> 3: <%@ page import = "java.io.*,java.util.*" %> 4: <%@ page import="bfs.hypBeans.HypEvent" %> _END ERROR___ As you can see, there is no semicolon in line 1 and the error message is showing the code exactly as it is in the tomcat/webapps/... directory. Can anyone help explain why a semi-colon error would be reported in the error message when it does not exist in the source code? Thanks in advance for any advise/guindance. Jim A. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Upgraded to 8.5.63, ssl stopped working...?
This was the fix. Thank you! jim On Thu, Feb 11, 2021 at 11:17 PM Mark Thomas wrote: > Check the user the Tomcat service is running as. This changed from Local > System (essentially an admin account) to the less privileged Local Service. > > Mark > > >
Re: Upgraded to 8.5.63, ssl stopped working...?
Yes, the file is there and readable. The NTFS permissions have only the built-in SYSTEM, CREATOR OWNER, and domain administrators group as having any kind of access to the folder. This was working before I started upgrading. The last modified date is 2017 on that file. jim On Thu, Feb 11, 2021 at 2:17 PM Rémy Maucherat wrote: > On Thu, Feb 11, 2021 at 10:33 PM Jim Weill > wrote: > > > Sorry, I should have posted it yesterday. This was the only thing I > could > > find that had anything like an error in the stderr log: > > > > 10-Feb-2021 17:34:09.930 SEVERE [main] > > org.apache.catalina.core.StandardService.initInternal Failed to > initialize > > connector [Connector[HTTP/1.1-8443]] > > org.apache.catalina.LifecycleException: Protocol handler initialization > > failed > > at > > org.apache.catalina.connector.Connector.initInternal(Connector.java:1077) > > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136) > > at > > > > > org.apache.catalina.core.StandardService.initInternal(StandardService.java:552) > > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136) > > at > > > > > org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:846) > > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136) > > at org.apache.catalina.startup.Catalina.load(Catalina.java:639) > > at org.apache.catalina.startup.Catalina.load(Catalina.java:662) > > 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 org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:302) > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:472) > > Caused by: java.lang.IllegalArgumentException: Illegal character in > opaque > > part at index 2: D:\_ssh\_.ICSI.Berkeley.EDU.key > > at > > org.apache.tomcat.util.net > > .AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:100) > > at > > org.apache.tomcat.util.net > > .AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:72) > > at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:247) > > at > > org.apache.tomcat.util.net > > .AbstractEndpoint.init(AbstractEndpoint.java:1143) > > at > > org.apache.tomcat.util.net > > .AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:222) > > at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:599) > > at > > > > > org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80) > > at > > org.apache.catalina.connector.Connector.initInternal(Connector.java:1075) > > ... 13 more > > Caused by: java.lang.IllegalArgumentException: Illegal character in > opaque > > part at index 2: D:\_ssh\_.ICSI.Berkeley.EDU.key > > at java.net.URI.create(Unknown Source) > > at java.net.URI.resolve(Unknown Source) > > at > > > > > org.apache.tomcat.util.file.ConfigFileLoader.getURI(ConfigFileLoader.java:105) > > at > > > > > org.apache.tomcat.util.file.ConfigFileLoader.getInputStream(ConfigFileLoader.java:88) > > at org.apache.tomcat.util.net.jsse.PEMFile.(PEMFile.java:98) > > at org.apache.tomcat.util.net.jsse.PEMFile.(PEMFile.java:90) > > at > > org.apache.tomcat.util.net > > .SSLUtilBase.getKeyManagers(SSLUtilBase.java:313) > > at > > org.apache.tomcat.util.net > > .SSLUtilBase.createSSLContext(SSLUtilBase.java:245) > > at > > org.apache.tomcat.util.net > > .AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:98) > > ... 20 more > > Caused by: java.net.URISyntaxException: Illegal character in opaque part > at > > index 2: D:\_ssh\_.ICSI.Berkeley.EDU.key > > at java.net.URI$Parser.fail(Unknown Source) > > at java.net.URI$Parser.checkChars(Unknown Source) > > at java.net.URI$Parser.parse(Unknown Source) > > at java.net.URI.(Unknown Source) > > ... 29 more > > 10-Feb-2021 17:34:09.930 INFO [main] > > org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler > > ["ajp-nio-127.0.0.1-8009"] > > 10-Feb-2021 17:34:09.930 INFO [main] > > org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a > > shared > > selector for servlet write/read > > 10-Feb-2021 17:34:09.930 INFO [main] > > org.apache.catalina.startup.Catalina.load Initialization processed in > 1522 > > ms > > > > This happens when D:\_ssh\_.ICSI.Berkeley.ED
Re: Upgraded to 8.5.63, ssl stopped working...?
Sorry, I should have posted it yesterday. This was the only thing I could find that had anything like an error in the stderr log: 10-Feb-2021 17:34:09.930 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-8443]] org.apache.catalina.LifecycleException: Protocol handler initialization failed at org.apache.catalina.connector.Connector.initInternal(Connector.java:1077) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:552) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:846) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136) at org.apache.catalina.startup.Catalina.load(Catalina.java:639) at org.apache.catalina.startup.Catalina.load(Catalina.java:662) 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 org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:302) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:472) Caused by: java.lang.IllegalArgumentException: Illegal character in opaque part at index 2: D:\_ssh\_.ICSI.Berkeley.EDU.key at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:100) at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:72) at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:247) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1143) at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:222) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:599) at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80) at org.apache.catalina.connector.Connector.initInternal(Connector.java:1075) ... 13 more Caused by: java.lang.IllegalArgumentException: Illegal character in opaque part at index 2: D:\_ssh\_.ICSI.Berkeley.EDU.key at java.net.URI.create(Unknown Source) at java.net.URI.resolve(Unknown Source) at org.apache.tomcat.util.file.ConfigFileLoader.getURI(ConfigFileLoader.java:105) at org.apache.tomcat.util.file.ConfigFileLoader.getInputStream(ConfigFileLoader.java:88) at org.apache.tomcat.util.net.jsse.PEMFile.(PEMFile.java:98) at org.apache.tomcat.util.net.jsse.PEMFile.(PEMFile.java:90) at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:313) at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:245) at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:98) ... 20 more Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 2: D:\_ssh\_.ICSI.Berkeley.EDU.key at java.net.URI$Parser.fail(Unknown Source) at java.net.URI$Parser.checkChars(Unknown Source) at java.net.URI$Parser.parse(Unknown Source) at java.net.URI.(Unknown Source) ... 29 more 10-Feb-2021 17:34:09.930 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-127.0.0.1-8009"] 10-Feb-2021 17:34:09.930 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 10-Feb-2021 17:34:09.930 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1522 ms On Thu, Feb 11, 2021 at 12:17 AM Mark Thomas wrote: > On 11/02/2021 02:06, Jim Weill wrote: > > I had 8.5.41 working and decided to do the upgrade to 8.5.63 today on > > Windows Server 2012r2. I've had success with stopping the service, > > renaming the tomcat directory, putting the unzipped files of the new > > version in its place, and dropping in the server.xml, and web.xml files > to > > replace the default files. As well, I copy over the webapps folder for > the > > site, then restart the service. This process has worked many times > before. > > > > When I did this today, the service would not start for some reason. So I > > renamed the folders back to their original names, and then ran the > > uninstall from the add/remove programs. I ran the install executable on > > 8.5.63, dropped in the webapps folder, and the server.xml and web.xml > files > > and the service started, but the site never loads, even on localhost. > > What do you see in the logs? Ideally you want to clear the logs, start > Tomcat, make a single request, stop Tomcat and then look at the logs. > > If you see an error, the safest approach is to fix that error and then > repeat the process as subsequent errors are often side-effects of the > first error. > > Mark > > --
Upgraded to 8.5.63, ssl stopped working...?
I had 8.5.41 working and decided to do the upgrade to 8.5.63 today on Windows Server 2012r2. I've had success with stopping the service, renaming the tomcat directory, putting the unzipped files of the new version in its place, and dropping in the server.xml, and web.xml files to replace the default files. As well, I copy over the webapps folder for the site, then restart the service. This process has worked many times before. When I did this today, the service would not start for some reason. So I renamed the folders back to their original names, and then ran the uninstall from the add/remove programs. I ran the install executable on 8.5.63, dropped in the webapps folder, and the server.xml and web.xml files and the service started, but the site never loads, even on localhost. This is the server.xml I'm using, first configured back in 2017. I could probably pare it down, but once it started working, I didn't feel like messing with removing the commented sections. :)
RE: [OT] Spring Security LDAPS authenticator won't trust TLS cert
Hi Chris, Are these typos for trustStrore (should be trustStore, yes?) from below from a copy/paste? > -Djavax.net.ssl.trustStrore=conf/truststore.jks > -Djavax.net.ssl.trustStrorePassword=[the password] I'm not a spring expert at all but everything else you mentioned looks right to me, that's the only thing that looked off. HTH - Jim -Original Message- From: Christopher Schultz Sent: Monday, January 25, 2021 11:11 AM To: Tomcat Users List Subject: [OT] Spring Security LDAPS authenticator won't trust TLS cert CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. All, Off-topic, but I know there are plenty of Spring users on this list who can probably help me figure this out. Recently, Let's Encrypt switched from using their soon-to-be-expiring intermediate certificate: Owner: CN=Let's Encrypt Authority X3, O=Let's Encrypt, C=US Issuer: CN=DST Root CA X3, O=Digital Signature Trust Co. Serial number: a014142015385736a0b85eca708 Valid from: Thu Mar 17 12:40:46 EDT 2016 until: Wed Mar 17 12:40:46 EDT 2021 To this new one: Owner: CN=R3, O=Let's Encrypt, C=US Issuer: CN=DST Root CA X3, O=Digital Signature Trust Co. Serial number: 400175048314a4c8218c84a90c16cddf Valid from: Wed Oct 07 15:21:40 EDT 2020 until: Wed Sep 29 15:21:40 EDT 2021 We are using LE for our LDAPS server and our latest-issued certificate is signed by and includes the above ("R3") certificate in the server's certificate chain when contacted by a client. As soon as this switch occurred on Saturday, two of my dependent services stopped working. It took me quite a while to figure out the underlying issue, but I got one of them back up and running by simply adding the new R3 intermediate certificate to the trust store of a non-Java service (actually, it was Apache httpd mod_authz_ldap). That was fun tracking-down, but I digress. The other service is JasperReports Server, which uses Spring Security for authentication against our LDAPS database. It's running on Tomcat, and here is the important part (IMO) of the command-line of the running process: -Djavax.net.ssl.trustStrore=conf/truststore.jks -Djavax.net.ssl.trustStrorePassword=[the password] The "conf" directory refers to $CATALINA_BASE/conf. Dumping the existing conf/truststore.jks file reveals the contents: Alias name: letsencrypt Creation date: Dec 12, 2016 Entry type: trustedCertEntry Owner: CN=Let's Encrypt Authority X3, O=Let's Encrypt, C=US Issuer: CN=DST Root CA X3, O=Digital Signature Trust Co. Serial number: a014142015385736a0b85eca708 Valid from: Thu Mar 17 12:40:46 EDT 2016 until: Wed Mar 17 12:40:46 EDT 2021 Nice. So just add the new certificate to the trust store and restart the service, right? $ keytool -importcert -alias 'letsencrypt2020' -keystore conf/truststore.jks Enter keystore password: -BEGIN CERTIFICATE- MIIEZTCCA02gAwIBAgIQQAF1BIMUpMghjISpDBbN3zANBgkqhkiG9w0BAQsFADA/ MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT DkRTVCBSb290IENBIFgzMB4XDTIwMTAwNzE5MjE0MFoXDTIxMDkyOTE5MjE0MFow MjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxCzAJBgNVBAMT AlIzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuwIVKMz2oJTTDxLs jVWSw/iC8ZmmekKIp10mqrUrucVMsa+Oa/l1yKPXD0eUFFU1V4yeqKI5GfWCPEKp Tm71O8Mu243AsFzzWTjn7c9p8FoLG77AlCQlh/o3cbMT5xys4Zvv2+Q7RVJFlqnB U840yFLuta7tj95gcOKlVKu2bQ6XpUA0ayvTvGbrZjR8+muLj1cpmfgwF126cm/7 gcWt0oZYPRfH5wm78Sv3htzB2nFd1EbjzK0lwYi8YGd1ZrPxGPeiXOZT/zqItkel /xMY6pgJdz+dU/nPAeX1pnAXFK9jpP+Zs5Od3FOnBv5IhR2haa4ldbsTzFID9e1R oYvbFQIDAQABo4IBaDCCAWQwEgYDVR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8E BAMCAYYwSwYIKwYBBQUHAQEEPzA9MDsGCCsGAQUFBzAChi9odHRwOi8vYXBwcy5p ZGVudHJ1c3QuY29tL3Jvb3RzL2RzdHJvb3RjYXgzLnA3YzAfBgNVHSMEGDAWgBTE p7Gkeyxx+tvhS5B1/8QVYIWJEDBUBgNVHSAETTBLMAgGBmeBDAECATA/BgsrBgEE AYLfEwEBATAwMC4GCCsGAQUFBwIBFiJodHRwOi8vY3BzLnJvb3QteDEubGV0c2Vu Y3J5cHQub3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0 LmNvbS9EU1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFBQusxe3WFbLrlAJQOYf r52LFMLGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0B AQsFAAOCAQEA2UzgyfWEiDcx27sT4rP8i2tiEmxYt0l+PAK3qB8oYevO4C5z70kH ejWEHx2taPDY/laBL21/WKZuNTYQHHPD5b1tXgHXbnL7KqC401dk5VvCadTQsvd8 S8MXjohyc9z9/G2948kLjmE6Flh9dDYrVYA9x2O+hEPGOaEOa1eePynBgPayvUfL qjBstzLhWVQLGAkXXmNs+5ZnPBxzDJOLxhF2JIbeQAcH5H0tZrUlo5ZYyOqA7s9p O5b85o3AM/OJ+CktFBQtfvBhcJVd9wvlwPsk+uyOy2HI7mNxKKgsBTt375teA2Tw UdHkhVNcsAKX1H7GNNLOEADksd86wuoXvg== -END CERTIFICATE- Owner: CN=R3, O=Let's Encrypt, C=US Issuer: CN=DST Root CA X3, O=Digital Signature Trust Co. Serial number: 400175048314a4c8218c84a90c16cddf Valid from: Wed Oct 07 15:21:40 EDT 2020 until: Wed Sep 29 15:21:40 EDT 2021 Certificate fingerprints: MD5: 31:21:28:F5:A0:ED:7B:A5:4B:65:82:92:87:56:BA:83 SHA1: 48:50:4E:97:4C:0D:AC:5B:5C:D4:76:C8:20:22:74:B2:4C:8C:71:72 SHA256: 73:0C:1B:DC:D8:5F:57:CE:
tomcat 9 fails when requesting a new URL
I'm working on developing a web page using Tomcat 9 as the local server. My web page comes up and when I submit my page for processing, the tomcat server crashes. Interestingly, when I run the same sequence in Eclipse, everything works fine. Anyway, I looked at the logs directory and I see some suspicious sections, but nothing that points directly back to source code causing the problem. I cleared the log directory and re-ran my process and I am attaching a compressed tar file of the log directory. I'm wondering if anyone can see any indication that Tomcat 9 is not configured properly. I apologize for sending the entire directory, but it is fairly small and I want to make the entire log available. The most likely error point is the "java.io.StreamCorruptedException: invalid type code: 00" in the catalina.2021-01-10.log file. Can my process or environment be the root cause of this? Jim A jja_tomcat_logs.tgz Description: application/compressed-tar - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: jdbc connction pool issues [EXTERNAL]
Hi Shawn, No, I don't think that maxActive means that it's defining the maximum number of connections for the pool, I think it's strictly referring to the "[ .. ] maximum number of *active connections* that can be allocated from this pool at the same time. [ .. ]" (emphasis mine on active connections) Here is the doc that I've been referring to - sorry for not linking it earlier: https://tomcat.apache.org/tomcat-9.0-doc/jdbc-pool.html On those other Tomcat servers is there a initialSize defined? Jim -Original Message- From: Beard, Shawn Sent: Tuesday, December 15, 2020 2:49 PM To: Tomcat Users List Subject: RE: jdbc connction pool issues [EXTERNAL] But wouldn’t maxActive mean the connection pool has a max of 50 conenctions? On other tomcat servers I have, maxActive is set to 50 and I verified im jmx that there are 50 max connections on the connection pool. Here though I checked jmx, sure enough, its max connections is 8. Shawn Beard Sr. Systems Engineer | BTS Middleware Engineering | +1-515-564-2528 | sbe...@wrberkley.com<mailto:sbe...@wrberkley.com> -Original Message- From: Johnson, Jim Sent: Tuesday, December 15, 2020 1:35 PM To: Tomcat Users List Subject: RE: jdbc connction pool issues [EXTERNAL] ** CAUTION: External message Hi Shawn, I think you’re missing initialSize initialSize (int)The initial number of connections that are created when the pool is started. Default value is 10 maxActive (int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100 It would make sense that 8 connections would be 80% utilized. I would try replacing maxActive with initialSize and seeing how that works for you. Good luck! - Jim From: Beard, Shawn Sent: Tuesday, December 15, 2020 2:12 PM To: Tomcat Users List Subject: jdbc connction pool issues CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. We have this jdbc connection pool set up: However we are getting this error: Resource Pool Limit Reached Time 12/15/20 11:48:00 AM Summary JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=X,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8] Shouldn’t the max connections of the connection pool be 50 since maxActive is 50? Shawn Beard • Sr. Systems Engineer Middleware Engineering [cid:image003.png@01D6D2E3.D5F1EFA0] 3840 109th Street Urbandale, IA 50322 Phone: +1-515-564-2528 Email: sbe...@wrberkley.com<mailto:sbe...@wrberkley.com> Website: berkleytechnologyservices.com<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fnam05.safelinks.protection.outlook.com%2F%3Furl%3Dhttps*3A*2F*2Fwww.berkleytechnologyservices.com*2F%26data%3D04*7C01*7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000%26sdata%3D3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*3D%26reserved%3D0__%3BJSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L--I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp%24data=04%7C01%7CJ1Johnson%40unum.com%7C016565a918474642884608d8a1328579%7Cd5952c785d4e41caaff07174c1f75393%7C0%7C0%7C637436585655273329%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=tBYkHrqnGHyaJPmtqrHIB5LPJLsZfdU4YdsK2JFVwAo%3Dreserved=0 > Technology Leadership Unleashing Business Potential Shawn Beard Sr. Systems Engineer | BTS Middleware Engineering | +1-515-564-2528 | sbe...@wrberkley.com<mailto:sbe...@wrberkley.com> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted. CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
RE: jdbc connction pool issues [EXTERNAL]
Hi Shawn, I can't speak to that monitoring tool or why it reports that way. I do see what you're saying though - I would expect the error message to be something like: >>name="jdbc/DataSource",type=DataSource has reached 80% limit. >>Current pool size [8, Max pool size [10] However, it could be that the number of maxActive connections at the time was 8 and they simply labeled it incorrectly. From my perspective it seemed that if you're getting an alert at 80% pool size and the current pool size is 8 then you're probably looking for a default setting of 10 somewhere that isn't being set and initialSize seemed like a good candidate for that setting. Perhaps you might check your monitoring tool thresholds - I would have to think that 80% is setting off bells and whistles so you have time to act before your JVM blows up. Cheers! - Jim -Original Message- From: Beard, Shawn Sent: Tuesday, December 15, 2020 2:42 PM To: Tomcat Users List Subject: RE: jdbc connction pool issues [EXTERNAL] If default is 10, they why would we be getting an error about 8 being max? Shawn Beard Sr. Systems Engineer | BTS Middleware Engineering | +1-515-564-2528 | sbe...@wrberkley.com<mailto:sbe...@wrberkley.com> -Original Message- From: Johnson, Jim Sent: Tuesday, December 15, 2020 1:35 PM To: Tomcat Users List Subject: RE: jdbc connction pool issues [EXTERNAL] ** CAUTION: External message Hi Shawn, I think you’re missing initialSize initialSize (int)The initial number of connections that are created when the pool is started. Default value is 10 maxActive (int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100 It would make sense that 8 connections would be 80% utilized. I would try replacing maxActive with initialSize and seeing how that works for you. Good luck! - Jim From: Beard, Shawn Sent: Tuesday, December 15, 2020 2:12 PM To: Tomcat Users List Subject: jdbc connction pool issues CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. We have this jdbc connection pool set up: However we are getting this error: Resource Pool Limit Reached Time 12/15/20 11:48:00 AM Summary JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=X,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8] Shouldn’t the max connections of the connection pool be 50 since maxActive is 50? Shawn Beard • Sr. Systems Engineer Middleware Engineering [cid:image003.png@01D6D2E3.D5F1EFA0] 3840 109th Street Urbandale, IA 50322 Phone: +1-515-564-2528 Email: sbe...@wrberkley.com<mailto:sbe...@wrberkley.com> Website: berkleytechnologyservices.com<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fnam05.safelinks.protection.outlook.com%2F%3Furl%3Dhttps*3A*2F*2Fwww.berkleytechnologyservices.com*2F%26data%3D04*7C01*7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000%26sdata%3D3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*3D%26reserved%3D0__%3BJSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L--I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp%24data=04%7C01%7CJ1Johnson%40unum.com%7C45da4026f80749aa4a4308d8a131bb92%7Cd5952c785d4e41caaff07174c1f75393%7C0%7C0%7C637436582286624695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000sdata=SsGXcy8tkFZxQlLMGWv1%2BZGKqnkiDRx3UvGWqo72a7o%3Dreserved=0 > Technology Leadership Unleashing Business Potential Shawn Beard Sr. Systems Engineer | BTS Middleware Engineering | +1-515-564-2528 | sbe...@wrberkley.com<mailto:sbe...@wrberkley.com> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted. CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the doc
RE: jdbc connction pool issues
Hi Shawn, I think you’re missing initialSize initialSize (int)The initial number of connections that are created when the pool is started. Default value is 10 maxActive (int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100 It would make sense that 8 connections would be 80% utilized. I would try replacing maxActive with initialSize and seeing how that works for you. Good luck! - Jim From: Beard, Shawn Sent: Tuesday, December 15, 2020 2:12 PM To: Tomcat Users List Subject: jdbc connction pool issues CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. We have this jdbc connection pool set up: However we are getting this error: Resource Pool Limit Reached Time 12/15/20 11:48:00 AM Summary JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=X,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8] Shouldn’t the max connections of the connection pool be 50 since maxActive is 50? Shawn Beard • Sr. Systems Engineer Middleware Engineering [cid:image003.png@01D6D2E3.D5F1EFA0] 3840 109th Street Urbandale, IA 50322 Phone: +1-515-564-2528 Email: sbe...@wrberkley.com<mailto:sbe...@wrberkley.com> Website: berkleytechnologyservices.com<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.berkleytechnologyservices.com%2F=04%7C01%7CJ1Johnson%40unum.com%7C64e6e4965acb42aebfe708d8a12d798c%7Cd5952c785d4e41caaff07174c1f75393%7C0%7C0%7C637436563975240326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000=3nTT6swXEeC2zC%2BUb7Q7nvgxM214SGf7HJaI%2F4%2BYupA%3D=0> Technology Leadership Unleashing Business Potential Shawn Beard Sr. Systems Engineer | BTS Middleware Engineering | +1-515-564-2528 | sbe...@wrberkley.com<mailto:sbe...@wrberkley.com> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
tomcat v 9.0 crashing in Eclipse IDE Version: 2020-09 (4.17.0)
I am trying to run Tomcat v 9.0 in Eclipse on a linux PC and the server is crashing before if fully starts up. At this point, I do not consider this a user error, but possibly my configuration of Eclipse is a bad one. But even if it is, there should be error message not a crash with a stack trace. For now, I am simply including the error file showing the stack trace. Should I submit this to the developers mailing list? -- Jim Anderson cell - 908-329-0586 Dec 08, 2020 2:17:24 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version name: Apache Tomcat/9.0.38 Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server built: Sep 10 2020 08:20:30 UTC Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version number: 9.0.38.0 Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Name: Linux Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Version:5.4.0-56-generic Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Architecture: amd64 Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Java Home: /usr/lib/jvm/java-11-openjdk-amd64 Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Version: 11.0.9.1+1-Ubuntu-0ubuntu1.20.04 Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Vendor:Ubuntu Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_BASE: /home/jja/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0 Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_HOME: /usr/share/apache-tomcat-9.0.38 Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.base=/home/jja/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0 Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.home=/usr/share/apache-tomcat-9.0.38 Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dwtp.deploy=/home/jja/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps Dec 08, 2020 2:17:25 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dfile.encoding=UTF-8 Dec 08, 2020 2:17:25 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib] Dec 08, 2020 2:17:27 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-nio-8080"] Dec 08, 2020 2:17:27 PM org.apache.catalina.startup.Catalina load INFO: Server initialization in [3411] milliseconds Dec 08, 2020 2:17:27 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service [Catalina] Dec 08, 2020 2:17:27 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet engine: [Apache Tomcat/9.0.38] Dec 08, 2020 2:17:29 PM org.apache.catalina.core.ContainerBase startInternal SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/testProj]] at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardServic
tomcat 9.0 cache warning errors
While writing this post, I managed to fix my own problem with help from the internet. The solution is for anyone running tomcat v 9.0 inside eclipse. Tomcat v9.0 in eclipse gave me a large number of cache warning errors and eventually crashed. While verifying the problem, I discovered a fix discussed at the following url: https://stackoverflow.com/questions/14771710/how-to-solve-javax-servlet-servletexception-java-lang-unsupportedclassversioner That site recommended adding the following line to the tomcat path .../config/context.xml. | I added that line to context.xml and after several iterations of trying, the |||cacheMaxSize value was 60 (i.e. 600M-bytes in size). The website I am working on only contains 22 M-bytes so cache size should not have been an issue, but the warnings kept coming. Then I thought, maybe Eclipse has its own version of tomcat 9.0 and sure enough I found there is a tomcat v 9.0 sub-directory in eclipse/workspace/Servers directory. I added the 'Resources' line shown above to the the conf/context.xml file in the eclipse tomcat v 9.0 sub-directory and that fixed my problem. |So the 2 step fix for cache error messages is: 1) locate the correct version of tomcat in your eclipse workspace 2) add "|||" to your context.xml file. I will update the stackoverflow.com URL with a comment. I'm not sure if this is worth mentioning anywhere in the tomcat documentation. I will leave that to others.|| -- Jim Anderson
Re: ERR_CONNECTION_REFUSED
On Mon, Nov 30, 2020 at 10:39 AM Tercio Pedro wrote: > Hello, > > I am a user of the Tomcat server, I need assistance in configuring the ssl > certificate and port 443. > > I installed the ssl certificate but the site just opens on port 8443 I want > to go to port 443, I already changed the port on the connector > (server.xml), I already enabled the port on the firewall and when I try to > open on port 443 I have the error: ERR_CONNECTION_REFUSED > > I need your help. > > Thanks > Hello, I guess my first questions would be what user / account are you using to run the Tomcat process? Can you confirm that port 443 is actually listening when you start Tomcat? Are there any errors in the catalina.out log? Ports lower than 1024 are considered privileged ports and only root can manage processes that use those ports. There are some workarounds where you can use software like authbind to have a non-root user do it instead but it takes some extra tinkering. There are also folks that run Tomcat on 8443 and then configure iptables to forward port 443 to 8443. There are a few different ways to accomplish what you want to do - have you researched any of these solutions? Jim
Re: Upgrading to tomcat 8.5.41
Yes, we already push notepad++ to the domain clients. This is a great suggestion, thanks! jim On Wed, May 15, 2019 at 3:17 AM André Warnier (tomcat) wrote: > On 15.05.2019 10:16, Mark Thomas wrote: > > On 15/05/2019 08:56, André Warnier (tomcat) wrote: > >> On 15.05.2019 00:23, Jim Weill wrote: > >>> We are currently running 8.5.32 on Server 2012r2. I went to use the > >>> upgrade tool before downloading 8.5.41 and the instructions say "If > there > >>> are no differences you will see an error page." > >>> http://tomcat.apache.org/migration-85.html#Upgrading_8.5.x > >>> > >>> When I check for any differences, even going back to 8.5.0 compared to > >>> 8.5.41, I get a "Forbidden You don't have permission to access > /repos/asf > >>> on this server". Is this the error I'm supposed to expect? > >>> > >> > >> Well no, obviously there is a problem with the page you mention above, I > >> get the same error (and I don't think that was expected behaviour). > >> > >> For now, you will have to apply the "manual" procedure, which generally > >> consist of : > >> - stop tomcat > >> - make a backup of your current tomcat directories (at least "conf") > >> - install the new tomcat in either a new directory, or overwrite the > >> existing one > >> - then manually compare the files in the new "conf", with the backed-up > >> ones. > >> - bring over any "local" changes that you made previously to the "conf" > >> files, into the new ones (and not the opposite). According to the > >> upgrade notes, between different 8.5 versions, there are no breaking > >> changes in terms of configuration parameters, but better safe than > sorry. > >> > >> Problem description : > >> > >> http://tomcat.apache.org/migration-85.html#Upgrading_8.5.x > >> click on the "View Differences" button under > >> "Tomcat 8.5.x configuration file differences" > >> > >> Looks like someone forgot to authorise > >> https://gitbox.apache.org/repos/asf for the world. > >> From https://gitbox.apache.org, it looks like one needs to register > >> first with an apache.org id, in order to use this tool. > >> But this is not clear from the upgrading page. > > > > Infra have disabled the function that this depends on due to high levels > > of abuse (unrelated to our use) that caused availability issues for all > > users. The intention is to re-enable function at some point but ther is > > no firm timescale. > > > > It is fairly easy to do the same thing with git on the command line. > > > > Suggestions for an alternative solution welcome. > > > > Since the OP indicated that this was under Windows, here is my suggestion : > - if not yet available, install a nice editor such as Notepad++ >(and consider donating) > - in Notepad++, there is a builtin plugin called "compare", very easy to > use : >- open both files to compare in Notepad++ >- trigger the plugin : Plugins -> compare -> compare >- this shows a nice side-by-side display of the 2 files, with > highlighted differences > (and you can directly paste from the one to the other) > - use this to compare the files in tomcat/conf, between the current > installed version and > the downloaded new tomcat version > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Upgrading to tomcat 8.5.41
We are currently running 8.5.32 on Server 2012r2. I went to use the upgrade tool before downloading 8.5.41 and the instructions say "If there are no differences you will see an error page." http://tomcat.apache.org/migration-85.html#Upgrading_8.5.x When I check for any differences, even going back to 8.5.0 compared to 8.5.41, I get a "Forbidden You don't have permission to access /repos/asf on this server". Is this the error I'm supposed to expect? jim
Updating tomcat Windows 2012r2
I'm on 8.5.6, and just downloaded 8.5.32 yesterday. On my test machine I stopped the service, copied in the core files, copied over my server.xml, web.xml, and the hosted application and it seems to work just fine, and thinks it's running 8.5.32 when I look at the logs. Is this correct for updating tomcat? I feel like I'm missing something. jim - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: setting packetSize for ajp connector in embedded tomcat via commandline system property
Hi Chris, > What led you to believe that there was a particular system property that had > any effect? Because I've seen other properties such as: server.tomcat.connector.max-post-size= server.max-http-header-size=XX server.use-forward-headers=true server.ajp.port= And I guess honestly, I was hoping that perhaps there was some standard that if it's a configurable option in an AJP Connector stanza, then there's a corresponding command line system property that can be used instead. This line of thinking of course would require that Spring Boot was using some "official" embedded Tomcat code that had a zillion options all ready to be used but as I read through your response, it's dawning on me that my line of thinking is completely off. That it's really up to the developer of the spring boot app I'm using to put into their code whatever options or settings that they need tomcat to use. If their code doesn’t use AJP or do anything with server.ajp.port, then no matter how hard I try, I'll never get an AJP connector to work. I think I get it now. My apologies, this is my first stint doing sysadmin work with embed and I've been treating it like a full blown Tomcat instance that comes with everything turned off, but still included, thinking I need to supply all these different arguments to turn stuff on. It's more like it's available but not included - the developer needs to supply the code to turn on the tomcat feature. Have I got it right now? Thanks! - Jim -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, August 22, 2017 1:06 PM To: users@tomcat.apache.org Subject: Re: setting packetSize for ajp connector in embedded tomcat via commandline system property This message originated outside of Unum. Use caution when opening attachments, clicking links or responding to requests for information. -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Him, On 8/22/17 11:57 AM, Johnson, Jim wrote: > I'm trying to set packetSize for an embedded Tomcat 8.5.4 AJP > connector using a command line property and I am failing. Does anyone > know what the correct property might be? What led you to believe that there was a particular system property that had any effect? > These are some settings that I know which work that I've found in the > Spring Boot Reference guide but that's not a complete reference. It's also specific to Spring Boot. > I'm thinking it should be something like > > -Dserver.tomcat.connector.packet-size=65536 > > Or something close to that - but there's no consistency that I've been > able to find in naming conventions at the server or server.tomcat or > server.tomcat.connector level. And after many hours of guessing I'm > turning to you all in hopes that someone may know the correct setting. If you are using Spring Boot, then you might want to ask the Spring Boot community. Perhaps someone here can answer your question, but most of us (myself included) can't. If you are using Tomcat embedded directly (i.e. you have written your own Java code to launch Tomcat) then you can use whatever system property you want... you just have to write your code to use it. > Can anyone provide the correct syntax? Or is packetSize for the AJP > connector not even supported through command line for embedded Tomcat? Embedded Tomcat does whatever you tell it to do. But it cannot read your mind. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJZnGSMAAoJEBzwKT+lPKRYPcUQAJ5poBQj19xiz5utBKQ3RL90 klMHNmAzZ45/afwTwj/G6JnSZCjRO30r33tKvTvzbf7WvDP1SL32f1Jl0b/LDXW8 o/8huECuKVhCjMsZWCM3HIxqlnR4bfhXXVOdbs3anWnO60/jrH58Km6xDLZnEVHG C6tTqOEMqYqLS/WKUC+x9P9zHqQX1I9WpZ9yr17KEvS6xIDTXzipnCbN8J3ujrzE o35BY7lj/ukCl2ZhqDszV21CuamdL2AW21FytIqBto7+CfnA/ftHllxPl6nUnpvg /wyKJ6mM8/gS4fcUKO+crj5QgTkor4LYi6vbog1U1gigRhZSx3d+l8mrNX2Sdn7D MhuM59jfzL6Q8IfkHHPrZVtQZVuKzASL79rupI025pSn7bqPFiqRv91/SrF6RT+v tF6CsrTOrp6HM/anTyESUjnHvsyTJBhLDGOHfTptNekGIOMtk4uEfN3gAM6wLU6G kK9Dd/7DOrtCN/6gNNp6/vVLwaJLqqJWPvfUdvYI6l2wwvBPfgKvNh/h0PVWmRu1 7JZQ89LgXZZYaUn4VqhsAEL60+RIjejK5d8ri3ZnM7OJOGOKb+VRSF6lA2pzHfM8 GuuDRxO1gVA9RhBEenObGO6445VrODW08uoe19mmw+NIqNuegnvoB6ZECP6TfPNv kJuLdC1rUZCEieFJUGBC =Zxsd -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
setting packetSize for ajp connector in embedded tomcat via commandline system property
Hello, I'm trying to set packetSize for an embedded Tomcat 8.5.4 AJP connector using a command line property and I am failing. Does anyone know what the correct property might be? These are some settings that I know which work that I've found in the Spring Boot Reference guide but that's not a complete reference. I'm thinking it should be something like -Dserver.tomcat.connector.packet-size=65536 Or something close to that - but there's no consistency that I've been able to find in naming conventions at the server or server.tomcat or server.tomcat.connector level. And after many hours of guessing I'm turning to you all in hopes that someone may know the correct setting. Can anyone provide the correct syntax? Or is packetSize for the AJP connector not even supported through command line for embedded Tomcat? Thanks! - Jim
Re: Syntax change in Set-Cookie header?
Sure, will do! Jim On Thu, Mar 16, 2017 at 12:57 PM, Mark Thomas <ma...@apache.org> wrote: > On 16 March 2017 14:31:31 GMT+00:00, Jim Griswold <jim.grisw...@gmail.com> > wrote: > >Thanks, Mark! I filed > >https://bz.apache.org/bugzilla/show_bug.cgi?id=60876 > > Thanks. I don't suppose you'd like to try your hand at a patch? > > Mark > > > > > > > >Jim > > > >On Thu, Mar 16, 2017 at 6:15 AM, Mark Thomas <ma...@apache.org> wrote: > > > >> On 15/03/17 21:56, Jim Griswold wrote: > >> > Hi everyone, > >> > > >> > After a recent upgrade from Tomcat 8.0.28 to 8.5.11, I've noticed a > >> syntax > >> > change in the Set-Cookie header generated by Tomcat, and I was > >hoping to > >> > confirm whether this is intentional or if I'm doing something > >> incorrectly. > >> > > >> > The background: > >> > > >> > After upgrading Tomcat, some automated tests started failing. These > >tests > >> > use an Apache CXF client to make requests to a service running > >inside > >> > Tomcat, and then make various assertions on the value of the > >Set-Cookie > >> > header returned from from the service. > >> > > >> > The root cause of the failure appears to be a change in the syntax > >used > >> for > >> > the Set-Cookie header which resulted in parsing failures in the > >client. > >> > > >> > The header that's generated by Tomcat 8.0.28 looks like: > >> > > >> > Set-Cookie: cookie_name=value; Path=/ > >> > > >> > With 8.5.11, it looks like: > >> > > >> > Set-Cookie: cookie_name=value;path=/ > >> > > >> > Note the missing space after the semicolon and the change from > >"Path" to > >> > "path". After some digging around, I saw that the > >> > new Rfc6265CookieProcessor was changed to be the default cookie > >> processor. > >> > When I followed instructions [1] to change back to the old > >processor, the > >> > original behavior was restored and my tests pass again. > >> > > >> > Is this expected behavior? I see that RFC 6265 specifies [2] that > >there > >> > must be a space between the semicolon and "path", and that it > >should be > >> > "Path" with the first letter uppercased. Taking a look at the > >> > Rfc6265CookieProcessor source code (the generateHeader method, > >> > specifically), the lack of space and lower case p appear to be > >> intentional, > >> > yet don't seem to conform to the RFC the class is targeting. > >> > > >> > I am sure I must be missing something since this is the new default > >and > >> > this is such a common behavior, but I've dug around for a while and > >can't > >> > find another explanation. > >> > >> Those are implementation bugs. Please raise a Bugzilla issue. The > >case > >> issue is probably wider than just path. > >> > >> Reading through the rest of the spec, they both look to be things > >> clients should tolerate so you probably want to look at the client > >code > >> as well. > >> > >> Kind regards, > >> > >> Mark > >> > >> > >> > > >> > Thanks in advance for your time and help! > >> > > >> > Jim > >> > > >> > [1] > >> > http://stackoverflow.com/questions/38696081/how-to- > >> change-cookie-processor-to-legacycookieprocessor-in-tomcat-8 > >> > > >> > [2] https://tools.ietf.org/html/rfc6265#section-4.1.1 > >> > > >> > >> > >> - > >> 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: Syntax change in Set-Cookie header?
Thanks, Mark! I filed https://bz.apache.org/bugzilla/show_bug.cgi?id=60876. Jim On Thu, Mar 16, 2017 at 6:15 AM, Mark Thomas <ma...@apache.org> wrote: > On 15/03/17 21:56, Jim Griswold wrote: > > Hi everyone, > > > > After a recent upgrade from Tomcat 8.0.28 to 8.5.11, I've noticed a > syntax > > change in the Set-Cookie header generated by Tomcat, and I was hoping to > > confirm whether this is intentional or if I'm doing something > incorrectly. > > > > The background: > > > > After upgrading Tomcat, some automated tests started failing. These tests > > use an Apache CXF client to make requests to a service running inside > > Tomcat, and then make various assertions on the value of the Set-Cookie > > header returned from from the service. > > > > The root cause of the failure appears to be a change in the syntax used > for > > the Set-Cookie header which resulted in parsing failures in the client. > > > > The header that's generated by Tomcat 8.0.28 looks like: > > > > Set-Cookie: cookie_name=value; Path=/ > > > > With 8.5.11, it looks like: > > > > Set-Cookie: cookie_name=value;path=/ > > > > Note the missing space after the semicolon and the change from "Path" to > > "path". After some digging around, I saw that the > > new Rfc6265CookieProcessor was changed to be the default cookie > processor. > > When I followed instructions [1] to change back to the old processor, the > > original behavior was restored and my tests pass again. > > > > Is this expected behavior? I see that RFC 6265 specifies [2] that there > > must be a space between the semicolon and "path", and that it should be > > "Path" with the first letter uppercased. Taking a look at the > > Rfc6265CookieProcessor source code (the generateHeader method, > > specifically), the lack of space and lower case p appear to be > intentional, > > yet don't seem to conform to the RFC the class is targeting. > > > > I am sure I must be missing something since this is the new default and > > this is such a common behavior, but I've dug around for a while and can't > > find another explanation. > > Those are implementation bugs. Please raise a Bugzilla issue. The case > issue is probably wider than just path. > > Reading through the rest of the spec, they both look to be things > clients should tolerate so you probably want to look at the client code > as well. > > Kind regards, > > Mark > > > > > > Thanks in advance for your time and help! > > > > Jim > > > > [1] > > http://stackoverflow.com/questions/38696081/how-to- > change-cookie-processor-to-legacycookieprocessor-in-tomcat-8 > > > > [2] https://tools.ietf.org/html/rfc6265#section-4.1.1 > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Syntax change in Set-Cookie header?
Hi everyone, After a recent upgrade from Tomcat 8.0.28 to 8.5.11, I've noticed a syntax change in the Set-Cookie header generated by Tomcat, and I was hoping to confirm whether this is intentional or if I'm doing something incorrectly. The background: After upgrading Tomcat, some automated tests started failing. These tests use an Apache CXF client to make requests to a service running inside Tomcat, and then make various assertions on the value of the Set-Cookie header returned from from the service. The root cause of the failure appears to be a change in the syntax used for the Set-Cookie header which resulted in parsing failures in the client. The header that's generated by Tomcat 8.0.28 looks like: Set-Cookie: cookie_name=value; Path=/ With 8.5.11, it looks like: Set-Cookie: cookie_name=value;path=/ Note the missing space after the semicolon and the change from "Path" to "path". After some digging around, I saw that the new Rfc6265CookieProcessor was changed to be the default cookie processor. When I followed instructions [1] to change back to the old processor, the original behavior was restored and my tests pass again. Is this expected behavior? I see that RFC 6265 specifies [2] that there must be a space between the semicolon and "path", and that it should be "Path" with the first letter uppercased. Taking a look at the Rfc6265CookieProcessor source code (the generateHeader method, specifically), the lack of space and lower case p appear to be intentional, yet don't seem to conform to the RFC the class is targeting. I am sure I must be missing something since this is the new default and this is such a common behavior, but I've dug around for a while and can't find another explanation. Thanks in advance for your time and help! Jim [1] http://stackoverflow.com/questions/38696081/how-to-change-cookie-processor-to-legacycookieprocessor-in-tomcat-8 [2] https://tools.ietf.org/html/rfc6265#section-4.1.1
Re: Unable to get SSL working on Tomcat 8.5
On 12/5/2016 8:43 AM, Mark Thomas wrote: On 05/12/2016 16:13, Mark Thomas wrote: On 01/12/2016 22:17, Jim Weill wrote: sslEnabledProtocols is now just protocols for one thing. And you have to put your certificate stuff in an sub-section to the connector now. That should not be necessary. Tomcat should handle the conversion for you under the hood. I've tested this with a JKS store but not a pkcs12 store. Let me see if there is something extra we need to do in the pkcs12 case. Confirmed. This is working as expected. The following works with 8.0.x and 8.5.x. I've built both from trunk but there are no relevant changes since the last release of each. Mark So what might have changed with tomcat between 7.0 and 8.5 then? I upgraded from 7.0 to 8.5 and had to do the separate SSLHostConfig section and change to the more updated connector syntax when a single connector string as shown above used to work. jim - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to get SSL working on Tomcat 8.5
sslEnabledProtocols is now just protocols for one thing. And you have to put your certificate stuff in an sub-section to the connector now. Here's how ours had to be reconfigured (on 8443 instead of 443) using NIO and JSSE: protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" protocols="TLSv1.2"> certificateKeyFile="path-to-cert-keyfile" /> Hope this helps. The parts that are relevant to your certificate are in the section here: https://tomcat.apache.org/tomcat-8.5-doc/config/http.html#SSL_Support_-_SSLHostConfig but scroll up slightly to get the instructions on how to use this subsection. jim On 12/1/2016 1:26 PM, Bartlett, Todd wrote: Thanks for your reply, unfortunately I know very little about Tomcat beyond the server.xml config below. What are "hooks" and or whats been deprecated related to the below, or is there a new example config for using a .pfx Keystorefile? -Original Message- From: Jim Weill [mailto:moon...@icsi.berkeley.edu] Sent: Thursday, December 01, 2016 2:38 PM To: Tomcat Users List <users@tomcat.apache.org> Subject: Re: Unable to get SSL working on Tomcat 8.5 Are you using the 8.5 reference? https://tomcat.apache.org/tomcat-8.5-doc/config/http.html When we updated to 8.5, we also found things changed with the connector for SSL. The above page is the current guide, and you'll notice several of the hooks have been deprecated since 6.0 jim On 12/1/2016 11:28 AM, Bartlett, Todd wrote: Thanks for replying, some more information. Tomcat 8.0 works fine with this configuration (Ive tested both installs on same server, same .pfx) (note no other changes anywhere, just a fresh install and modifying the server.xml) We have been using this config since 6.0 through 8.0. Something changed in 8.5, it does not seem to recognize or load the .pfx file anymore. Thanks Todd -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Wednesday, November 30, 2016 8:52 PM To: Tomcat Users List <users@tomcat.apache.org> Subject: Re: Unable to get SSL working on Tomcat 8.5 -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Todd, On 11/29/16 4:41 PM, Bartlett, Todd wrote: The below settings work fine on 6.0 version (no other changes Im aware of) Error received Failed to initialize component [Connector[HTTP/1.1-443 What's the rest of the error message? Looks okay so far. You need to post more information. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJYP4IrAAoJEBzwKT+lPKRY5hAP/3thD5lk9DDd/PMAN1s+Vche ghVnzNYryyBaqcFCFOpjUWlocWkaltV8yaWHRpkLpzvvRz1SnXVbKx7IRr5wAP6V 7qr4h8FLLubjukA/g42D8UkUmc/Q64ATPZEdKch8FszlchLqsdf1WSfp2e68k/Gg KPBB2New3bSc4XVxC90gItOcSgq6qwZlIINEYV+f/jsOJufkjzTPF4NllS0NM9i/ XA0EgRhUQlB1Lo9QfmJquniRmNHJwcIt6A810IISaL/f0o1TxFMpqD0xdBrULD+W 169HkBIdTEvpqa3RG9tIVEEDhkW8xN4KR/Q/+WmjxnUGzffDH4AAfJkYKOxYdMzf zFKG4ka+A5i2Qi9Z+Y87yi0fDKFsjxpA1ugeCRYpLKfTRnu2dkEGak2QRU4KpaIM IUdql0gy71ZdyNGHj0XTzen6mUqEm0k3AL0pzTsXK0eSvpHlT0Eh981VfGAZQKlo hs3gUFEdwNJ5xiWEil0tNtke9j8eNwPVE7jRy0QFguc6HkXmWr89DTDi/3W541Nz ZH7iONQBPtd1fcAk0PoAxuH7ldZ9LcjxZ1tV7t3KYv4SKcD5WjTe6Cc5eVCwQwxY 47TrkSq4enCGw6BbwX+iBKt9LY4MIugpnEp8o2sxnZ56B3bxwfT29/hWmKYmlRjj l9lZDcQlY4Q+sZhDFifa =Op4c -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to get SSL working on Tomcat 8.5
Are you using the 8.5 reference? https://tomcat.apache.org/tomcat-8.5-doc/config/http.html When we updated to 8.5, we also found things changed with the connector for SSL. The above page is the current guide, and you'll notice several of the hooks have been deprecated since 6.0 jim On 12/1/2016 11:28 AM, Bartlett, Todd wrote: Thanks for replying, some more information. Tomcat 8.0 works fine with this configuration (Ive tested both installs on same server, same .pfx) (note no other changes anywhere, just a fresh install and modifying the server.xml) We have been using this config since 6.0 through 8.0. Something changed in 8.5, it does not seem to recognize or load the .pfx file anymore. Thanks Todd -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Wednesday, November 30, 2016 8:52 PM To: Tomcat Users List <users@tomcat.apache.org> Subject: Re: Unable to get SSL working on Tomcat 8.5 -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Todd, On 11/29/16 4:41 PM, Bartlett, Todd wrote: The below settings work fine on 6.0 version (no other changes Im aware of) Error received Failed to initialize component [Connector[HTTP/1.1-443 What's the rest of the error message? Looks okay so far. You need to post more information. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJYP4IrAAoJEBzwKT+lPKRY5hAP/3thD5lk9DDd/PMAN1s+Vche ghVnzNYryyBaqcFCFOpjUWlocWkaltV8yaWHRpkLpzvvRz1SnXVbKx7IRr5wAP6V 7qr4h8FLLubjukA/g42D8UkUmc/Q64ATPZEdKch8FszlchLqsdf1WSfp2e68k/Gg KPBB2New3bSc4XVxC90gItOcSgq6qwZlIINEYV+f/jsOJufkjzTPF4NllS0NM9i/ XA0EgRhUQlB1Lo9QfmJquniRmNHJwcIt6A810IISaL/f0o1TxFMpqD0xdBrULD+W 169HkBIdTEvpqa3RG9tIVEEDhkW8xN4KR/Q/+WmjxnUGzffDH4AAfJkYKOxYdMzf zFKG4ka+A5i2Qi9Z+Y87yi0fDKFsjxpA1ugeCRYpLKfTRnu2dkEGak2QRU4KpaIM IUdql0gy71ZdyNGHj0XTzen6mUqEm0k3AL0pzTsXK0eSvpHlT0Eh981VfGAZQKlo hs3gUFEdwNJ5xiWEil0tNtke9j8eNwPVE7jRy0QFguc6HkXmWr89DTDi/3W541Nz ZH7iONQBPtd1fcAk0PoAxuH7ldZ9LcjxZ1tV7t3KYv4SKcD5WjTe6Cc5eVCwQwxY 47TrkSq4enCGw6BbwX+iBKt9LY4MIugpnEp8o2sxnZ56B3bxwfT29/hWmKYmlRjj l9lZDcQlY4Q+sZhDFifa =Op4c -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AT WITS END regarding JVM arguments
Hi James, On Thu, Sep 1, 2016 at 2:36 PM, James H. H. Lampert < jam...@touchtonecorp.com> wrote: > Ladies and Gentlemen: > > One of our Tomcat servers (refreshed from > apache-tomcat-7.0.67-windows-x86.zip) > is running AS A SERVICE on a Windows box. > > And we need to set JVM Options of > -Djavax.servlet.request.encoding=UTF-8 > -Dfile.encoding=UTF-8 > -Djava.awt.headless=true > > Unlike IBM Midrange boxes, on which I can, with a simple OS command, list > all the JVMs currently running on the system, and look up the arguments, > environment variables, system properties, , I can't find any way to > verify the JVM arguments (this box has only a JRE, not a JDK), other than > what gets sent to the log file. I even tried installing a trial of > JProfiler, but if checking arguments is in there, it's well-hidden! > > I just tried adding a "setenv.bat" to the "bin" directory, containing > > SET CATALINA_OPTS=-Djava.awt.headless=true > -Djavax.servlet.request.encoding=UTF-8 >> -Dfile.encoding=UTF-8 >> > > and after stopping and starting the service, even after rebooting the > Windows box, "headless" cannot be found in the log file, and neither can I > find "UTF." > > WHAT COULD BE GOING WRONG HERE? > > -- > JHHL > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > I don't run Tomcat on Windows so there might be a typo in this line here but in your setenv.bat have you tried something like: SET JAVA_OPTS="%JAVA_OPTS% -Djava.awt.headless=true -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8" instead of using CATALINA_OPTS? We use JAVA_OPTS in our setenv.sh file for Linux, perhaps it will work for Windows as well ... - Jim
Best practices around Kerberos ticket management & Tomcat instances? [Linux]
Hello, This is my first experience using Kerberos and lucky me it's with Tomcat on Linux. We're only using it to access an MSSQL database for now - no single sign-on (yet). So far the testing has been done on one server and it's been pretty successful. We're now looking to enable this functionality on the other two servers that make up this environment. My questions are mostly around best practices when it comes to managing tickets with multiple tomcat instances for a single app so I'll just get to it: - We will have three tomcat instances on three different linux servers all running the same application that will be connecting to the same MSSQL instances. Here are the two options I've come up with that make the most sense right now - 1. Have each Tomcat instance use the same SPN and get tickets on their own respective servers. The means that at any given time there would be three active tickets for the same SPN but I would have each tomcat instance doing kinits and kdestroys as the app is started or stopped. Or 2. I need to create a new SPN (and new AD accounts?) for each tomcat instance accessing the MSSQL database and each tomcat instance would be doing kinits and kdestroys with its own ticket. I'm leaning towards option #1 but perhaps someone has another option or can lend some thoughts as to which way I should proceed? - On each server, we need to go through a process that requests a ticket when tomcat starts, uses the ticket as long as the JVM is running and then destroys the ticket when the JVM is stopped. I'm thinking that I modify the tomcat startup script in /etc/init.d so that when the specific tomcat option is called the following things happen: start:: - kdestroy is called to clear any existing tickets in the tomcat ticket cache (cache is in custom location w/ custom filename) - kinit is called to request a renewable ticket - lets say 14 days - tomcat process starts as normal stop:: - tomcat process stops as normal - kdestroy is called to clear any existing tickets in the tomcat ticket cache (cache is in custom location w/ custom filename) Once the ticket has been requested, I would have a crontab job go out and do renewals every 12 hours - noon and midnight perhaps? Does a ticket renewal in the middle of the day become too risky with the application running in production? Then once a week, I would have the application stopped for DB re-indexing, other maintenance, etc. We should never get to the point where the JVM is running for 2 weeks and then causes a problem when the ticket expires. Would these align with best practices that others have done or seen in similar scenarios? Do the ticket lifespans and renewal timeframes make sense or should they be less often / more often? I really appreciate any feedback or thoughts on this - thanks! - Jim
If there a security hardened / production ready binary distribution?
Hi all. Sorry if this has already been answered, but I couldn't find it. I'm looking at using tomcat in a docker container and I was wondering why there isn't a binary distribution that has most / all of the steps already done from the security how to? https://tomcat.apache.org/tomcat-7.0-doc/security-howto.html I understand that there wouldn't be a true one size fits all, but I rather than get everyone to try to follow the same basic steps I thought that they would be done upstream in the project. If there's a reason why, I'm curious to learn what it is. I've also opened a ticket with the official docker tomcat image project for a tomcat that has this done. https://github.com/docker-library/tomcat/issues/14 Thanks for your time. Jim
Re: If there a security hardened / production ready binary distribution?
On Thu, Jul 23, 2015 at 10:50 AM, Mark Thomas ma...@apache.org wrote: On 23 July 2015 15:07:01 CEST, Jim Sellers jim.sell...@gmail.com wrote: Hi all. Sorry if this has already been answered, but I couldn't find it. I'm looking at using tomcat in a docker container and I was wondering why there isn't a binary distribution that has most / all of the steps already done from the security how to? https://tomcat.apache.org/tomcat-7.0-doc/security-howto.html I understand that there wouldn't be a true one size fits all, but I rather than get everyone to try to follow the same basic steps I thought that they would be done upstream in the project. If there's a reason why, I'm curious to learn what it is. I've also opened a ticket with the official docker tomcat image project for a tomcat that has this done. https://github.com/docker-library/tomcat/issues/14 Thanks for your time. Jim Which default settings do you expect to be changed? Mark I was thinking the parts from that document that say should be or not intended for production. e.g. deleting the default apps, disabling the version number, etc. I'm somewhat new to TC and was looking for distribution that was closer to the recommended TC production setup than the default one. I was assuming that both would be available for download. Jim
Re: How to debug tomcat code in eclipse
Hi Harmeet, I have a setup similar to yours and I had to go through the same process you are right now. The good news is that with some help, I got it going and it works well. The bad news is that I am very busy at the moment and cannot help immediately, but I will try to get back to you over the weekend if you have not been able to get set up in Eclipse. Please let me know if you have resolved your problem. Otherwise, I will get back to you over the weekend. Jim On 01/08/2015 11:42 AM, MyList wrote: Hello All, I am new to web development with tomcat. Have many years experience in C and C++ on Unix. I am newbie to tomcat too. Pardon me if my questions seem simple, just guide me to the source or links. I am interested in debugging the tomcat server source code through Eclipse.I would like to see how/where/what of the tomcat source code and it's internals to get a grip on the way it handles things. I have the following installed - 1)Eclipse Java For EE - Luna 2)Have the RC7_0_57 of the tomcat code. 3) I have tomcat 6,7,8 installed and tested. Running concurrently on three different port setups etc. My intention is to write a few Servlet based projects and step into the tomcat source code while debugging from eclipse. I haven't found any good link to achieve the same.I will have to compile the tomcat source code too, don't know how to do that either. I would be obliged if you could help me or point me to the sources to achieve this goal. Thanks in Advance, Harmeet - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: My problem: I cannot successfully get or set a session attribute from a JSP file.
Resolved! I apologize to everyone for taking a while to respond. It was a busy weekend and I was not at the computer. Thank you all for the responses. I read your emails about a half hour ago and ran my application to get fresh log files and to check them all. Sure enough in the log file, 'localhost.2014-12-08.log', I found an error message about the java code in my 's.jsp' file. I fixed the error and all is well now. I thought that I looked at this file the other day before sending in my question to the mailing list and I did not see the error messages then. I am going to guess that I am in error and the I did not actually look at the file, although I know I looked at most of the log files in the tomcat/logs directory. I was curious why the error did not show up in my firefox browser console, so I removed my fix and re-ran my application with the error in it. Sure enough, the error did not show up on the console. One thing I am going to do, before going back to my main stream work is write up a document for myself on how to debug my current environment. When done, I will share it with this mailing list since it may be useful to others and others my want to contribute addtions. Jim A. On 12/06/2014 04:19 PM, Jim Anderson wrote: Hi to all, I am currently developing some server side JSP code. By and large, things are progressing and working well. I have gotten half way decent at debugging my java/javascript/jquery/jsp/HTML source code, but I have run into a problem in JSP where the code does not work, but I have found no clues as to why it is not working. The environment that I am working in is Tomcat 7.0.54 and I am using java 1.8 and jquery 1.7.2. What I am trying to do: I have html code with an embedded javascript that runs jquery code. The jquery code being run makes an ajax call to a JSP file on the server side, which I will call s.jsp. This file is a very simple file whose sole function is to take a registration name and query an SQL database to see if the name has already been used at the web site. The registration name is passed with a method call that looks like this: regName = request.getParameter(registrationName); [item 1] This all works fine for me. So far so good. If the registration name is good, the state of my application logic changes. I guess there are multiple ways to store state, but I have chosen to store the state as a session variable. I searched the net and found an example of JSP code that uses the session object to store information as an attribute with a statement that looks something like: session.setAttribute(logicState,nameValidated); [item 2] I tried adding this line and when I now push the submit button of my HTML form, which calls s.jsp as an action, the application hangs (in firefox). I receive no error messages anywhere. Usually, when I add bad code in s.jsp I will get a stacktrace from firefox or error messages in the firefox debug console, or both. Or I will error message in my own homegrown debug code, but that does not happen. I know that my home grown code does not get called, so I can infer that the call to s.jsp is never made, but I cannot be 100% certain of this. I also checked my tomcat/logs directory and there was nothing in the log files that I would not expect. So my first question is: Can I simply add item 2, above, to my jsp file and expect that tomcat will recognize that I am referencing the session object? In s.jsp, item 1, above, references the request object and tomcat handles that and I am expecting that it will also hand my reference to the session object. My second question is more general. My code is not working and there are no error messages. Can anyone speculate why this would be the case? Is there any place else I should be looking for error messages? Jim A. - 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: My problem: I cannot successfully get or set a session attribute from a JSP file.
David, I have to question your response. In the past, I have made errors in the serverside JSP file and the console has identified errors for me to the point were I have become dependent this feedback. I understand the separation of the client side vs the server side, (and I must confess that sometimes in the middle of debugging, I forget that it is there), but my assumption has been that when the JSP code is compiled by the tomcat environment, it gets sent errors back through the Firefox API that allows the errors to be displayed in the console. I don't know the Firefox API, but I can believe it has hooks in the brower code that allows an application such as Tomcat to post information into the console. If fact, I would expect the browser console to have that kind of hook. Jim On 12/08/2014 03:54 PM, David kerber wrote: On 12/8/2014 3:49 PM, Jim Anderson wrote: Resolved! I apologize to everyone for taking a while to respond. It was a busy weekend and I was not at the computer. Thank you all for the responses. I read your emails about a half hour ago and ran my application to get fresh log files and to check them all. Sure enough in the log file, 'localhost.2014-12-08.log', I found an error message about the java code in my 's.jsp' file. I fixed the error and all is well now. I thought that I looked at this file the other day before sending in my question to the mailing list and I did not see the error messages then. I am going to guess that I am in error and the I did not actually look at the file, although I know I looked at most of the log files in the tomcat/logs directory. I was curious why the error did not show up in my firefox browser console, so I removed my fix and re-ran my application with the error in it. Sure enough, the error did not show up on the console. The reason it doesn't show up in your browser is that it's happening on the server, not the client. So the browser never knows that there is an error. - 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: My problem: I cannot successfully get or set a session attribute from a JSP file.
Please make note that I do not see errors in the brower window, but in the brower console window. If I have time later, I will create an error in my 's.jsp' server code and verify that an error is reported in the console. Jim A. On 12/08/2014 04:17 PM, David kerber wrote: On 12/8/2014 4:04 PM, Jim Anderson wrote: David, I have to question your response. In the past, I have made errors in the serverside JSP file and the console has identified errors for me to the point were I have become dependent this feedback. I understand the separation of the client side vs the server side, (and I must confess that sometimes in the middle of debugging, I forget that it is there), but my assumption has been that when the JSP code is compiled by the tomcat environment, it gets sent errors back through the Firefox API that allows the errors to be displayed in the console. I don't know the Firefox API, but I can believe it has hooks in the brower code that allows an application such as Tomcat to post information into the console. If fact, I would expect the browser console to have that kind of hook. Hmm, I've never seen anything like that. The only time I see server errors in the browser is when the server sends them as part of its HTTP response. If the error output is swallowed on the server end and never makes it to the browser, the browser does not display anything. I could certainly be missing something here, though... Jim On 12/08/2014 03:54 PM, David kerber wrote: On 12/8/2014 3:49 PM, Jim Anderson wrote: Resolved! I apologize to everyone for taking a while to respond. It was a busy weekend and I was not at the computer. Thank you all for the responses. I read your emails about a half hour ago and ran my application to get fresh log files and to check them all. Sure enough in the log file, 'localhost.2014-12-08.log', I found an error message about the java code in my 's.jsp' file. I fixed the error and all is well now. I thought that I looked at this file the other day before sending in my question to the mailing list and I did not see the error messages then. I am going to guess that I am in error and the I did not actually look at the file, although I know I looked at most of the log files in the tomcat/logs directory. I was curious why the error did not show up in my firefox browser console, so I removed my fix and re-ran my application with the error in it. Sure enough, the error did not show up on the console. The reason it doesn't show up in your browser is that it's happening on the server, not the client. So the browser never knows that there is an error. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
My problem: I cannot successfully get or set a session attribute from a JSP file.
Hi to all, I am currently developing some server side JSP code. By and large, things are progressing and working well. I have gotten half way decent at debugging my java/javascript/jquery/jsp/HTML source code, but I have run into a problem in JSP where the code does not work, but I have found no clues as to why it is not working. The environment that I am working in is Tomcat 7.0.54 and I am using java 1.8 and jquery 1.7.2. What I am trying to do: I have html code with an embedded javascript that runs jquery code. The jquery code being run makes an ajax call to a JSP file on the server side, which I will call s.jsp. This file is a very simple file whose sole function is to take a registration name and query an SQL database to see if the name has already been used at the web site. The registration name is passed with a method call that looks like this: regName = request.getParameter(registrationName);[item 1] This all works fine for me. So far so good. If the registration name is good, the state of my application logic changes. I guess there are multiple ways to store state, but I have chosen to store the state as a session variable. I searched the net and found an example of JSP code that uses the session object to store information as an attribute with a statement that looks something like: session.setAttribute(logicState,nameValidated); [item 2] I tried adding this line and when I now push the submit button of my HTML form, which calls s.jsp as an action, the application hangs (in firefox). I receive no error messages anywhere. Usually, when I add bad code in s.jsp I will get a stacktrace from firefox or error messages in the firefox debug console, or both. Or I will error message in my own homegrown debug code, but that does not happen. I know that my home grown code does not get called, so I can infer that the call to s.jsp is never made, but I cannot be 100% certain of this. I also checked my tomcat/logs directory and there was nothing in the log files that I would not expect. So my first question is: Can I simply add item 2, above, to my jsp file and expect that tomcat will recognize that I am referencing the session object? In s.jsp, item 1, above, references the request object and tomcat handles that and I am expecting that it will also hand my reference to the session object. My second question is more general. My code is not working and there are no error messages. Can anyone speculate why this would be the case? Is there any place else I should be looking for error messages? Jim A. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
installing tomcat7-admin --- I have not /etc/tomcat7 directory
I am running on crunchbang Linux, a derivative of Debian Linux, and I use apt-get to install most packages. However, I am in the process of upgrading from tomcat6 to tomcat7 and I have a problem because tomcat7 is not available for download with the crunchbang distribution. When tomcat6-admin was installed with apt-get, the /etc/tomcat6 directory got populated for me. I downloaded tomcat7 as a compressed tar file from apache and installed it. The Tomcat7 daemon is running. But right now, non of my web applications can be accessed from my browser and there is no /etc/tomcat7 directory to control the local configuration. I will look at the web application failure at a later time. For now, I would like to get the tomcat web manager running but I need a /etc/tomcat7 directory set up properly. It looks like it should be created when the tomcat7-admin package is installed. But I cannot find any documentation about installing tomcat7-admin. I have scanned through the tomcat7 doc website and have not been able to find the installation instructions I'm looking for. Can someone either point me to the instructions I would need to install tomcat7-admin? Regards, Jim Anderson
Re: installing tomcat7-admin --- I have not /etc/tomcat7 directory
Chuck and Hassan, Thank you for your replies. Obviously, I did not realize that /etc/tomcat6 is an artifact of the crunchbang distribution. However, I actually did use the standard tomcat7 distribution prior to sending in my help request. I have now read the directions and they were very helpful. I got tomcat7 working with no trouble at all in a short amount of time. Lets just say I was misled by the tomcat6 distribution from Crunchbang. In some ways, I do not like some of their restructuring, but in all honesty, they do a great job of distribution and support. I love their version of Linux because they use the KISS (Keep It Simple Stupid!) principle. Anyway, you help not only resolved my tomcat7 problem. But now that I have tomcat7 working, my problems with Struts 2 in tomcat (struts 2 was crashing in my linux environment) is also resolved, so now I can get back to my software development. A big thanks to you and to Hassan for taking the time to help me out Regards, Jim On 07/12/2014 03:13 PM, Caldarale, Charles R wrote: From: Jim Anderson [mailto:jim_ander...@jjajava.com] Subject: installing tomcat7-admin --- I have not /etc/tomcat7 directory I have a problem because tomcat7 is not available for download with the crunchbang distribution. You would need to discuss on whatever support mechanism is available for crunchbang. When tomcat6-admin was installed with apt-get, the /etc/tomcat6 directory got populated for me. That is a characteristic of the particular repackaged Tomcat you were using, not of any standard Tomcat distribution. there is no /etc/tomcat7 directory to control the local configuration. No such directory exists in a standard Tomcat distribution. For now, I would like to get the tomcat web manager running but I need a /etc/tomcat7 directory set up properly. No, you don't need any such directory. You do need to look at the Tomcat manager documentation: http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html It looks like it should be created when the tomcat7-admin package is installed. Again, that is not part of a standard Tomcat distribution. But I cannot find any documentation about installing tomcat7-admin. Because it's an aspect of the 3rd-party repackaging of Tomcat, not of a real Tomcat. The 3rd-party repackaged versions tend to scatter files all over the place, disregarding the proper Tomcat setup. Stick with the standard Tomcat from tomcat.apache.org, read the docs for the level you chose, and have a look at the FAQ/Wiki. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Severe performance issues on images
Hi Christopher, Thank you for your insights and sorry for a late reply. This specific issue seemed do be because of limited bandwidth at the data centre and it had now been fixed. We are having some other problem as well, but these seem to come from inefficient modules at the moment and we are investigating at full pace. What is the JkMount directive(s) that you are trying to undo with JkUnMount? JkMount /* customer Whenever you turn off /Tomcat/ they get fast again? Do you just have to stop Tomcat or do you have to de-configure it in httpd.conf? Only stopping Tomcat is required. This would correspond with the bandwidth issue. Wait, you have a server with 64GiB of RAM? Cool. And it serves images for a living? Weird. It is both cool and weird. :P The reason for 64Gb is basically that when things break down, more ram and cpu delays the problem. We are looking for ways to reduce memory usage. Up. Grade. We are looking into it, but 7.0.26 seems to be associated with this Ubuntu version. Is it a huge difference? I really don't want to rock this boat any more that absolutely necessary. Again, thank you for your time and insights! Best Regards Jim On 24 June 2014 14:45, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jim, On 6/23/14, 4:21 PM, Jim Lindqvist wrote: I have I server with Apache and Tomcat through jk_mod and the perfonrmance is awful. This is mostly confined to images as far as I know, but it is hard to tell. The images are served from Apache with the help of the following lines: # Serve static content from /resources and /data using Apache instead of Tomcat worker Alias /resources /var/lib/tomcat7/webapps/customer/resources JkUnMount /resources/* customer Alias /data /var/lib/tomcat7/webapps/customer/data JkUnMount /data/* customer What is the JkMount directive(s) that you are trying to undo with JkUnMount? It seems that whenever Tomcat is running, Apache grinds to almost standstill, but whenever I tun off apache images seems to spring to life again. Whenever you turn off /Tomcat/ they get fast again? Do you just have to stop Tomcat or do you have to de-configure it in httpd.conf? I could really use some input. I feel like I have tries all the settings I can find, but any changes seems to make the situation worse and it doesn't get better when I turn the settings back. Can you give us some performance numbers? How have you tested? All the guides I can find focus on servers from 64Mb - 512Mb, but I can get up to 64Gb and some serious processing power. I don't mind using a less than perfect configuration as long as it works. Wait, you have a server with 64GiB of RAM? Cool. And it serves images for a living? Weird. This is the output from version.sh: Using CATALINA_BASE: /usr/share/tomcat7 Using CATALINA_HOME: /usr/share/tomcat7 Using CATALINA_TMPDIR: /usr/share/tomcat7/temp Using JRE_HOME: /usr/lib/jvm/java-7-oracle Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar Server version: Apache Tomcat/7.0.26 Up. Grade. What version of Apache httpd? What version of mod_jk? What is your mod_jk configuration (workers.properties)? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTqXMGAAoJEBzwKT+lPKRYPhkP+wV2ecvTUrKUy+r/B1fYfXxQ rpczIZfYXpYnRlz9dOFtd5H1H6fuxa851Biwk7tCiC+tB1OJl8sY1OFHzX5AzheH dty5n1jIzZgIOF+fURgkMvz7Ukx8gOFD5uxttt02ZzsYeKtJWeTWm7yviPa09LYv bu9k7d11WQNAF1R83HPfJhkELV7kT/vAAGkFLfVq/d83EsjUx8kSzyqJu1WDw1T6 AzBKxJh4+JN4+zayymfF0HsHWL/VfwyYiQAAnwd7NpeWEmtpgUEy9heEze0Y1le0 8zCBhIkcLTyKU+ipZIW4av2k6vIuPhrgzjx2GuizRqXHTiqFmfFt3T8RPdEcPPyB UqYqIxgtNxWFA6pzNDdoQI5KKY920TSpdACBr8HBQBUQpSIuUjns+bXDAKdAkLQd UiqDz8cSxXVJnmyshv+ZIK16hkU9xfalqYB7LoqPgBdCESnJHUYssNT6SfTScLRC jeCyvELYv0aSaeKX/9PlC3D3bmU5L+FS06bRxmF2N8Q8YPFVRrw8mWYaIA2HFcwm LbJEoVEYGZcE1qoh4hoqp/bzfjXWiJ8i9+4ldqsKHakVfyCxnmbHoiDjoZABE4kk fzOWIEapbjVshHr1FdPo/xyb2HIzgUPqTgZwdf0bM5MabY2aUzOKRETgL8z8b8Ck vTOtBPphAfBnDrX5bUkm =6/W1 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Severe performance issues on images
Hi, I have I server with Apache and Tomcat through jk_mod and the perfonrmance is awful. This is mostly confined to images as far as I know, but it is hard to tell. The images are served from Apache with the help of the following lines: # Serve static content from /resources and /data using Apache instead of Tomcat worker Alias /resources /var/lib/tomcat7/webapps/customer/resources JkUnMount /resources/* customer Alias /data /var/lib/tomcat7/webapps/customer/data JkUnMount /data/* customer It seems that whenever Tomcat is running, Apache grinds to almost standstill, but whenever I tun off apache images seems to spring to life again. I could really use some input. I feel like I have tries all the settings I can find, but any changes seems to make the situation worse and it doesn't get better when I turn the settings back. All the guides I can find focus on servers from 64Mb - 512Mb, but I can get up to 64Gb and some serious processing power. I don't mind using a less than perfect configuration as long as it works. This is the output from version.sh: Using CATALINA_BASE: /usr/share/tomcat7 Using CATALINA_HOME: /usr/share/tomcat7 Using CATALINA_TMPDIR: /usr/share/tomcat7/temp Using JRE_HOME:/usr/lib/jvm/java-7-oracle Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar Server version: Apache Tomcat/7.0.26 Server built: Apr 1 2013 08:32:04 Server number: 7.0.26.0 OS Name:Linux OS Version: 3.8.0-29-generic Architecture: amd64 JVM Version:1.7.0_45-b18 JVM Vendor: Oracle Corporation I am using Ubuntu 12.04 LTS.
Re: Problem with mod_proxyajp and Tomcat 7
On Mar 5, 2014, at 11:23 AM, Teresa Fasano t.fas...@cineca.it wrote: Hi, I have a communication problem between Apache and Tomcat with mod_proxy_ajp. The Apache version is 2.2.15. The problem occurred only with Tomcat 7 ( the same problem occurred with various version 7.0.x ), while it works with Tomcat 6. The configuration of mod_proxy_ajp is ProxyPass / share ajp :/ / 127.0.0.1:8009 / share ProxyPassReverse / share ajp :/ / 127.0.0.1:8009 / share Why the spaces? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod-jk stopped working
Wow! I put my JkMounts inside the VirtualHost directives and now it is working again. Thank you very much! On Feb 14, 2014, at 11:52 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jim, On 2/12/14, 11:53 PM, Jim Borland wrote: Apache 2.2 and Tomcat 6 on Linux Ubuntu 10.10 My connector worked fine for several years and then suddenly stopped working! Now I get a requested URL was not found on this server error instead. This sounds like a missing JkMount in httpd or even a non-deployed webapp in Tomcat. Can you tell which component it generating the page (httpd versus Tomcat)? I've tried several things to fix this but no joy. Here is the current content of my two files: == workers.properties file -- workers.tomcat_home=/usr/share/tomcat6 workers.java_home=/usr/lib/jvm/java-6-openjdk/jre ps=/ worker.list=ajp13_worker worker.ajp13_worker.port=8009 worker.ajp13_worker.host=localhost worker.ajp13_worker.type=ajp13 worker.ajp13_worker.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=ajp13_worker == httpd.conf file -- LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/libapache2-mod-jk/workers.properties JkShmFile /var/log/apache2/mod_jk.shM JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkMount /big41 ajp13_worker JkMount /big41/* ajp13_worker JkMount /big50 ajp13_worker JkMount /big50/* ajp13_worker JkMount /*.jsp ajp13_worker JkMount /*/servlet/ ajp13_worker == Did you declare these JkMounts in a VirtualHost? Did you define them at the top-level and then try to use them in a virtual host? If you do a JkWorkersFile and JkMount at the top-level, they won't work within virtual hosts. You have to either explicitly-add them to all virtual hosts, or use JkMountCopy in each virtual host that should inherit the configuration. Maybe you added a new virtual host and forgot JkMountCopy? Or switched from non-virtualhost configuration to one with a default virtual host instead of none at all? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJS/nPzAAoJEBzwKT+lPKRYK+IP/2beJ98jzAJNW10fHNHU8poR sVze1TZr53hVjSGiS76xV8eoPO164egmrv9DVDKqWmk/0sWYyjmutUTLCXUXIwOA kNw0g0LF6xHQhBL/Mle8IXlSokwlBOvkuu02ILf25N4CGAr9yap0uGNFb2RsWLvR AmZWseNU6ALmLgaiMStpxXMwnjR4OHIiaxrJUm1QFKlo7AIIWodql3lUibUzuK2y uIl4yxcd5JnQWozEaT6qh4y/8nk2EEvvJAxxfSvDZWtL1u0UTK1YsZ0SpOA1milL LjFoRzVMX1pGtrik2XsEAt2lkna7TWNMi5qCIlRqSrX27z/QJBqsCgByk4wtpecp BBo6scXHbi8ksyFud338GB5OIgWHE+nOXNGcUS24CvETcDlnKJhZ4PyeIH/RsyRM vX7u/Y2q5EytwczyK8Ai+mDMMTrygBLNm1TbU43wNG6R473YtIsbRiwAMxJLI2W8 AyhHW95/KioUqQt8kUZgNRiQukGYNUqz4Lj4+fvuuHKW4TUQ8/zNnjW5agOFiEcB /G6dskV9Os4sFLq+SqUaYl725eXqcIGoowsH7cfW32J4sZv1eCcnzXgR+AgBVg+b zMioWdNAI2q/5g9XZ1/wjKtacae1wH7IQLyXKfdY0l+PEwf9hAsYQ3ZRIbKq8aGb Ax6Diqn/lFLWBe3xkTFP =rZAN -END PGP SIGNATURE- - 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
mod-jk stopped working
Apache 2.2 and Tomcat 6 on Linux Ubuntu 10.10 My connector worked fine for several years and then suddenly stopped working! Now I get a requested URL was not found on this server error instead. I've tried several things to fix this but no joy. Here is the current content of my two files: == workers.properties file -- workers.tomcat_home=/usr/share/tomcat6 workers.java_home=/usr/lib/jvm/java-6-openjdk/jre ps=/ worker.list=ajp13_worker worker.ajp13_worker.port=8009 worker.ajp13_worker.host=localhost worker.ajp13_worker.type=ajp13 worker.ajp13_worker.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=ajp13_worker == httpd.conf file -- LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/libapache2-mod-jk/workers.properties JkShmFile /var/log/apache2/mod_jk.shM JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkMount /big41 ajp13_worker JkMount /big41/* ajp13_worker JkMount /big50 ajp13_worker JkMount /big50/* ajp13_worker JkMount /*.jsp ajp13_worker JkMount /*/servlet/ ajp13_worker == I changed the JkLogLevel to debug, restarted Apache, and read through the long log file. No errors and everything seems to have be setup correctly. However, there was one strange occurrance. It went through the entire setup process twice and gave me two of these log entries: [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized Now the log file is giving me a bunch of [debug] entries saying things similar to: missing uri map for domU-12-31-39-04-58-57.compute-1.internal:/big41. Also, I have a bunch of missing uri map entries for things present on the server that were never JkMounted. Like I said, it used to work fine. Any help or suggestions would be greatly appreciated. Thank you! Jim Borland - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Filtering HTTP OPTIONS request method from logs?
On 17/09/2013 5:05 PM, André Warnier wrote: Jim Barber wrote: All, On 16/09/2013 10:52 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Felix, On 9/16/13 10:25 AM, Felix Schumacher wrote: Am Montag, den 16.09.2013, 10:02 -0400 schrieb Christopher Schultz: Jim, On 9/16/13 3:42 AM, Jim Barber wrote: I'm hoping someone on this list can help me since I've been reading docs, mailing lists, FAQs, and so on for hours now, and I'm not having much luck finding an answer to my question. I am using Tomcat version 7.0.42 as packaged in Debian Linux. In front of my Tomcat servers, I am using haproxy for load balancing. The haproxy load balancers are using the HTTP OPTIONS request method to check if the Tomcat servers are alive and healthy. This results in log entries like the following in the Tomcat accesslog file: 10.122.32.4 - - [16/Sep/2013:17:12:49 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:51 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:53 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:55 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:57 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:59 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:01 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:03 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:05 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:07 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:09 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:11 +1000] OPTIONS / HTTP/1.0 200 - At the moment I'm getting one of these every 2seconds, but I haven't enabled the second load balancer for HA purposes yet. When I do that, I'll be getting twice as many hits of this type. This is going to result in rather large log files full of noise that I'm not interested in. Playing the devil's advocate here a bit... Why wouldn't you be interested in getting these logs? They are requests being handled by your web server. They require (a small amount of) time and resources to process, and indicate that your lb is still reaching-out to determine the status of the app server. My recommendation would be to leave those logs in there (they accurately describe a real request) and filter them out if you want to do some kind of analytics against your log files and consider those OPTIONS requests to be noise. I have had one case where I wanted to get rid of those requests too, so I can understand the OP. But I have to admint I had a scary feeling about it. Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=%h %l %u %t quot;%rquot; %s %b / Specifically adding the condition=VALUE attribute, but I have no idea what to set VALUE to. It's not that simple: if you want to use condition, then you have a write a Valve (can't be a Filter, since it must run *before* the AccessLogValve) that tests the request and sets a request attribute that will then trigger this condition. That is not true, you can use a filter, since the logging will happen *after* the request and can and will check the request attribute then. Thanks for pointing that out. After I had sent my message, I realized that and decided not to post a followup after reading yours. - -chris Thank you all for your responses. It looks like I'll just have to put up with these messages. There seems to be no easy way to filter them out. Actually, based on earlier responses and on the URLrewrite filter (http://http://tuckey.org/urlrewrite/), there may be a solution after all, which does not involve additional Java programming, as long as you are willing to do some research by yourself. (Short intro : the URLrewrite filter is a bit of a workhorse, simioar to mod_rewrite for Apache httpd, and which can do a multitude of things when it comes to filter/modify HTTP requests in Tomcat) First, get the URLrewrite User's Manual at http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/4.0/index.html and then search for : condition element (see method and remote-addr) and set element (see request (default)) : The same as request.setAttribute([name], [value]) (note, name must be set). So, the requests that you want to not log look like this : 10.122.32.4 - - [16/Sep/2013:17:12:49 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:51 +1000] and thus they address the / (default) webapp, originate from the client IP 10.122.32.4, and have the method OPTIONS. And on the other hand, the AccessLogValve has an attribute which allows you to specify that if the request has an attribute (e.g.) nolog set, it will not be logged. So, by configuring your ROOT (default) webapp to include the URLrewrite filter, and configuring this filter properly, you should be able to attain your goal
Filtering HTTP OPTIONS request method from logs?
Hi all. I'm hoping someone on this list can help me since I've been reading docs, mailing lists, FAQs, and so on for hours now, and I'm not having much luck finding an answer to my question. I am using Tomcat version 7.0.42 as packaged in Debian Linux. In front of my Tomcat servers, I am using haproxy for load balancing. The haproxy load balancers are using the HTTP OPTIONS request method to check if the Tomcat servers are alive and healthy. This results in log entries like the following in the Tomcat accesslog file: 10.122.32.4 - - [16/Sep/2013:17:12:49 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:51 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:53 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:55 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:57 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:59 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:01 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:03 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:05 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:07 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:09 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:11 +1000] OPTIONS / HTTP/1.0 200 - At the moment I'm getting one of these every 2seconds, but I haven't enabled the second load balancer for HA purposes yet. When I do that, I'll be getting twice as many hits of this type. This is going to result in rather large log files full of noise that I'm not interested in. I've been trying to work out how to filter these out. Basically I don't want to log anything that is using the HTTP OPTIONS Request Method, but still want to log anything else that Tomcat usually logs. I have a feeling it will come down to modifying the following entry in the /etc/tomcat7/server.xml file: Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=%h %l %u %t quot;%rquot; %s %b / Specifically adding the condition=VALUE attribute, but I have no idea what to set VALUE to. The docs say that if ServletRequest.getAttribute(VALUE) returns null for the attribute defined in condition, then the item will be logged. Is there an ServletRequest attribute that is null when the http request method is not using OPTIONS? Or am I completely off track and there is a different way to filter these access log messages? Regards, -- Jim Barber - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Filtering HTTP OPTIONS request method from logs?
On 16/09/2013 4:46 PM, André Warnier wrote: Apologies for top posting, just following the trend. OPTIONS are used quite a bit by e.g. DAV clients. Won't you want also to add an IP filter then, to be able to block selectively only the requests from the proxies themselves ? Cédric Couralet wrote: Hi, I'm also interested in a method to filter those OPTIONS. With the same setup, I basically created my own AccessLogValve wich does the filtering, something like : /** * Don't log request when HTTP Method is one of the exclude List */ @Override public void log(Request request, Response response, long time) { if (Arrays.asList(exclude.split(,)).contains(request.getMethod())) { return; } super.log(request, response, time); } But there must be something better. 2013/9/16 Jim Barber jim.bar...@ddihealth.com: Hi all. I'm hoping someone on this list can help me since I've been reading docs, mailing lists, FAQs, and so on for hours now, and I'm not having much luck finding an answer to my question. I am using Tomcat version 7.0.42 as packaged in Debian Linux. In front of my Tomcat servers, I am using haproxy for load balancing. The haproxy load balancers are using the HTTP OPTIONS request method to check if the Tomcat servers are alive and healthy. This results in log entries like the following in the Tomcat accesslog file: 10.122.32.4 - - [16/Sep/2013:17:12:49 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:51 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:53 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:55 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:57 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:59 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:01 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:03 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:05 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:07 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:09 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:11 +1000] OPTIONS / HTTP/1.0 200 - At the moment I'm getting one of these every 2seconds, but I haven't enabled the second load balancer for HA purposes yet. When I do that, I'll be getting twice as many hits of this type. This is going to result in rather large log files full of noise that I'm not interested in. I've been trying to work out how to filter these out. Basically I don't want to log anything that is using the HTTP OPTIONS Request Method, but still want to log anything else that Tomcat usually logs. I have a feeling it will come down to modifying the following entry in the /etc/tomcat7/server.xml file: Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=%h %l %u %t quot;%rquot; %s %b / Specifically adding the condition=VALUE attribute, but I have no idea what to set VALUE to. The docs say that if ServletRequest.getAttribute(VALUE) returns null for the attribute defined in condition, then the item will be logged. Is there an ServletRequest attribute that is null when the http request method is not using OPTIONS? Or am I completely off track and there is a different way to filter these access log messages? Regards, -- Jim Barber Hi André. I'm not sure I follow what you're saying. I don't want an IP filter, since I need the HTTP OPTIONS check from the load balancers to reach the Tomcat servers and a response to come back, or else the load balancers will think the tomcat instance is unhealthy. I just don't want that check to be logged at all. Although there are other things that use the HTTP OPTIONS check, these load balancers are only exposed to internal traffic requesting specific servlets from the Tomcat servers, and so there won't be anything else of interest using the HTTP OPTIONS request methods to the Tomcat servers. Hi Cédric. What you posted is some Java code that needs to be compiled and then the resulting class file put somewhere where Tomcat can find it right? Is it only partial code where 'exclude' was some sort of pre-populated comma separated string? Just checking as it doesn't look like anything that you can put direct into a Tomcat configuration file to me. Or is it? Regards, Jim Barber - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Filtering HTTP OPTIONS request method from logs?
All, On 16/09/2013 10:52 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Felix, On 9/16/13 10:25 AM, Felix Schumacher wrote: Am Montag, den 16.09.2013, 10:02 -0400 schrieb Christopher Schultz: Jim, On 9/16/13 3:42 AM, Jim Barber wrote: I'm hoping someone on this list can help me since I've been reading docs, mailing lists, FAQs, and so on for hours now, and I'm not having much luck finding an answer to my question. I am using Tomcat version 7.0.42 as packaged in Debian Linux. In front of my Tomcat servers, I am using haproxy for load balancing. The haproxy load balancers are using the HTTP OPTIONS request method to check if the Tomcat servers are alive and healthy. This results in log entries like the following in the Tomcat accesslog file: 10.122.32.4 - - [16/Sep/2013:17:12:49 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:51 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:53 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:55 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:57 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:12:59 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:01 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:03 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:05 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:07 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:09 +1000] OPTIONS / HTTP/1.0 200 - 10.122.32.4 - - [16/Sep/2013:17:13:11 +1000] OPTIONS / HTTP/1.0 200 - At the moment I'm getting one of these every 2seconds, but I haven't enabled the second load balancer for HA purposes yet. When I do that, I'll be getting twice as many hits of this type. This is going to result in rather large log files full of noise that I'm not interested in. Playing the devil's advocate here a bit... Why wouldn't you be interested in getting these logs? They are requests being handled by your web server. They require (a small amount of) time and resources to process, and indicate that your lb is still reaching-out to determine the status of the app server. My recommendation would be to leave those logs in there (they accurately describe a real request) and filter them out if you want to do some kind of analytics against your log files and consider those OPTIONS requests to be noise. I have had one case where I wanted to get rid of those requests too, so I can understand the OP. But I have to admint I had a scary feeling about it. Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=%h %l %u %t quot;%rquot; %s %b / Specifically adding the condition=VALUE attribute, but I have no idea what to set VALUE to. It's not that simple: if you want to use condition, then you have a write a Valve (can't be a Filter, since it must run *before* the AccessLogValve) that tests the request and sets a request attribute that will then trigger this condition. That is not true, you can use a filter, since the logging will happen *after* the request and can and will check the request attribute then. Thanks for pointing that out. After I had sent my message, I realized that and decided not to post a followup after reading yours. - -chris Thank you all for your responses. It looks like I'll just have to put up with these messages. There seems to be no easy way to filter them out. Regards, - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC 6.0.2*: Dynamically-compiled jsps/tags not being loaded
Thanks for the question -- I worded that part awkwardly. Our project has a root-level /src directory with the web app's Java files, and a root-level /war directory with the exploded non-Java files (static assets, JSPs, etc.). When developing, Eclipse compiles the /src directory into the /war/WEB-INF/classes directory, and then copies any changed files from /war into its embedded Tomcat instance. When we switch Git branches, that could change the .jsp/.tag files inside the /war directory, but depending on the branch, those changed files might have an earlier modified-timestamp than the .jsp/.tag files that have already been copied over to the embedded Tomcat's exploded webapp directory. So my thought was that those files would not, then, be recompiled, and so at runtime, Tomcat would be using the older versions of those files that are cached in Tomcat's /work directory. I think that theory is countered, however, by my colleague's claim that she clears out /work before deploying a new branch, and also my own experience wherein I watched Tomcat re-compile the .tag file into the /work directory, yet still claim the tag's class cannot be resolved. But to clarify: no part of Tomcat itself, including /work, is kept under version control. -- Jim On 11/20/12 2:18 AM, Pid * wrote: On 19 Nov 2012, at 23:58, Jim open...@gmail.com wrote: Hello! My team has been having an issue wherein our application occasionally fails to start up because Tomcat claims it can't find find a dynamically-created classfile. This doesn't happen all the time, and restarting Tomcat (albeit more than once, sometimes) resolves it. For example, I just started my Tomcat 6.0.26 instance (via Eclipse WTP, on OS 10.7.5), tried to load a page, and got: ** snip ** An error occurred at line: 1 in the jsp file: /WEB-INF/jsp/about/about_impact.jsp org.apache.jsp.tag.web.about_tag cannot be resolved to a type 1: %@ include file=../common/constants.jsp %templates:about ** snip/ ** The constants.jsp referenced above contains: %@ taglib prefix=templates tagdir=/WEB-INF/tags % ... and /WEB-INF/tags contains the about.tag file. The $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web directory exists, and it contains both about_tag.class and about_tag.java, with timestamps corresponding to when I loaded the page. I then deleted those files, and refreshed the page in my browser. about_tag.class and about_tag.java get recreated in that directory, but I still get the above error claiming about_tag can't be resolved. I then restarted Tomcat, refreshed the page in my browser, and all is well. I've also seen this happen regularly for my Windows-using colleagues, as well as in a non-Eclipse Linux-based 6.0.29 instance, and (hearsay) a colleague reported it happening in his Tomcat 7. Thinking it was a runtime race condition, we also tried telling Tomcat to load the JSP on startup via the web.xml, and while we did see the .java and .class files being created on startup, we still ran into the issue. We haven't yet tried pre-compiling our JSPs/TAGs before starting Tomcat -- but that shouldn't be necessary, right? I'd love some advice/insight in how I might investigate this further, or if there's a gotcha I might be running into. It feels like a race condition in the classloader, but I don't want to submit a bug report without a reliable test case, of course. Since we can't reliably recreate the situation, I'm having trouble putting that together. This seems to happen more often for me when I'm switching between substantially-different Git branches, so I thought it might have to do with the /work directory having older versions of the JSPs/TAGs, but one of my colleagues claims to clean her /work directory every time she switches branches, and before starting Tomcat, and still getting the issue. What is the relationship between Git and Tomcat, exactly? Does Tomcat load an app (or its files) directly from a version controlled file system? p Thanks in advance for any help! Jim - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC 6.0.2*: Dynamically-compiled jsps/tags not being loaded
No -- the /war/WEB-INF/classes directory is .gitignored, and empty until we deploy, at which point we copy in the compiled .java files, etc. I suppose my core question is: if $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class exists, what situations could cause Tomcat to give the following error: An error occurred at line: 1 in the jsp file: /WEB-INF/jsp/about/about_impact.jsp org.apache.jsp.tag.web.about_tag cannot be resolved to a type 1: %@ include file=../common/constants.jsp %templates:about If I delete $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class, and re-visit /WEB-INF/jsp/about/about_impact.jsp, $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class gets re-created, but I still get the above error. So, Tomcat appears to be compiling the JSP fine, but that compiled JSP does not appear to be making it into the classloader? -- Jim On 11/20/12 2:34 PM, Pid * wrote: On 20 Nov 2012, at 13:42, Jim open...@gmail.com wrote: Thanks for the question -- I worded that part awkwardly. Our project has a root-level /src directory with the web app's Java files, and a root-level /war directory with the exploded non-Java files (static assets, JSPs, etc.). When developing, Eclipse compiles the /src directory into the /war/WEB-INF/classes directory, and then copies any changed files from /war into its embedded Tomcat instance. When we switch Git branches, that could change the .jsp/.tag files inside the /war directory, but depending on the branch, those changed files might have an earlier modified-timestamp than the .jsp/.tag files that have already been copied over to the embedded Tomcat's exploded webapp directory. So my thought was that those files would not, then, be recompiled, and so at runtime, Tomcat would be using the older versions of those files that are cached in Tomcat's /work directory. I think that theory is countered, however, by my colleague's claim that she clears out /work before deploying a new branch, and also my own experience wherein I watched Tomcat re-compile the .tag file into the /work directory, yet still claim the tag's class cannot be resolved. But to clarify: no part of Tomcat itself, including /work, is kept under version control. -- Jim On 11/20/12 2:18 AM, Pid * wrote: On 19 Nov 2012, at 23:58, Jim open...@gmail.com wrote: Hello! My team has been having an issue wherein our application occasionally fails to start up because Tomcat claims it can't find find a dynamically-created classfile. This doesn't happen all the time, and restarting Tomcat (albeit more than once, sometimes) resolves it. For example, I just started my Tomcat 6.0.26 instance (via Eclipse WTP, on OS 10.7.5), tried to load a page, and got: ** snip ** An error occurred at line: 1 in the jsp file: /WEB-INF/jsp/about/about_impact.jsp org.apache.jsp.tag.web.about_tag cannot be resolved to a type 1: %@ include file=../common/constants.jsp %templates:about ** snip/ ** The constants.jsp referenced above contains: %@ taglib prefix=templates tagdir=/WEB-INF/tags % ... and /WEB-INF/tags contains the about.tag file. The $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web directory exists, and it contains both about_tag.class and about_tag.java, with timestamps corresponding to when I loaded the page. I then deleted those files, and refreshed the page in my browser. about_tag.class and about_tag.java get recreated in that directory, but I still get the above error claiming about_tag can't be resolved. I then restarted Tomcat, refreshed the page in my browser, and all is well. I've also seen this happen regularly for my Windows-using colleagues, as well as in a non-Eclipse Linux-based 6.0.29 instance, and (hearsay) a colleague reported it happening in his Tomcat 7. Thinking it was a runtime race condition, we also tried telling Tomcat to load the JSP on startup via the web.xml, and while we did see the .java and .class files being created on startup, we still ran into the issue. We haven't yet tried pre-compiling our JSPs/TAGs before starting Tomcat -- but that shouldn't be necessary, right? I'd love some advice/insight in how I might investigate this further, or if there's a gotcha I might be running into. It feels like a race condition in the classloader, but I don't want to submit a bug report without a reliable test case, of course. Since we can't reliably recreate the situation, I'm having trouble putting that together. This seems to happen more often for me when I'm switching between substantially-different Git branches, so I thought it might have to do with the /work directory having older versions of the JSPs/TAGs, but one of my colleagues claims to clean her /work directory every time she switches branches, and before starting Tomcat, and still getting the issue. What is the relationship between Git and Tomcat, exactly? Does Tomcat load
Re: TC 6.0.2*: Dynamically-compiled jsps/tags not being loaded
What I'm getting at is this: your release process should produce a .war (or exploded directory) that is copied to Tomcat and that Tomcat should not be reading any part of the app from the /war directory - a source controlled directory. Right: we produce an exploded directory which is then copied to Tomcat. The exploded /war directory in our project is copied into $CATALINA_HOME/webapps/[name of app]. All of Tomcat, including the /work and /webapps directories, is separate from our source-controlled project. To clarify one thing: the JSPs /are/ being compiled, and recompiled. I will see the classfile for the JSP/tag appear in Tomcat's /work directory, but Tomcat claims it can't find it. If I remove the .class file in the /work directory, and re-visit the JSP, Tomcat will re-compile the .class file, but the page will still fail to load with the same error about not being able to resolve the class. That latter behavior makes me think that Git/timestamps are a red herring; my problem seems to be that the compilation occurs correctly, but that the classes are sometimes not loaded into the classloader. Also, when this error happens, restarting Tomcat -- without changing the contents of /webapp/[name of app] at all -- resolves the issue, which hints at some sort of classloading race condition. -- Jim On 11/20/12 3:40 PM, Pid * wrote: On 20 Nov 2012, at 19:44, Jim open...@gmail.com wrote: No -- the /war/WEB-INF/classes directory is .gitignored, and empty until we deploy, at which point we copy in the compiled .java files, etc. I suppose my core question is: if $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class exists, what situations could cause Tomcat to give the following error: An error occurred at line: 1 in the jsp file: /WEB-INF/jsp/about/about_impact.jsp org.apache.jsp.tag.web.about_tag cannot be resolved to a type 1: %@ include file=../common/constants.jsp %templates:about If I delete $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class, and re-visit /WEB-INF/jsp/about/about_impact.jsp, $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class gets re-created, but I still get the above error. So, Tomcat appears to be compiling the JSP fine, but that compiled JSP does not appear to be making it into the classloader? -- Jim On 11/20/12 2:34 PM, Pid * wrote: On 20 Nov 2012, at 13:42, Jim open...@gmail.com wrote: Thanks for the question -- I worded that part awkwardly. Our project has a root-level /src directory with the web app's Java files, and a root-level /war directory with the exploded non-Java files (static assets, JSPs, etc.). When developing, Eclipse compiles the /src directory into the /war/WEB-INF/classes directory, and then copies any changed files from /war into its embedded Tomcat instance. When we switch Git branches, that could change the .jsp/.tag files inside the /war directory, but depending on the branch, those changed files might have an earlier modified-timestamp than the .jsp/.tag files that have already been copied over to the embedded Tomcat's exploded webapp directory. So my thought was that those files would not, then, be recompiled, and so at runtime, Tomcat would be using the older versions of those files that are cached in Tomcat's /work directory. I think that theory is countered, however, by my colleague's claim that she clears out /work before deploying a new branch, and also my own experience wherein I watched Tomcat re-compile the .tag file into the /work directory, yet still claim the tag's class cannot be resolved. But to clarify: no part of Tomcat itself, including /work, is kept under version control. -- Jim On 11/20/12 2:18 AM, Pid * wrote: On 19 Nov 2012, at 23:58, Jim open...@gmail.com wrote: Hello! My team has been having an issue wherein our application occasionally fails to start up because Tomcat claims it can't find find a dynamically-created classfile. This doesn't happen all the time, and restarting Tomcat (albeit more than once, sometimes) resolves it. For example, I just started my Tomcat 6.0.26 instance (via Eclipse WTP, on OS 10.7.5), tried to load a page, and got: ** snip ** An error occurred at line: 1 in the jsp file: /WEB-INF/jsp/about/about_impact.jsp org.apache.jsp.tag.web.about_tag cannot be resolved to a type 1: %@ include file=../common/constants.jsp %templates:about ** snip/ ** The constants.jsp referenced above contains: %@ taglib prefix=templates tagdir=/WEB-INF/tags % ... and /WEB-INF/tags contains the about.tag file. The $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web directory exists, and it contains both about_tag.class and about_tag.java, with timestamps corresponding to when I loaded the page. I then deleted those files, and refreshed the page in my browser. about_tag.class and about_tag.java get recreated in that directory, but I still get the above error
Re: TC 6.0.2*: Dynamically-compiled jsps/tags not being loaded
On 11/20/12 5:02 PM, Pid * wrote: On 20 Nov 2012, at 21:44, Jim open...@gmail.com wrote: What I'm getting at is this: your release process should produce a .war (or exploded directory) that is copied to Tomcat and that Tomcat should not be reading any part of the app from the /war directory - a source controlled directory. Right: we produce an exploded directory which is then copied to Tomcat. The exploded /war directory in our project is copied into $CATALINA_HOME/webapps/[name of app]. All of Tomcat, including the /work and /webapps directories, is separate from our source-controlled project. To clarify one thing: the JSPs /are/ being compiled, and recompiled. I will see the classfile for the JSP/tag appear in Tomcat's /work directory, but Tomcat claims it can't find it. If I remove the .class file in the /work directory, and re-visit the JSP, Tomcat will re-compile the .class file, but the page will still fail to load with the same error about not being able to resolve the class. That latter behavior makes me think that Git/timestamps are a red herring; my problem seems to be that the compilation occurs correctly, but that the classes are sometimes not loaded into the classloader. Also, when this error happens, restarting Tomcat -- without changing the contents of /webapp/[name of app] at all -- resolves the issue, which hints at some sort of classloading race condition. -- Jim On 11/20/12 3:40 PM, Pid * wrote: On 20 Nov 2012, at 19:44, Jim open...@gmail.com wrote: No -- the /war/WEB-INF/classes directory is .gitignored, and empty until we deploy, at which point we copy in the compiled .java files, etc. I suppose my core question is: if $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class exists, what situations could cause Tomcat to give the following error: An error occurred at line: 1 in the jsp file: /WEB-INF/jsp/about/about_impact.jsp org.apache.jsp.tag.web.about_tag cannot be resolved to a type 1: %@ include file=../common/constants.jsp %templates:about If I delete $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class, and re-visit /WEB-INF/jsp/about/about_impact.jsp, $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web/about_tag.class gets re-created, but I still get the above error. So, Tomcat appears to be compiling the JSP fine, but that compiled JSP does not appear to be making it into the classloader? -- Jim On 11/20/12 2:34 PM, Pid * wrote: On 20 Nov 2012, at 13:42, Jim open...@gmail.com wrote: Thanks for the question -- I worded that part awkwardly. Our project has a root-level /src directory with the web app's Java files, and a root-level /war directory with the exploded non-Java files (static assets, JSPs, etc.). When developing, Eclipse compiles the /src directory into the /war/WEB-INF/classes directory, and then copies any changed files from /war into its embedded Tomcat instance. When we switch Git branches, that could change the .jsp/.tag files inside the /war directory, but depending on the branch, those changed files might have an earlier modified-timestamp than the .jsp/.tag files that have already been copied over to the embedded Tomcat's exploded webapp directory. So my thought was that those files would not, then, be recompiled, and so at runtime, Tomcat would be using the older versions of those files that are cached in Tomcat's /work directory. I think that theory is countered, however, by my colleague's claim that she clears out /work before deploying a new branch, and also my own experience wherein I watched Tomcat re-compile the .tag file into the /work directory, yet still claim the tag's class cannot be resolved. But to clarify: no part of Tomcat itself, including /work, is kept under version control. -- Jim On 11/20/12 2:18 AM, Pid * wrote: On 19 Nov 2012, at 23:58, Jim open...@gmail.com wrote: Hello! My team has been having an issue wherein our application occasionally fails to start up because Tomcat claims it can't find find a dynamically-created classfile. This doesn't happen all the time, and restarting Tomcat (albeit more than once, sometimes) resolves it. For example, I just started my Tomcat 6.0.26 instance (via Eclipse WTP, on OS 10.7.5), tried to load a page, and got: ** snip ** An error occurred at line: 1 in the jsp file: /WEB-INF/jsp/about/about_impact.jsp org.apache.jsp.tag.web.about_tag cannot be resolved to a type 1: %@ include file=../common/constants.jsp %templates:about ** snip/ ** The constants.jsp referenced above contains: %@ taglib prefix=templates tagdir=/WEB-INF/tags % ... and /WEB-INF/tags contains the about.tag file. The $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web directory exists, and it contains both about_tag.class and about_tag.java, with timestamps corresponding to when I loaded the page. I then deleted those files, and refreshed the page in my browser. about_tag.class
TC 6.0.2*: Dynamically-compiled jsps/tags not being loaded
Hello! My team has been having an issue wherein our application occasionally fails to start up because Tomcat claims it can't find find a dynamically-created classfile. This doesn't happen all the time, and restarting Tomcat (albeit more than once, sometimes) resolves it. For example, I just started my Tomcat 6.0.26 instance (via Eclipse WTP, on OS 10.7.5), tried to load a page, and got: ** snip ** An error occurred at line: 1 in the jsp file: /WEB-INF/jsp/about/about_impact.jsp org.apache.jsp.tag.web.about_tag cannot be resolved to a type 1: %@ include file=../common/constants.jsp %templates:about ** snip/ ** The constants.jsp referenced above contains: %@ taglib prefix=templates tagdir=/WEB-INF/tags % ... and /WEB-INF/tags contains the about.tag file. The $CATALINA_HOME/work/Catalina/localhost/_/org/apache/jsp/tag/web directory exists, and it contains both about_tag.class and about_tag.java, with timestamps corresponding to when I loaded the page. I then deleted those files, and refreshed the page in my browser. about_tag.class and about_tag.java get recreated in that directory, but I still get the above error claiming about_tag can't be resolved. I then restarted Tomcat, refreshed the page in my browser, and all is well. I've also seen this happen regularly for my Windows-using colleagues, as well as in a non-Eclipse Linux-based 6.0.29 instance, and (hearsay) a colleague reported it happening in his Tomcat 7. Thinking it was a runtime race condition, we also tried telling Tomcat to load the JSP on startup via the web.xml, and while we did see the .java and .class files being created on startup, we still ran into the issue. We haven't yet tried pre-compiling our JSPs/TAGs before starting Tomcat -- but that shouldn't be necessary, right? I'd love some advice/insight in how I might investigate this further, or if there's a gotcha I might be running into. It feels like a race condition in the classloader, but I don't want to submit a bug report without a reliable test case, of course. Since we can't reliably recreate the situation, I'm having trouble putting that together. This seems to happen more often for me when I'm switching between substantially-different Git branches, so I thought it might have to do with the /work directory having older versions of the JSPs/TAGs, but one of my colleagues claims to clean her /work directory every time she switches branches, and before starting Tomcat, and still getting the issue. Thanks in advance for any help! Jim - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem with JAASMemoryLoginModule?
, Principal userPrincipal, LoginContext loginContext) { super(); this.name = name; this.password = password; this.userPrincipal = userPrincipal; if (roles != null) { this.roles = new String[roles.size()]; this.roles = roles.toArray(this.roles); if (this.roles.length 0) Arrays.sort(this.roles); } this.loginContext = loginContext; } This seems like it could be a bug, but given that I am new to JAAS on Tomcat, I may just be doing something wrong. Any JAAS/Tomcat experts out there able to point me in the right direction? Jim Doble - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
problems installing app on tomcat v.7.0.26
Greetings — I'm running into errors installing a Java app called GeoServer (latest stable v2.1.4) on my Tomcat server at sge.lclark.edu:8080 (Tomcat v.7.0.26, JVM v.1.6.0_20-b20). I downloaded the .war.zip file, expanded it, and uploaded the .war file into a root-level directory (/geoserver) in Tomcat's webapps folder. Then, using the Tomcat manager, I tried both clicking Start for this directory, and used the Deploy menu below. The Deploy option results in Tomcat error Application already exists at path, and the Start option results in Tomcat error Application at context path /geoserver could not be started. A full catalina.log output for the latter error is below. I'm no Tomcat expert, but I have successfully installed one other app on this Tomcat server so don't expect the below to be purely a Tomcat issue…maybe it is? Would sure appreciate help; thanks. Jim P. *** Jul 23, 2012 12:22:18 PM org.apache.tomcat.util.scan.StandardJarScanner scan WARNING: Failed to scan [file:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/gnome-java-bridge.jar] from classloader hierarchy java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:131) at java.util.jar.JarFile.init(JarFile.java:150) at java.util.jar.JarFile.init(JarFile.java:87) at sun.net.www.protocol.jar.URLJarFile.init(URLJarFile.java:90) at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:66) at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:86) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122) at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89) at org.apache.tomcat.util.scan.FileUrlJar.init(FileUrlJar.java:40) at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34) at org.apache.catalina.startup.ContextConfig$FragmentJarScannerCallback.scan(ContextConfig.java:2566) at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:241) at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:204) at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1864) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1211) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:747) at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:222) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:187) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407
Re: problems installing app on tomcat v.7.0.26
Tim, thanks…I was going on the basis of other apps (all of which have root folders), but apparently GeoServer creates its own root folder upon installation. All seems to work now. Regards, Jim P. On Jul 23, 2012, at 4:17 PM, Tim Watts wrote: On Mon, 2012-07-23 at 14:39 -0700, Jim Proctor wrote: Greetings — I'm running into errors installing a Java app called GeoServer (latest stable v2.1.4) on my Tomcat server at sge.lclark.edu:8080 (Tomcat v.7.0.26, JVM v.1.6.0_20-b20). I downloaded the .war.zip file, expanded it, and uploaded the .war file into a root-level directory (/geoserver) in Tomcat's webapps folder. Then, using the Tomcat manager, I tried both clicking Start for this directory, and used the Deploy menu below. The Deploy option results in Tomcat error Application already exists at path, and the Start option results in Tomcat error Application at context path /geoserver could not be started. Huh? Are you saying you uploaded geoserver.war to the directory TC_HOME/webapps/geoserver/ and tried to deploy it from there using the Manager? If so, don't do that. Stop Tomcat, move the .war file to webapps/, remove the webapps/geoserver/ directory and restart. Unless autodeploy is disabled it should deploy automatically. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Source jar for tomcat-dbcp?
It would have been nice if this was noted in the docs :-) Sounds like you're pretty close to being able to make a patch. ;) I'm willing to write something up, but am not sure how to contribute it to the doc website. I rummaged through the ASF svn and found the tomcat/site stuff, but it seems to be old and does not look like the current doc website. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Source jar for tomcat-dbcp?
I have a problem I need to debug by stepping into tomcat-dbcp (6.0.35). I tried downloading the Apache commons-dbcp source but it seems the version in Tomcat has the classes in different packages, so I can't get Eclipse to recognize the source. I've searched the following areas: * the tomcat source zip (apache-tomcat-6.0.35-src.zip) -- it does not contain the dbcp source * archive.apache.org/dist/tomcat/tomcat-6 * maven-central; it has source jars for tomcat 7, but none for tomcat 6. * svn.apache.org/repos/asf/tomcat/tc6.0.x/tags/TOMCAT_6_0_35/java -- this does not contain the dbcp sources either * svn.apache.org/repos/asf/tomcat/tags/JDBC_POOL_1_1_0_1/ -- This looked promising, but on examination it does not seem to contain the source for the library in 6.0.35 The tomcat-dbcp.jar that came with 6.0.35 contains the following packages: org.apache.tomcat.dbcp.collections org.apache.tomcat.dbcp.dbcp org.apache.tomcat.dbcp.dbcp.cpdsadapter org.apache.tomcat.dbcp.datasources org.apache.tomcat.dbcp.jocl org.apache.tomcat.dbcp.pool org.apache.tomcat.dbcp.pool.impl So, where can I find the source for tomcat-dbcp 6.0.35?
RE: Source jar for tomcat-dbcp?
-Original Message- From: Jim Garrison [mailto:jim.garri...@troux.com] Sent: Saturday, March 10, 2012 7:07 PM To: users@tomcat.apache.org Subject: Source jar for tomcat-dbcp? I have a problem I need to debug by stepping into tomcat-dbcp (6.0.35). I tried downloading the Apache commons-dbcp source but it seems the version in Tomcat has the classes in different packages, so I can't get Eclipse to recognize the source. [snip] I think I've figured this out. In build.xml, the commons-dbcp sources are copied into a different package hierarchy and then built. Based on build.properties.default I see that it uses commons-dbcp version 1.3 and commons-pool version 1.5.6. So all I need to do is duplicate what build.xml does to assemble the sources in the proper locations. It would have been nice if this was noted in the docs :-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat6w.exe -- 32bit and 64bit versions identical?
-Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Tuesday, March 06, 2012 12:27 PM To: Tomcat Users List Subject: RE: tomcat6w.exe -- 32bit and 64bit versions identical? From: Jim Garrison [mailto:jim.garri...@troux.com] Subject: tomcat6w.exe -- 32bit and 64bit versions identical? The two versions of tomcat6w.exe are identical. Is this correct? That is correct. The tomcat6w.exe program does not access the JVM, so it need not match the JVM's execution mode. Thanks. Is that a change from 6.0.20? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat6w.exe -- 32bit and 64bit versions identical?
I am in an environment where I deploy tomcat via a script. Rather than keep two entire copies of Tomcat for 32- and 64-bit systems I have the complete 32-bit download plus the 64-bit tomcat6*.exe files. I'm upgrading from 6.0.20 to 6.0.35 and my usual procedure is to diff the 32- and 64-bit versions, which in the past has found only those differences (and tcnative-1.dll). This time, when diffing apache-tomcat-6.0.35-windows-x64 with apache-tomcat-6.0.35-windows-x86, I get only tomcat6.exe as different. The two versions of tomcat6w.exe are identical. Is this correct?
RE: Documentation Question
Hmm. Am I to understand this is fixed now? I tried it and it still seems to have problems. However, the other versions ( 7.0) seem to be working much better (I thought they too had problems when I tried in the past). Also, I appreciate everyone jumping in quickly to fix this. Jim -Original Message- From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: Wednesday, February 22, 2012 10:44 AM To: Tomcat Users List Subject: Re: Documentation Question The worst offender (in my opinion) is http://tomcat.apache.org/tomcat-7.0-doc/config/context.html. By the way, for the page in question, my HTML-checker lists 147 errors (not warnings), the few first of which being : line 59 column 5 - Error: end tag for element P which is not open line 78 column 11 - Error: end tag for element P which is not open line 111 column 10 - Error: end tag for element P which is not open line 137 column 5 - Error: end tag for element P which is not open line 154 column 5 - Error: end tag for element P which is not open Fixed. If VirtualWebappLoader is updated to trim each value in virtualClasspath, then that example could be wrapped into several lines. That seems like a very reasonable thing to do, as long as it's just trimming-off leading and trailing whitespace. I noticed while I was reading those two examples that we have two separate path separators in the same example: virtualClasspath uses semi-colons (aka win32-style path separators) and extraResourcePaths uses commas. Maybe we should try for some consistency :) VirtualWebappLoader already trims the spaces, so I fixed the docs. extraResourcePaths does not trim, so it needs more work. I agree that ';' is better there. My plan is to check if the path contains semicolon ';' and if it does then go with ; as separator. Otherwise fall back to the current comma ,. Best regards, Konstantin Kolinko - 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
Documentation Question
Is there a version of the Tomcat documentation that consistently handles word-wrap? Some of the segments are very difficult to read while others do word wrap properly? Thanks, Jim
[ANNOUNCE] Apache Tomcat 5.5.35 Released.
The Apache Tomcat team announces the immediate availability of Apache Tomcat 5.5.35 stable. Apache Tomcat 5.5.35 is primarily a security and bug fix release. All users of older versions of the Tomcat 5.5 family should upgrade to 5.5.35. Please refer to the change log for the list of changes: http://tomcat.apache.org/tomcat-5.5-doc/changelog.html Downloads: http://tomcat.apache.org/download-55.cgi 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: Availability of Tomcat 5.5.34
Tomcat 5.5.34 was released and announced yesterday... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Availability of Tomcat 5.5.34
I am TRing 5.5.34 today... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Availability of Tomcat 5.5.34
My plan is to TR 5.5.34 the week after next… I'm traveling next week :/ On Aug 12, 2011, at 12:25 AM, Sachin Mankapure wrote: Hi Jim, Is there any update on release date of 5.5.34? Thanks, -Sachin Jim Jagielski wrote: I am tempted to do a release next week... we seem to have enough to warrant it. On Jul 21, 2011, at 5:57 AM, Sachin Mankapure wrote: Thanks. I wanted to know *when* 5.5.34 will be available. I got the answer. Konstantin Kolinko wrote: 2011/7/20 msachin sachin.mankap...@gmail.com: Where can I get information about availability of Tomcat 5.3.34? Thanks. Here: http://tomcat.apache.org/download-55.cgi http://tomcat.apache.org/whichversion.html If you want o be notified about release you can subscribe to the announce@ mailing list I do not think that it can happen sooner than next release of 6.0. There is not much activity with Tomcat 5.5 development. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Availability-of-Tomcat-5.5.34-tp32098293p32106146.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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 -- View this message in context: http://old.nabble.com/Availability-of-Tomcat-5.5.34-tp32098293p32247100.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: Availability of Tomcat 5.5.34
I am tempted to do a release next week... we seem to have enough to warrant it. On Jul 21, 2011, at 5:57 AM, Sachin Mankapure wrote: Thanks. I wanted to know *when* 5.5.34 will be available. I got the answer. Konstantin Kolinko wrote: 2011/7/20 msachin sachin.mankap...@gmail.com: Where can I get information about availability of Tomcat 5.3.34? Thanks. Here: http://tomcat.apache.org/download-55.cgi http://tomcat.apache.org/whichversion.html If you want o be notified about release you can subscribe to the announce@ mailing list I do not think that it can happen sooner than next release of 6.0. There is not much activity with Tomcat 5.5 development. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Availability-of-Tomcat-5.5.34-tp32098293p32106146.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader
On Wed, 11 May 2011 18:04:15 -0400 Jim Seymour jseym...@linxnet.com wrote: On Thu, 12 May 2011 01:16:43 +0400 Konstantin Kolinko knst.koli...@gmail.com wrote: 1) jsvc is not developed within Apache Tomcat project but within the Apache Commons - it belongs to Apache Commons Daemon, -- your question belongs there http://commons.apache.org/daemon/ Thanks! I'll subscribe there and re-post. [snip] Well, Konstantin, there was no joy over there, either, so I guess I'll have to seek another solution. Thanks for the pointer. Regards, Jim -- Note: My mail server employs *very* aggressive anti-spam filtering. If you reply to this email and your email is rejected, please accept my apologies and let me know via my web form at http://jimsun.LinxNet.com/contact/scform.php. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader
On Thu, 12 May 2011 01:16:43 +0400 Konstantin Kolinko knst.koli...@gmail.com wrote: 1) jsvc is not developed within Apache Tomcat project but within the Apache Commons - it belongs to Apache Commons Daemon, -- your question belongs there http://commons.apache.org/daemon/ Thanks! I'll subscribe there and re-post. 2) This appears to be specific to Solaris - this issue in relation with Solaris was asked several times here and there in the last several months, but I have not seen any substantial answer Yes, I noticed that, which is why I posted it again. If somebody could just give me some direction, I'd be good. I only ask when I've exhausted everything I can find w/o doing so. 3) One of those threads mentioned that a previous version (1.0.2 ?) worked correctly. Maybe you can try it. 1.0.1, somebody reported. As I reported: That did not work for me, either. Thanks for the follow-up. Regards, Jim -- Note: My mail server employs *very* aggressive anti-spam filtering. If you reply to this email and your email is rejected, please accept my apologies and let me know via my web form at http://jimsun.LinxNet.com/contact/scform.php. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: RemoteIP valve and multiple X-Forwarded-For headers
On Dec 10, 2010, at 7:59 AM, Mark Thomas wrote: Looks like a bug, Please add it to bugzilla, as Mark suggested. BTW, I think that the following change can fix it: (for current tc6.0.x, not tested!) I don't think so. I think the problem is further up on line 558: String[] remoteIpHeaderValue = commaDelimitedListToStringArray(request.getHeader(remoteIpHeader)); I'm pretty sure that needs to be using request.getHeaders() but I haven't tested it either ;) It does indeed need to be using the Enumeration from request.getHeaders() instead of the single value from getHeader(). I have started work on a patch, unless someone beats me to it... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: EXTERNAL: Re: Tomcat hung
In your full production trace, is there an indication which thread has the 0xd50244e8 lock? I've debugged similar situations where threads were blocked waiting for monitor 0x. (getting java.sql.Connections, as it turned out) -- identifying examining the thread that had locked that monitor (with a message something like grabbed monitor 0x) helped quite a bit w/debugging. On Thu, Nov 18, 2010 at 10:35 AM, Robillard, Greg L greg.l.robill...@lmco.com wrote: Production, as of yet, strangely, I have not been able to create this problem testing. Here is the top of the stack without a profiler. 2010-10-04 10:35:50 Full thread dump Java HotSpot(TM) Server VM (10.0-b19 mixed mode): Attach Listener daemon prio=10 tid=0x08170400 nid=0x716b waiting on condition [0x..0x] java.lang.Thread.State: RUNNABLE http-8080-200 daemon prio=10 tid=0xcbca9800 nid=0xb5e waiting on condition [0xc5dbc000..0xc5dbcea0] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for 0xd50244e8 (a java.util.concurrent.locks.ReentrantReadWriteLock$FairSync) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(Unknown Source) at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(Unknown Source) at com.lmco.fltwinds.wxserver.wcs.ScanningCoverage.getOffering(ScanningCoverage.java:286) at com.lmco.fltwinds.wxserver.wcs.ScanningCoverage.getCoverageOffering(ScanningCoverage.java:282) at com.luciad.ogc.wcs.server.f.a(SourceFile:124) at com.luciad.ogc.wcs.server.f.a(SourceFile:14) at com.luciad.ogc.wcs.server.f$c.handleRequest(SourceFile:155) at com.luciad.ogc.common.f.a(LuciadMap:41) at com.luciad.ogc.wcs.TLcdWCSServlet.a(LuciadMap:68) at com.luciad.ogc.wcs.TLcdWCSServlet.doGet(LuciadMap:99) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source) http-8080-199 daemon prio=10 tid=0xcbca8400 nid=0xb5d waiting on condition [0xc5e0d000..0xc5e0de20] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for 0xd50244e8 (a java.util.concurrent.locks.ReentrantReadWriteLock$FairSync) at java.util.concurrent.locks.LockSupport.park(Unknown Source) I can include more if required. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Going down Frequently
Is LoginBean.java your code (or code that you control)? You might have to change that code a bit to handle a session that has already been invalidated. On Mon, Nov 15, 2010 at 6:03 AM, Amol Puglia amolcpug...@yahoo.com wrote: Hello team, Tomcat Server going down frequently with the following messages in the logs. kindly help. body { margin: 0pt; padding: 0pt; }td, div { font-family: Tahoma; font-size: 8pt; vertical-align: top; }body { margin: 0pt; padding: 0pt; }.transcript { background-color: rgb(210, 210, 210); }.messageBlock { margin-left: 4px; margin-bottom: 3px; }.message { margin-left: 100px; word-wrap: break-word; }.messageCont { margin-left: 100px; word-wrap: break-word; }.other { color: rgb(57, 87, 122); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.myself { color: rgb(218, 129, 3); font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont { font-size: 8px; text-align: right; color: rgb(57, 87, 122); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.myselfCont { font-size: 8px; text-align: right; color: rgb(218, 129, 3); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.system { margin-left: 4px; word-wrap: break-word; color: rgb(218, 129, 3); font-style: normal; font-weight: normal; }.showTimestamp { margin-right: 3px; float: right; color: rgb(153, 153, 153); font-style: normal; font-weight: normal; }.other1 { color: rgb(172, 32, 0); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont1 { font-size: 8px; text-align: right; color: rgb(172, 32, 0); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other2 { color: rgb(60, 159, 168); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont2 { font-size: 8px; text-align: right; color: rgb(60, 159, 168); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other3 { color: rgb(226, 86, 20); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont3 { font-size: 8px; text-align: right; color: rgb(226, 86, 20); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other4 { color: rgb(11, 106, 200); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont4 { font-size: 8px; text-align: right; color: rgb(11, 106, 200); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other5 { color: rgb(178, 50, 144); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont5 { font-size: 8px; text-align: right; color: rgb(178, 50, 144); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other6 { color: rgb(2, 231, 199); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont6 { font-size: 8px; text-align: right; color: rgb(2, 231, 199); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other7 { color: rgb(91, 50, 132); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont7 { font-size: 8px; text-align: right; color: rgb(91, 50, 132); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.tsDisplay { display: block; } Nov 12, 2010 1:29:23 PM org.apache.catalina.core.ContainerBase backgroundProcess WARNING: Exception processing manager org.apache.catalina.session.standardmana...@a20981 background process java.lang.IllegalStateException: getAttributeNames: Session already invalidated at org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1052) at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:120) at com.ericsson.mars.jspbean.LoginBean.logout(LoginBean.java:2366) at com.ericsson.mars.jspbean.LoginBean.valueUnbound(LoginBean.java:2450) at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1654) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:756) at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592) at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:680) at
Re: Connector Setting Problem in tomcat 6.0.29
On Nov 6, 2010, at 12:50 AM, rujin raj wrote: Now my server.xml file is like this.As you told i added executor=tomcatThreradPool as follows Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=1000 minSpareThreads=150/ Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 executor=tomcatThreadPool maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / Still the minSpareThreads is not taken into account. I believe (if I heard it correctly), either Mark T. or Tim F. explained at ApacheCon this week that the minimum is not immediate. It needs to build up to that level. So, when you start Tomcat, you won't immediately fire up 150 threads for the executor pool, but once = 150 threads are created in the process of serving requests, it will always keep a minimum of 150 for you. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Connector Setting Problem in tomcat 6.0.29
On Nov 6, 2010, at 2:17 PM, Christopher Schultz wrote: I believe (if I heard it correctly), either Mark T. or Tim F. explained at ApacheCon this week that the minimum is not immediate. It needs to build up to that level. So, when you start Tomcat, you won't immediately fire up 150 threads for the executor pool, but once = 150 threads are created in the process of serving requests, it will always keep a minimum of 150 for you. If that's the case, I find that surprising. I always like to avoid violating the principle of least surprise. minSpareThreads as a name implies to me that those spares are /always/ available, even immediately after startup. Chris - If you look in org.apache.catalina.core.StandardThreadExecutor, you will see that it is using a ThreadPoolExecutor. setMinSpareThreads() calls setCorePoolSize() in the ThreadPoolExecutor. If you read the javadoc for ThreadPoolExecutor, specifically the subsections labeled Core and maximum pool sizes and On-demand construction, you will see that the threads are created on demand unless you use prestartCoreThread()/prestartAllCoreThreads(), which Tomcat does not. So, although it may seem surprising or even counterintuitive, all 150 will not be fired up on startup. Perhaps we could add a separate attribute on the Executor (e.g. startThreads)? Then Tomcat would have a paradigm similar to httpd's Start(Servers|Threads) and MinSpare(Servers|Threads). Any interest in such an attribute? It would be fairly simple to roll a patch for it... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Connector Setting Problem in tomcat 6.0.29
executor=executor_name, so in your case: executor=tomcatThreadPool This is shown in the default/sample server.xml under the comment !-- A Connector using the shared thread pool-- On Nov 5, 2010, at 9:49 AM, rujin raj wrote: Please how to add the executor attribute in connector Executor=enable or true Is it like this: Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 Executor=enable or true maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / Thanks for helping me upto this level.I am trying this from last one week. Regards rujin On 5 November 2010 18:37, Caldarale, Charles R chuck.caldar...@unisys.comwrote: From: rujin raj [mailto:rujin...@gmail.com] Subject: Re: Connector Setting Problem in tomcat 6.0.29 I tried a lot. I am not able to point out the problem.Herewith i attached my server.xml file.. When posting long XML files, please strip out the comments, so we don't have to wade through the junk. Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=1000 minSpareThreads=150/ You finally have an Executor configured; that's good. Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / You failed to specify the executor attribute in the Connector, so the Connector will use its own thread pool, not the Executor. - 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
[ANN] Apache Tomcat 5.5.31 released
The Apache Tomcat Team announces the immediate availability of Apache Tomcat 5.5.31 stable. Apache Tomcat 5.5.31 is primarily a security and bug fix release. All users of older versions of the Tomcat 5.5 family should upgrade to 5.5.31. Please refer to the change log for the list of changes: http://tomcat.apache.org/tomcat-5.5-doc/changelog.html Please refer to the Tomcat 5 security page for the list of security fixes in this release: http://tomcat.apache.org/security-5.html Downloads: http://tomcat.apache.org/download-55.cgi 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: 2 second delays in mod_jk while maintaining workers
On Sep 9, 2010, at 8:34 AM, Mladen Turk wrote: On 09/09/2010 02:09 PM, John Baker wrote: Thanks for the feedback. Can you tell me why this if statement exists: if (poll(fds, 1, timeout) 0) { ... } else break; It appears to be at fault. poll returns positive number if there is some data to read on the socket. It returns 0 in case of timeout (two seconds in this case). Try to change fds.events = POLLIN; to fds.events = POLLIN | POLLHUP | POLLERR; If that doesn't help, it's obvious the Tomcat doesn't close the socket, so should be investigated why. Like said before, either the Tomcat doesn't respond to shutdown or the shutdown's FIN packet isn't send to the Tomcat or back to mod_jk, due to some weird OS networking issues. +1 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Feedback Requested: Proposed CLI Tool for Apache Tomcat; kitty.
Any interest in the code moving to the ASF incubator? On Aug 16, 2010, at 4:06 PM, Networked wrote: Elevator pitch Myself and Peary Chiu have created a lightweight utility for administering Tomcat from the command line in our copious amounts of free time on the weekends. This is a very rough utility, but we wanted a command line administration utility that made it very easy and quick to debug a Tomcat server via JMX. We are looking to solicit feedback from the community on this utility. Really it could be used for any application server, but because of Tomcat's relevance and our familiarity with it, we prefer to offer to this audience. The reason we are creating this utility is because we didn't feel that jconsole or other utilities such as jmxsh were not swift enough or user friendly enough for troubleshooting Tomcat in a production environment. We have nothing against these projects, we just had a different preference for this tool. Needs to be improved We are aware that it needs some features, such as: - #1 Documentation - Easier navigation - Bash-style auto completion (if accomplished, could also benefit the Jython project) - Compile Jython code to Java classes We are working on getting these problems addressed. To our knowledge it works without issue with Jython 2.5.1+. (http://sourceforge.net/projects/jython/files/) What we'd appreciate Feel free to reply back with bugs and enhancement requests. We believe this will eventually be a useful, lightweight administration utility for Tomcat. We believe that by putting this out to the community early, we can address the needs of the community for such a utility, if at all, and have the community give some feedback on their general thoughts on the project. Fin Code is available at: http://github.com/msacks/kitty Thanks for your friendly replies, Matthew Sacks - 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
[ANN] Apache Tomcat 5.5.30 released
The Apache Tomcat Team announces the immediate availability of Apache Tomcat 5.5.30 stable. Apache Tomcat 5.5.30 is primarily a security and bug fix release. All users of older versions of the Tomcat 5.5 family should upgrade to 5.5.30. Please refer to the change log for the list of changes: http://tomcat.apache.org/tomcat-5.5-doc/changelog.html Please refer to the Tomcat 5 security page for the list of security fixes in this release: http://tomcat.apache.org/security-5.html Downloads: http://tomcat.apache.org/download-55.cgi 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
JSESSIONID being lost
I'm hoping someone may have some insight into a difficult problem we are having. We have a situation where the JSESSIONID seems to get lost somewhere in a users transaction - the result is they get kicked back to the applications login page (no sessionid so the app thinks they haven't logged in). Our current setup is two hardware load balancers (layer 4) in front of two Apache servers (2.2.14) which sit in front of two tomcat servers (6.0.20). The hardware load balancers load balance apache and apache load balances tomcat using AJP via mod_proxy. Apache and Tomcat are running on RHEL4 32-bit. The JVM is 1.6. This issue first popped up when we moved to the above architecture - previously we had no hardware load balancers and only one apache server balancing two tomcat servers (still with AJP via mod_proxy). Initial thoughts were that it had something to do with either the 2nd apache server or the load balancers. One way we have made this better (but not fixed) was to turn off one of the tomcat servers so that requests could only go to one place - we thought that the users session was being sent to the other tomcat server even though we were using sticky sessions. This was our temporary fix until we could implement clustering, but today we found that users were still being kicked back to the login page even with only one tomcat server running. In the interim we have turned off one of the apache servers to see if that helps (so two hardware load balancers, one apache server and one tomcat server). This problem is intermittent and almost impossible to reproduce, but it does seem to happen more under heavy load. Any insight would be very much appreciated. If it would help I can post our apache and tomcat configurations. Thanks in advance.
Re: JSP Page hangs... clues?
Can you truss/strace Tomcat, or watch the network traffic between MySQL and Tomcat? Comparing captures from those tools between successul and hung page generation might show what the issue is, or at least suggest other areas to look at. On Wed, Feb 10, 2010 at 2:53 PM, Jordan Michaels jor...@viviotech.net wrote: We have an interesting situation and I'm wondering if anyone has any ideas on where we could look for possible solutions. We have a JSP page that performs a large mysql query of product titles (just the names). The list is then spit out on the page with drill-down links. Pretty simple really. The problem is that just after a tomcat restart, the first and occasionally the second and third requests will process all the way just fine, but most subsequent requests will hang on a random record. Occasionally one will go all the way through, but most will hang. Let me clarify, we restart tomcat, hit the page, and the page loads fine. We hit refresh once or twice, and the page will fail to load fully. The page will hang after a random product title and just stop responding. You can click on any other page on the site, but this one page with the large product listing query hangs in random spots. We've studied this intently. The server this is running on is a CentOS 4, 32-bit box with 1.5 GB RAM, Apache 2, and mod_jk. Our first thought was memory issues. We increased Tomcat's memory using the setenv.sh file, which now contains the following line: JAVA_OPTS=-Xms128m -Xmx1024m -Xss256m -XX:MaxPermSize=256m ; export JAVA_OPTS We've verified that the settings are in place by using the ps ax command and making sure the java process includes the updated settings. Unfortunately, this seems to have no effect at all. We then reviewed the logs: catalina.out, mod_jk.log, and apache's error_log, among others. We monitored these logs using tail so we could see if any errors were thrown as we hit the page. No errors were thrown if the request went through good or it failed. The logs were completely quiet. We've updated Tomcat, mod_jk, the JVM, and the MySQL driver to the absolute latest versions available as of this writing. Does anyone have any clues as to where we might look for what is happening to make this one page hang? It still feels like a memory issue, but with nothing in the logs and no indicators other then the problem itself, we'd appreciate any suggestions on what to look for at this point. Thank you in advance! -- Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Railo Community Distributions - 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: How to change effective user id on Windows
勹 发自我的 iPod 在 Jan 7, 2010,22:42,Looijmans, Mike mike.looijm...@oce.com 写到: The current configuration is correct in terms of security - the 'SYSTEM' user is a limited account that has no access to the desktop nor shared network resources. Be warned that running a service under other credentials than the system user is likely to lead to a less secure configuration, instead of improving. M. -Original Message- From: Amit Agarwal [mailto:ami@gmail.com] Sent: donderdag 07 januari 2010 15:08 To: users@tomcat.apache.org Subject: How to change effective user id on Windows Tomat on Linux starts as root to bind to port 80, and then switches effective user id to nobody. Windows does not appear to have concept of changing effective user. Tomcat service runs as a local system on Windows. Need to change the user for Tomcat after binding to port 80. How can this be achieved? -- Sent from Karnataka, India This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law. If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone and with a 'reply' message. Thank you for your co-operation. - 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
disableProxyCaching in Tomcat6?
In Tomcat5 there was a Context parameter disableProxyCaching to prevent proxies from caching content. This parameter doesn't seem to be present in Tomcat6. Is there an equivalent setting?
Re: thread dumps catalina.out
FWIW, I usually do a tail/tee on catalina.out in a term, then do the kill -QUIT tomcat PID from another term, then kill the tail/tee combo which leaves me with a reasonably clean thread dump. For example: Terminal A: prompt$ tail -f /usr/local/tomcat/logs/catalina.out | tee /tmp/tomcat-threads.tmpA Terminal B: prompt$ kill -QUIT 12345 On Wed, Sep 2, 2009 at 2:56 PM, keeplearningp_sodh...@yahoo.com wrote: Hi All, I have a quick question about getting thread dumps. I have been told that if I do kill -3 process id, it will send the thread dumps to catalina.out. Let say if I run test 1 and take 3 dumps. Then if I run test 2 and 3 more. Do these get appended to first thread dumps I took? If yes, Let say if I run 3 different tests and take 3 dumps each test, how should I seperate those dumps as per specific tests. How do you guys normally do it? -- View this message in context: http://www.nabble.com/thread-dumps-catalina.out-tp25263566p25263566.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: thread dumps catalina.out
Nothing magical to the two terms, just makes it easier to have a tail/tee combo running while issuing the kill -QUIT cmd (v. via job control, e.g). For example, in terminal A: prompt#tail -f /usr/local/tomcat/logs/catalina.out | tee /tmp/tomcat.dump.A Now in terminal B: prompt#ps -aef | egrep '[t]omcat' root 17660 1 0 Sep 01 ?6:15 /usr/java/bin/java -Dtomcat=1 -Xmx512m -Djava.awt.headl root 8918 8899 0 23:41:01 pts/30:00 tee /tmp/tomcat.dump.A root 8917 8899 0 23:41:01 pts/30:00 tail -f /usr/local/tomcat/logs/catalina.out prompt#kill -QUIT 17660 prompt# After stopping the tail/tee combo in Term A (with Ctrl+C): prompt#ls -alF /tmp/tomcat.dump.A -rw-rw-r-- 1 adir adir 20096 Sep 2 23:43 /tmp/tomcat.dump.A prompt#head /tmp/tomcat.dump.A Full thread dump Java HotSpot(TM) Client VM (1.4.2_13-b06 mixed mode): Thread-52 daemon prio=5 tid=0x007dc168 nid=0x40 waiting on condition [0xd0181000..0xd01819c8] at java.lang.Thread.sleep(Native Method) at org.apache.log4j.helpers.FileWatchdog.run(FileWatchdog.java:95) http80-Monitor prio=5 tid=0x00355f18 nid=0x39 in Object.wait() [0xd3081000..0xd30819c8] at java.lang.Object.wait(Native Method) - waiting on 0xd9057088 (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable) at org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:564) prompt#tail /tmp/tomcat.dump.A at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398) VM Thread prio=5 tid=0x000d1120 nid=0x4 runnable VM Periodic Task Thread prio=10 tid=0x000d8110 nid=0xa waiting on condition Suspend Checker Thread prio=10 tid=0x000d5140 nid=0x7 runnable prompt# On Wed, Sep 2, 2009 at 3:09 PM, keeplearningp_sodh...@yahoo.com wrote: Sorry. But I didn't understand how using 2 terminals would help me with the questions I posted. Jim Cox-2 wrote: FWIW, I usually do a tail/tee on catalina.out in a term, then do the kill -QUIT tomcat PID from another term, then kill the tail/tee combo which leaves me with a reasonably clean thread dump. For example: Terminal A: prompt$ tail -f /usr/local/tomcat/logs/catalina.out | tee /tmp/tomcat-threads.tmpA Terminal B: prompt$ kill -QUIT 12345 On Wed, Sep 2, 2009 at 2:56 PM, keeplearningp_sodh...@yahoo.com wrote: Hi All, I have a quick question about getting thread dumps. I have been told that if I do kill -3 process id, it will send the thread dumps to catalina.out. Let say if I run test 1 and take 3 dumps. Then if I run test 2 and 3 more. Do these get appended to first thread dumps I took? If yes, Let say if I run 3 different tests and take 3 dumps each test, how should I seperate those dumps as per specific tests. How do you guys normally do it? -- View this message in context: http://www.nabble.com/thread-dumps-catalina.out-tp25263566p25263566.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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 -- View this message in context: http://www.nabble.com/thread-dumps-catalina.out-tp25263566p25263811.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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
MapListener update
Hi , When I update my code for embedding tomcat 5.x to embedding 6.x, a null pointer exception blocks me . I dug the code , I found it cause by the org.apache.catalina.connector.MapperListener difference : Tomcat5.x --- /** * Register host. */ private void registerHost(ObjectName objectName) throws Exception { String name=objectName.getKeyProperty(host); if( name != null ) { String[] aliases = (String[]) mBeanServer.invoke(objectName, findAliases, null, null); mapper.addHost(name, aliases, objectName); if(log.isDebugEnabled()) log.debug(sm.getString (mapperListener.registerHost, name, domain)); } } Tomcat6.x - /** * Register host. */ private void registerHost(ObjectName objectName) throws Exception { String name=objectName.getKeyProperty(host); if( name != null ) { Host host = (Host) ServerFactory.getServer().findService( domain).getContainer().findChild(name); String[] aliases = host.findAliases(); mapper.addHost(name, aliases, objectName); host.addContainerListener(this); if(log.isDebugEnabled()) log.debug(sm.getString (mapperListener.registerHost, name, domain)); } } Is this change to fix an issue ? Or Tomcat6.x totally change the host name looking up mechanism . Could you also point to me where can I find the Tomcat6.x document about difference with Tomcat5.x if there is ? for example architecture , execution etc. Thanks in advance . Jim Ma
Re: JSP when tag question
Ron, Thank you, much! I will definitely get the plugin and give it a try. Jim Ron McNulty wrote: Hi Jim A liitle OT, but I can recommend the HTML Validator plugin for Firefox (if you don't already have it). It puts a red light in the bottom right corner of the browser when you forget an import - the HTML is of course invalid. Has saved me many a time... Regards Ron - Original Message - From: Jim Anderson ez...@ieee.org To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, July 05, 2009 5:52 AM Subject: Re: JSP when tag question David, Thank you to 'pid' and yourself. I spent quite a few hours going over the source HTML from Firefox and fixed some problems (e.g. an tag with no closing tag) and fixed some inefficient code. I was getting very inconsistent results and went through a number of iterations. This was to follow pid's suggestion. Then started to respond to your suggestion about the tablib libraries, etc. I have a number of jsp files using include statements. Lo and behold, I did not have a taglib directive! I'm embarrassed to say this, since I know better. I really thought I had already done it, but I guess at the time I was going to add the directive, I got distracted and failed to do it. Having said that, I'm a bit surprised that there was not error message generate by tomcat about seeing a reference to c:choose and c:xxx with no definition available. Thanks, again. Jim David Smith wrote: Following up on what Pid suggested, when you look at the output (view source in the browser), can you see the c:choose and c:when tags still present? Can you offer us a little more info like what you have declared for taglibs at the top of this jsp and what's in your webapp's WEB-INF/lib folder? --David Jim Anderson wrote: 3 This is a JSP issue. I have unsuccessfully searched for a JSP 4 support forum so I figured I will start here since the Tomcat 5 container processes JSP. If this is question is inappropriate, 6 I apologize. If you can point me to a better forum, please do. 8 The environment is Tomcat 6.0.18 on Linux using Firefox 2.0. I'm writing my first JSP program and I'm having a problem with the c:when construct. I have a bean that contains a property named 'midContent'. When the program segment is entered, the bean, BFSInfo, has it's midContent property set to 'page2'. The when tag test evaluates to false, yet the code within the when tag is executed. Here is the code segment: 18 c:choose 19 c:when test=${BFSInfo.midContent == 'page1'} 20 T/F = ${BFSInfo.midContent == 'page1'} 21 br/br 22 INFO EL is ${BFSInfo.midContent} 23 /c:when 24 ... 25 /c:choose When run, the lines inside the 'when' construct print the following on the web page: 31 T/F = false 32 INFO EL is page2 The test expression of line 19 is evaluated again at line 20 and the result is 'false' as shown at line 31. The output produced by line 22 is shown at line 32 and confirms that the value of midContent is 'page2'. Can someone explain why the code inside the 'c:when' tag is executed when the test on line 19 appears to be evaluating to false? Thanks you in advance. Jim Anderson - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JSP when tag question
David, Thank you to 'pid' and yourself. I spent quite a few hours going over the source HTML from Firefox and fixed some problems (e.g. an tag with no closing tag) and fixed some inefficient code. I was getting very inconsistent results and went through a number of iterations. This was to follow pid's suggestion. Then started to respond to your suggestion about the tablib libraries, etc. I have a number of jsp files using include statements. Lo and behold, I did not have a taglib directive! I'm embarrassed to say this, since I know better. I really thought I had already done it, but I guess at the time I was going to add the directive, I got distracted and failed to do it. Having said that, I'm a bit surprised that there was not error message generate by tomcat about seeing a reference to c:choose and c:xxx with no definition available. Thanks, again. Jim David Smith wrote: Following up on what Pid suggested, when you look at the output (view source in the browser), can you see the c:choose and c:when tags still present? Can you offer us a little more info like what you have declared for taglibs at the top of this jsp and what's in your webapp's WEB-INF/lib folder? --David Jim Anderson wrote: 3 This is a JSP issue. I have unsuccessfully searched for a JSP 4 support forum so I figured I will start here since the Tomcat 5 container processes JSP. If this is question is inappropriate, 6 I apologize. If you can point me to a better forum, please do. 8 The environment is Tomcat 6.0.18 on Linux using Firefox 2.0. I'm writing my first JSP program and I'm having a problem with the c:when construct. I have a bean that contains a property named 'midContent'. When the program segment is entered, the bean, BFSInfo, has it's midContent property set to 'page2'. The when tag test evaluates to false, yet the code within the when tag is executed. Here is the code segment: 18 c:choose 19 c:when test=${BFSInfo.midContent == 'page1'} 20 T/F = ${BFSInfo.midContent == 'page1'} 21 br/br 22 INFO EL is ${BFSInfo.midContent} 23 /c:when 24 ... 25 /c:choose When run, the lines inside the 'when' construct print the following on the web page: 31 T/F = false 32 INFO EL is page2 The test expression of line 19 is evaluated again at line 20 and the result is 'false' as shown at line 31. The output produced by line 22 is shown at line 32 and confirms that the value of midContent is 'page2'. Can someone explain why the code inside the 'c:when' tag is executed when the test on line 19 appears to be evaluating to false? Thanks you in advance. Jim Anderson - 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
JSP when tag question
3 This is a JSP issue. I have unsuccessfully searched for a JSP 4 support forum so I figured I will start here since the Tomcat 5 container processes JSP. If this is question is inappropriate, 6 I apologize. If you can point me to a better forum, please do. 8 The environment is Tomcat 6.0.18 on Linux using Firefox 2.0. I'm writing my first JSP program and I'm having a problem with the c:when construct. I have a bean that contains a property named 'midContent'. When the program segment is entered, the bean, BFSInfo, has it's midContent property set to 'page2'. The when tag test evaluates to false, yet the code within the when tag is executed. Here is the code segment: 18 c:choose 19 c:when test=${BFSInfo.midContent == 'page1'} 20 T/F = ${BFSInfo.midContent == 'page1'} 21 br/br 22 INFO EL is ${BFSInfo.midContent} 23 /c:when 24 ... 25 /c:choose When run, the lines inside the 'when' construct print the following on the web page: 31 T/F = false 32 INFO EL is page2 The test expression of line 19 is evaluated again at line 20 and the result is 'false' as shown at line 31. The output produced by line 22 is shown at line 32 and confirms that the value of midContent is 'page2'. Can someone explain why the code inside the 'c:when' tag is executed when the test on line 19 appears to be evaluating to false? Thanks you in advance. Jim Anderson - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'
Pid wrote: On 2/7/09 04:25, Jim Anderson wrote: Hi, I'm running tomcat 6.0.18 on Linux and I'm having a problem running a javabean. I created a bean and was able to call setProperty and getProperty for the property 'startPage' in the bean. When I added a 2nd property to the bean, I got the following message: org.apache.jasper.JasperException: Cannot find any information on property 'midContent' in a bean of type 'bfs.beans.BFSInfo' The setter and getter methods were copied and pasted from 'startPage' so they should have worked. I checked the spelling of the new property 'midContent' VERY carefully and I'm sure there was not a spelling error. I experimented and found that no matter what name I gave the new property, it would not work with the getter and setter methods. In the jsp code, my getter and setter methods for 'startPage' continued to work. I decided to rename the property to 'sPage'. I did this, recompiled the source, rebuilt the jar file and placed it the web library. I ran the jsp page again and found that getProperty Which web library and where did you put the compiled class and web library that contains it? In WEB-INF/lib. I compiled the java file in a separate directory and then copied created the jar file and copied the jar file to WEB-INF/lib Are you using a tool like Eclipse or Netbeans? No. I use a makefile based system. on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp page worked. It looks like tomcat is still is finding an old jar file or has cached a reference to the old library. Does anyone have an suggestions on how to resolve my problem? 25 public String getMidContent() { 26 return(midContent); 27 } wow. old school. Not reading a really old tutorial from somewhere are you? I'm working out of Java Server Pages, 3rd edition. p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'
Konstantin, Thank you. That did the trick. I kind of guessed it was that sort of problem, but could not find it in documentation of the book that I'm using. Jim Konstantin Kolinko wrote: 2009/7/2 Jim Anderson ez...@ieee.org: Hi, I'm running tomcat 6.0.18 on Linux and I'm having a problem running a javabean. I created a bean and was able to call setProperty and getProperty for the property 'startPage' in the bean. When I added a 2nd property to the bean, I got the following message: org.apache.jasper.JasperException: Cannot find any information on property 'midContent' in a bean of type 'bfs.beans.BFSInfo' The setter and getter methods were copied and pasted from 'startPage' so they should have worked. I checked the spelling of the new property 'midContent' VERY carefully and I'm sure there was not a spelling error. I experimented and found that no matter what name I gave the new property, it would not work with the getter and setter methods. In the jsp code, my getter and setter methods for 'startPage' continued to work. I decided to rename the property to 'sPage'. I did this, recompiled the source, rebuilt the jar file and placed it the web library. I ran the jsp page again and found that getProperty on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp page worked. It looks like tomcat is still is finding an old jar file or has cached a reference to the old library. It looks like you have not restarted (reloaded) your web application. One of the ways to do so in development mode is to touch your WEB-INF/web.xml (or any other WatchedResource if those are configured). Another way is to use the Tomcat Manager web application. http://tomcat.apache.org/tomcat-6.0-doc/html-manager-howto.html http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html Best regards, Konstantin Kolinko - 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
Cannot find any information on property 'x' in a bean of type 'bfs.beans.BFSInfo'
Hi, I'm running tomcat 6.0.18 on Linux and I'm having a problem running a javabean. I created a bean and was able to call setProperty and getProperty for the property 'startPage' in the bean. When I added a 2nd property to the bean, I got the following message: org.apache.jasper.JasperException: Cannot find any information on property 'midContent' in a bean of type 'bfs.beans.BFSInfo' The setter and getter methods were copied and pasted from 'startPage' so they should have worked. I checked the spelling of the new property 'midContent' VERY carefully and I'm sure there was not a spelling error. I experimented and found that no matter what name I gave the new property, it would not work with the getter and setter methods. In the jsp code, my getter and setter methods for 'startPage' continued to work. I decided to rename the property to 'sPage'. I did this, recompiled the source, rebuilt the jar file and placed it the web library. I ran the jsp page again and found that getProperty on 'sPage' failed, but if I changed 'sPage' back to 'startPage', the jsp page worked. It looks like tomcat is still is finding an old jar file or has cached a reference to the old library. Does anyone have an suggestions on how to resolve my problem? Thank you in advance for any help. Jim Anderson __ source code: JSP: 1 %@ page contentType=text/html % 2 jsp:useBean id=BFSInfo class=bfs.beans.BFSInfo / 3 jsp:setProperty name=BFSInfo property=startPage value=page1.jsp/ 4 jsp:setProperty name=BFSInfo property=midContent value=page1Mid.jsp/-- fails . . . BFSINFO is jsp:getProperty name=BFSInfo property=startPage / BFSINFO is jsp:getProperty name=BFSInfo property=midContent / java: 1 2 package bfs.beans; 3 4 import java.io.Serializable; 5 6 public class BFSInfo implements Serializable { 7 private String startPage = ; 8 private String midContent = ; 9 10 public BFSInfo() { 11 } 12 13 public void setStartPage(String s) { 14 startPage = s; BFSINFO is jsp:getProperty name=BFSInfo property=startPage / BFSINFO is jsp:getProperty name=BFSInfo property=midContent / java: 1 2 package bfs.beans; 3 4 import java.io.Serializable; 5 6 public class BFSInfo implements Serializable { 7 private String startPage = ; 8 private String midContent = ; 9 10 public BFSInfo() { 11 } 12 13 public void setStartPage(String s) { 14 startPage = s; 15 } 16 17 public String getStartPage() { 18 return(startPage); 19 } 20 21 public void setMidContent(String s) { 22 midContent = s; 23 } 24 25 public String getMidContent() { 26 return(midContent); 27 } 28 } - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache 2.2 to Tomcat 6 via proxy_ajp
On May 21, 2009, at 10:28 PM, J. Zimmerman wrote: I am just getting started with Tomcat and have been asked to take on the administration of our Tomcat servers at our college. I am not one of the developers, just the administrator. So far everything has gone pretty smoothly except for getting everything to run proxied via Apache (at least the way we would like it). Our requirement is for Tomcat to deliver the application through http://hostname:8080/appname and/or ajp://hostname:8009/appname. This happens by default and works well. However, we want end users to access the applications via port 443 or 80 and we are doing this via Apache. I can make this work via proxy_ajp and proxy_http so that something like http://hostname/appname works just fine. The wrench in the works is that we want to do virtual hosting through Apache and not have the appname appended to it. The Apache virtual hosted URL's will be the ones exposed to the public. For example if we developed an application called mycoolapp and we were deploying it at a website of the same name we would want the application to run at http://mycoolapp.com and not http://mycoolapp.com/mycoolapp. I have hacked together several different configs suggested through many different pieces of documentation and forums, but just can't seem to get it. Our setup is as follows. Server: Ubuntu 8.04 (all updates) Java: Latest JDK download from Sun Tomcat: Latest version 6 official download (configs are near defaults, I have revereted to the default server.xml) Apache: Latest version 2.2 via Ubuntu repositories. proxy_ajp, proxy_http, and rewrite enabled. If anyone has suggestions or a working example any help is greatly appreciated. ProxyPass / http://hostname:8080/mycoolapp -or- ProxyPass / ajp://hostname:8080/mycoolapp Assuming hostname:8080 is the Tomcat server No need for rewrite at all. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
acceptCount in Tomcat 5.x and 6.x?
Does the acceptCount setting that is part of the AJP connector in the server.xml file still exist in Tomcat 5.x and Tomcat 6.x? I see a lot of references to it in Tomcat 4.x, but I have not run across it in 5 or 6. We have this setting defined in our tomcat 6 installation, but I think it is a relic from some previous tomcat 4 configuration. Thanks
Re: Rotating catalina.out in tomcat 6.x
Since I can't get my development team to NOT log to catalina.out I just script it: cp -a $logdir/catalina.out $logdir/catalina.out-`date +%Y-%m-%d` $logdir/catalina.out On Tue, Mar 17, 2009 at 9:16 AM, Mark Thomas ma...@apache.org wrote: André Warnier wrote: Ghufran wrote: I am using tomcat 6.0.18 on RHEL 5. Please tell me how to rotate the catalina.out log file. Some simple nice polite innocent question like that, yet so perfect for triggering a huge ranting thread..;-) Or just ignoring it since the OP hijacked the thread. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org