Re: 8.0->8.5 migration - digests
On 16/08/2016 04:08, Anthony Biacco wrote: > Just started testing a migration from 8.0 to 8.5. > I'm was using digested passwords with digest="sha-512" in my realm for > manager and i noticed in the migration doc that it said the digest property > was removed. > Took me a little while to figure out that this was replaced with the > CredentialHandler. > Might to nice to see a little blurb after the notice to say, this is > replaced by CredentialHandler. See > https://tomcat.apache.org/tomcat-8.5-doc/config/credentialhandler.html The digest attribute is deprecated in 8.0.x. The credential handler is referenced in the 8.0.x docs in the description for the digest attribute. That said, this isn't mentioned in the 7.0.x to 8.0.x migration guide. I've made some changes. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
8.0->8.5 migration - digests
Just started testing a migration from 8.0 to 8.5. I'm was using digested passwords with digest="sha-512" in my realm for manager and i noticed in the migration doc that it said the digest property was removed. Took me a little while to figure out that this was replaced with the CredentialHandler. Might to nice to see a little blurb after the notice to say, this is replaced by CredentialHandler. See https://tomcat.apache.org/tomcat-8.5-doc/config/credentialhandler.html -Tony
Re: [jdbc-pool] Validation query leaves transaction open
I don't have one. I'm creating the pool in code. Basically like this: PoolConfiguration p = new PoolProperties(); p.setUrl(url); p.setDriverClassName(driverClass); p.setUsername(username); p.setPassword(password); p.setJmxEnabled(true); p.setTestWhileIdle(true); p.setTestOnBorrow(true); p.setTestOnReturn(false); p.setValidationQuery("SELECT 1"); p.setValidationInterval(3); p.setValidationQueryTimeout(15000); p.setLogValidationErrors(true); p.setTimeBetweenEvictionRunsMillis(6); p.setMaxActive(maxConnections); p.setMaxIdle(Math.max(maxConnections / 2, minConnections)); p.setMinIdle(minConnections); p.setInitialSize(minConnections); p.setMaxWait(maxWait); p.setRemoveAbandoned(true); p.setRemoveAbandonedTimeout(60*30); // 30 minutes (in seconds) p.setLogAbandoned(true); p.setMinEvictableIdleTimeMillis(5*60*1000); // 5 minutes p.setFairQueue(true); p.setJdbcInterceptors( "org.apache.tomcat.jdbc.pool.interceptor.ConnectionState" +";org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer" ); org.apache.tomcat.jdbc.pool.DataSource result = new org.apache.tomcat.jdbc.pool.DataSource(p); On Mon, Aug 15, 2016 at 4:44 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > John, > > On 8/11/16 3:33 PM, John Huss wrote: > > I have verified that in version 8.0.36 of tomcat jdbc the > > validation query functionality does not commit the transaction it > > starts in order to run the validation query, which can cause an > > open transaction for a very long time (possibly until the database > > crashes). This seems to be especially problematic if you have a > > large pool where the connections are idle for a large period of > > time. > > > > I also tested against version 9.0.0M9, and in that version the > > problem is fixed. However, nothing about this appears in the > > release notes for any version (9.0, 8.5, or 8.0). If this bug has > > indeed been fixed it should be documented in the release notes. > > Also, back-porting the fix to the 8.0 branch would be very > > helpful. > > > > For the time being I am working around the problem by changing my > > validation query from "SELECT 1" to be "SELECT 1; COMMIT" (using > > postgresql). This prevents the issue. > > > > This was reported previously (three years ago) here: > > https://mail-archives.apache.org/mod_mbox/tomcat-users/201301.mbox/%3C > CAPw873vy%2B9kWMQiFPbnTX6g1FSQ8oTVhDJ3Zagp9UkUZ3d5qjw%40mail.gmail.com%3 > E > > Can > > > you post your whole (sanitized) definition? > > Thanks, > - -chris > -BEGIN PGP SIGNATURE- > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJXsjewAAoJEBzwKT+lPKRYqacP/j/IUunibNUhUMx+FzyfBVZo > wK2WcQdM/gdjo6VvhT30A5ndf0HgD8PxHt+7ZaQ8LPQ3cqcLem2KhZvaMD0Kaepw > k2+HCCayv89KhDXBlvLdKBKJ9mNT1s7cgmNLsF0xdvEioTi8KAbJtG0JOndYwQFb > MUuYBifOoW4ir47tQmETnu0z6rGvezTRu7eycbiaUZw0jNoQgy0WojJQqm2mmQou > uLkQghDHivqeauCLf/SbnHnJR1RuXTxef6v25M3a0rbC1XpLE9mrv/CExI92Vm9R > 94iR7olGErxJbjZywSBM4sbdlhT91IFbSeIAh/Q6FlnC2MbJxEH5naUHVIX9q36R > p94412emJ2tBWxLB8VY5E9hJVeTNzOe2+bhjBypj9z9aewuCi9oDfVs5pTTmKedu > LypcLCWsXPg4/VQ4DQ6VL81igAnLnNZbcWNueBTQiqEg2F5c3pjEwfc/G4YqTfQ0 > byTRBraKBR3FLU8n9kkwpNpO4MMVX/keUTD1NEhP/NL8ldh+nGroekFx1JBmzIk4 > 5ID8gvtelcS9Mwp+nxz4uUuXYy0iDe4pMX50QRG2AY+Hxye4rfX9NmCG/BYhwNAQ > x0X/16fZ4usyKOyj75Lya6IfbMTq2ufv8rVciKaIJJXybQNAhgWvO2F1VZHTgdIG > HT8rSho2EhsqjyNlR2s4 > =28er > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: [jdbc-pool] Validation query leaves transaction open
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 John, On 8/11/16 3:33 PM, John Huss wrote: > I have verified that in version 8.0.36 of tomcat jdbc the > validation query functionality does not commit the transaction it > starts in order to run the validation query, which can cause an > open transaction for a very long time (possibly until the database > crashes). This seems to be especially problematic if you have a > large pool where the connections are idle for a large period of > time. > > I also tested against version 9.0.0M9, and in that version the > problem is fixed. However, nothing about this appears in the > release notes for any version (9.0, 8.5, or 8.0). If this bug has > indeed been fixed it should be documented in the release notes. > Also, back-porting the fix to the 8.0 branch would be very > helpful. > > For the time being I am working around the problem by changing my > validation query from "SELECT 1" to be "SELECT 1; COMMIT" (using > postgresql). This prevents the issue. > > This was reported previously (three years ago) here: > https://mail-archives.apache.org/mod_mbox/tomcat-users/201301.mbox/%3C CAPw873vy%2B9kWMQiFPbnTX6g1FSQ8oTVhDJ3Zagp9UkUZ3d5qjw%40mail.gmail.com%3 E Can > you post your whole (sanitized) definition? Thanks, - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJXsjewAAoJEBzwKT+lPKRYqacP/j/IUunibNUhUMx+FzyfBVZo wK2WcQdM/gdjo6VvhT30A5ndf0HgD8PxHt+7ZaQ8LPQ3cqcLem2KhZvaMD0Kaepw k2+HCCayv89KhDXBlvLdKBKJ9mNT1s7cgmNLsF0xdvEioTi8KAbJtG0JOndYwQFb MUuYBifOoW4ir47tQmETnu0z6rGvezTRu7eycbiaUZw0jNoQgy0WojJQqm2mmQou uLkQghDHivqeauCLf/SbnHnJR1RuXTxef6v25M3a0rbC1XpLE9mrv/CExI92Vm9R 94iR7olGErxJbjZywSBM4sbdlhT91IFbSeIAh/Q6FlnC2MbJxEH5naUHVIX9q36R p94412emJ2tBWxLB8VY5E9hJVeTNzOe2+bhjBypj9z9aewuCi9oDfVs5pTTmKedu LypcLCWsXPg4/VQ4DQ6VL81igAnLnNZbcWNueBTQiqEg2F5c3pjEwfc/G4YqTfQ0 byTRBraKBR3FLU8n9kkwpNpO4MMVX/keUTD1NEhP/NL8ldh+nGroekFx1JBmzIk4 5ID8gvtelcS9Mwp+nxz4uUuXYy0iDe4pMX50QRG2AY+Hxye4rfX9NmCG/BYhwNAQ x0X/16fZ4usyKOyj75Lya6IfbMTq2ufv8rVciKaIJJXybQNAhgWvO2F1VZHTgdIG HT8rSho2EhsqjyNlR2s4 =28er -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Any way to configure a javascript/html war with deployment-time properties?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 David, On 8/15/16 3:39 PM, KARR, DAVID wrote: > I'm using TomEE, but I think this question is Tomcat-specific, if > there's any solution at all. > > I have a WAR that is a "pure" webapp, with only javascript, css, > and html. The javascript connects to a REST service at a defined > host:port. The host:port is currently hardcoded in a javascript > variable. > > I really need to be able to configure this host:port at deployment > time. I know how to do this sort of thing with Java apps, but I'm > at a loss to see how to do this conveniently for a non-Java war. > > How can I rearrange this solution so that I can change the > host:port the WAR uses at deployment time? If your content is non-dynamic, then it's .. non-dynamic. There is no problem returning a dynamically-built javascript source file if you'd like. You have a lot of choices for how to dynamically-build a source file like that, but if you were to use JSP, it could look something like this : // This is my "pure" webapp, with only javascript, css, and html var serviceBaseURL = '<%= request.getServletContext().getAttribute("baseURL") %>'; // Here is the rest of your application. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJXsjORAAoJEBzwKT+lPKRYr+YQAJ176abKGbiOxE1PSoXBzZ1B dMELhokb9/nIsS4h9JkJ4MU+paQit/Hl4vjWYqLL9wyP7zzr3qM40gWlTLT5VnyB afpt+q3IjJihgsAzMrCe+2SHBr6kSVctwFtiUu0mHFlgpO1j/HtZ/Eu96+0IRZln Deqn2Ci29P2S10cwTAWNE+vByE+YJiG857pwJ+M25HXoHXheJumqE0SqK2pqVCcT DkoB86qTEe8wVEtKImNwR8m8NhWEthca860n/Zvo1nhdA1+oXtJU2F89Khu5v3nW bDErUdks0jUErMtCQFRCl4iq6KxMbWFLmv2fV8weIoM9X6d4w1/0u9MIHXkxOjSd mOWKH0ECdldk2alz45aX3CFxeKjnx8o6jlyc2oCyUJZgSDck7A01a3FwjSEqz2+T XqZYOzgXV1C/7NC+ocG0vK7G6YVRPjruq1k94/+QwaebS/oOqgNDsP4t+R5ZUoJQ 5pOyVcH3RzJqsobtjthR277xHv3CwDGqGbZFJhc7MLegs9nRySX7vOAaloC8/61R zMBumUdH3Wpee/8tTs5gOPcsEkjGagVXlCrpxaTjKXzT496f0Zc+33ZJeypVG1OF zb6jqZyK3Q3Z3Hiinx84B+kX5lhIb9ezq5vlthnzmmjluExL9gvjF1p5rd8qFc8m QLuYNTyl12udOjD57SUn =Rf7X -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Any way to configure a javascript/html war with deployment-time properties?
I'm using TomEE, but I think this question is Tomcat-specific, if there's any solution at all. I have a WAR that is a "pure" webapp, with only javascript, css, and html. The javascript connects to a REST service at a defined host:port. The host:port is currently hardcoded in a javascript variable. I really need to be able to configure this host:port at deployment time. I know how to do this sort of thing with Java apps, but I'm at a loss to see how to do this conveniently for a non-Java war. How can I rearrange this solution so that I can change the host:port the WAR uses at deployment time? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat8: WARNING: Problem with directory [/usr/share/tomcat8/common
On 15.08.2016 17:12, Wayne Li wrote: Hi, I installed tomcat8 on Ubuntu 16 using sudo apt install tomcat8 I only need one tomcat, no need for CATALINA_BASE. But, I got warnings below. Can I ignore these warnings? Or anything I can do? Any information would be appreciated. Thanks in advance. Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false] ... Hi. I am personally a fan of the Debian/Ubuntu and other packages, as they immensely simplify the sysadmin part of my life. But for this kind of problem, there is little that anyone on this list can do, because the people who so "package" Tomcat to distribute it, are not the same ones who develop Tomcat and provide a "standard Tomcat download" on the website at tomcat.apache.org. So basically here, we have no idea what this package really does, or how/where it distributes the various components of Tomcat. You need to get in touch with the Debian/Ubuntu people for that. These packages typically "distribute" Tomcat over a series of directories (/usr/share, /var/lib, /etc/tomcat etc..), which are very clever but at times quite difficult to follow. So here we have no idea what *should* be [/usr/share/tomcat8/common/classes] under Ubuntu for example, and why it is obviously not there. All we can tell you here, is that you can download a working tomcat version 8 from http://tomcat.apache.org, and follow the provided instructions to install it. And if you have a similar problem with that one, then someone here should be able to help you better. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat8: WARNING: Problem with directory [/usr/share/tomcat8/common
Hi, I installed tomcat8 on Ubuntu 16 using sudo apt install tomcat8 I only need one tomcat, no need for CATALINA_BASE. But, I got warnings below. Can I ignore these warnings? Or anything I can do? Any information would be appreciated. Thanks in advance. > Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false] Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat8/common], exists: [false], isDirectory: [false], canRead: [false] Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat8/server/classes], exists: [false], isDirectory: [false], canRead: [false] Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat8/server], exists: [false], isDirectory: [false], canRead: [false] Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat8/shared/classes], exists: [false], isDirectory: [false], canRead: [false] Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory validateFile WARNING: Problem with directory [/usr/share/tomcat8/shared], exists: [false], isDirectory: [false], canRead: [false]
Re: Unable to access Manager App, Host Manager and Server Status urls
2016-08-15 6:22 GMT+03:00 Andrew M : > Thank you so much ! Issue resolved. So why it was not asking for username and > password before ?? Also the standard documentation doesn't talk about > removing that tag from context.xml. One last thing though, I can access > "Server Status" and "Manager app" but not "Host Manager" ? I do have > admin-gui role defined so not sure why I cannot access it. > Cheers Read carefully: http://tomcat.apache.org/tomcat-8.5-doc/security-howto.html#Securing_Management_Applications http://tomcat.apache.org/tomcat-8.5-doc/manager-howto.html#Configuring_Manager_Application_Access http://tomcat.apache.org/migration-85.html#Web_applications Also, mailing list rules http://tomcat.apache.org/lists.html#tomcat-users -> Important -> 6. Top-posting is bad. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org