Help setting up sqlite data source
Hello, I wanted to setup tomcat+hibernate+JOTM+sqlite but could not find any information on sqlite setup. I did read a document on setting up datasources and also one tomcat document relating to mysql, postgresql. It appears I need to supply a resource name, auth, factory, driver class and url, which could be: resource name- any name I want to supply auth-does this apply to sqlite factory -whats the factory for sqlite??? driverclass-class of jdbc driver lib url-connection string So please let me know how to setup the sqlite database and if you have a working configuration that would be great! TIA, nandy - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Getting javax.net.ssl.SSLHandshakeException
Dear Christopher , Perhaps you disabled SSLv3 and a client is trying to connect using SSLv3? We agree with your above statement. We have disabled SSLv3 on Tomcat server and our client is an exe which sends request using below code. URL server = new URL(url); jprogress.setValue(11); final String hostvar = ip; HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { public boolean verify(String hostname, SSLSession session) { if (hostname.equals(hostvar)) { return true; } else { return false; } } }); try{ HttpsURLConnection con = (HttpsURLConnection) server.openConnection(); jprogress.setValue(14); con.setConnectTimeout(9000); con.setDoOutput(true); con.setUseCaches(false); con.setReadTimeout(6); jprogress.setValue(16); We are unable to find at which point the client exe uses either TLS or SSLv3 to send request to the server. Also we find that client exe works fine in other machines. We want to know if this is system specific or java specific. Any help will be greatly appreciated. Thanks and Regards Deepak kumar From: Christopher Schultz To: Tomcat Users List Date: 24-02-2015 20:36 Subject:Re: Getting javax.net.ssl.SSLHandshakeException -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Deepak, On 2/24/15 9:19 AM, dku...@ccilindia.co.in wrote: > We have migrated from apache tomcat 8.0.8 to apache tomcat > 8.0.18.(to prevent the poodle attack). Note that upgrading Tomcat is not necessary to mitigate SSL POODLE. Upgrading does have other advantages, though. > But now we are facing the below issue. > > javax.net.ssl.SSLHandshakeException: Remote host closed connection > during handshake at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown > Source) at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown > Source) at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown > Source) at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown > Source) at > sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown > Source) at > sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown > Source) at > sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown > Source) at > sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown > Source) at > connection.ReceiveConnect.connect(ReceiveConnect.java:77) at > util.ReceiveFile.run(ReceiveFile.java:94) at > java.lang.Thread.run(Unknown Source) Caused by: > java.io.EOFException: SSL peer shut down incorrectly at > com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source) ... > 11 more > > > Any help will be greatly appreciated. Perhaps you disabled SSLv3 and a client is trying to connect using SSLv3? Try using this tool to probe your server to see what it can do: http://markmail.org/thread/tz4z44nfjl7sy2lj Also remember this: http://markmail.org/thread/ip4j45tioft4bntd - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJU7JLBAAoJEBzwKT+lPKRYT8UP/jFwpGCb0ZrNQuyOYQRtB+Fb 7vzciBQbsyXTKin7l5g2+31nP9NGFgxbrXhswJWMQL9ZQyyKxxe4H5RUagpT+IkZ yAkmh7BzTaIkCgQjEVS9y7mQK/lPG37umYcnz4/yKQ/zQKXVeKfxrlOGpNXMtxMu 0QClDNbUrmIfTOOhHmcXiwgcH7bK/mjfeDqow1IyU/mL5J5C66iTEgUEtivGmtyi yCTgWkEQaAlUoQ85Tzp6FQHHA7irIo2IQppBba+BOz2rx+GYrLil2qCaAopbE57T 5LPqrOU0uI2irlc/4wLBxR6MqS6SeZ7aaGMDPqUWfvlg+OlQBl5XFJmlISd1hwTU Sv6wwfFJ7DMvE2KqSMIAtgyM+WfvveJqvf8aE0aaDYt/ikP3mV6r3YUa7IA9r3Lf WdP69upZIZSZMu6G8npNqMzqmWjeYq/K3Rjli5a/9sERdSDA1cwxwitwWklTzEnL VP6pdjoK6UBZFrhaIDmWX4yshGQRgptycna+edh3zd9elAT3utffswAXOP063ToP KD/JmSOSOra0asZq7t6Dl+IqczK3tjByleAJdHlsxqiYGl77XnnGZzxg1qmQBQO2 dqWD+4KZay8X29N26sUWvEJBrBMrddwSRE7YU210ncGSuX4VaUy1iGiZmyCHFtoO WpZRD0ruzsx95nIJE8J/ =Fk6V -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org "Disclaimer and confidentiality clause - This message and any attachments relating to official business of CCIL OR ANY OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the original addressee only. The message may contain information that is confidential and subject to legal privilege. Any views expressed in this message are those of the individual sender. If you have received this message in error, please notify the original sender immediately and destroy the message and copies thereof and any attachments contained in it . If
Re: Connection leak Tomcat7 and Oracle
Am 24. Februar 2015 22:20:00 MEZ, schrieb Red : >OS: Ubuntu 14.04.2 LTS >Oracle: 12.1.0.1.0 or 11.2.0.3.0 >Tomcat: 7.0.52-1ubuntu0.1 >odjbc: Ojdbc6 or Ojdbc7 (placed in /var/lib/tomcat7/lib) >java version "1.8.0_31" of "1.7.0_65" > >Context.xml: > type="javax.sql.DataSource" >driverClassName="oracle.jdbc.OracleDriver" > url="jdbc:oracle:thin:@//*:1521/" >minIdle="1" > username="***" password="***" maxActive="10" >maxIdle="10" maxWait="-1" /> > type="javax.sql.DataSource" >driverClassName="oracle.jdbc.OracleDriver" > url="jdbc:oracle:thin:@//***:1521/**" > username="***" password="**" maxActive="20" >maxIdle="10" maxWait="-1" /> > >Immediately after tomcat startup, number of connection goes up until it >reaches below: > >SQL> select machine, username, count (1) from v$session group by >machine, username; > >MACHINE USERNAME COUNT(1) >- - -- >tc**1 40 >tc**2 60 > >Then, after a while connection count drops to: > >MACHINE USERNAME COUNT(1) >- - -- >tc**1 6 >tc**2 60 > > > >I have commented all other pools, most fail due to lack of resources on >database side (hundreeds of connections). Connection are opened if >pool >is defined in context.xml, even if actually not used anywhere. > >Catalina.out gives me nothing for two pools, bunch of errors with 3 or >more, but those seem to be due to exhaustion of databases availability. > >Looked up oracle support, nothing of use there. All of this works fine >with tomcat6, java6, oracle 11g or 12c Apart from the answers you already got. Take a look at the troubleshooting guide http://wiki.apache.org/tomcat/FAQ/Troubleshooting_and_Diagnostics . Maybe the starting takes long enough to see where your connections are taken. Another thing you can do is to configure your pools to report abandoned connections. That way you will see where the connections where created. Felix > >Red > > > > > >- >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: Connection leak Tomcat7 and Oracle
unless DBCP changed of course. I would add the following property to your element factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html On Tue, Feb 24, 2015 at 3:47 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Red, > > On 2/24/15 4:20 PM, Red wrote: > > OS: Ubuntu 14.04.2 LTS Oracle: 12.1.0.1.0 or 11.2.0.3.0 Tomcat: > > 7.0.52-1ubuntu0.1 odjbc: Ojdbc6 or Ojdbc7 (placed in > > /var/lib/tomcat7/lib) java version "1.8.0_31" of "1.7.0_65" > > > > Context.xml: > type="javax.sql.DataSource" > > driverClassName="oracle.jdbc.OracleDriver" > > url="jdbc:oracle:thin:@//*:1521/" minIdle="1" > > username="***" password="***" maxActive="10" maxIdle="10" > > maxWait="-1" /> > type="javax.sql.DataSource" > > driverClassName="oracle.jdbc.OracleDriver" > > url="jdbc:oracle:thin:@//***:1521/**" > > username="***" password="**" maxActive="20" > > maxIdle="10" maxWait="-1" /> > > > > Immediately after tomcat startup, number of connection goes up > > until it reaches below: > > > > SQL> select machine, username, count (1) from v$session group by > > machine, username; > > > > MACHINE USERNAME COUNT(1) - > > - -- tc**1 > > 40 tc**2 60 > > > > Then, after a while connection count drops to: > > > > MACHINE USERNAME COUNT(1) - > > - -- tc**1 6 > > tc**2 60 > > > > > > > > I have commented all other pools, most fail due to lack of > > resources on database side (hundreeds of connections). Connection > > are opened if pool is defined in context.xml, even if actually not > > used anywhere. > > > > Catalina.out gives me nothing for two pools, bunch of errors with 3 > > or more, but those seem to be due to exhaustion of databases > > availability. > > > > Looked up oracle support, nothing of use there. All of this works > > fine with tomcat6, java6, oracle 11g or 12c > > So which one of these makes a difference? Tomcat's connection pool > didn't change dramatically between Tomcat 6 and 7. The Java version > likely has nothing to do with it, and the Oracle version also likely > has nothing to do with it. > > So what's the problem? > > Has your application's user behavior changed in any way? Say, an > increase in traffic? > > What you describe sounds an awful lot like poor resource management in > the application itself. > > 1. Are you sure every part of your application is using your JDBC pools? > > 2. Read this: > > http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/ > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1 > Comment: GPGTools - http://gpgtools.org > > iQIcBAEBCAAGBQJU7P9wAAoJEBzwKT+lPKRYX/YP/ijgvvieYaNlgaM7cODgPPzm > 4GdEyJfXW+xQA5HBOBQemz5CX8YWrSgr9PrlSumf/uU6mx57G1yhmDdmwv1N5jnJ > ct9hBU97aw/6t7FiGF+JPyEjbhETBRIZB5NoOKPiP8CNJeTMd8a9z1Qe6aU1oXMM > yPtsvzg7J5aziKzpdm9xrb0lXtdQe9ga5YfikPShS6Tup1iJzcCImi27RQ6nuUFY > zC8wHVmz0PU8UcbLpFDQGTTUsq6JtQvR/aGpDcHYfq8dNqavnP/QECcx6ZQlixy6 > HX30Oj4s/D/I5ez8PXAo2PiSF4ZZ86j0UQt9ntqcDeE7w7ldIfLQ2NCj5jANS6SL > coG3n0tszmVSfCQ3fCXsTphbry0NZSJjNwmkZ4ezXj+3KpD5oATbaTLVL9ZeH9s4 > d3HiheNcF//pdeGDZ5Zy09vAO94V9CD+fr2TbbovluHzgpuOu7vYqAwg6IzuMQfs > QWwmiC+Rccp6PnWltSJ7ClIKTh9mDHI7cejdFmQJe4J0kN7HZHggkk7ZlJD5/p6h > sEVxmBZ0JMm0GJzoqOurtHKrviqvbfOJhXd5w6Jmv9Dyj7yK/izhXkACmOp7Rz9K > 9/T1OQsyWBtbWho8/xdisEUvsuY9w3lIf2uIeQmikIpICQ4NYddxz5I3/zpd8CSo > KApJwDf0qsXvXduOrANP > =F0TE > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Connection leak Tomcat7 and Oracle
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Red, On 2/24/15 4:20 PM, Red wrote: > OS: Ubuntu 14.04.2 LTS Oracle: 12.1.0.1.0 or 11.2.0.3.0 Tomcat: > 7.0.52-1ubuntu0.1 odjbc: Ojdbc6 or Ojdbc7 (placed in > /var/lib/tomcat7/lib) java version "1.8.0_31" of "1.7.0_65" > > Context.xml: type="javax.sql.DataSource" > driverClassName="oracle.jdbc.OracleDriver" > url="jdbc:oracle:thin:@//*:1521/" minIdle="1" > username="***" password="***" maxActive="10" maxIdle="10" > maxWait="-1" /> type="javax.sql.DataSource" > driverClassName="oracle.jdbc.OracleDriver" > url="jdbc:oracle:thin:@//***:1521/**" > username="***" password="**" maxActive="20" > maxIdle="10" maxWait="-1" /> > > Immediately after tomcat startup, number of connection goes up > until it reaches below: > > SQL> select machine, username, count (1) from v$session group by > machine, username; > > MACHINE USERNAME COUNT(1) - > - -- tc**1 > 40 tc**2 60 > > Then, after a while connection count drops to: > > MACHINE USERNAME COUNT(1) - > - -- tc**1 6 > tc**2 60 > > > > I have commented all other pools, most fail due to lack of > resources on database side (hundreeds of connections). Connection > are opened if pool is defined in context.xml, even if actually not > used anywhere. > > Catalina.out gives me nothing for two pools, bunch of errors with 3 > or more, but those seem to be due to exhaustion of databases > availability. > > Looked up oracle support, nothing of use there. All of this works > fine with tomcat6, java6, oracle 11g or 12c So which one of these makes a difference? Tomcat's connection pool didn't change dramatically between Tomcat 6 and 7. The Java version likely has nothing to do with it, and the Oracle version also likely has nothing to do with it. So what's the problem? Has your application's user behavior changed in any way? Say, an increase in traffic? What you describe sounds an awful lot like poor resource management in the application itself. 1. Are you sure every part of your application is using your JDBC pools? 2. Read this: http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/ - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJU7P9wAAoJEBzwKT+lPKRYX/YP/ijgvvieYaNlgaM7cODgPPzm 4GdEyJfXW+xQA5HBOBQemz5CX8YWrSgr9PrlSumf/uU6mx57G1yhmDdmwv1N5jnJ ct9hBU97aw/6t7FiGF+JPyEjbhETBRIZB5NoOKPiP8CNJeTMd8a9z1Qe6aU1oXMM yPtsvzg7J5aziKzpdm9xrb0lXtdQe9ga5YfikPShS6Tup1iJzcCImi27RQ6nuUFY zC8wHVmz0PU8UcbLpFDQGTTUsq6JtQvR/aGpDcHYfq8dNqavnP/QECcx6ZQlixy6 HX30Oj4s/D/I5ez8PXAo2PiSF4ZZ86j0UQt9ntqcDeE7w7ldIfLQ2NCj5jANS6SL coG3n0tszmVSfCQ3fCXsTphbry0NZSJjNwmkZ4ezXj+3KpD5oATbaTLVL9ZeH9s4 d3HiheNcF//pdeGDZ5Zy09vAO94V9CD+fr2TbbovluHzgpuOu7vYqAwg6IzuMQfs QWwmiC+Rccp6PnWltSJ7ClIKTh9mDHI7cejdFmQJe4J0kN7HZHggkk7ZlJD5/p6h sEVxmBZ0JMm0GJzoqOurtHKrviqvbfOJhXd5w6Jmv9Dyj7yK/izhXkACmOp7Rz9K 9/T1OQsyWBtbWho8/xdisEUvsuY9w3lIf2uIeQmikIpICQ4NYddxz5I3/zpd8CSo KApJwDf0qsXvXduOrANP =F0TE -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Connection leak Tomcat7 and Oracle
On 24/02/2015 21:20, Red wrote: > OS: Ubuntu 14.04.2 LTS > Oracle: 12.1.0.1.0 or 11.2.0.3.0 > Tomcat: 7.0.52-1ubuntu0.1 > odjbc: Ojdbc6 or Ojdbc7 (placed in /var/lib/tomcat7/lib) > java version "1.8.0_31" of "1.7.0_65" > > Context.xml: Which context.xml file? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Connection leak Tomcat7 and Oracle
OS: Ubuntu 14.04.2 LTS Oracle: 12.1.0.1.0 or 11.2.0.3.0 Tomcat: 7.0.52-1ubuntu0.1 odjbc: Ojdbc6 or Ojdbc7 (placed in /var/lib/tomcat7/lib) java version "1.8.0_31" of "1.7.0_65" Context.xml: Immediately after tomcat startup, number of connection goes up until it reaches below: SQL> select machine, username, count (1) from v$session group by machine, username; MACHINE USERNAME COUNT(1) - - -- tc**1 40 tc**2 60 Then, after a while connection count drops to: MACHINE USERNAME COUNT(1) - - -- tc**1 6 tc**2 60 I have commented all other pools, most fail due to lack of resources on database side (hundreeds of connections). Connection are opened if pool is defined in context.xml, even if actually not used anywhere. Catalina.out gives me nothing for two pools, bunch of errors with 3 or more, but those seem to be due to exhaustion of databases availability. Looked up oracle support, nothing of use there. All of this works fine with tomcat6, java6, oracle 11g or 12c Red - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Active Directory User Authentication Apache Tomcat 5.5 Struts Servlets JSP
Seema Patel wrote: Hi, We are using Apache Tomcat 5.5, JDK 1.5 and have a internal portal on our intranet which is written in java jsp struts and jsp. I know that the tomcat and Java versions are old, but upgrading isn't a quick thing to do without lots of testing. The issue we have is that the users keep getting the authentication box popping up asking for username and password when using the portal in Internet Explorer. One of the users has noticed that when they use Chrome, they don't seem to get this popup constantly. Authentication is against the Active Directory using JCIFS (I know it's discontinued, but to re-write and test is not feasible at the moment). The users are meant to be using Internet Explorer as not everything works in Chrome. We have been trying to work out this issue for some time, with no success. The user saying that it works in Chrome makes us wonder if there's something within Internet Explorer that is possibly dropping the connection or something for it to keep asking the user for username and password. Or is there something that Internet Explorer doesn't like with Apache Tomcat? Any help/guidance on this issue is greatly appreciated. Hi. Tomcat 5.5 is old. The JCIFS http/NTLM authentication filter is old and deprecated and does not work anymore in any recent Windows Domain setup, because it only works with NTLM v1. Please read the first paragraph in blue here : http://jcifs.samba.org/src/docs/ntlmhttpauth.html and *believe what it says, it is true*. (Look at Jespa @ www.ioplex.com for a painless replacement) (look at a more recent version of Tomcat and the SPNEGO authentication valve for another possible replacement) A login dialog that pops up in the browser when it should not, indicates one thing for sure : /something/ is not working in the WIA (Windows Integrated Authentication). But what that something is in your case, is impossible to say from outside of your network. It is almost certainly not a browser problem. It may be things like : - some of the clients are running newer versions of Windows and/or browsers which will not accept NTLMv1 authentication anymore - in your network, there are multiple Domain Controllers, some of which younger than others. Some still accept to do NTLMv1 authentication, some do not. As your clients get one or the other (quasi randomly) it sometimes works, and sometimes not. - and a large number of possible other reasons The one certainty is : you are using obsolete software and solutions, and nobody will be able to give you any miracle solution for that. The sooner you accept that, the less time you will lose in the end. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: URL rewrite in tomcat 7
Baran Topal wrote: Hi; Thanks for the swift replies. I am not allowed to tuckey's rewrite (at least until i cannot find a normative Tomcat solution). I looked for the documentation for 7.0. and Alias under Host is my solution however, after rewriting, i bookmark the page and want to reach via bookmark but it fails when I directly go via bookmark. What should be the remedy? "it fails" is not very helpful as an error description (and neither is the rest of what you are writing above a very understandable description of what you are doing) I suggest that you get one of the browser plugins which shows the exact exchanges between browser and server (HttpFox, LiveHttpheaders, Fiddler2 or similar), try your thing again and then look at exactly what happens back and forth. Any of those plugins allows you to save what they track to a text file, which you can then copy/paste here. And maybe just looking at it will show you why whatever you are trying doesn't work. Br. 2015-02-07 15:40 GMT+01:00 Caldarale, Charles R : From: Baran Topal [mailto:jazziiil...@gmail.com] Subject: URL rewrite in tomcat 7 I have a tomcat 7 instance in which i need use alias for my domain. Essentially, the alias http://test1/ would replace the http:/myaddress.com and its sub addresses It is not a redirect, rather rewrite of the URL. How do i do this? (modifying context.xml or?) Can you help me? Take a look at the usual rewrite filter: http://tuckey.org/urlrewrite/ - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: URL rewrite in tomcat 7
Hi; Thanks for the swift replies. I am not allowed to tuckey's rewrite (at least until i cannot find a normative Tomcat solution). I looked for the documentation for 7.0. and Alias under Host is my solution however, after rewriting, i bookmark the page and want to reach via bookmark but it fails when I directly go via bookmark. What should be the remedy? Br. 2015-02-07 15:40 GMT+01:00 Caldarale, Charles R : > > From: Baran Topal [mailto:jazziiil...@gmail.com] > > Subject: URL rewrite in tomcat 7 > > > I have a tomcat 7 instance in which i need use alias for my domain. > > > Essentially, the alias > > http://test1/ would replace the http:/myaddress.com and its sub > addresses > > > It is not a redirect, rather rewrite of the URL. > > > How do i do this? (modifying context.xml or?) Can you help me? > > Take a look at the usual rewrite filter: > http://tuckey.org/urlrewrite/ > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail and > its attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
RE: mod_jk causing stuck Apache processes
> -Original Message- > From: Rainer Jung [mailto:rainer.j...@kippdata.de] > Sent: Monday, February 23, 2015 5:00 PM > To: Tomcat Users List > Subject: Re: mod_jk causing stuck Apache processes > > Am 24.02.2015 um 00:29 schrieb Jesse Defer: > >> -Original Message- > >> Am 23.02.2015 um 22:53 schrieb Jesse Defer: > -Original Message- > Am 23.02.2015 um 19:03 schrieb Jesse Defer: > > ... > > >> How many Apache web servers sit in front of the Tomcats? Is each of > >> the Apaches configured with 512 processes? > > > > All Tomcats are configured the same, maxThreads is 4096, apr, Tomcat 6. > > 16 apaches, all configured identically with 512 processes, the same > > worker.properties, etc. > > OK. So less threads than 16*512. But the apr connector - like the nio one > - can handle more connections than it has threads. Not more in-flight > requests, but for both connectors idle connections (keep-alive > connections) are cheap and do not need a pool thread. > > > Our busiest Tomcats peak at about 2000 connections to their AJP port > > from the web farm. I'm not sure how closely connections relate to > > thread usage, I haven't looked too closely at the JVM yet. > > For BIO one connection one thread. For APR and NIO it's roughly one in- > flight request one thread. Connections waiting for the next request to > arrive are cheap and handled by few separate poller threads. > > ... > > >> And only the lb is added to the worker.list? Or also the individual > >> AJP workers? > > > > Just the LBs. > > OK > > If your Apache uses a threaded APR library, you could try using > JkWatchdogInterval. That moved the maintenance from the normal > request processing code to a separate thread per Apache process. > >> > >> I suspect that once your app (one or some of your apps) gets slow, > >> requests pile up in Apache and >Apache can no longer connect to > >> Tomcat, because it doesn't have free threads. Some Apache children > >> still can connect, because the connect is handled by the OS > >> underneath Tomcat, but those connections do not get the awaited cping > reply. > > > > Shouldn't the ping timeout cause the processes to exit the wait state > > if the cping reply hasn't been received? I have seen the SS column in > > server-status grow into the thousands. > > Yes it would. But it could be a mixture: lots of Apache processes waiting > for hanging or slow Tomcat responses due to an aplication or GC > bottleneck, and some on-top requests failing in cping. > > >> In addition to the Thread Dumps, you should also activate GC-Logs for > >> your Tomcat JVMs. > > > > I have gc logging enabled already. > > ACK > > - using the worker or prefork MPM in combination with > JkWatchdogInterval would reduce the amount of shm locking due to > global maintenance calls, because it is done per process, not per > thread. You might have other reasons for using prefork though. Have > >> you? > >>> > >>> Use of prefork is historical. We have been looking at going to > >>> event, but Haven't made the switch yet. > >> > >> If you are using many Apaches each with 512 children, you will most > >> likely need to use an NIO connector on the Tomcat processes and would > >> also benefit from worker or event MPM for Apache. Each process e.g. > >> with > >> 50 or 100 threads and a relatively short connection_pool_timeout like > e.g. > >> 60 seconds. > > > > I am going to bring up accelerating the switch to the event MPM with > > my team. Will NIO give us more scalability than APR? > > Not really, both are good at connection scalability. Maybe don't change to > much at the same time. I'd say NIO is a bit more mainstream than APR, but > your mileage my vary. > > >> What was the reason, that you started suspecting the fcntl() > >> underneath jk_shm_lock? Are we sure, that the stack you provided is > >> really the typical one? And was the strace dumping all system calls > >> or only the fcntl calls? > > > > I can't be sure it's the typical one, I only know every time I sample > > the stack of a stuck process that's what I get, plus the strace shows > > no other system calls except time(). It seems like it's stuck in a > fairly tight loop somewhere. > > I haven't looked too deeply in the mod_jk code though and haven't > > collected any system call statistics. > > > > I don't necessarily suspect fcntl, but it's getting called a lot (the > > strace is not filtered). System time jumps when the issue is > > happening and the fcntl looks like the vast majority of system calls. > > Since the issue got worse when we added more processes it seems > plausible it could be lock contention. > > Hmm, but lock contention should result in the fcntl call to take more and > more time. Could it be a problem with the system time? That somehow the > "don't run the maintenance for the next 60 seconds" rule doesn't get > effective because the clock jumps? > > I suggest: > > - check whether the
[ANN] Apache Tomcat 8.0.20 available
The Apache Tomcat team announces the immediate availability of Apache Tomcat 8.0.20. Apache Tomcat 8 is an open source software implementation of the Java Servlet, JavaServer Pages, Java Unified Expression Language and Java WebSocket technologies. Apache Tomcat 8.0.20 includes numerous fixes for issues identified in 8.0.18 as well as a number of other enhancements and changes. The notable changes since 8.0.18 include: - Fix a performance regression in the new resources implementation when signed JARs are used in a web application. - Fix several bugs that could cause multiple registrations for write events for a single socket when using Servlet 3.0 async. Typically, the side effects of these multiple registrations would be exceptions appearing in the logs. - Enhance the bean factory used for JNDI resources. The new attribute forceString allows to support non-standard string argument property setters. Please refer to the change log for the complete list of changes: http://tomcat.apache.org/tomcat-8.0-doc/changelog.html Downloads: http://tomcat.apache.org/download-80.cgi Migration guides from Apache Tomcat 5.5.x, 6.0.x and 7.0.x: http://tomcat.apache.org/migration.html Enjoy! - The Apache Tomcat team - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to close DB Connections while shutting down server
Dear Experts, I am using container managed datasource to manage the database connections. But while shutting down the server I am getting lot of messages like below: appears to have started a thread named [pool-1-thread-1] but has failed to stop it. This is very likely to create a memory leak Would you please suggest any better way so that open connections in Pool will be gracefully closed while shutting down the application. Thank you very much Regards, Rajesh
Re: Tomcat 6 database connection issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, Sorry... I just can't read through all those reply-to-reply-to-reply-to lines anymore. I'm snipping them out since they are less relevant, now. On 2/24/15 10:50 AM, Mark Maciolek wrote: > Should have mentioned this: > > Switched to tomcat 7, since no matter what I tried connection pool > would not start. Is this a new application, or something that has been working that needs to be modified? If you are supporting an old application, then you should change as little as possible until you solve your problem. If this is a new application, you should go all the way up to Tomcat 8. The servlet spec is backward-compatible, so you aren't really risking anything by using the current highest version. It's also the one likely to be supported the longest. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJU7LSvAAoJEBzwKT+lPKRY/c4P/1hOK3Cp6KW8x2fEUPls8mrB UHp1RD2el5Ox4wE92L4dxiVev/ZRLVmos9KK5VGWSRjgPEt2b8RpwZe3t1NcQuVv TwpE8qplaR7hsx2+xLM0r8arYzj/jTUQVyXVBLQO+llIE3RNvef4W3TwyG+oPciJ qu7wnVR8HSpBOW5SC5d6sZfOiYyTSYR08FL+qZyyDTtOEzJVgWxldv3wtMWBVEjY KzPhRri64FazSr+d5Cw8NPTXJRDaS8lt5UOP4piPAcI0D+QEYIaNPvsZCXoVbPRS fTzZX/BUWf5l1B4cw0qAfIGnYUbVepnWXxIQXoaBWzPG+SDh53kgCAW4Oe0s/4fk VaR9N7PoUZjcu/8O89EL/MrESNcp5NCHVqdbguo+clAkqjNVWPn0vXL1tyfwDPV4 LGgc05e6Ki9/JNEvVCPVsG4e8RnmbxYpMQ68RsAet9/g/bZVKdx7oizCjAFBDElC 5U0SBwQaXpoEMgD0vw3sb9apl7YYf0TGRZthgNfjguWETqHflb9Wqp76iul63TOv OyjSenanWqczk4BtAxmwOM8z+nlOJ0Z5hdyKjsf/FOo4NXhG+RnSmAxcKNn7qKuk 21Q6oVvpvWUp/tdnyzlLQ2Wy1PZJlMKComYhgmtOGtN1UQpLw6E9Rv8PFj79xdVW 4gq7M1WgVFW/cc2wh6Eg =qkWF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 database connection issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 2/24/15 10:49 AM, Mark Maciolek wrote: > seeing this in the logs: > > [Tue Feb 24 10:17:12 2015] [error] (70007)The timeout specified > has expired: proxy: read response failed from (null) (*) [Tue Feb > 24 10:17:14 2015] [error] ajp_read_header: ajp_ilink_receive > failed [Tue Feb 24 10:17:14 2015] [error] (70007)The timeout > specified has expired: proxy: read response failed from (null) (*) > > > just restarting tomcat it immediately makes ~200 connections > > still investigating what the issue might be FYI this has nothing to do with your JDBC connection pool. It looks like a bad mod_proxy_ajp configuration. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJU7LP6AAoJEBzwKT+lPKRY8LkP/20uvc8cQpKNLp7FR5MvSl7f nLQh7kWoJ5i/Fdwwy7Fb237kDd2ZG8hdQaPJcsy4Q2a+yV2Rev32dxozcIXyxaqh YKtCTrjOhJIFD/EbliGAPp/kltrAC3q8jzTAICbY+RnwIvdH20y4vilpM5vPBmaT 4SQkPnSFeYuQv4d8PwsXacKV7KMe96Xpn7RtAmxoT9uEKcf1RUuKtN3KpBC5/4NC sqm0if0Dvt56rPTcjN74XUoBhTZtbm4iws7zztfoi0nPSCPrcWQ2H1VUzXBlaDAw qW6flzrBjxlWMBShNlzqHjUC1MLEcnr4OG3wvrUjFyyMIduro7EB5w/bi8pvGygY rxarOypSLIm2UCVz0kYdGGtmdhuevR315OmGCo+urAqlcZODIKnAnwze6uGe/QyB hMKAVgJxYTjNF3hTKfAKsg8s70cIjlaZcYMW+bhB3bq8C97yuX458CMg/DhNJYKd KxkcbJSttM1FMfXGthxJLNSDRhdcm8V5NZ+T+ryJpuKXKegEyaIbxbgZ/33HnftB BTY6OZbdgfmEZ92/B3wabCtdGDSaj+St32kXLS+feEoMBl7xCaTkjYRxM7mtsMh/ eE4V+bLGQTiifHlwhLirPtkfZldlj9DgYSwEpmbZ43MUNbGTq94PRn8OmOAO4pxm vrfvMCzflKf0ITzl7G3P =gv62 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 database connection issue
On 2/24/2015 10:22 AM, Daniel Mikusa wrote: On Tue, Feb 24, 2015 at 10:08 AM, Mark Maciolek wrote: On 2/23/2015 2:46 PM, Daniel Mikusa wrote: On Feb 23, 2015 12:49 PM, "Mark Maciolek" wrote: On 2/23/2015 12:37 PM, Daniel Mikusa wrote: On Mon, Feb 23, 2015 at 12:25 PM, Mark Maciolek wrote: On 2/23/2015 9:55 AM, Daniel Mikusa wrote: On Mon, Feb 23, 2015 at 9:46 AM, Mark Maciolek wrote: hi, operating system: Scientific Linux release 6.6 (Carbon) postgres version postgresql-server-8.4.2 tomcat version tomcat6-6.0.24 Tomcat starts and I can reach page at the 8080 port on the server when I add the following xml file and restart tomcat I get this error: Feb 23, 2015 9:28:16 AM org.apache.catalina.startup.ContextConfig processContextConfig SEVERE: Parse error in context.xml for /cooa org.xml.sax.SAXParseException; systemId: file:///etc/tomcat6/Catalina/ localhost/cooa.xml; lineNumber: 21; columnNumber: 12; Error at (21, 12: null path="/web/opal/webapps" docBase="/web/opal/webapps/ROOT" debug="5" reloadable="true" allowLinking="true" name="jdbc/postgres" auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://127.0.0.1:5432/cooa" username="dbuser" password="*" maxActive="20" maxIdle="10" maxWait="1" This could be the list or a copy / paste issue, but you should not have the ">" on the opening resource tag. It should be after your last attribute (i.e. after maxWait. You also don't need the closing Resource tag. Ex: Dan PS: Remove "path", it's not valid here. Remove "debug", I don't think that does anything. Also, you probably want to remove docBase because you're pointing to something in the webapps folder (i.e. appBase), and you should only use docBase if your app is outside of the appBase folder. Line #21 is the ran file past xml parse checker and reports everything okay. Been googling it for two days now and can not figure out what I have done wrong. Mark -- Mark Maciolek Network Administrator Morse Hall Room 339 603-862-3050 https://www.unh.edu/research/support-units/research-computing-center - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org hi, Changing the xml file per your suggestions loads now and my jsp pages now load as long as they don't need a database connection. I expect to see new postgres processes similar to this from a working server: postgres 407 7734 0 Feb17 ?00:01:00 postgres: dbuser eosearthdata 127.0.0.1(60176) idle postgres 408 7734 0 Feb17 ?00:01:00 postgres: dbuser eosearthdata 127.0.0.1(60177) idle postgres 409 7734 0 Feb17 ?00:01:01 postgres: dbuser eosearthdata 127.0.0.1(60178) idle postgres 410 7734 0 Feb17 ?00:01:00 postgres: dbuser eosearthdata 127.0.0.1(60179) idle postgres 411 7734 0 Feb17 ?00:01:01 postgres: dbuser eosearthdata 127.0.0.1(60180) idle Starting tomcat does not start the additional postgres processes on my server. It is trying to though: Do you have Postgres running on the same machine as Tomcat? Looks like it's waiting trying to make a connection, although it's a little hard to say because it looks like you're using a custom pool (edu.unh.sr.cooa.DBPool?). Dan hi, yes, postgres and tomcat are on same server, OK. It does seem like its hanging on connection. Have you actually tried the connection details outside of Tomcat? Perhaps with a command line tool or simple Java app? it is a custom pool because when moved to production server it will be sharing tomcat and postgres resources with other web sites. I don't know your circumstances but as an fyi Tomcat can share connection pools across multiple apps on one server. For testing purposes I would be willing to make it a standard pool. If you could, that would be helpful. Thanks Dan hi, added this line to my context xml and pool connections start factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" For what it's worth, this is not the default pool used by Tomcat 6. Tomcat 6 is going to use a repackaged version of DBCP. If you simply remove the "factory" attribute, Tomcat should create your with the default. had to get older tomcat-jdbc.jar now on to updating my web pages to use this +1 to Chris' comment. You shouldn't need to change anything. You code should be fetching a connection from the pool through JNDI. It shouldn't know or care what pool you're using. Perhaps your code is creating / using the pool directly? http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#Using_resources Dan HI, Should have mentioned this: Switched
Re: Tomcat 6 database connection issue
hi, seeing this in the logs: [Tue Feb 24 10:17:12 2015] [error] (70007)The timeout specified has expired: proxy: read response failed from (null) (*) [Tue Feb 24 10:17:14 2015] [error] ajp_read_header: ajp_ilink_receive failed [Tue Feb 24 10:17:14 2015] [error] (70007)The timeout specified has expired: proxy: read response failed from (null) (*) just restarting tomcat it immediately makes ~200 connections still investigating what the issue might be Mark On 2/24/2015 10:18 AM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 2/24/15 10:08 AM, Mark Maciolek wrote: added this line to my context xml and pool connections start factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" had to get older tomcat-jdbc.jar now on to updating my web pages to use this Why would you have to modify your web pages to use a different connection pool? This is a JNDI-defined pool using standard Java-defined interfaces. The JSP pages shouldn't have to change by a single byte. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJU7JY0AAoJEBzwKT+lPKRYgsMQAMEw+Ezel+1DrCUH+j/QfKY1 lT5CEyL7sJBJGHjDPtfeIfR2TSA1Bq45VF0Mf/gshhzxwJuzW97G6RfeNvVEIkRF QICD3nkxix21F9wQaHb/QJ9gal9tkZ5HjXIsEcVww8DCj5IkAc4uYDvFmsw+D7Cq Ityhlbh6FReMnxPsizZFMIRrQD6ZfFqYAVsIOxtRy+uvdOjMQtEcivl6ecYDXHzI Um8SnkkPhu7z56yLckosg1uJ3E1Ly+GHFBH+lbHW/IOIivM+p8yFH+UwpGqTwQOY SS74Bvn/u5WxU1TUe8yKqYsSd0N7yQfn06eOMuTgfX5QxXXOuBZzKHmTFTteDL4Q uw2+1xxJ1weJ5yZeLEUeUZ7AcjH3CkoCwelMuNX5Lk4vHOtKN1w4w+EWZSwD96dg cv0pvgpkTYfuc2Jy1zrEeLtUQ6evP8wFL2ySlw/NiJ7L2mUwzyaNO/YbTn0R2Z5Z Y8k5vt1HBdjmi5VeqFNwbQVyz837Q9DwQ6qbLe9oozhYjPj58macbGFhJJxkShDM ZxuHEq6dTlDZLeYic6EhKDIqqRt5qNvrm4m/DhwPiOiSrzpRXWleMxpp3Cqmbz+F KznP+hE+Q66jQPUV3LTact0lakU5RMOIh4OIL2gNAe7SFk3kwq9FmSL2Q1DW5Apd YPeFmRUhvVC0Ct1m7JMv =2TID -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Mark Maciolek Network Administrator Morse Hall Room 339 603-862-3050 https://www.unh.edu/research/support-units/research-computing-center - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: when idle tomcat runs on 3.9% CPU
On 2/24/2015 10:16 AM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Daniel, On 2/24/15 8:01 AM, Daniel Mikusa wrote: On Tue, Feb 24, 2015 at 7:33 AM, Peter Irbizon wrote: Hello, I would like to know if it is normal that tomcat7 runs on 3.9% CPU when idle? I saw all other processes are at 0%, only tomcat7 is always at least 3.9%. 1.) What's your system like? How many CPUs / cores? Is it a VM or hardware? What is the specific version of Tomcat? of Java? What OS are you running? 2.) How are you determining it's idle? As John mention, do you have any apps deployed? Do you know if traffic is hitting the server? 3.) Can you run a profiler and attach it to Tomcat? It'll tell you what's happening inside the JVM. 4. Take a few thread dumps to see what the JVM threads are doing. When truly idle (i.e. no requests are being processed), Tomcat runs a maintenance thread that performs some background tasks, but that runs about once every 60 seconds and does very little, depending on what you have configured. So unless you are seeing that thread specifically running at its interval, Tomcat's threads are totally blocked waiting on various events to occur (like an I/O event for an incoming request, or waiting for a timeout to perform that maintenance). On a dev server, I just checked and my Tomcat processes go down to 0.0 CPU as measured by top when they aren't "doing" anything. There is also the question of "3.9% of what"? If it's a slow, single core machine, it's a lot more likely that TC might use 3% of it, than it is if it's a 16-core 3.5GHz server. The thread dumps will likely tell the story. - -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 database connection issue
On Tue, Feb 24, 2015 at 10:08 AM, Mark Maciolek wrote: > > On 2/23/2015 2:46 PM, Daniel Mikusa wrote: > >> On Feb 23, 2015 12:49 PM, "Mark Maciolek" wrote: >> >>> >>> On 2/23/2015 12:37 PM, Daniel Mikusa wrote: >>> On Mon, Feb 23, 2015 at 12:25 PM, Mark Maciolek wrote: On 2/23/2015 9:55 AM, Daniel Mikusa wrote: > > On Mon, Feb 23, 2015 at 9:46 AM, Mark Maciolek > > >> wrote: >> >>hi, >> >>> operating system: >>> Scientific Linux release 6.6 (Carbon) >>> >>> postgres version >>> postgresql-server-8.4.2 >>> >>> tomcat version >>> tomcat6-6.0.24 >>> >>> Tomcat starts and I can reach page at the 8080 port on the server >>> when I add the following xml file and restart tomcat I get this >>> error: >>> >>> Feb 23, 2015 9:28:16 AM org.apache.catalina.startup.ContextConfig >>> processContextConfig >>> SEVERE: Parse error in context.xml for /cooa >>> org.xml.sax.SAXParseException; systemId: >>> file:///etc/tomcat6/Catalina/ >>> localhost/cooa.xml; >>> lineNumber: 21; columnNumber: 12; Error at (21, 12: null >>> >>> >>> >>> >>>path="/web/opal/webapps" >>>docBase="/web/opal/webapps/ROOT" >>>debug="5" >>>reloadable="true" >>>allowLinking="true" >>> >>> >>>name="jdbc/postgres" >>>auth="Container" >>>type="javax.sql.DataSource" >>>driverClassName="org.postgresql.Driver" >>>url="jdbc:postgresql://127.0.0.1:5432/cooa" >>>username="dbuser" >>>password="*" >>>maxActive="20" >>>maxIdle="10" >>>maxWait="1" >>> >>> >>>This could be the list or a copy / paste issue, but you should not >>> >> have >> >>> the >> ">" on the opening resource tag. It should be after your last >> > attribute >> >>> (i.e. after maxWait. You also don't need the closing Resource tag. >> >> Ex: >> >> >path="/web/opal/webapps" >>docBase="/web/opal/webapps/ROOT" >>debug="5" >>reloadable="true" >>allowLinking="true"> >> >name="jdbc/postgres" >>auth="Container" >>type="javax.sql.DataSource" >>driverClassName="org.postgresql.Driver" >>url="jdbc:postgresql://127.0.0.1:5432/cooa" >>username="dbuser" >>password="*" >>maxActive="20" >>maxIdle="10" >>maxWait="1" /> >> >> >> Dan >> >> PS: Remove "path", it's not valid here. Remove "debug", I don't >> think >> that does anything. Also, you probably want to remove docBase because >> you're pointing to something in the webapps folder (i.e. appBase), and >> > you >> >>> should only use docBase if your app is outside of the appBase folder. >> >> >> >> >>> >>> Line #21 is the ran file past xml parse checker and >>> >> reports >> >>> everything okay. >>> >>> Been googling it for two days now and can not figure out what I have >>> >> done >> >>> wrong. >>> >>> Mark >>> >>> >>> -- >>> >>> Mark Maciolek >>> Network Administrator >>> Morse Hall Room 339 >>> 603-862-3050 >>> https://www.unh.edu/research/support-units/research-computing-center >>> >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >>> >>>hi, >>> >> Changing the xml file per your suggestions loads now and my jsp pages > now >> >>> load as long as they don't need a database connection. > > I expect to see new postgres processes similar to this from a working > server: > > postgres 407 7734 0 Feb17 ?00:01:00 postgres: dbuser > eosearthdata 127.0.0.1(60176) idle > postgres 408 7734 0 Feb17 ?00:01:00 postgres: dbuser > eosearthdata 127.0.0.1(60177) idle > postgres 409 7734 0 Feb17 ?00:01:01 postgres: dbuser > eosearthdata 127.0.0.1(60178) idle > postgres 410 7734 0 Feb17 ?00:01:00 postgres: dbuser > eosearthdata 127.0.0.1(60179) idle > postgres 411 7734 0 Feb17 ?00:01:01 postgres: dbuser > eosearthdata 127.0.0.1(60180) idle > > Starting tomcat does not start the additional postgres processes on my > server. > It is trying to though: > > Do you have Postgres running on the same machine as Tomcat? Looks like it's waiting trying to make a connection, althou
Re: Tomcat 6 database connection issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 2/24/15 10:08 AM, Mark Maciolek wrote: > added this line to my context xml and pool connections start > > factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" had to get > older tomcat-jdbc.jar now on to updating my web pages to use this Why would you have to modify your web pages to use a different connection pool? This is a JNDI-defined pool using standard Java-defined interfaces. The JSP pages shouldn't have to change by a single byte. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJU7JY0AAoJEBzwKT+lPKRYgsMQAMEw+Ezel+1DrCUH+j/QfKY1 lT5CEyL7sJBJGHjDPtfeIfR2TSA1Bq45VF0Mf/gshhzxwJuzW97G6RfeNvVEIkRF QICD3nkxix21F9wQaHb/QJ9gal9tkZ5HjXIsEcVww8DCj5IkAc4uYDvFmsw+D7Cq Ityhlbh6FReMnxPsizZFMIRrQD6ZfFqYAVsIOxtRy+uvdOjMQtEcivl6ecYDXHzI Um8SnkkPhu7z56yLckosg1uJ3E1Ly+GHFBH+lbHW/IOIivM+p8yFH+UwpGqTwQOY SS74Bvn/u5WxU1TUe8yKqYsSd0N7yQfn06eOMuTgfX5QxXXOuBZzKHmTFTteDL4Q uw2+1xxJ1weJ5yZeLEUeUZ7AcjH3CkoCwelMuNX5Lk4vHOtKN1w4w+EWZSwD96dg cv0pvgpkTYfuc2Jy1zrEeLtUQ6evP8wFL2ySlw/NiJ7L2mUwzyaNO/YbTn0R2Z5Z Y8k5vt1HBdjmi5VeqFNwbQVyz837Q9DwQ6qbLe9oozhYjPj58macbGFhJJxkShDM ZxuHEq6dTlDZLeYic6EhKDIqqRt5qNvrm4m/DhwPiOiSrzpRXWleMxpp3Cqmbz+F KznP+hE+Q66jQPUV3LTact0lakU5RMOIh4OIL2gNAe7SFk3kwq9FmSL2Q1DW5Apd YPeFmRUhvVC0Ct1m7JMv =2TID -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: when idle tomcat runs on 3.9% CPU
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Daniel, On 2/24/15 8:01 AM, Daniel Mikusa wrote: > On Tue, Feb 24, 2015 at 7:33 AM, Peter Irbizon > wrote: > >> Hello, I would like to know if it is normal that tomcat7 runs on >> 3.9% CPU when idle? I saw all other processes are at 0%, only >> tomcat7 is always at least 3.9%. >> > > 1.) What's your system like? How many CPUs / cores? Is it a VM or > hardware? What is the specific version of Tomcat? of Java? What > OS are you running? > > 2.) How are you determining it's idle? As John mention, do you > have any apps deployed? Do you know if traffic is hitting the > server? > > 3.) Can you run a profiler and attach it to Tomcat? It'll tell > you what's happening inside the JVM. 4. Take a few thread dumps to see what the JVM threads are doing. When truly idle (i.e. no requests are being processed), Tomcat runs a maintenance thread that performs some background tasks, but that runs about once every 60 seconds and does very little, depending on what you have configured. So unless you are seeing that thread specifically running at its interval, Tomcat's threads are totally blocked waiting on various events to occur (like an I/O event for an incoming request, or waiting for a timeout to perform that maintenance). On a dev server, I just checked and my Tomcat processes go down to 0.0 CPU as measured by top when they aren't "doing" anything. The thread dumps will likely tell the story. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJU7JXcAAoJEBzwKT+lPKRYbpoP/iEYzgNjKkAXyvo907sJe6vY 0gVe3qLlZiuQGQLnlXHxTOTP701+IxK+3TzQN6jO2+dCNAZkJvup+xOzRLUavHk2 fNMYUgsPdCugg9S64Vfx7Mmo7Id9zX9UZ49yg+cwWAp7OAYaGfB6QIY/ux6C0zxB /ELOjGvyE1gHrenhovtVptze4JBBOzpsa2AMl1bnz4mtfVk5p8+21VI7u5e3gfRU 4lE5tNsjekWXnxUVwg4FNzDuIY2KP2Wqq7sNE6QSKhoIltuT+DB0g8u71ARQzkJH atMNuu7lG0auZqUQRhUxtCJ/6DIshHNxKlhCT91AjF9Mc3rdNSadTd7/j3DslCcL 0TnhdznXPou5LJgYNmdW4AVD6FQqxEf+0JW7o8jq4bbJ3NYlDVjhFoFMskN7IsOD h6uDzvS3nLrYuKJjsBNQWBRloMNtiy/fIa37AZeXrl81CubSgDPO3kYJs3fzjs9j srLvGEoctaHHA8N6ZWI+PL4r2vgLhu5iRY4Hh6OHHQ8zpnzKO1vWbqw0oFD44TQ6 tnuPyEwclm44tdAonAxmAyRLxpACVdjBp2hMbZq8YvcetCi/XvuRs3nhp5NpIZnE QHxEk2BpCGWoQxGTkLuEtj+vf/EwqAUyk+qLXV04lo29KcO4maxh4HYYViM/rSgb rC5Fm3UhC3vhkxwRE8/e =Wts6 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6 database connection issue
On 2/23/2015 2:46 PM, Daniel Mikusa wrote: On Feb 23, 2015 12:49 PM, "Mark Maciolek" wrote: On 2/23/2015 12:37 PM, Daniel Mikusa wrote: On Mon, Feb 23, 2015 at 12:25 PM, Mark Maciolek wrote: On 2/23/2015 9:55 AM, Daniel Mikusa wrote: On Mon, Feb 23, 2015 at 9:46 AM, Mark Maciolek wrote: hi, operating system: Scientific Linux release 6.6 (Carbon) postgres version postgresql-server-8.4.2 tomcat version tomcat6-6.0.24 Tomcat starts and I can reach page at the 8080 port on the server when I add the following xml file and restart tomcat I get this error: Feb 23, 2015 9:28:16 AM org.apache.catalina.startup.ContextConfig processContextConfig SEVERE: Parse error in context.xml for /cooa org.xml.sax.SAXParseException; systemId: file:///etc/tomcat6/Catalina/ localhost/cooa.xml; lineNumber: 21; columnNumber: 12; Error at (21, 12: null path="/web/opal/webapps" docBase="/web/opal/webapps/ROOT" debug="5" reloadable="true" allowLinking="true" name="jdbc/postgres" auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://127.0.0.1:5432/cooa" username="dbuser" password="*" maxActive="20" maxIdle="10" maxWait="1" This could be the list or a copy / paste issue, but you should not have the ">" on the opening resource tag. It should be after your last attribute (i.e. after maxWait. You also don't need the closing Resource tag. Ex: Dan PS: Remove "path", it's not valid here. Remove "debug", I don't think that does anything. Also, you probably want to remove docBase because you're pointing to something in the webapps folder (i.e. appBase), and you should only use docBase if your app is outside of the appBase folder. Line #21 is the ran file past xml parse checker and reports everything okay. Been googling it for two days now and can not figure out what I have done wrong. Mark -- Mark Maciolek Network Administrator Morse Hall Room 339 603-862-3050 https://www.unh.edu/research/support-units/research-computing-center - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org hi, Changing the xml file per your suggestions loads now and my jsp pages now load as long as they don't need a database connection. I expect to see new postgres processes similar to this from a working server: postgres 407 7734 0 Feb17 ?00:01:00 postgres: dbuser eosearthdata 127.0.0.1(60176) idle postgres 408 7734 0 Feb17 ?00:01:00 postgres: dbuser eosearthdata 127.0.0.1(60177) idle postgres 409 7734 0 Feb17 ?00:01:01 postgres: dbuser eosearthdata 127.0.0.1(60178) idle postgres 410 7734 0 Feb17 ?00:01:00 postgres: dbuser eosearthdata 127.0.0.1(60179) idle postgres 411 7734 0 Feb17 ?00:01:01 postgres: dbuser eosearthdata 127.0.0.1(60180) idle Starting tomcat does not start the additional postgres processes on my server. It is trying to though: Do you have Postgres running on the same machine as Tomcat? Looks like it's waiting trying to make a connection, although it's a little hard to say because it looks like you're using a custom pool (edu.unh.sr.cooa.DBPool?). Dan hi, yes, postgres and tomcat are on same server, OK. It does seem like its hanging on connection. Have you actually tried the connection details outside of Tomcat? Perhaps with a command line tool or simple Java app? it is a custom pool because when moved to production server it will be sharing tomcat and postgres resources with other web sites. I don't know your circumstances but as an fyi Tomcat can share connection pools across multiple apps on one server. For testing purposes I would be willing to make it a standard pool. If you could, that would be helpful. Thanks Dan hi, added this line to my context xml and pool connections start factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" had to get older tomcat-jdbc.jar now on to updating my web pages to use this mark Mark When I kill -3 2015-02-23 12:16:21 Full thread dump OpenJDK 64-Bit Server VM (23.25-b01 mixed mode): "http-8080-7" daemon prio=10 tid=0x7f133c1b3000 nid=0x7134 in Object.wait() [0x7f1348f39000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0xbae00240> (a org.apache.tomcat.util.net.AprEndpo int$Worker) at java.lang.Object.wait(Object.java:502) at org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java: 1511) - locked <0xbae00240> (a org.apache.tomcat.util.net.AprEndpoint$ Worker) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint
Re: Getting javax.net.ssl.SSLHandshakeException
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Deepak, On 2/24/15 9:19 AM, dku...@ccilindia.co.in wrote: > We have migrated from apache tomcat 8.0.8 to apache tomcat > 8.0.18.(to prevent the poodle attack). Note that upgrading Tomcat is not necessary to mitigate SSL POODLE. Upgrading does have other advantages, though. > But now we are facing the below issue. > > javax.net.ssl.SSLHandshakeException: Remote host closed connection > during handshake at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown > Source) at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown > Source) at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown > Source) at > com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown > Source) at > sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown > Source) at > sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown > Source) at > sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown > Source) at > sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown > Source) at > connection.ReceiveConnect.connect(ReceiveConnect.java:77) at > util.ReceiveFile.run(ReceiveFile.java:94) at > java.lang.Thread.run(Unknown Source) Caused by: > java.io.EOFException: SSL peer shut down incorrectly at > com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source) ... > 11 more > > > Any help will be greatly appreciated. Perhaps you disabled SSLv3 and a client is trying to connect using SSLv3? Try using this tool to probe your server to see what it can do: http://markmail.org/thread/tz4z44nfjl7sy2lj Also remember this: http://markmail.org/thread/ip4j45tioft4bntd - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJU7JLBAAoJEBzwKT+lPKRYT8UP/jFwpGCb0ZrNQuyOYQRtB+Fb 7vzciBQbsyXTKin7l5g2+31nP9NGFgxbrXhswJWMQL9ZQyyKxxe4H5RUagpT+IkZ yAkmh7BzTaIkCgQjEVS9y7mQK/lPG37umYcnz4/yKQ/zQKXVeKfxrlOGpNXMtxMu 0QClDNbUrmIfTOOhHmcXiwgcH7bK/mjfeDqow1IyU/mL5J5C66iTEgUEtivGmtyi yCTgWkEQaAlUoQ85Tzp6FQHHA7irIo2IQppBba+BOz2rx+GYrLil2qCaAopbE57T 5LPqrOU0uI2irlc/4wLBxR6MqS6SeZ7aaGMDPqUWfvlg+OlQBl5XFJmlISd1hwTU Sv6wwfFJ7DMvE2KqSMIAtgyM+WfvveJqvf8aE0aaDYt/ikP3mV6r3YUa7IA9r3Lf WdP69upZIZSZMu6G8npNqMzqmWjeYq/K3Rjli5a/9sERdSDA1cwxwitwWklTzEnL VP6pdjoK6UBZFrhaIDmWX4yshGQRgptycna+edh3zd9elAT3utffswAXOP063ToP KD/JmSOSOra0asZq7t6Dl+IqczK3tjByleAJdHlsxqiYGl77XnnGZzxg1qmQBQO2 dqWD+4KZay8X29N26sUWvEJBrBMrddwSRE7YU210ncGSuX4VaUy1iGiZmyCHFtoO WpZRD0ruzsx95nIJE8J/ =Fk6V -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Active Directory User Authentication Apache Tomcat 5.5 Struts Servlets JSP
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Seema, On 2/24/15 7:59 AM, Seema Patel wrote: > We are using Apache Tomcat 5.5, JDK 1.5 and have a internal portal > on our intranet which is written in java jsp struts and jsp. I know > that the tomcat and Java versions are old, but upgrading isn't a > quick thing to do without lots of testing. > > The issue we have is that the users keep getting the > authentication box popping up asking for username and password when > using the portal in Internet Explorer. One of the users has noticed > that when they use Chrome, they don't seem to get this popup > constantly. Authentication is against the Active Directory using > JCIFS (I know it's discontinued, but to re-write and test is not > feasible at the moment). The users are meant to be using Internet > Explorer as not everything works in Chrome. > > We have been trying to work out this issue for some time, with no > success. The user saying that it works in Chrome makes us wonder > if there's something within Internet Explorer that is possibly > dropping the connection or something for it to keep asking the user > for username and password. Or is there something that Internet > Explorer doesn't like with Apache Tomcat? So, this was a system working in the past, and now it does not work? Or you have been having problems for years and you are finally investigating it? If something changed recently, what was it? Are your users using a newer version of Internet Explorer (i.e. they finally migrated from MSIE 6 to something more modern)? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJU7JG5AAoJEBzwKT+lPKRYWy4P/1a2xLQEr4PWIpFvZ8+QVc27 CZ4fEJ5TVzCrOE0WqwN4COe/9M5XjvACYbLH1dKaDKXTVc/1R8sZpiQyXDGBZ7De +C5Gs76JibsmYgwECRHwJozrKbm0cZNu1JZLjTBnhHgxAxAXHw99a+EPZBisutSu 3keEL64BYmMRboKW50qVYP2PiYpcqtyCgO2uew8nwca6nPDTt2AXMAC2vd/dgNds IQ8g1RIe8ndPIl0g7YvW7t4oMzm/keMPEvLew5cbs8q47ZnE4mlukC9HtyoDEjcU NW0FvDxktF9kdnLll//xqrPB6PkF4zW+5wENBvgJcQqoZbjaNc5sUf+SOUJj+iH5 5k/klIydaCHnMjmANOwvu0z/doj3wpKVNiS12D5FTlRNzEkrmqwNlvTA2xy5P8Kt LbJwDGhBzAFQBPQGmLCKJeQMOvWn5GzXv/zzAAM1D062yaNH855JPNbUYZo0ZOub FroFiBeNdm5rLRTm4EHbFAMc2VCvpCWlAtUYh/ltTTC7ZN6tYWC8M2erfm2/8tqS /PHcnoXjAB0ADS/Yd1cNwx4//jsDmfeXZIlOPwS63gjs7goRQKbvkIdTBhRKEJYU ghOnI3vALYq7bMMjRUc6xfrfLnqt3DzGayUTTjEw7efTgO6Z436qo4hu8js2TJ6H 6GctCFmQou5ZK6I+693Z =DM3L -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Getting javax.net.ssl.SSLHandshakeException
Dear All, We have migrated from apache tomcat 8.0.8 to apache tomcat 8.0.18.(to prevent the poodle attack). But now we are facing the below issue. javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source) at connection.ReceiveConnect.connect(ReceiveConnect.java:77) at util.ReceiveFile.run(ReceiveFile.java:94) at java.lang.Thread.run(Unknown Source) Caused by: java.io.EOFException: SSL peer shut down incorrectly at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source) ... 11 more Any help will be greatly appreciated. Thanks and Regards Deepak Kumar "Disclaimer and confidentiality clause - This message and any attachments relating to official business of CCIL OR ANY OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the original addressee only. The message may contain information that is confidential and subject to legal privilege. Any views expressed in this message are those of the individual sender. If you have received this message in error, please notify the original sender immediately and destroy the message and copies thereof and any attachments contained in it . If you are not the intended recipient of this message, you are hereby notified that you must not disseminate, copy, use, distribute, or take any action in connection therewith. CCIL cannot ensure that the integrity of this communication has been maintained nor that it is free of errors, viruses, interception and/or interference. CCIL is not liable whatsoever for loss or damage resulting from the opening of this message and/or attachments and/or the use of the information contained in this message and/or attachments."
Re: when idle tomcat runs on 3.9% CPU
On Tue, Feb 24, 2015 at 7:33 AM, Peter Irbizon wrote: > Hello, > I would like to know if it is normal that tomcat7 runs on 3.9% CPU when > idle? I saw all other processes are at 0%, only tomcat7 is always at least > 3.9%. > 1.) What's your system like? How many CPUs / cores? Is it a VM or hardware? What is the specific version of Tomcat? of Java? What OS are you running? 2.) How are you determining it's idle? As John mention, do you have any apps deployed? Do you know if traffic is hitting the server? 3.) Can you run a profiler and attach it to Tomcat? It'll tell you what's happening inside the JVM. Dan
Active Directory User Authentication Apache Tomcat 5.5 Struts Servlets JSP
Hi, We are using Apache Tomcat 5.5, JDK 1.5 and have a internal portal on our intranet which is written in java jsp struts and jsp. I know that the tomcat and Java versions are old, but upgrading isn't a quick thing to do without lots of testing. The issue we have is that the users keep getting the authentication box popping up asking for username and password when using the portal in Internet Explorer. One of the users has noticed that when they use Chrome, they don't seem to get this popup constantly. Authentication is against the Active Directory using JCIFS (I know it's discontinued, but to re-write and test is not feasible at the moment). The users are meant to be using Internet Explorer as not everything works in Chrome. We have been trying to work out this issue for some time, with no success. The user saying that it works in Chrome makes us wonder if there's something within Internet Explorer that is possibly dropping the connection or something for it to keep asking the user for username and password. Or is there something that Internet Explorer doesn't like with Apache Tomcat? Any help/guidance on this issue is greatly appreciated. Thanks Seema
Re: when idle tomcat runs on 3.9% CPU
When you say idle, is there an application deployed to tomcat, or is it just the bare app server with nothing deployed? On Tue Feb 24 2015 at 7:35:31 AM Peter Irbizon wrote: > Hello, > I would like to know if it is normal that tomcat7 runs on 3.9% CPU when > idle? I saw all other processes are at 0%, only tomcat7 is always at least > 3.9%. >
when idle tomcat runs on 3.9% CPU
Hello, I would like to know if it is normal that tomcat7 runs on 3.9% CPU when idle? I saw all other processes are at 0%, only tomcat7 is always at least 3.9%.
CORS-Filter for all webapps?
Hi there, I am having issues with Cross-Origin Resource Sharing (CORS). I use Tomcat 7.0.57 with deegree-webservices 3.3.13 on both a Windows Server 2013 and Windows Pro SP1 on my localhost. I have a html with javascript-code and want to send requests with AJAX to a WFS running on the Tomcat Server. I know Tomcat (7.0.57) is able to Filter CORS-Requests and I implemented a Filter in Tomcats web.xml (in Tomcat 7.0/conf/) to allow requests from all Origins. In order to test it I put a test-file in some random Tomcat directories on the server and try to access it from localhost via an AJAX-request in my javascript-code. It Works. But as soon as I make a WFS-request to my deegree-WFS (or even if I just put the test-file in the deegree directory) I can't access it any more. Error: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 500. What I thought is if I configure the web.xml in Tomcat/conf it should be valid for all webapps and also deegree. Am I wrong? Also if I put the CORS-Filter in Tomcat/webapps/deegree-webservices-3.3.13/web-inf/web.xml it doesn't work. Somebody an idea what I am doing wrong? Cheers Eike