RE: tomcat8.0.33 classpath/classloader issues
Can anyone please help me on this? From: Venkata Reddy P Sent: 24 May 2016 14:44 To: Tomcat Users List Subject: tomcat8.0.33 classpath/classloader issues Hi, Currently I am migrating my existing tomcat6.0.x to tomcat8.0.33 version. 1) I have deployed four web applications inside webapps folder, all these 4 web applications use the few common jars which I was (in tomcat6.0.x) setting as classpath variable in setclasspath.bat as below rem Adding classpath to existing path. set CLASSPATH=%CLASSPATH%;%PROJECT_CP% %PROJECT_CP% is set by the list of project jars. This way of setting classpath is not working in tomcat8.0.33. Is it still valid way of setting the classpath in tomcat8.0.x? 2) Some unknown reason when I start tomcat8.0.x server by running \bin\startup.bat, Its unable to load the default tomcat jars from \lib\ folder Do we have any limitation in tomcat8.0.33 version? In both 1) and 2) cases if I have copy all the required jars to primary roo class loader \ext\lib folder, then it is loading all the jars as expected. The way of loading through the jre folder is not good practice in my project to separate the jars. Could you please help why default tomcat jars not loading and classpath is not working in tomcat8.0.33 version? Many Thanks in advance.
Re: Job priority (AS/400s)
Hi James, Just out of curiosity, does JVM for Tomcat runs on PASE or as native in OS/400? Regards, Daniel On Fri, Apr 1, 2016 at 6:49 AM James H. H. Lampertwrote: > On 3/31/16, 2:30 PM, Christopher Schultz wrote: > > > Wild Googling has produced this page: > > http://www.texas400.com/b400tip16.html > > > > ...which claims that priority *30* is the same as "interactive". > > > > Something tells me that it's going to come down to a matter of opinion > > what exact priority should be used. But OS processes should probably > > get higher priority than daemons, Tomcat included. > > I've been dealing with IBM Midrange Systems for close to 22 years, and > up until today, I'd never heard of "texas400.com" or David Mount. > > I'm still waiting for a response from the Midrange.com gurus on a > succinct, to-the-point, straight-from-the-equine-masticatory-orifice > document on normal job priorities, but I can tell you, we've never > futzed with them on our production box, and here's an annotated sample > from a WRKACTJOB screen: > > Subsystem/Job Type Pool Pty > > QBASE SBS 20 This is a subsystem. > > AUTHSERVER BCH 2 50 This is part of a simple web service. > > CATALINA BCH 2 50 This is the CATALINA job for Tomcat. > > JAMESL00 INT 3 20 This is my terminal session. > > POWERMON2BCH 2 50 This job checks for power outages. > > QJVACMDSRV BCI 2 50 This is the JVM for AUTHSERVER. > > QP0ZSPWT BCI 26 This is the JVM for CATALINA (Tomcat). > > QSYSSCD BCH 3 20 > > THINSERVER BCH 2 50 These are a couple of non-Java servers, > > WTCPCHILDBCH 2 50 both of them running as batch jobs. > > QHTTPSVR SBS 20 Another subsystem. > > ADMINBCI 2 25 This is the system's admin web server. > > QSYSWRKSBS 20 Another subsystem. > > CRTPFRDTABCH 2 50 Some misc. system batch jobs. > > QGLDPUBA ASJ 2 50 > > QGLDPUBE ASJ 2 50 > > QHTTPBCH 2 10 > > QJOBLOGSVR BCH 2 40 > > QJVACMDSRV BCI 2 50 More JVMs > > QJVAEXEC BCI 2 50 > > QMSF BCH 2 35 > > QSQSRVR PJ 2 20 These are system jobs for SQL access. > > QSQSRVR PJ 21 Note that the priorities vary. > > QSQSRVR PJ 2 10 > > QSQSRVR PJ 2 10 > > QSQSRVR PJ 2 10 > > The general rule-of-thumb based on what I've seen is that subsystems > always run at 0, batch jobs tend to run at 50, interactive jobs tend to > run at 20, and jobs that are initiated by the operating system can vary > over a wide range. > > FWIW, IBM handles timesharing rather differently from the way most other > manufacturers handle it: terminals, terminal controllers, and terminal > emulators are expected to handle individual keystrokes without any CPU > attention whatsoever, and jobs only get CPU timeslices when there is > processing to be done. And so timeslices tend to be measured in full > seconds (but end immediately as soon as it's necessary to wait for user > interaction). > > -- > JHHL > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: nio connector
On 24 May 2016 12:33 pm, "Christopher Schultz"wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Jakub, > > On 5/23/16 8:03 PM, Ja kub wrote: > > Christopher, Thx for response, pleas confirm or deny if I > > understand well. > > > > BIO uses thread per http connection (tcp connection). (Shame I > > didn't realize it!) NIO uses thread per request. > > It's more complicated than that, but very close. > > > With NIO thread is returned to pool as soon as request is finished > > (doGet ends). > > Yes. > > > With BIO thread is returned to pool only when tcp connection is > > closed !!! > > Yes, but even HTTP keepalive has a timeout, and the connection will be > dropped after that timeout, releasing the thread. > > > Given http://kb.mozillazine.org/Network.http.keep-alive.timeout - > > Amount of time in seconds to keep keep-alive connections alive. > > Default: 115 seconds. default tomcat keepAliveTimeout 60 s default > > tomcat maxThreads is 200 With 200 browsers with ajax pooling server > > every 50 seconds tomcat connector thread pool will be depleted and > > client no 201 will not be able to connect to tomcat ? > > Yes. > Although there is default accept queue of 100 so theoretically the conn 301 will be rejected. Right? > > So with default configuration tomcat 7 will have problem with just > > 201 on-line clients of an ajax application (with only 4 > > requests/second) ? > > If the browse doesn't close those HTTP connections from the Ajax > clients, the yes, you can trivially DOS your server. > > > Why is BIO connector still default one in tomcat 7 server.xml? > > Because it was the default when Tomcat 7 shipped and changing defaults > that are that important is a big deal. You are welcome to change it > yourself. > > > Is there any problem with backward compatibility (don't think so, > > cause than BIO wouldn't be totally removed in 8.5, but left > > available ) ? > > BIO is 100% gone in Tomcat 8.5. > > The protocol (HTTP) and the API (servlet) are still identical, so > there should be no problems for your application in general. > > - -chris > -BEGIN PGP SIGNATURE- > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJXQ71tAAoJEBzwKT+lPKRYZHIP/jbN3vhtHkLHny6kNXguh5Pl > BpwaRNHojlOqzXQUWidrmQpQPZ+8GKSUcJp3hcwCklRYNqLS9GdENodwYJFhyKRE > jVFG2KRSVI+difWKpuX+gIVEiFxUV/fQ+1ZhrNUXusElprqku+s15dqsgI5GYu3u > BlvEUVs5/rYG+KqZFCYXw5lpe/pRd3fs+zNJFKOXYqY2qQRICzXQJDCvICgPp7fZ > I804dDIR8mhOfffemgaB1OyOy4F3NsPodBA2LsVcbJpecfQy3vWPCSNkLmUT1Nee > a30Q6VjdMsq+w/C1cGnxxDwxqoK8mXnyUEIH8GmtGyiak4lzJzSXmqO3RjqXHwm8 > tJnJdWNK+lP4EY9dJQrzv4NokZN+rYb9WCogMXKHvTdpmWDzMiMQs3zyFPkbLfKw > EGeZKaY3zJFIGltPvpk/QRj0+VcXh6x3g9TUtR8ypoETrchAszCJPVUYy8H5yBaX > N3H9wrJ2OlFmjrXKNRsY1OtuTABiKjVZXtfuTIgyK4tSddM+4gme5iydmURRISMY > 7G1UQRNtLng8WFpCaIPrrBVUgXXrfkmYu9pEyjgzuMNc1/gf5stQNWH/AagOVt+J > WR2Nz4nCSjsMDCyo3+AW6pcesp7aPOJ/uAsNAZHJbZvE2mTxsw857jZxonTF1bVN > V7EDZv5G8d/FFtZuzVzf > =UEDx > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >
JNDI DataSource in Tomcat 8: maxTotal and maxWaitMillis
Hi, Since 8.0, I think we should use maxTotal instead of maxActive and maxWaitMillis instead of maxWait. [1,2] However, if I use maxTotal for instance, the jmx console doesn't show it but show the old maxActive value (100, probably the default value?). Browsing the source, o.a.t.jdbc.pool.PoolConfiguration doesn't seem to consider both. o.a.t.jdbc.pool.DataSourceFactory#parsePoolProperties(Properties) seems even unaware of those new properties. Would this be a bug in either code or documentation? Another question is, why does it ignore 'poolPreparedStatements' parameter even though it's supported by the underlying dbcp? Regards, Woonsan [1] https://tomcat.apache.org/migration-8.html#Database_Connection_Pooling [2] http://tomcat.apache.org/tomcat-8.0-doc/jndi-datasource-examples-howto.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with monitoring with JMX
Tomcat 8.0.33 Java 1.8 Debian 8 From: Christopher SchultzSent: Tuesday, May 24, 2016 9:45 PM To: Tomcat Users List Subject: Re: Problem with monitoring with JMX -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Edwin, On 5/24/16 5:03 PM, Edwin Quijada wrote: > What are shared apps? I use JAVA_OPTS and it works ! But now I dont > know if it is correct CATALINA_OPTS should be the right one. JAVA_OPTS is used for multiple tools, and will configure every JVM you launch (even for e.g. "shutdown"). CATALINA_OPTS will only apply to launching a new Tomcat instance. What version of Tomcat are you running? - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAldEy1wACgkQ9CaO5/Lv0PDkNgCgjI0dHLZCK6VXLr5srg6x6n+W 67YAn0qnSobJoRbVZGiGrKVNgG5ALHHL =Vd0p -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
Re: Problem with monitoring with JMX
To both : Do not guess. Read the start of the "bin/catalina.sh" script (Linux) or the "bin/catalina.bat" script (Windows). It explains the difference between JAVA_OPTS and CATALINA_OPTS. It also recommends that you should not modify either catalina.sh/bat or startup.bat/sh or shutdown.bat/sh, but should define these options in a bin/setenv.bat/sh file, that you create if it is not there yet. This "bin/setenv.sh/bat" file, if it exists, is called and executed *before* the JVM that starts (or stops) Tomcat is started, and thus these options will be set in time to be active when the JVM runs. The reason not to modify the above files, is that they will be overwritten if you update (or re-install) your Tomcat, and thus your changes would be lost in that case. An exception to the above, is if you run Tomcat as a Service under Windows. Then you should set the Java options using the "tomcatw.exe" GUI interface to the Java/Tomcat settings. See here : http://wiki.apache.org/tomcat/FAQ/Windows#Q11 On 24.05.2016 23:13, Edwin Quijada wrote: I didnt want to put on startup script because it is not correct I read this From: Niranjan Babu BommuSent: Tuesday, May 24, 2016 8:36 PM To: Tomcat Users List Subject: Re: Problem with monitoring with JMX can you try putting config in startup script? CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port= \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false " I'm guessing when you set this in setenv.sh, this may not able to find all the classes. On Tue, May 24, 2016 at 4:31 PM, Niranjan Babu Bommu < niranjan.bo...@gmail.com> wrote: make sense, if you are not using shared apps better to use CATALINA_OPTS.. On Tue, May 24, 2016 at 4:07 PM, Edwin Quijada Sent: Tuesday, May 24, 2016 7:44 PM To: Tomcat Users List Subject: Re: Problem with monitoring with JMX I think this would be JAVA_OPTS. CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" On Tue, May 24, 2016 at 2:50 PM, Edwin Quijada < listas_quij...@hotmail.com> wrote: Hi! I am trying to monitor my Tomcat server using JMX remote when I configure the JMX protocol when I try to start Tomcat I get this Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.util.logging.LogManager$1.run(LogManager.java:195) at java.util.logging.LogManager$1.run(LogManager.java:181) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.(LogManager.java:181) at java.util.logging.Logger.demandLogger(Logger.java:448) at java.util.logging.Logger.getLogger(Logger.java:502) at com.sun.jmx.remote.util.ClassLogger.(ClassLogger.java:55) at sun.management.jmxremote.ConnectorBootstrap.(ConnectorBootstrap.java:814) at sun.management.Agent.startAgent(Agent.java:257) at sun.management.Agent.startAgent(Agent.java:447) Can't load log handler "1catalina.org.apache.juli.AsyncFileHandler" java.lang.ClassNotFoundException: 1catalina.org.apache.juli.AsyncFileHandler java.lang.ClassNotFoundException: 1catalina.org.apache.juli.AsyncFileHandler and to the bottom I get errror : Error: Password file not found: /usr/lib/jvm/java-8-oracle/jre/lib/management/jmxremote.password but my config doesnt use password This is my setenv.sh CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port= \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false " When I put off this configuration everything is fine and Tomcat can startup Any cluees?> #-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \ #-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access" -- *Thanks* *Niranjan* *+1 781.956.6900* - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands,
Re: Problem with monitoring with JMX
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Edwin, On 5/24/16 5:03 PM, Edwin Quijada wrote: > What are shared apps? I use JAVA_OPTS and it works ! But now I dont > know if it is correct CATALINA_OPTS should be the right one. JAVA_OPTS is used for multiple tools, and will configure every JVM you launch (even for e.g. "shutdown"). CATALINA_OPTS will only apply to launching a new Tomcat instance. What version of Tomcat are you running? - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAldEy1wACgkQ9CaO5/Lv0PDkNgCgjI0dHLZCK6VXLr5srg6x6n+W 67YAn0qnSobJoRbVZGiGrKVNgG5ALHHL =Vd0p -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Resetting mod_jk balancer worker errors stat only
All, I haven't yet tried the obvious -- to just slam this value into the balancer working using a FORM POST -- but I was wondering if it was possible to "reset" the "errors" stat for a balancer worker without resetting all of the stats. For example, I have these two workers here: [S|E|R] [S|E|R] Namefoo bar Act ACT ACT State OK OK D 0 0 F 1 1 M 1 1 V 25 24 Acc 42044 (0/sec) 51188 (0/sec) Sess2495 (0/sec)3303 (0/sec) Err 0 3 CE 0 10 RE 0 0 Wr 39M (172 /sec) 53M (235 /sec) Rd 220M (967 /sec) 266M (1.1K/sec) Busy0 0 MaxBusy 4 4 Con 8 9 MaxCon 25 25 Route foo bar RR Cd Rs 0/0 0/0 LR 238401 238401 LE I would like to set the "Err" stat for "bar" to zero, but I'd like to continue to have the LR and LE, plus all other stats, unchanged. Is that possible to do? What about other items in the status -- can they be reset independently? I don't see a field for the "error" count on the "edit worker" page, so I'd probably have to go into the source to find the field if it was even supported. Thanks, -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with monitoring with JMX
I didnt want to put on startup script because it is not correct I read this From: Niranjan Babu BommuSent: Tuesday, May 24, 2016 8:36 PM To: Tomcat Users List Subject: Re: Problem with monitoring with JMX can you try putting config in startup script? CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port= \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false " I'm guessing when you set this in setenv.sh, this may not able to find all the classes. On Tue, May 24, 2016 at 4:31 PM, Niranjan Babu Bommu < niranjan.bo...@gmail.com> wrote: > make sense, if you are not using shared apps better to use CATALINA_OPTS. > > On Tue, May 24, 2016 at 4:07 PM, Edwin Quijada > wrote: > >> I read that is better use CATALINA_OPTS instead of JAVA_OPTS >> >> >> From: Niranjan Babu Bommu >> Sent: Tuesday, May 24, 2016 7:44 PM >> To: Tomcat Users List >> Subject: Re: Problem with monitoring with JMX >> >> I think this would be JAVA_OPTS. >> >> CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" >> >> On Tue, May 24, 2016 at 2:50 PM, Edwin Quijada < >> listas_quij...@hotmail.com> >> wrote: >> >> > Hi! >> > I am trying to monitor my Tomcat server using JMX remote when I >> configure >> > the JMX protocol when I try to start Tomcat I get this >> > >> > Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" >> > java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager >> > at java.net.URLClassLoader$1.run(URLClassLoader.java:372) >> > at java.net.URLClassLoader$1.run(URLClassLoader.java:361) >> > at java.security.AccessController.doPrivileged(Native Method) >> > at java.net.URLClassLoader.findClass(URLClassLoader.java:360) >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) >> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) >> > at java.util.logging.LogManager$1.run(LogManager.java:195) >> > at java.util.logging.LogManager$1.run(LogManager.java:181) >> > at java.security.AccessController.doPrivileged(Native Method) >> > at java.util.logging.LogManager.(LogManager.java:181) >> > at java.util.logging.Logger.demandLogger(Logger.java:448) >> > at java.util.logging.Logger.getLogger(Logger.java:502) >> > at >> com.sun.jmx.remote.util.ClassLogger.(ClassLogger.java:55) >> > at >> > >> sun.management.jmxremote.ConnectorBootstrap.(ConnectorBootstrap.java:814) >> > at sun.management.Agent.startAgent(Agent.java:257) >> > at sun.management.Agent.startAgent(Agent.java:447) >> > Can't load log handler "1catalina.org.apache.juli.AsyncFileHandler" >> > java.lang.ClassNotFoundException: >> > 1catalina.org.apache.juli.AsyncFileHandler >> > java.lang.ClassNotFoundException: >> > 1catalina.org.apache.juli.AsyncFileHandler >> > >> > and to the bottom I get errror : >> > Error: Password file not found: >> > /usr/lib/jvm/java-8-oracle/jre/lib/management/jmxremote.password >> > >> > but my config doesnt use password >> > >> > This is my setenv.sh >> > CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" >> > CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ >> > -Dcom.sun.management.jmxremote.port= \ >> > -Dcom.sun.management.jmxremote.authenticate=false \ >> > -Dcom.sun.management.jmxremote.ssl=false " >> > >> > When I put off this configuration everything is fine and Tomcat can >> startup >> > >> > Any cluees?> >> > >> > >> #-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \ >> > #-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access" >> > >> > >> > >> >> >> -- >> *Thanks* >> *Niranjan* >> *+1 781.956.6900* >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > > > -- > *Thanks* > *Niranjan* > *+1 781.956.6900 <%2B1%20781.956.6900>* > -- *Thanks* *Niranjan* *+1 781.956.6900* - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with monitoring with JMX
What are shared apps? I use JAVA_OPTS and it works ! But now I dont know if it is correct From: Niranjan Babu BommuSent: Tuesday, May 24, 2016 8:31 PM To: Tomcat Users List Subject: Re: Problem with monitoring with JMX make sense, if you are not using shared apps better to use CATALINA_OPTS. On Tue, May 24, 2016 at 4:07 PM, Edwin Quijada wrote: > I read that is better use CATALINA_OPTS instead of JAVA_OPTS > > > From: Niranjan Babu Bommu > Sent: Tuesday, May 24, 2016 7:44 PM > To: Tomcat Users List > Subject: Re: Problem with monitoring with JMX > > I think this would be JAVA_OPTS. > > CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" > > On Tue, May 24, 2016 at 2:50 PM, Edwin Quijada > > wrote: > > > Hi! > > I am trying to monitor my Tomcat server using JMX remote when I configure > > the JMX protocol when I try to start Tomcat I get this > > > > Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" > > java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager > > at java.net.URLClassLoader$1.run(URLClassLoader.java:372) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:361) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:360) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > at java.util.logging.LogManager$1.run(LogManager.java:195) > > at java.util.logging.LogManager$1.run(LogManager.java:181) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.util.logging.LogManager.(LogManager.java:181) > > at java.util.logging.Logger.demandLogger(Logger.java:448) > > at java.util.logging.Logger.getLogger(Logger.java:502) > > at > com.sun.jmx.remote.util.ClassLogger.(ClassLogger.java:55) > > at > > > sun.management.jmxremote.ConnectorBootstrap.(ConnectorBootstrap.java:814) > > at sun.management.Agent.startAgent(Agent.java:257) > > at sun.management.Agent.startAgent(Agent.java:447) > > Can't load log handler "1catalina.org.apache.juli.AsyncFileHandler" > > java.lang.ClassNotFoundException: > > 1catalina.org.apache.juli.AsyncFileHandler > > java.lang.ClassNotFoundException: > > 1catalina.org.apache.juli.AsyncFileHandler > > > > and to the bottom I get errror : > > Error: Password file not found: > > /usr/lib/jvm/java-8-oracle/jre/lib/management/jmxremote.password > > > > but my config doesnt use password > > > > This is my setenv.sh > > CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" > > CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ > > -Dcom.sun.management.jmxremote.port= \ > > -Dcom.sun.management.jmxremote.authenticate=false \ > > -Dcom.sun.management.jmxremote.ssl=false " > > > > When I put off this configuration everything is fine and Tomcat can > startup > > > > Any cluees?> > > > > #-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password > \ > > #-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access" > > > > > > > > > -- > *Thanks* > *Niranjan* > *+1 781.956.6900* > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- *Thanks* *Niranjan* *+1 781.956.6900* - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with monitoring with JMX
can you try putting config in startup script? CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port= \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false " I'm guessing when you set this in setenv.sh, this may not able to find all the classes. On Tue, May 24, 2016 at 4:31 PM, Niranjan Babu Bommu < niranjan.bo...@gmail.com> wrote: > make sense, if you are not using shared apps better to use CATALINA_OPTS. > > On Tue, May 24, 2016 at 4:07 PM, Edwin Quijada> wrote: > >> I read that is better use CATALINA_OPTS instead of JAVA_OPTS >> >> >> From: Niranjan Babu Bommu >> Sent: Tuesday, May 24, 2016 7:44 PM >> To: Tomcat Users List >> Subject: Re: Problem with monitoring with JMX >> >> I think this would be JAVA_OPTS. >> >> CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" >> >> On Tue, May 24, 2016 at 2:50 PM, Edwin Quijada < >> listas_quij...@hotmail.com> >> wrote: >> >> > Hi! >> > I am trying to monitor my Tomcat server using JMX remote when I >> configure >> > the JMX protocol when I try to start Tomcat I get this >> > >> > Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" >> > java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager >> > at java.net.URLClassLoader$1.run(URLClassLoader.java:372) >> > at java.net.URLClassLoader$1.run(URLClassLoader.java:361) >> > at java.security.AccessController.doPrivileged(Native Method) >> > at java.net.URLClassLoader.findClass(URLClassLoader.java:360) >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) >> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) >> > at java.util.logging.LogManager$1.run(LogManager.java:195) >> > at java.util.logging.LogManager$1.run(LogManager.java:181) >> > at java.security.AccessController.doPrivileged(Native Method) >> > at java.util.logging.LogManager.(LogManager.java:181) >> > at java.util.logging.Logger.demandLogger(Logger.java:448) >> > at java.util.logging.Logger.getLogger(Logger.java:502) >> > at >> com.sun.jmx.remote.util.ClassLogger.(ClassLogger.java:55) >> > at >> > >> sun.management.jmxremote.ConnectorBootstrap.(ConnectorBootstrap.java:814) >> > at sun.management.Agent.startAgent(Agent.java:257) >> > at sun.management.Agent.startAgent(Agent.java:447) >> > Can't load log handler "1catalina.org.apache.juli.AsyncFileHandler" >> > java.lang.ClassNotFoundException: >> > 1catalina.org.apache.juli.AsyncFileHandler >> > java.lang.ClassNotFoundException: >> > 1catalina.org.apache.juli.AsyncFileHandler >> > >> > and to the bottom I get errror : >> > Error: Password file not found: >> > /usr/lib/jvm/java-8-oracle/jre/lib/management/jmxremote.password >> > >> > but my config doesnt use password >> > >> > This is my setenv.sh >> > CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" >> > CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ >> > -Dcom.sun.management.jmxremote.port= \ >> > -Dcom.sun.management.jmxremote.authenticate=false \ >> > -Dcom.sun.management.jmxremote.ssl=false " >> > >> > When I put off this configuration everything is fine and Tomcat can >> startup >> > >> > Any cluees?> >> > >> > >> #-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \ >> > #-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access" >> > >> > >> > >> >> >> -- >> *Thanks* >> *Niranjan* >> *+1 781.956.6900* >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > > > -- > *Thanks* > *Niranjan* > *+1 781.956.6900 <%2B1%20781.956.6900>* > -- *Thanks* *Niranjan* *+1 781.956.6900*
Re: Problem with monitoring with JMX
make sense, if you are not using shared apps better to use CATALINA_OPTS. On Tue, May 24, 2016 at 4:07 PM, Edwin Quijadawrote: > I read that is better use CATALINA_OPTS instead of JAVA_OPTS > > > From: Niranjan Babu Bommu > Sent: Tuesday, May 24, 2016 7:44 PM > To: Tomcat Users List > Subject: Re: Problem with monitoring with JMX > > I think this would be JAVA_OPTS. > > CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" > > On Tue, May 24, 2016 at 2:50 PM, Edwin Quijada > > wrote: > > > Hi! > > I am trying to monitor my Tomcat server using JMX remote when I configure > > the JMX protocol when I try to start Tomcat I get this > > > > Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" > > java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager > > at java.net.URLClassLoader$1.run(URLClassLoader.java:372) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:361) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:360) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > at java.util.logging.LogManager$1.run(LogManager.java:195) > > at java.util.logging.LogManager$1.run(LogManager.java:181) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.util.logging.LogManager.(LogManager.java:181) > > at java.util.logging.Logger.demandLogger(Logger.java:448) > > at java.util.logging.Logger.getLogger(Logger.java:502) > > at > com.sun.jmx.remote.util.ClassLogger.(ClassLogger.java:55) > > at > > > sun.management.jmxremote.ConnectorBootstrap.(ConnectorBootstrap.java:814) > > at sun.management.Agent.startAgent(Agent.java:257) > > at sun.management.Agent.startAgent(Agent.java:447) > > Can't load log handler "1catalina.org.apache.juli.AsyncFileHandler" > > java.lang.ClassNotFoundException: > > 1catalina.org.apache.juli.AsyncFileHandler > > java.lang.ClassNotFoundException: > > 1catalina.org.apache.juli.AsyncFileHandler > > > > and to the bottom I get errror : > > Error: Password file not found: > > /usr/lib/jvm/java-8-oracle/jre/lib/management/jmxremote.password > > > > but my config doesnt use password > > > > This is my setenv.sh > > CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" > > CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ > > -Dcom.sun.management.jmxremote.port= \ > > -Dcom.sun.management.jmxremote.authenticate=false \ > > -Dcom.sun.management.jmxremote.ssl=false " > > > > When I put off this configuration everything is fine and Tomcat can > startup > > > > Any cluees?> > > > > #-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password > \ > > #-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access" > > > > > > > > > -- > *Thanks* > *Niranjan* > *+1 781.956.6900* > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- *Thanks* *Niranjan* *+1 781.956.6900*
Re: Problem with monitoring with JMX
I read that is better use CATALINA_OPTS instead of JAVA_OPTS From: Niranjan Babu BommuSent: Tuesday, May 24, 2016 7:44 PM To: Tomcat Users List Subject: Re: Problem with monitoring with JMX I think this would be JAVA_OPTS. CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" On Tue, May 24, 2016 at 2:50 PM, Edwin Quijada wrote: > Hi! > I am trying to monitor my Tomcat server using JMX remote when I configure > the JMX protocol when I try to start Tomcat I get this > > Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" > java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager > at java.net.URLClassLoader$1.run(URLClassLoader.java:372) > at java.net.URLClassLoader$1.run(URLClassLoader.java:361) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:360) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at java.util.logging.LogManager$1.run(LogManager.java:195) > at java.util.logging.LogManager$1.run(LogManager.java:181) > at java.security.AccessController.doPrivileged(Native Method) > at java.util.logging.LogManager.(LogManager.java:181) > at java.util.logging.Logger.demandLogger(Logger.java:448) > at java.util.logging.Logger.getLogger(Logger.java:502) > at com.sun.jmx.remote.util.ClassLogger.(ClassLogger.java:55) > at > sun.management.jmxremote.ConnectorBootstrap.(ConnectorBootstrap.java:814) > at sun.management.Agent.startAgent(Agent.java:257) > at sun.management.Agent.startAgent(Agent.java:447) > Can't load log handler "1catalina.org.apache.juli.AsyncFileHandler" > java.lang.ClassNotFoundException: > 1catalina.org.apache.juli.AsyncFileHandler > java.lang.ClassNotFoundException: > 1catalina.org.apache.juli.AsyncFileHandler > > and to the bottom I get errror : > Error: Password file not found: > /usr/lib/jvm/java-8-oracle/jre/lib/management/jmxremote.password > > but my config doesnt use password > > This is my setenv.sh > CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" > CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ > -Dcom.sun.management.jmxremote.port= \ > -Dcom.sun.management.jmxremote.authenticate=false \ > -Dcom.sun.management.jmxremote.ssl=false " > > When I put off this configuration everything is fine and Tomcat can startup > > Any cluees?> > > #-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \ > #-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access" > > > -- *Thanks* *Niranjan* *+1 781.956.6900* - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with monitoring with JMX
I think this would be JAVA_OPTS. CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" On Tue, May 24, 2016 at 2:50 PM, Edwin Quijadawrote: > Hi! > I am trying to monitor my Tomcat server using JMX remote when I configure > the JMX protocol when I try to start Tomcat I get this > > Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" > java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager > at java.net.URLClassLoader$1.run(URLClassLoader.java:372) > at java.net.URLClassLoader$1.run(URLClassLoader.java:361) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:360) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at java.util.logging.LogManager$1.run(LogManager.java:195) > at java.util.logging.LogManager$1.run(LogManager.java:181) > at java.security.AccessController.doPrivileged(Native Method) > at java.util.logging.LogManager.(LogManager.java:181) > at java.util.logging.Logger.demandLogger(Logger.java:448) > at java.util.logging.Logger.getLogger(Logger.java:502) > at com.sun.jmx.remote.util.ClassLogger.(ClassLogger.java:55) > at > sun.management.jmxremote.ConnectorBootstrap.(ConnectorBootstrap.java:814) > at sun.management.Agent.startAgent(Agent.java:257) > at sun.management.Agent.startAgent(Agent.java:447) > Can't load log handler "1catalina.org.apache.juli.AsyncFileHandler" > java.lang.ClassNotFoundException: > 1catalina.org.apache.juli.AsyncFileHandler > java.lang.ClassNotFoundException: > 1catalina.org.apache.juli.AsyncFileHandler > > and to the bottom I get errror : > Error: Password file not found: > /usr/lib/jvm/java-8-oracle/jre/lib/management/jmxremote.password > > but my config doesnt use password > > This is my setenv.sh > CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" > CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ > -Dcom.sun.management.jmxremote.port= \ > -Dcom.sun.management.jmxremote.authenticate=false \ > -Dcom.sun.management.jmxremote.ssl=false " > > When I put off this configuration everything is fine and Tomcat can startup > > Any cluees?> > > #-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \ > #-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access" > > > -- *Thanks* *Niranjan* *+1 781.956.6900*
Problem with monitoring with JMX
Hi! I am trying to monitor my Tomcat server using JMX remote when I configure the JMX protocol when I try to start Tomcat I get this Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.util.logging.LogManager$1.run(LogManager.java:195) at java.util.logging.LogManager$1.run(LogManager.java:181) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.(LogManager.java:181) at java.util.logging.Logger.demandLogger(Logger.java:448) at java.util.logging.Logger.getLogger(Logger.java:502) at com.sun.jmx.remote.util.ClassLogger.(ClassLogger.java:55) at sun.management.jmxremote.ConnectorBootstrap.(ConnectorBootstrap.java:814) at sun.management.Agent.startAgent(Agent.java:257) at sun.management.Agent.startAgent(Agent.java:447) Can't load log handler "1catalina.org.apache.juli.AsyncFileHandler" java.lang.ClassNotFoundException: 1catalina.org.apache.juli.AsyncFileHandler java.lang.ClassNotFoundException: 1catalina.org.apache.juli.AsyncFileHandler and to the bottom I get errror : Error: Password file not found: /usr/lib/jvm/java-8-oracle/jre/lib/management/jmxremote.password but my config doesnt use password This is my setenv.sh CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC" CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port= \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false " When I put off this configuration everything is fine and Tomcat can startup Any cluees?> #-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \ #-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access"
proper web application logging
Tomcat 8.0.35 The below question is not about logging Tomcat internal activity. This is about logging web applications running within Tomcat. I have been using tomcat forever. I have been manually adding the Log4J 1.2 JAR file into my web application. Then using Log4J for web application logging. I have been thinking about upgrading from Log4J 1.2 to Log4J 2.2 . The more reading I do the more I am concerned about other JAR files and Tomcat itself getting confused if I make the change to 2.2. Then it hit me. Maybe I have been doing this all wrong to start with. Maybe I should see if I could have my software somehow use whatever the default Tomcat 8.0.35 logging mechanism is. Then I could avoid this issue completely. Questions: 1) Is there a preferred way to log web applications from within Tomcat 8? 2) If so could someone recommend a how to web page? 3) My main two requirements for logging are: be able to set the logging level to debug or error and send logging data to a database. Thanks, Lance
[SECURITY] Java Deserialization, JMX and CVE-2016-3427
TL;DR If you use remote JMX, you need to update your JVM to address CVE-2016-3427 For the longer version, see the blog post I just published on this: http://engineering.pivotal.io/post/java-deserialization-jmx/ Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat8.0.33 classpath/classloader issues
Hi, Currently I am migrating my existing tomcat6.0.x to tomcat8.0.33 version. 1) I have deployed four web applications inside webapps folder, all these 4 web applications use the few common jars which I was (in tomcat6.0.x) setting as classpath variable in setclasspath.bat as below rem Adding classpath to existing path. set CLASSPATH=%CLASSPATH%;%PROJECT_CP% %PROJECT_CP% is set by the list of project jars. This way of setting classpath is not working in tomcat8.0.33. Is it still valid way of setting the classpath in tomcat8.0.x? 2) Some unknown reason when I start tomcat8.0.x server by running \bin\startup.bat, Its unable to load the default tomcat jars from \lib\ folder Do we have any limitation in tomcat8.0.33 version? In both 1) and 2) cases if I have copy all the required jars to primary roo class loader \ext\lib folder, then it is loading all the jars as expected. The way of loading through the jre folder is not good practice in my project to separate the jars. Could you please help why default tomcat jars not loading and classpath is not working in tomcat8.0.33 version? Many Thanks in advance.
Re: The connection was reset.
On 24.05.2016 09:55, Bjørn T Johansen wrote: On Mon, 23 May 2016 15:25:54 +0200 André Warnier (tomcat)wrote: On 23.05.2016 15:08, Bjørn T Johansen wrote: On Mon, 23 May 2016 14:54:14 +0200 André Warnier (tomcat) wrote: On 23.05.2016 14:48, Bjørn T Johansen wrote: On Mon, 23 May 2016 14:39:25 +0200 André Warnier (tomcat) wrote: On 23.05.2016 14:25, Bjørn T Johansen wrote: On Fri, 20 May 2016 13:49:35 +0200 André Warnier (tomcat) wrote: On 20.05.2016 12:54, Bjørn T Johansen wrote: When I access the status page everything works fine but when I try to access the manager page, I get the following error: This site can’t be reached The connection was reset. Try: Reloading the page Checking the connection Checking the proxy and the firewall ERR_CONNECTION_RESET I can not find any reasons for this in the default config, what am I missing? And in the Tomcat logfiles ? Nothing, except for this in the access log: [23/May/2016:14:23:22 +0200] "GET /manager HTTP/1.1" 302 - [23/May/2016:14:23:22 +0200] "GET /manager/ HTTP/1.1" 302 - [23/May/2016:14:23:22 +0200] "GET /manager/html HTTP/1.1" 401 2473 What's strange is that if I try from the same subnet as the Tomcat is installed in, then it works. But not from another subnet... I don't remember if you ever posted the Tomcat version which you are using. In case it is 8.0.x, have a look here : http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html#Configuring_Manager_Application_Access (The paragraph starting with : "In addition to the password restrictions,..") Check with the on-line docs relevant to your version, if there isn't something like that configured on your system. Yes, we are using version 8.0.x And last week I just downloaded the new version 8.0.35 and added my user in the tomcat-users.xml file and tried on an empty tomcat server and I got the same result... And did you really check what I asked you to check above ? A 401 response (as shown by the above log) means "forbidden". If you say that from some place you can access it, and from others not, then there is somewhere something that makes a difference based on your client's IP address. Yes, I read the same page last week. I even tried to add a file where ? containing: with my ip address without any change... And yes, I know the logic behind the error message but I can not find any logic to why it's happening.. Also if /status works, why wouldn't /manager ? And sorry, I was wrong above. A 401 response means really this : quote 10.4.2 401 Unauthorized The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in "HTTP Authentication: Basic and Digest Access Authentication" [43]. unquote In other words, it means "for accessing this page, you need to authenticate". So, if your browser is allowed to use HTTP Basic authentication, it should pop up a login dialog. Does it ? If it does not, then : - are you inside some company LAN, within a Windows Domain ? - if yes, is your browser IE, and is it allowed to do HTTP Basic authentication ? I created a file called "hostname".xml and placed it in conf/Catalina.. And yes, I get the popup asking for username and password, the 401 error appears after I have logged in... And the answer to your other questions is no, I am using Linux... I think that it would save time (for all), if you provided us with a clear description of your setup, rather than having to pull it out of you little by little like teeth. Such as : - server where Tomcat is running - IP address or similar - Operating system - Java version - Full Tomcat version (8.0.x) (for the last three, run "version.sh" in the Tomcat/bin directory) - workstation where "it works" - same things, + browser used - workstation where "it does not work" - same things, + browser used and what is (maybe) in-between the server and the workstations in both cases. Regarding "the 401 error appears after I have logged in" and similar statements : can you make an effort and be somewhat more precise ? we do not have a crystal ball, and we cannot connect to your network, so what may appear clear to you, is a bit fuzzy here at the moment. Let's summarise what we know already : -
Re: nio connector
Christopher, Great Thanks. BR Jakub On Tue, May 24, 2016 at 4:33 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Jakub, > > On 5/23/16 8:03 PM, Ja kub wrote: > > Christopher, Thx for response, pleas confirm or deny if I > > understand well. > > > > BIO uses thread per http connection (tcp connection). (Shame I > > didn't realize it!) NIO uses thread per request. > > It's more complicated than that, but very close. > > > With NIO thread is returned to pool as soon as request is finished > > (doGet ends). > > Yes. > > > With BIO thread is returned to pool only when tcp connection is > > closed !!! > > Yes, but even HTTP keepalive has a timeout, and the connection will be > dropped after that timeout, releasing the thread. > > > Given http://kb.mozillazine.org/Network.http.keep-alive.timeout - > > Amount of time in seconds to keep keep-alive connections alive. > > Default: 115 seconds. default tomcat keepAliveTimeout 60 s default > > tomcat maxThreads is 200 With 200 browsers with ajax pooling server > > every 50 seconds tomcat connector thread pool will be depleted and > > client no 201 will not be able to connect to tomcat ? > > Yes. > > > So with default configuration tomcat 7 will have problem with just > > 201 on-line clients of an ajax application (with only 4 > > requests/second) ? > > If the browse doesn't close those HTTP connections from the Ajax > clients, the yes, you can trivially DOS your server. > > > Why is BIO connector still default one in tomcat 7 server.xml? > > Because it was the default when Tomcat 7 shipped and changing defaults > that are that important is a big deal. You are welcome to change it > yourself. > > > Is there any problem with backward compatibility (don't think so, > > cause than BIO wouldn't be totally removed in 8.5, but left > > available ) ? > > BIO is 100% gone in Tomcat 8.5. > > The protocol (HTTP) and the API (servlet) are still identical, so > there should be no problems for your application in general. > > - -chris > -BEGIN PGP SIGNATURE- > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJXQ71tAAoJEBzwKT+lPKRYZHIP/jbN3vhtHkLHny6kNXguh5Pl > BpwaRNHojlOqzXQUWidrmQpQPZ+8GKSUcJp3hcwCklRYNqLS9GdENodwYJFhyKRE > jVFG2KRSVI+difWKpuX+gIVEiFxUV/fQ+1ZhrNUXusElprqku+s15dqsgI5GYu3u > BlvEUVs5/rYG+KqZFCYXw5lpe/pRd3fs+zNJFKOXYqY2qQRICzXQJDCvICgPp7fZ > I804dDIR8mhOfffemgaB1OyOy4F3NsPodBA2LsVcbJpecfQy3vWPCSNkLmUT1Nee > a30Q6VjdMsq+w/C1cGnxxDwxqoK8mXnyUEIH8GmtGyiak4lzJzSXmqO3RjqXHwm8 > tJnJdWNK+lP4EY9dJQrzv4NokZN+rYb9WCogMXKHvTdpmWDzMiMQs3zyFPkbLfKw > EGeZKaY3zJFIGltPvpk/QRj0+VcXh6x3g9TUtR8ypoETrchAszCJPVUYy8H5yBaX > N3H9wrJ2OlFmjrXKNRsY1OtuTABiKjVZXtfuTIgyK4tSddM+4gme5iydmURRISMY > 7G1UQRNtLng8WFpCaIPrrBVUgXXrfkmYu9pEyjgzuMNc1/gf5stQNWH/AagOVt+J > WR2Nz4nCSjsMDCyo3+AW6pcesp7aPOJ/uAsNAZHJbZvE2mTxsw857jZxonTF1bVN > V7EDZv5G8d/FFtZuzVzf > =UEDx > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: The connection was reset.
On Mon, 23 May 2016 15:25:54 +0200 André Warnier (tomcat)wrote: > On 23.05.2016 15:08, Bjørn T Johansen wrote: > > On Mon, 23 May 2016 14:54:14 +0200 > > André Warnier (tomcat) wrote: > > > >> On 23.05.2016 14:48, Bjørn T Johansen wrote: > >>> On Mon, 23 May 2016 14:39:25 +0200 > >>> André Warnier (tomcat) wrote: > >>> > On 23.05.2016 14:25, Bjørn T Johansen wrote: > > On Fri, 20 May 2016 13:49:35 +0200 > > André Warnier (tomcat) wrote: > > > >> On 20.05.2016 12:54, Bjørn T Johansen wrote: > >>> When I access the status page everything works fine but when I try to > >>> access the manager page, I get the following error: > >>> > >>> This site can’t be reached > >>> > >>> The connection was reset. > >>> Try: > >>> Reloading the page > >>> Checking the connection > >>> Checking the proxy and the firewall > >>> ERR_CONNECTION_RESET > >>> > >>> > >>> I can not find any reasons for this in the default config, what am I > >>> missing? > >>> > >> > >> And in the Tomcat logfiles ? > >> > >> > > Nothing, except for this in the access log: > > > > [23/May/2016:14:23:22 +0200] "GET /manager HTTP/1.1" 302 - > > [23/May/2016:14:23:22 +0200] "GET /manager/ HTTP/1.1" 302 - > > [23/May/2016:14:23:22 +0200] "GET /manager/html HTTP/1.1" 401 2473 > > > > > > What's strange is that if I try from the same subnet as the Tomcat is > > installed in, then it works. But not from another subnet... > > > > I don't remember if you ever posted the Tomcat version which you are > using. > In case it is 8.0.x, have a look here : > http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html#Configuring_Manager_Application_Access > (The paragraph starting with : "In addition to the password > restrictions,..") > Check with the on-line docs relevant to your version, if there isn't > something like that > configured on your system. > > >>> > >>> Yes, we are using version 8.0.x > >>> And last week I just downloaded the new version 8.0.35 and added my user > >>> in the tomcat-users.xml file and tried on an empty tomcat server and I got > >>> the same result... > >>> > >> > >> And did you really check what I asked you to check above ? > >> A 401 response (as shown by the above log) means "forbidden". > >> If you say that from some place you can access it, and from others not, > >> then there is > >> somewhere something that makes a difference based on your client's IP > >> address. > >> > >> > > Yes, I read the same page last week. I even tried to add a file > > where ? > > containing: > > > > > >> allow="127\.0\.0\.1"/> > > > > > > with my ip address without any change... > > > > And yes, I know the logic behind the error message but I can not find any > > logic to why it's happening.. Also if /status works, why wouldn't /manager ? > > > > And sorry, I was wrong above. A 401 response means really this : > > quote > 10.4.2 401 Unauthorized > > The request requires user authentication. The response MUST include a > WWW-Authenticate > header field (section 14.47) containing a challenge applicable to the > requested resource. > The client MAY repeat the request with a suitable Authorization header field > (section > 14.8). If the request already included Authorization credentials, then the > 401 response > indicates that authorization has been refused for those credentials. If the > 401 response > contains the same challenge as the prior response, and the user agent has > already > attempted authentication at least once, then the user SHOULD be presented the > entity that > was given in the response, since that entity might include relevant > diagnostic > information. HTTP access authentication is explained in "HTTP Authentication: > Basic and > Digest Access Authentication" [43]. > unquote > > In other words, it means "for accessing this page, you need to authenticate". > So, if your browser is allowed to use HTTP Basic authentication, it should > pop up a login > dialog. > Does it ? > If it does not, then : > - are you inside some company LAN, within a Windows Domain ? > - if yes, is your browser IE, and is it allowed to do HTTP Basic > authentication ? > > I created a file called "hostname".xml and placed it in conf/Catalina.. And yes, I get the popup asking for username and password, the 401 error appears after I have logged in... And the answer to your other questions is no, I am using Linux... BTJ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat cluster questions
Hi, 2016-05-23 18:56 GMT+09:00 Hans-Joachim Kliemeck < hans-joachim.kliem...@hays.de>: > Hey, > > > If you do not set the LocalMember, > > the implementation class of local members will become MemberImpl rather > than the StaticMember. > > In addition, you can not explicitly specify the domain and the uniqueId > of local member. > > If you do not mind these, there is no problem if you do not set > LocalMember. > > According to the configuration example, it is possible to set the > uniqueid/domain. Could you clarify your statement? > https://tomcat.apache.org/tomcat-7.0-doc/config/cluster-interceptor.html > > className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor"> > className="org.apache.catalina.tribes.membership.StaticMember" > port="4000" > securePort="-1" > host="tomcat01.mydomain.com" > domain="staging-cluster" > uniqueId="{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1}"/> > className="org.apache.catalina.tribes.membership.StaticMember" > port="5678" > securePort="-1" > host="tomcat01.mydomain.com" > domain="staging-cluster" > uniqueId="{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}"/> > > > > If you explicitly define the in server.xml, You can define the domain and uniqueId. (As in the above example) If you do not define a in server.xml, the local member is automatically generated by the multicast service. (This multicast service is available even if you use a static cluster) The domain of this local member is used the domain that is defined by multicast service. The uniqueId is automatically generated in multicast service. > > The heartbeat is chained. > > > Container->Cluster->channel->Interceptor(TcpPingInterceptor)->ChannelSender > > When using a static membership, TcpPingInterceptor does the nodes > failure detection. > > Therefore, when using a static membership, TcpPingInterceptor is > required. > I understand the concept of this chain, but I want to understand WHY there > are these 3 points to enable the heartbeat instead of a central one? > I don’t see a reason to send the heartbeat on different levels of the > chain. > > Usually, The heartbeat is controlled by the Channel#heartbeat only. If you want to do the heartbeat, you set true to Channel#heartbeat. If you do not want to do the heartbeat, you set false to Channel#heartbeat. Cluster#heartbeatBackgroundEnabled is set to true only if you want to do a heartbeat by the container background thread . The default is false If heartbeatBackgroundEnabled is true, Channel # heartbeat is forced to false. The useThread is set to true only if you want to send a PING in a different period than the heartbeat of the channel. > Regards > Hajo > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- > Keiichi.Fujino >> >