Re: server.xml password encryption instead of plain text
On Thu, 25 May 2017 at 6:01 PM, Dhaval Jaiswal <dhaval.jais...@via.com> wrote: > How can we avoid defining plain text password in server.xml or is there a > way i can encrypt the password in server.xml. > There are couple of examples on https://wiki.apache.org/tomcat/FAQ/Password -- Regards, Vidyadhar
Re: JSP compilation 65535 bytes limit
On Wed, May 17, 2017 at 7:36 PM, Mohammed Manna <manme...@gmail.com> wrote: > You cannot blindly execute the snippet by copying it from Tomcat website. > You have to adapt it to your project first. Try and remove the file> line and try to build it. You probably need to set up your project > for Ant build first if not done already. > Project is already setup and same set of build file is working fine with different version of Tomcat. If we remove the import task for this particular project we are seeing some different error which is regarding to ANT and not related with Tomcat or JSP compilation. Snippet of catalina-tasks.xml is as follows ( and this is the only file included in import): Catalina Ant Manager, JMX and JSPC Tasks > On 17 May 2017 at 15:03, Vidyadhar <techienote@gmail.com> wrote: > > > On Wed, May 17, 2017 at 7:30 PM, Mohammed Manna <manme...@gmail.com> > > wrote: > > > > > Your ant Build File seems to be incorrect. Could you provide the > snippet > > of > > > the Jspc Task and Javac task for this? > > > > > Following is the tomcat.xml which I am using for precompilation: > > > > > > > > > > > > > > > validateXml="false" > > uriroot="${webapp.path}" > > webXmlFragment="${webapp.path}/WEB-INF/generated_web.xml" > > outputDir="${webapp.path}/WEB-INF/src" /> > > > > > > > > > > > > > > > > > > >optimize="off" > >debug="on" failonerror="false" > >srcdir="${webapp.path}/WEB-INF/src" > >excludes="**/*.smap"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 17 May 2017 at 14:58, Vidyadhar <techienote@gmail.com> wrote: > > > > > > > Hello KR, > > > > > > > > On Tue, May 16, 2017 at 8:43 PM, Mohammed Manna <manme...@gmail.com> > > > > wrote: > > > > > > > > > Hi Vidyadhar, > > > > > > > > > > Some points to note here: > > > > > > > > > > 1) Setting those parameters in Web.xml file (CATALINA_HOME/conf) > > > doesn't > > > > > guarantee that it won't happen. Tomcat 8.0.43 onwards have got this > > > > relaxed > > > > > out by using a more efficient error handling code. But you will > have > > > this > > > > > error if the code is truly hitting near the limit. > > > > > 2) The issue occurs with Tomcat 8.0.39 onwards. Try to see if the > > issue > > > > > happens for tomcat 8.0.29. I can vouch for 8.0.29 where it didn't > > > happen. > > > > > 3) Did you try and follow my suggestion on point 3 (last email) > about > > > > > checking the method sizes of the precompiled JSPs using apache > > commons > > > > BCEL > > > > > (bcel-5.4.1.jar) library? If yes, what did you find? > > > > > > > > > > > > > I already tried to precompile the JSPs using ANT but it is giving > > > following > > > > error: > > > > C:\apache-ant-1.9.4\tomcat.xml:11: org.apache.jasper. > JasperException: > > > > java.lang.IllegalArgumentException: Page directive: invalid value > for > > > > import > > > > at org.apache.jasper.JspC.processFile(JspC.java:1296) > > > > at org.apache.jasper.JspC.execute(JspC.java:1415) > > > > at > > > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > > > > I guess I am hitting the bug # 57099 and there are multiple JSPs > > wherein > > > we > > > > need to do these changes. > > > > > > > > > > > > > > > > > > > You also haven't mentioned what sort of JSPs you have that yield
Re: JSP compilation 65535 bytes limit
On Wed, May 17, 2017 at 7:30 PM, Mohammed Manna <manme...@gmail.com> wrote: > Your ant Build File seems to be incorrect. Could you provide the snippet of > the Jspc Task and Javac task for this? > Following is the tomcat.xml which I am using for precompilation: > > On 17 May 2017 at 14:58, Vidyadhar <techienote@gmail.com> wrote: > > > Hello KR, > > > > On Tue, May 16, 2017 at 8:43 PM, Mohammed Manna <manme...@gmail.com> > > wrote: > > > > > Hi Vidyadhar, > > > > > > Some points to note here: > > > > > > 1) Setting those parameters in Web.xml file (CATALINA_HOME/conf) > doesn't > > > guarantee that it won't happen. Tomcat 8.0.43 onwards have got this > > relaxed > > > out by using a more efficient error handling code. But you will have > this > > > error if the code is truly hitting near the limit. > > > 2) The issue occurs with Tomcat 8.0.39 onwards. Try to see if the issue > > > happens for tomcat 8.0.29. I can vouch for 8.0.29 where it didn't > happen. > > > 3) Did you try and follow my suggestion on point 3 (last email) about > > > checking the method sizes of the precompiled JSPs using apache commons > > BCEL > > > (bcel-5.4.1.jar) library? If yes, what did you find? > > > > > > > I already tried to precompile the JSPs using ANT but it is giving > following > > error: > > C:\apache-ant-1.9.4\tomcat.xml:11: org.apache.jasper.JasperException: > > java.lang.IllegalArgumentException: Page directive: invalid value for > > import > > at org.apache.jasper.JspC.processFile(JspC.java:1296) > > at org.apache.jasper.JspC.execute(JspC.java:1415) > > at > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > I guess I am hitting the bug # 57099 and there are multiple JSPs wherein > we > > need to do these changes. > > > > > > > > > > > You also haven't mentioned what sort of JSPs you have that yields into > > such > > > error. Are you having legacy scriptlets which are quite heavy and uses > > lots > > > of custom tags? Try to use the following too: > > > > > > > > > trimSpaces > > > true > > > > > > > > > The above is having some inconsistency reported in a different email > > > thread, but I assume it should be fine in most of the cases. Try to see > > if > > > you can provide some results on the above points. > > > > > > > > > KR, > > > > > > On 16 May 2017 at 15:29, Vidyadhar <techienote@gmail.com> wrote: > > > > > > > Hello KR, > > > > > > > > On Fri, May 12, 2017 at 12:37 PM, Mohammed Manna <manme...@gmail.com > > > > > > wrote: > > > > > > > > > I have two things which you might want to try out: > > > > > > > > > > 1) You will lose your JSP debugging capability - but if that's not > > your > > > > > concern, then in your CATALINA_HOME\conf folder append this for > > > > > "JspServlet" > > > > > > > > > > > > > > > mappedfile > > > > > false > > > > > > > > > > > > > > > suppressSmap > > > > > true > > > > > > > > > > > > > > We already tried this option. We included these lines in tomcat's > > web.xml > > > > file and restarted the services, but still it is giving the same > error. > > > > > > > > > > > > > > This will stop generating JSR45 debug info and Symbol Maps for > > JSP > > > > > pages ( I think I have said technical things right here, otherwise > > > please > > > > > correct me!). > > > > > > > > > > 2) I sincerely recommend moving scriptlet code out of your JSP and > > > remove > > > > > all unwanted/commented code, newline/carriages from your JSP. Even > > with > > > > the > > > > > config above, this might fail since the code is genuinely too
Re: JSP compilation 65535 bytes limit
Hello KR, On Tue, May 16, 2017 at 8:43 PM, Mohammed Manna <manme...@gmail.com> wrote: > Hi Vidyadhar, > > Some points to note here: > > 1) Setting those parameters in Web.xml file (CATALINA_HOME/conf) doesn't > guarantee that it won't happen. Tomcat 8.0.43 onwards have got this relaxed > out by using a more efficient error handling code. But you will have this > error if the code is truly hitting near the limit. > 2) The issue occurs with Tomcat 8.0.39 onwards. Try to see if the issue > happens for tomcat 8.0.29. I can vouch for 8.0.29 where it didn't happen. > 3) Did you try and follow my suggestion on point 3 (last email) about > checking the method sizes of the precompiled JSPs using apache commons BCEL > (bcel-5.4.1.jar) library? If yes, what did you find? > I already tried to precompile the JSPs using ANT but it is giving following error: C:\apache-ant-1.9.4\tomcat.xml:11: org.apache.jasper.JasperException: java.lang.IllegalArgumentException: Page directive: invalid value for import at org.apache.jasper.JspC.processFile(JspC.java:1296) at org.apache.jasper.JspC.execute(JspC.java:1415) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) I guess I am hitting the bug # 57099 and there are multiple JSPs wherein we need to do these changes. > > > You also haven't mentioned what sort of JSPs you have that yields into such > error. Are you having legacy scriptlets which are quite heavy and uses lots > of custom tags? Try to use the following too: > > > trimSpaces > true > > > The above is having some inconsistency reported in a different email > thread, but I assume it should be fine in most of the cases. Try to see if > you can provide some results on the above points. > > > KR, > > On 16 May 2017 at 15:29, Vidyadhar <techienote@gmail.com> wrote: > > > Hello KR, > > > > On Fri, May 12, 2017 at 12:37 PM, Mohammed Manna <manme...@gmail.com> > > wrote: > > > > > I have two things which you might want to try out: > > > > > > 1) You will lose your JSP debugging capability - but if that's not your > > > concern, then in your CATALINA_HOME\conf folder append this for > > > "JspServlet" > > > > > > > > > mappedfile > > > false > > > > > > > > > suppressSmap > > > true > > > > > > > > We already tried this option. We included these lines in tomcat's web.xml > > file and restarted the services, but still it is giving the same error. > > > > > > > > This will stop generating JSR45 debug info and Symbol Maps for JSP > > > pages ( I think I have said technical things right here, otherwise > please > > > correct me!). > > > > > > 2) I sincerely recommend moving scriptlet code out of your JSP and > remove > > > all unwanted/commented code, newline/carriages from your JSP. Even with > > the > > > config above, this might fail since the code is genuinely too large for > > > __jspService(). > > > > > > 3) If possible, try to use Ant and precompile your JSP and iterate > > through > > > the .class files to check which method size is larger or close to 90% > or > > > the 64k footprint. You can write a short program by leveraging java.io > > and > > > Apache commons BCEL library. Ant has a strange behaviour which doesn't > > > throw any exceptions if the Jsp method size exceeds the limit. But the > > > compilation occurs anyway. So you can go through those compiled files > > using > > > your custom tool and print the size of the methods. > > > > > > > > > I hope this helps you. > > > > > > Further to above we tried various tomcat version and as per our > > observation we are not seeing this error on 8.0.29 version. Note that the > > same error is still there in latest version i.e. 8.5.15. > > > > > KR, > > > > > > On 12 May 2017 at 07:58, Vidyadhar <techienote@gmail.com> wrote: > > > > > > > Hello Sagar, > > > > > > > > On Fri, 12 May 2017 at 12:26 PM, sagar kohli <sagarkohl...@gmail.com > > > > > > wrote: > > > > > > > > > Try adding following init parameter in /conf/web.xml > > > > > > > > > > > > > > > mappedfile > > > > > false > > > &g
Re: JSP compilation 65535 bytes limit
Hello KR, On Fri, May 12, 2017 at 12:37 PM, Mohammed Manna <manme...@gmail.com> wrote: > I have two things which you might want to try out: > > 1) You will lose your JSP debugging capability - but if that's not your > concern, then in your CATALINA_HOME\conf folder append this for > "JspServlet" > > > mappedfile > false > > > suppressSmap > true > > We already tried this option. We included these lines in tomcat's web.xml file and restarted the services, but still it is giving the same error. > > This will stop generating JSR45 debug info and Symbol Maps for JSP > pages ( I think I have said technical things right here, otherwise please > correct me!). > > 2) I sincerely recommend moving scriptlet code out of your JSP and remove > all unwanted/commented code, newline/carriages from your JSP. Even with the > config above, this might fail since the code is genuinely too large for > __jspService(). > > 3) If possible, try to use Ant and precompile your JSP and iterate through > the .class files to check which method size is larger or close to 90% or > the 64k footprint. You can write a short program by leveraging java.io and > Apache commons BCEL library. Ant has a strange behaviour which doesn't > throw any exceptions if the Jsp method size exceeds the limit. But the > compilation occurs anyway. So you can go through those compiled files using > your custom tool and print the size of the methods. > > > I hope this helps you. > > Further to above we tried various tomcat version and as per our observation we are not seeing this error on 8.0.29 version. Note that the same error is still there in latest version i.e. 8.5.15. > KR, > > On 12 May 2017 at 07:58, Vidyadhar <techienote@gmail.com> wrote: > > > Hello Sagar, > > > > On Fri, 12 May 2017 at 12:26 PM, sagar kohli <sagarkohl...@gmail.com> > > wrote: > > > > > Try adding following init parameter in /conf/web.xml > > > > > > > > > mappedfile > > > false > > > > > > > > > We already tried it but no success. > > > > > > > > > > > On Fri, May 12, 2017 at 10:28 AM, Vidyadhar <techienote@gmail.com> > > > wrote: > > > > > > > Hello Team, > > > > > > > > Recently we did a upgrade existing tomcat from 7.0.42 to 7.0.76 on > > > windows > > > > box. Post the up gradation we are seeing following error in couple of > > > JSPs > > > > > > > > org.apache.jasper.JasperException: Unable to compile class for JSP: > > > > > > > > An error occurred at line: [231] in the generated java file: > > [C:\Program > > > > Files\Apache\Tomcat\work\Catalina\localhost\app\org\apache\jsp\jsp\ > > > > applicationChange\applicationChangeMain_jsp.java] > > > > The code of method _jspService(HttpServletRequest, > > HttpServletResponse) > > > is > > > > exceeding the 65535 bytes limit > > > > > > > > Stacktrace: > > > > org.apache.jasper.compiler.DefaultErrorHandler.javacError( > > > > DefaultErrorHandler.java:103) > > > > org.apache.jasper.compiler.ErrorDispatcher.javacError( > > > > ErrorDispatcher.java:366) > > > > > > > org.apache.jasper.compiler.JDTCompiler.generateClass( > > JDTCompiler.java:490) > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:379) > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:354) > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:341) > > > > I have checked the various threads on tomcat support archive and did > > try > > > > following solution which did not work on 7.0.76 as well as on 7.0.77. > > > > > > > > 1. Following changes in conf/web.xml > > > > > > > > mappedfile > > > > false > > > > > > > > > > > > compiler > > > > modern > > > > > > > > 2. Increased the buffer size. > > > > > > > > Can some one suggest some ways to resolve this error, without > > downgrading > > > > to 7.0.42 > > > > > > > > > > > > > > > > > > > > -- > > > > Regards, > > > > Vidyadhar > > > > > > > > > > > > > > > > -- > > > Regards, > > > sagar kohli > > > > > -- > > Regards, > > Vidyadhar > > > -- Regards, Vidyadhar
Re: JSP compilation 65535 bytes limit
Hello Sagar, On Fri, 12 May 2017 at 12:26 PM, sagar kohli <sagarkohl...@gmail.com> wrote: > Try adding following init parameter in /conf/web.xml > > > mappedfile > false > We already tried it but no success. > > > On Fri, May 12, 2017 at 10:28 AM, Vidyadhar <techienote@gmail.com> > wrote: > > > Hello Team, > > > > Recently we did a upgrade existing tomcat from 7.0.42 to 7.0.76 on > windows > > box. Post the up gradation we are seeing following error in couple of > JSPs > > > > org.apache.jasper.JasperException: Unable to compile class for JSP: > > > > An error occurred at line: [231] in the generated java file: [C:\Program > > Files\Apache\Tomcat\work\Catalina\localhost\app\org\apache\jsp\jsp\ > > applicationChange\applicationChangeMain_jsp.java] > > The code of method _jspService(HttpServletRequest, HttpServletResponse) > is > > exceeding the 65535 bytes limit > > > > Stacktrace: > > org.apache.jasper.compiler.DefaultErrorHandler.javacError( > > DefaultErrorHandler.java:103) > > org.apache.jasper.compiler.ErrorDispatcher.javacError( > > ErrorDispatcher.java:366) > > > org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:490) > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:379) > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:354) > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:341) > > I have checked the various threads on tomcat support archive and did try > > following solution which did not work on 7.0.76 as well as on 7.0.77. > > > > 1. Following changes in conf/web.xml > > > > mappedfile > > false > > > > > > compiler > > modern > > > > 2. Increased the buffer size. > > > > Can some one suggest some ways to resolve this error, without downgrading > > to 7.0.42 > > > > > > > > > > -- > > Regards, > > Vidyadhar > > > > > > -- > Regards, > sagar kohli > -- Regards, Vidyadhar
JSP compilation 65535 bytes limit
Hello Team, Recently we did a upgrade existing tomcat from 7.0.42 to 7.0.76 on windows box. Post the up gradation we are seeing following error in couple of JSPs org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [231] in the generated java file: [C:\Program Files\Apache\Tomcat\work\Catalina\localhost\app\org\apache\jsp\jsp\applicationChange\applicationChangeMain_jsp.java] The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:490) org.apache.jasper.compiler.Compiler.compile(Compiler.java:379) org.apache.jasper.compiler.Compiler.compile(Compiler.java:354) org.apache.jasper.compiler.Compiler.compile(Compiler.java:341) I have checked the various threads on tomcat support archive and did try following solution which did not work on 7.0.76 as well as on 7.0.77. 1. Following changes in conf/web.xml mappedfile false compiler modern 2. Increased the buffer size. Can some one suggest some ways to resolve this error, without downgrading to 7.0.42 -- Regards, Vidyadhar
Re: Tomcat getting stopped when idle
Hi Chris, On Sat, Nov 2, 2013 at 7:04 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Vidyadhar, On 11/1/13, 11:31 PM, Vidyadhar wrote: Hi Konstantin, On 2 Nov 2013 01:06, Konstantin Kolinko knst.koli...@gmail.com wrote: 2013/11/1 Vidyadhar techienote@gmail.com: On 1 Nov 2013 00:52, Konstantin Kolinko knst.koli...@gmail.com wrote: 2013/10/31 Vidyadhar techienote@gmail.com: Hi, We are facing some weird issue in our Tomcat environment. After starting the Tomcat process on one of our Solaris server, process is automatically getting shutdown after 2-3 minutes if no activity is done through Application deployed in Tomcat. I have observed similar issue in one of following mailing thread where as user has asked to install a Listener and print a stacktrace when the stop event happens. I need to know how to install such Listener. http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html There are several listeners that have been already configured there. You can use their source code as an example. http://www.mail-archive.com/users@tomcat.apache.org/msg84717.html Server version: Apache Tomcat/6.0.16 Server built: Jan 28 2008 11:35:29 Server number: 6.0.16.0 OS Name:SunOS OS Version: 5.10 Architecture: sparc JVM Version:1.6.0_51-b11 JVM Vendor: Sun Microsystems Inc. A recent commercial JRE, but 5,5 years old Tomcat? You may need to read this: http://tomcat.apache.org/security-6.html Error in the catalina.out Oct 30, 2013 5:04:56 AM org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-9920 Oct 30, 2013 5:04:56 AM org.apache.catalina.connector.Connector pause SEVERE: Protocol handler pause failed java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:365) at java.net.Socket.connect(Socket.java:527) at java.net.Socket.connect(Socket.java:476) at java.net.Socket.init(Socket.java:373) at java.net.Socket.init(Socket.java:216) at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:486) at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:283) at org.apache.jk.server.JkMain.pause(JkMain.java:681) at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153) at org.apache.catalina.connector.Connector.pause(Connector.java:1073) at org.apache.catalina.core.StandardService.stop(StandardService.java:563) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744) at org.apache.catalina.startup.Catalina.stop(Catalina.java:628) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:671) Here you already have the stacktrace. It starts with CatalinaShutdownHook. It means that JVM was shut down by some external force (e.g. a HUP signal). Thus the shutdown hook was triggered. Best regards, Konstantin Kolinko - Hi Konstantin, To find out the actual reason we are changing log level to trace. Will keep you all updated on the same. What log level? Added .level = fine to understand what is happening. Tuning anything on the java side is unlikely to help. 1. If shutdown is initiated by ShutdownHook like in the stacktrace above, it means that JVM died (because of Ctrl+C or SUGHUP or similar that happened outside of the Java code) or exited (because of a java.lang.System.exit() call). This is unix environment and I suppose if we execute startup.sh tomcat runs in background. You might not be able to just run startup.sh and then close your connection. Is that what you are doing? The original list-archives thread you posted explains exactly that potential danger. If you run startup.sh and then immediately log out of the terminal used to run startup.sh, what happens? It is still in running state. As per my information process runs in background mode. As of now we have added -Xrs parameter in JVM arguments. Is there any other way to troubleshoot this issue? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.15 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSdP9jAAoJEBzwKT+lPKRYvtQQAK6YZHKYKZXdpON6SMyHbpdU LzfBwnHPCxUGJ87xvM8bofR/UfWyKEqjcFzvNkRjd76DO4oyRI+kBW3pIvN/W/Zn twHnEQvyrF6CZJlMKLUuboAgzfZ0eu6GP77YYIuh2Olt+VaNt7gTAFCg7C370piZ h8DwfoTdGahPf9xL5FPCZymNoJIfZac5ugwl62N5V4s4ic0
Re: Tomcat getting stopped when idle
On 1 Nov 2013 00:52, Konstantin Kolinko knst.koli...@gmail.com wrote: 2013/10/31 Vidyadhar techienote@gmail.com: Hi, We are facing some weird issue in our Tomcat environment. After starting the Tomcat process on one of our Solaris server, process is automatically getting shutdown after 2-3 minutes if no activity is done through Application deployed in Tomcat. I have observed similar issue in one of following mailing thread where as user has asked to install a Listener and print a stacktrace when the stop event happens. I need to know how to install such Listener. http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html There are several listeners that have been already configured there. You can use their source code as an example. http://www.mail-archive.com/users@tomcat.apache.org/msg84717.html Server version: Apache Tomcat/6.0.16 Server built: Jan 28 2008 11:35:29 Server number: 6.0.16.0 OS Name:SunOS OS Version: 5.10 Architecture: sparc JVM Version:1.6.0_51-b11 JVM Vendor: Sun Microsystems Inc. A recent commercial JRE, but 5,5 years old Tomcat? You may need to read this: http://tomcat.apache.org/security-6.html Error in the catalina.out Oct 30, 2013 5:04:56 AM org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-9920 Oct 30, 2013 5:04:56 AM org.apache.catalina.connector.Connector pause SEVERE: Protocol handler pause failed java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:365) at java.net.Socket.connect(Socket.java:527) at java.net.Socket.connect(Socket.java:476) at java.net.Socket.init(Socket.java:373) at java.net.Socket.init(Socket.java:216) at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:486) at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:283) at org.apache.jk.server.JkMain.pause(JkMain.java:681) at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153) at org.apache.catalina.connector.Connector.pause(Connector.java:1073) at org.apache.catalina.core.StandardService.stop(StandardService.java:563) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744) at org.apache.catalina.startup.Catalina.stop(Catalina.java:628) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:671) Here you already have the stacktrace. It starts with CatalinaShutdownHook. It means that JVM was shut down by some external force (e.g. a HUP signal). Thus the shutdown hook was triggered. Best regards, Konstantin Kolinko - Hi Konstantin, To find out the actual reason we are changing log level to trace. Will keep you all updated on the same. Thanks.
Re: Tomcat getting stopped when idle
Hi Konstantin, On 2 Nov 2013 01:06, Konstantin Kolinko knst.koli...@gmail.com wrote: 2013/11/1 Vidyadhar techienote@gmail.com: On 1 Nov 2013 00:52, Konstantin Kolinko knst.koli...@gmail.com wrote: 2013/10/31 Vidyadhar techienote@gmail.com: Hi, We are facing some weird issue in our Tomcat environment. After starting the Tomcat process on one of our Solaris server, process is automatically getting shutdown after 2-3 minutes if no activity is done through Application deployed in Tomcat. I have observed similar issue in one of following mailing thread where as user has asked to install a Listener and print a stacktrace when the stop event happens. I need to know how to install such Listener. http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html There are several listeners that have been already configured there. You can use their source code as an example. http://www.mail-archive.com/users@tomcat.apache.org/msg84717.html Server version: Apache Tomcat/6.0.16 Server built: Jan 28 2008 11:35:29 Server number: 6.0.16.0 OS Name:SunOS OS Version: 5.10 Architecture: sparc JVM Version:1.6.0_51-b11 JVM Vendor: Sun Microsystems Inc. A recent commercial JRE, but 5,5 years old Tomcat? You may need to read this: http://tomcat.apache.org/security-6.html Error in the catalina.out Oct 30, 2013 5:04:56 AM org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-9920 Oct 30, 2013 5:04:56 AM org.apache.catalina.connector.Connector pause SEVERE: Protocol handler pause failed java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:365) at java.net.Socket.connect(Socket.java:527) at java.net.Socket.connect(Socket.java:476) at java.net.Socket.init(Socket.java:373) at java.net.Socket.init(Socket.java:216) at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:486) at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:283) at org.apache.jk.server.JkMain.pause(JkMain.java:681) at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153) at org.apache.catalina.connector.Connector.pause(Connector.java:1073) at org.apache.catalina.core.StandardService.stop(StandardService.java:563) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744) at org.apache.catalina.startup.Catalina.stop(Catalina.java:628) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:671) Here you already have the stacktrace. It starts with CatalinaShutdownHook. It means that JVM was shut down by some external force (e.g. a HUP signal). Thus the shutdown hook was triggered. Best regards, Konstantin Kolinko - Hi Konstantin, To find out the actual reason we are changing log level to trace. Will keep you all updated on the same. What log level? Added .level = fine to understand what is happening. Tuning anything on the java side is unlikely to help. 1. If shutdown is initiated by ShutdownHook like in the stacktrace above, it means that JVM died (because of Ctrl+C or SUGHUP or similar that happened outside of the Java code) or exited (because of a java.lang.System.exit() call). This is unix environment and I suppose if we execute startup.sh tomcat runs in background. (Well, a JVM can be configured to terminate itself on OutOfMemory condition, but such option (an -XX one) will be clearly visible among arguments of the java process). 2. 6.0.16 is so old, and I remember some fixes to shutdown process of Tomcat 2-3 years ago. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat getting stopped when idle
Hi, We are facing some weird issue in our Tomcat environment. After starting the Tomcat process on one of our Solaris server, process is automatically getting shutdown after 2-3 minutes if no activity is done through Application deployed in Tomcat. I have observed similar issue in one of following mailing thread where as user has asked to install a Listener and print a stacktrace when the stop event happens. I need to know how to install such Listener. http://www.mail-archive.com/users@tomcat.apache.org/msg84717.html Server version: Apache Tomcat/6.0.16 Server built: Jan 28 2008 11:35:29 Server number: 6.0.16.0 OS Name:SunOS OS Version: 5.10 Architecture: sparc JVM Version:1.6.0_51-b11 JVM Vendor: Sun Microsystems Inc. Error in the catalina.out Oct 30, 2013 5:04:56 AM org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-9920 Oct 30, 2013 5:04:56 AM org.apache.catalina.connector.Connector pause SEVERE: Protocol handler pause failed java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:365) at java.net.Socket.connect(Socket.java:527) at java.net.Socket.connect(Socket.java:476) at java.net.Socket.init(Socket.java:373) at java.net.Socket.init(Socket.java:216) at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:486) at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:283) at org.apache.jk.server.JkMain.pause(JkMain.java:681) at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153) at org.apache.catalina.connector.Connector.pause(Connector.java:1073) at org.apache.catalina.core.StandardService.stop(StandardService.java:563) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744) at org.apache.catalina.startup.Catalina.stop(Catalina.java:628) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:671) Oct 30, 2013 5:04:57 AM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Oct 30, 2013 5:04:58 AM org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-9920 -- Regards,