Re: Tomcat shutdown process
On 05/04/2016 21:48, Vinicius Carvalho wrote: > Thanks for the quick reply Mark, one final question, does tomcat return a > 503 error in that case? New connections will fail. Existing connections will be closed. Mark > > Regards > > On Tue, Apr 5, 2016 at 4:05 PM, Mark Thomaswrote: > >> On 05/04/2016 20:54, Vinicius Carvalho wrote: >>> Hi there, I googled this one around, but I found a big mix on exactly how >>> tomcat operates when a shutdown is initiated. What happens when a >> shutdown >>> is started in regards to: >>> >>> - Requests that are currently being processed (if a request is waiting on >>> an external resource such as a jdbc connection), does the container wait >>> for all responses to be committed or it will eventually kill any pending >>> request? >> >> Requests are given a configurable time to complete (default is 10s as >> far as I recall) and then Tomcat stops anyway. >> >>> - New requests that arrive after the shutdown. Does the container stop >>> accepting them? >> >> No new requests are accepted. >> >> Mark >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 8.5 and TLS
On Tue, Apr 5, 2016 at 4:25 PM, Rémy Maucheratwrote: > 2016-04-05 15:11 GMT-05:00 Thad Humphries : > > > My primary interest in Tomcat 8.5 is HTTP/2, so I must set up HTTPS and > > TLS. > > > > Since I eventually must demonstrate the various HTTPS approaches to > others, > > I have tried both the APR and the NIO implementation, as well as the > > different layouts in the docs ( > > > > > http://tomcat.apache.org/tomcat-8.5-doc/ssl-howto.html#Edit_the_Tomcat_Configuration_File > > ), > > and the $CATALINA_BASE/conf/server.xml comments. I've gotten APR is > > working both ways, but not quite NIO. > > > > When I use the following connector for NIO (from the docs), my SSL works: > > > > >protocol="org.apache.coyote.http11.Http11NioProtocol" > >port="8443" maxThreads="200" compression="on" > >scheme="https" secure="true" SSLEnabled="true" > >keystoreFile="conf/foo.jks" keystorePass="changeit" > >clientAuth="false" sslProtocol="TLS"> > >/> > > > > > > However when I try the approach in the server.xml comments, Tomcat does > not > > start: > > > > > protocol="org.apache.coyote.http11.Http11NioProtocol" > >maxThreads="200" SSLEnabled="true" > >scheme="https" secure="true" clientAuth="false" > >sslProtocol="TLS"> > >/> > > > > > certificateKeystoreType="JKS" > > certificateKeystorePassword="changeit" > > certificateKeyAlias="tomcat" > > type="RSA" /> > > > > > > > > The error at the top of catalina.out is below. I'm trying to understand > > why, both for myself and so that I can explain it to others. The "Caused > > by: java.lang.IllegalArgumentException: Multiple SSLHostConfig elements > > were provided for the host name [_default_]. Host names must be unique." > > has me stumped as I have only the one uncommented SSLHostConfig in > > server.xml. > > > > (Once I have this second working, I must make a write-up for > > folks here, a write-up which I hope will be clearer and more direct than > > the docs. I would be happy to offer that write-up to the wiki or docs.) > > > > You still have some attributes which should go into SSLHostConfig, so you > have two SNI for the default host (clientAuth and sslProtocol). BTW > sslProtocol is really useless. > > Rémy > I'm sorry, I'm not following you. Are you saying that to make the second work I must remove either clientAuth or sslProtocol? (No, I must be mistaken--remove either/or and Tomcat still fails to start). "BTW sslProtocol is really useless." does make sense. If so, I think I'm hearing that I should not use the sslProtocol="TLS" attribute or the element. Is that right? The 8.5 docs say "As of Tomcat 9, the majority of the SSL configuration attributes in the Connector are deprecated. If specified, they will be used to configure a SSLHostConfig and Certificate for the sslDefaultHost. Note that if an explicit SSLHostConfig element also exists for the sslDefaultHost then that will be treated as a configuration error. It is expected that Tomcat 10 will drop support for the SSL configuration attributes in the Connector." This confuses me. The 8.5 server.xml uses in its commented examples while the 8.0 server.xml does not. And if SSL* attributes are going away, why is now the example? And without SSL*, how do I specify the certificates in an APR connector like this one (which is the first I got working): > > > > > 05-Apr-2016 15:32:42.642 SEVERE [main] > > org.apache.tomcat.util.digester.Digester.endElement End event threw > > exception > > java.lang.reflect.InvocationTargetException > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > > at > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:498) > > at > > > > > org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:377) > > at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:145) > > at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:966) > > at > > > > > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609) > > at > > > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1783) > > at > > > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2970) > > at > > > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) > > at > > > > >
Re: Tomcat shutdown process
Thanks for the quick reply Mark, one final question, does tomcat return a 503 error in that case? Regards On Tue, Apr 5, 2016 at 4:05 PM, Mark Thomaswrote: > On 05/04/2016 20:54, Vinicius Carvalho wrote: > > Hi there, I googled this one around, but I found a big mix on exactly how > > tomcat operates when a shutdown is initiated. What happens when a > shutdown > > is started in regards to: > > > > - Requests that are currently being processed (if a request is waiting on > > an external resource such as a jdbc connection), does the container wait > > for all responses to be committed or it will eventually kill any pending > > request? > > Requests are given a configurable time to complete (default is 10s as > far as I recall) and then Tomcat stops anyway. > > > - New requests that arrive after the shutdown. Does the container stop > > accepting them? > > No new requests are accepted. > > Mark > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Tomcat 8.5 and TLS
2016-04-05 15:11 GMT-05:00 Thad Humphries: > My primary interest in Tomcat 8.5 is HTTP/2, so I must set up HTTPS and > TLS. > > Since I eventually must demonstrate the various HTTPS approaches to others, > I have tried both the APR and the NIO implementation, as well as the > different layouts in the docs ( > > http://tomcat.apache.org/tomcat-8.5-doc/ssl-howto.html#Edit_the_Tomcat_Configuration_File > ), > and the $CATALINA_BASE/conf/server.xml comments. I've gotten APR is > working both ways, but not quite NIO. > > When I use the following connector for NIO (from the docs), my SSL works: > > protocol="org.apache.coyote.http11.Http11NioProtocol" >port="8443" maxThreads="200" compression="on" >scheme="https" secure="true" SSLEnabled="true" >keystoreFile="conf/foo.jks" keystorePass="changeit" >clientAuth="false" sslProtocol="TLS"> > > > > However when I try the approach in the server.xml comments, Tomcat does not > start: > > protocol="org.apache.coyote.http11.Http11NioProtocol" >maxThreads="200" SSLEnabled="true" >scheme="https" secure="true" clientAuth="false" >sslProtocol="TLS"> > > > certificateKeystoreType="JKS" > certificateKeystorePassword="changeit" > certificateKeyAlias="tomcat" > type="RSA" /> > > > > The error at the top of catalina.out is below. I'm trying to understand > why, both for myself and so that I can explain it to others. The "Caused > by: java.lang.IllegalArgumentException: Multiple SSLHostConfig elements > were provided for the host name [_default_]. Host names must be unique." > has me stumped as I have only the one uncommented SSLHostConfig in > server.xml. > > (Once I have this second working, I must make a write-up for > folks here, a write-up which I hope will be clearer and more direct than > the docs. I would be happy to offer that write-up to the wiki or docs.) > You still have some attributes which should go into SSLHostConfig, so you have two SNI for the default host (clientAuth and sslProtocol). BTW sslProtocol is really useless. Rémy > > 05-Apr-2016 15:32:42.642 SEVERE [main] > org.apache.tomcat.util.digester.Digester.endElement End event threw > exception > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > > org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:377) > at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:145) > at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:966) > at > > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609) > at > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1783) > at > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2970) > at > > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) > at > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) > at > > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) > at > > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) > at > > com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) > at > > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) > at > > com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) > at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1461) > at org.apache.catalina.startup.Catalina.load(Catalina.java:578) > at org.apache.catalina.startup.Catalina.load(Catalina.java:629) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494) > Caused by: java.lang.IllegalArgumentException: Multiple SSLHostConfig > elements were provided for the host name [_default_]. Host names must be > unique. > at > >
Tomcat 8.5 and TLS
My primary interest in Tomcat 8.5 is HTTP/2, so I must set up HTTPS and TLS. Since I eventually must demonstrate the various HTTPS approaches to others, I have tried both the APR and the NIO implementation, as well as the different layouts in the docs ( http://tomcat.apache.org/tomcat-8.5-doc/ssl-howto.html#Edit_the_Tomcat_Configuration_File), and the $CATALINA_BASE/conf/server.xml comments. I've gotten APR is working both ways, but not quite NIO. When I use the following connector for NIO (from the docs), my SSL works: However when I try the approach in the server.xml comments, Tomcat does not start: The error at the top of catalina.out is below. I'm trying to understand why, both for myself and so that I can explain it to others. The "Caused by: java.lang.IllegalArgumentException: Multiple SSLHostConfig elements were provided for the host name [_default_]. Host names must be unique." has me stumped as I have only the one uncommented SSLHostConfig in server.xml. (Once I have this second working, I must make a write-up for folks here, a write-up which I hope will be clearer and more direct than the docs. I would be happy to offer that write-up to the wiki or docs.) 05-Apr-2016 15:32:42.642 SEVERE [main] org.apache.tomcat.util.digester.Digester.endElement End event threw exception java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:377) at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:145) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:966) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1783) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2970) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1461) at org.apache.catalina.startup.Catalina.load(Catalina.java:578) at org.apache.catalina.startup.Catalina.load(Catalina.java:629) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494) Caused by: java.lang.IllegalArgumentException: Multiple SSLHostConfig elements were provided for the host name [_default_]. Host names must be unique. at org.apache.tomcat.util.net.AbstractEndpoint.addSslHostConfig(AbstractEndpoint.java:201) at org.apache.coyote.http11.AbstractHttp11Protocol.addSslHostConfig(AbstractHttp11Protocol.java:398) at org.apache.catalina.connector.Connector.addSslHostConfig(Connector.java:876) ... 26 more -- "Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be" --Christopher Marlowe, *Doctor Faustus* (v. 121-24)
Re: Tomcat shutdown process
On 05/04/2016 20:54, Vinicius Carvalho wrote: > Hi there, I googled this one around, but I found a big mix on exactly how > tomcat operates when a shutdown is initiated. What happens when a shutdown > is started in regards to: > > - Requests that are currently being processed (if a request is waiting on > an external resource such as a jdbc connection), does the container wait > for all responses to be committed or it will eventually kill any pending > request? Requests are given a configurable time to complete (default is 10s as far as I recall) and then Tomcat stops anyway. > - New requests that arrive after the shutdown. Does the container stop > accepting them? No new requests are accepted. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat shutdown process
Hi there, I googled this one around, but I found a big mix on exactly how tomcat operates when a shutdown is initiated. What happens when a shutdown is started in regards to: - Requests that are currently being processed (if a request is waiting on an external resource such as a jdbc connection), does the container wait for all responses to be committed or it will eventually kill any pending request? - New requests that arrive after the shutdown. Does the container stop accepting them? Regards
Re: Tomcat 9.0.0M4 (and trunk) issue with Websockets (bug?)
On 04/04/2016 18:01, Francesco Bassi wrote: > Hello everybody. > > Tomcat 9 has a different behaviour than Tomcat 8, during the management of > MessageHandler.onMessage: > > - in Tomcat 8: > Thread.currentThread().getContextClassLoader() returns an instance of > org.apache.catalina.loader.WebappClassLoader > > - in Tomcat 9 > Thread.currentThread().getContextClassLoader() returns an instance of > java.net.URLClassLoader > (which doesn't resolve the WEB-INF/lib/* classes) > > It seems to be related to the switch to ParallelWebappClassLoader. > Is it a bug or and intended behaviour? It looks like a bug. I need to dig deeper to figure out the root cause. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 8.0.X - findService("Catalina").getContainer() deprecated. How to retrieve StandardEngine
On 05/04/2016 18:30, Mariano López wrote: > Hi all, I'm working with Tomcat 8.0.32 after migrating from 7.0.X. > > When I want to get the host object in Tomcat 7 I did: > >MBeanServer mBeanServer = > MBeanServerFactory.findMBeanServer(null).get(0); > ObjectName catalinaNombre = null; > try { > catalinaNombre = new ObjectName("Catalina","type","Server"); > servidorTomcat = (Server) mBeanServer.getAttribute( > catalinaNombre, "managedResource"); >StandardEngine engineTomcat = (StandardEngine) > servidorTomcat.findService("Catalina").getContainer(); >hostTomcat = (Host) engineTomcat.findChild( "localhost" ); > } > ... > > Now findService("Catalina").getContainer() is deprecated and don't know how > to do it. > > Nothing found after long search about this. > > Could anybody help me please ? You don't need to change anything. Look at the Javadocs for an explanation of the deprecation. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 8.0.X - findService("Catalina").getContainer() deprecated. How to retrieve StandardEngine
Hi all, I'm working with Tomcat 8.0.32 after migrating from 7.0.X. When I want to get the host object in Tomcat 7 I did: MBeanServer mBeanServer = MBeanServerFactory.findMBeanServer(null).get(0); ObjectName catalinaNombre = null; try { catalinaNombre = new ObjectName("Catalina","type","Server"); servidorTomcat = (Server) mBeanServer.getAttribute( catalinaNombre, "managedResource"); StandardEngine engineTomcat = (StandardEngine) servidorTomcat.findService("Catalina").getContainer(); hostTomcat = (Host) engineTomcat.findChild( "localhost" ); } ... Now findService("Catalina").getContainer() is deprecated and don't know how to do it. Nothing found after long search about this. Could anybody help me please ? Regards, Mriano
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
I missed to answer some of the other questions: 1. I start tomcat with the startup.sh 2. The files in the ../1.5.2/libexec/lib can be derived from the ln -s commands (see below) 3. TCNATIVE_PRIV_INCLUDES is default I didn't changed here anything. 4. I posted a step by step guide - I think if I run configure with the args "--prefix=" the native libraries are placed into the lib folder. kind regards Tobias > Am 05.04.2016 um 05:00 schrieb Christopher Schultz >: > > Tobias, > >> On 4/4/16 4:49 AM, Tobias Soloschenko wrote: >> I just figured out that this issue might depend on the file names of APR >> 1.5.2 - if I create links in the lib folder that reflects the names of >> 1.4.8 - tomcat throws an exception that the version of APR can not be >> resolved: >> >> ln -s libapr-1.0.dylib libtcnative-1.0.dylib >> >> ln -s libapr-1.a libtcnative-1.a >> >> ln -s libapr-1.dylib libtcnative-1.dylib >> >> ln -s libapr-1.la libtcnative-1.la >> >> >> Exception: >> >> 04-Apr-2016 10:42:39.579 WARNING [main] >> org.apache.catalina.core.AprLifecycleListener.init The APR based Apache >> Tomcat Native library failed to load. The error reported was >> [org.apache.tomcat.jni.Library.version(I)I] > > That wasn't going to work. > > APR and tcnative are different libraries. Copying one to the other is > about as useful as trying to load your /etc/passwd file as a shared library. > > When you set JAVA_OPTS: > >> "export >> JAVA_OPTS=-Djava.library.path=/usr/local/Cellar/apr/1.5.2/libexec/lib" >> >> but Tomcat can not find it at this location. > > How did you start Tomcat after that? What files are in > .../1.5.2/libexec/lib? What is in your "TCNATIVE_PRIV_INCLUDES" > directory? Where do you configure that for loading into Tomcat? > > -chris > > - > 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: Tomcat 8.5 documentation question
On Tue, Apr 5, 2016 at 2:53 AM, Mark Thomaswrote: > On 04/04/2016 23:10, Thad Humphries wrote: > > In docs/config/http.xml, lines #1430 and #1648 use > "certificateValidation". > > However when I go to "#SSL_Support_-_SSLHostConfig" I find the attribute > > "certificateVerification", *not *"certificate*Validation*". I think one > or > > the other is an error (and I think "certificateVerification" is the > correct > > attribute based on the "certificateVerificationDepth" attribute name). > > Thanks for pointing that out. > > I've fixed this for 9.0.x and 8.5.x and it will be included in the next > release of both. > > For the record, certificateVerification was the correct one. > > Mark > You're welcome. I would have put it in a pull request, but I was unsure which was which. -- "Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be" --Christopher Marlowe, *Doctor Faustus* (v. 121-24)
Re: Apache Tomcat 9.0.0-M4 and http/2 on Mac OS X 10.11.4
Hi > Am 05.04.2016 um 05:00 schrieb Christopher Schultz >: > > Tobias, > >> On 4/4/16 4:49 AM, Tobias Soloschenko wrote: >> I just figured out that this issue might depend on the file names of APR >> 1.5.2 - if I create links in the lib folder that reflects the names of >> 1.4.8 - tomcat throws an exception that the version of APR can not be >> resolved: >> >> ln -s libapr-1.0.dylib libtcnative-1.0.dylib >> >> ln -s libapr-1.a libtcnative-1.a >> >> ln -s libapr-1.dylib libtcnative-1.dylib >> >> ln -s libapr-1.la libtcnative-1.la >> >> >> Exception: >> >> 04-Apr-2016 10:42:39.579 WARNING [main] >> org.apache.catalina.core.AprLifecycleListener.init The APR based Apache >> Tomcat Native library failed to load. The error reported was >> [org.apache.tomcat.jni.Library.version(I)I] > > That wasn't going to work. > > APR and tcnative are different libraries. Copying one to the other is > about as useful as trying to load your /etc/passwd file as a shared library. I don't mix the libraries. I had a look into the apr version installed by default /usr/local/apr/lib (1.4.8) and the files in that directory are named that way - so I linked those of APR 1.5.8 the same - then tomcat greps them up and try to find the version which causes the exception. > > When you set JAVA_OPTS: > >> "export >> JAVA_OPTS=-Djava.library.path=/usr/local/Cellar/apr/1.5.2/libexec/lib" >> >> but Tomcat can not find it at this location. > > How did you start Tomcat after that? What files are in > .../1.5.2/libexec/lib? What is in your "TCNATIVE_PRIV_INCLUDES" > directory? Where do you configure that for loading into Tomcat? > As you can see in my first post (the log extract) tomcat uses the folder as expected, because when I switch to /usr/local/apr/lib it takes 1.4.8 - but this does not work for 1.5.2. > -chris > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > kind regards Tobias - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Exception Both the UrlPattern and value attribute were set for the WebServlet annotation on class ...
2016-04-05 9:10 GMT+03:00 basilk: > > Hi. > > Thanks for the answer. But i didn't quite catch, what i should do? > Eclipse refused to start Tomcat. I don't have any annotations i my application. > Check the settings for the project. In Eclipse the web app is executed directly from the project so it may appear that you linked some additional sources. Regards, Violeta > Basil. > > > From: Violeta Georgieva > Sent: Monday, April 04, 2016 10:30 AM > To: Tomcat Users List > Subject: Re: Exception Both the UrlPattern and value attribute were set for the WebServlet annotation on class ... > > > Hi, > > 2016-04-04 9:53 GMT+03:00 basilk : >> >> >> Hi. >> >> I try to start tomcat 8.0.33 in debug mode under Eclipse Mars.2. >> I get the following errors: >> >> SEVERE: A child container failed during start >> java.util.concurrent.ExecutionException: > > org.apache.catalina.LifecycleException: Failed to start component > [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/isogdquery]] >> >> at java.util.concurrent.FutureTask.report(FutureTask.java:122) >> at java.util.concurrent.FutureTask.get(FutureTask.java:192) >> at > > org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) >> >> at > > org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871) >> >> at > > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) >> >> at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) >> >> at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) >> >> at java.util.concurrent.FutureTask.run(FutureTask.java:266) >> at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) >> >> at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) >> >> at java.lang.Thread.run(Thread.java:745) >> Caused by: org.apache.catalina.LifecycleException: Failed to start > > component > [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/isogdquery]] >> >> at > > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) >> >> ... 6 more >> Caused by: java.lang.IllegalArgumentException: Both the UrlPattern and > > value attribute were set for the WebServlet annotation on class > [test.org.apache.catalina.startup.DuplicateMappingParamFilter] >> >> at > > org.apache.catalina.startup.ContextConfig.processAnnotationWebFilter(ContextConfig.java:2426) >> >> at > > org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2057) >> >> at > > org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1940) >> >> at > > org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934) >> >> at > > org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934) >> >> at > > org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934) >> >> at > > org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934) >> >> at > > org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934) >> >> at > > org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1147) >> >> at > > org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:779) >> >> at > > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:306) >> >> at > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95) >> >> at > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) >> >> at > > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150) >> >> at > > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) >> >> ... 6 more > > > This exception means that the filter with > class test.org.apache.catalina.startup.DuplicateMappingParamFilter has > wrong annotation i.e. the @WebFilter annotation is used with both "value" > and "urlPatterns" which is wrong. > If this filter is the one from Tomcat tests sources it is stated clearly in > the javadoc that this class is used for testing wrong annotations. > > About the message itself, it needs some rewording because the problem is > not with @WebServlet but with @WebFilter. > I'll fix that. > > Regards, > Violeta > > >> When i start tomcat as service in Windows everything is ok. >> >> What seems to be a problem? >> >> Thank you. >> >> Basil. >> >> >> >> --- >> Это сообщение проверено на вирусы антивирусом Avast. >> https://www.avast.com/antivirus > > > > --- > Это сообщение проверено на вирусы антивирусом Avast. > https://www.avast.com/antivirus > > > -
Re: Tomcat 8.5 documentation question
On 04/04/2016 23:10, Thad Humphries wrote: > In docs/config/http.xml, lines #1430 and #1648 use "certificateValidation". > However when I go to "#SSL_Support_-_SSLHostConfig" I find the attribute > "certificateVerification", *not *"certificate*Validation*". I think one or > the other is an error (and I think "certificateVerification" is the correct > attribute based on the "certificateVerificationDepth" attribute name). Thanks for pointing that out. I've fixed this for 9.0.x and 8.5.x and it will be included in the next release of both. For the record, certificateVerification was the correct one. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Information about incident ID 2205106170494020972
Hello Ivan, From: John D. AmentSent: 05 April 2016 03:11 To: Tomcat Users List Subject: Re: Information about incident ID 2205106170494020972 Is it at all possible that you have some network level security that's blocking your access to this port? On Mon, Apr 4, 2016 at 10:03 PM Yin, Ivan wrote: > Hi, > > I am sure this error message doesn't come from that webapp since there is > no "incident ID" in the webapp. > In addition, I searched this error in google and I found a lot of similar > error messages coming from different webapps deployed on tomcat so I > thought it might come from Tomcat. > > The original error is: > > This page can't be displayed. Contact support for additional information. > The incident ID is: N/A. > > I found the following message in http trace: > > This page can't be displayed. Contact support for additional information. > The incident ID is: 2205106170494020972. > > May I know if there is a concept called "incident ID" in tomcat? > > Regards, > Ivan > > -邮件原件- > 发件人: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] > 发送时间: 2016年4月5日 9:38 > 收件人: Tomcat Users List > 主题: RE: Information about incident ID 2205106170494020972 > > > From: Yin, Ivan [mailto:ivan@sap.com] > > Subject: Information about incident ID 2205106170494020972 > > > When I tried to click one button in the web application deployed in > Tomcat 7, it throws > > an error message as below: > > > This page can't be displayed. Contact support for additional information. > > The incident ID is: 2205106170494020972. > > > May I know what is the meaning of this incident ID and how I can solve > this issue? > > The message does not come from Tomcat itself, but most likely a webapp > deployed under Tomcat. As the message says, you'll need to contact the > support personnel for the webapp. > > - Chuck That response looks like an F5 firewall response message. Usually this happens due to the web service inadvertently submitting an attack / illegal signature due to - Header size, number of headers, restricted header type, restricted verb or and body size. Speak with the guys that manage the F5, give them the message ID and they will pin point the exact issue in the F5 logs. Theo Avios Group (AGL) Ltd is a limited company registered in England (registered number 2260073 and VAT number 512566754) whose registered address is Astral Towers, Betts Way, London Road, Crawley, West Sussex RH10 9XY . Avios Group (AGL) Limited is part of the IAG group of companies This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.
Re: Exception Both the UrlPattern and value attribute were set for the WebServlet annotation on class ...
Hi. Thanks for the answer. But i didn't quite catch, what i should do? Eclipse refused to start Tomcat. I don't have any annotations i my application. Basil. From: Violeta Georgieva Sent: Monday, April 04, 2016 10:30 AM To: Tomcat Users List Subject: Re: Exception Both the UrlPattern and value attribute were set for the WebServlet annotation on class ... Hi, 2016-04-04 9:53 GMT+03:00 basilk: Hi. I try to start tomcat 8.0.33 in debug mode under Eclipse Mars.2. I get the following errors: SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/isogdquery]] at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/isogdquery]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) ... 6 more Caused by: java.lang.IllegalArgumentException: Both the UrlPattern and value attribute were set for the WebServlet annotation on class [test.org.apache.catalina.startup.DuplicateMappingParamFilter] at org.apache.catalina.startup.ContextConfig.processAnnotationWebFilter(ContextConfig.java:2426) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2057) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1940) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934) at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1934) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1147) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:779) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:306) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) ... 6 more This exception means that the filter with class test.org.apache.catalina.startup.DuplicateMappingParamFilter has wrong annotation i.e. the @WebFilter annotation is used with both "value" and "urlPatterns" which is wrong. If this filter is the one from Tomcat tests sources it is stated clearly in the javadoc that this class is used for testing wrong annotations. About the message itself, it needs some rewording because the problem is not with @WebServlet but with @WebFilter. I'll fix that. Regards, Violeta When i start tomcat as service in Windows everything is ok. What seems to be a problem? Thank you. Basil. --- Это сообщение проверено на вирусы антивирусом Avast. https://www.avast.com/antivirus --- Это сообщение проверено на вирусы антивирусом Avast. https://www.avast.com/antivirus - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org