Re: Trying to filter noise from catalina.out.
On Tue, Nov 4, 2014 at 6:12 PM, Brandon Darbro bdar...@uievolution.com wrote: Looking for configuration help. Using tomcat7 7.0.34 from rpm package tomcat7-7.0.34-3.jpp6.noarch. Followed the instructions for using log4j for catalina.out found here: http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j These are instructions for using Log4j with Tomcat. It would enable you to control the files that Tomcat creates with log content. This includes files like catalina.-mm-dd.log, localhost.-mm-dd.log and other files that by default have the date in their name, however it does not allow you to control catalina.out. The catalina.out file represents anything written to STDOUT or STDERR by Tomcat or your applications. This would include things like an application directly writing to System.out or System.err or an application that is configured to log to STDOUT / STDERR or as some logging framework's call it the console. If you have application's writing to STDOUT / STDERR directly, you can use Tomcat's swallowOutput option to capture this output and run it through the logging system. http://tomcat.apache.org/tomcat-7.0-doc/config/context.html If you have applications that are logging to STDOUT / STDERR, you can control what's logged by editing the application specific logging configuration or by instructing them to log to a file and not STDOUT / STDERR. For the record, Tomcat writes very little to STDOUT / STDERR and it doesn't use EHCache so it's almost certain that the exception you're seeing is coming from an application. Dan Took the example log4j.properties file from the instructions above, corrected the logging paths for /var/log/tomcat7, and put it through a properties to xml converter. Replaced log4j.properties with log4j.xml, and logging is working. Now we want to try and filter out an Exception we are willing to live with, but can't have overflowing our log. Added the following filter: filter class=org.apache.log4j.filter.ExpressionFilter param name=expression value=EXCEPTION ~= java.io.NotSerializableException / param name=acceptOnMatch value=false/ /filter Yet we continue to get the exception in the log: Nov 4, 2014 1:52:45 PM net.sf.ehcache.distribution.RMISynchronousCacheReplicator replicatePutNotification SEVERE: Exception on replication of putNotification. error marshalling arguments; nested exception is: java.io.NotSerializableException: com.fakename.services.cache.ehcache.EHCacheServiceImpl. Continuing... java.rmi.MarshalException: error marshalling arguments; nested exception is: java.io.NotSerializableException: com.fakename.services.cache.ehcache.EHCacheServiceImpl at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138) ...snip... Caused by: java.io.NotSerializableException: com.fakename.services.cache.ehcache.EHCacheServiceImpl at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) ...snip... What am I doing wrong? Full xml and/or log of error available if requested. *Brandon Darbro - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 7 deployments context
Looking for deployment and configuration help. Using Tomcat 7.0.56 I'm trying to deploy my applications (WAR) using the context in the META-INF/context.xml, without luck. I've been reading the documentation and can't find a way to do this, even though the documentation says its possible. What I'm getting as the context is the name of the WAR. Is this possible to do? What files and what do I have to put inside of them? Kind regards, José
Tomcat JDBC pool - too many connections in TIME_WAIT state
Hello all! I have developed an application using Tomcat JDBC pool. Everything is fine except that the pool leaves hundreds of TCP connections in TIME_WAIT state, which kills the server sooner or later... Could you please suggest what to fix, my configuration is below: PoolProperties pp = new PoolProperties(); String connprops = oracle.net.CONNECT_TIMEOUT=3000;oracle.jdbc.ReadTimeout=3000;oracle.net.READ_TIMEOUT=3000; pp.setUsername(user); pp.setPassword(pass); pp.setConnectionProperties(connprops); pp.setDriverClassName(oracle.jdbc.OracleDriver); pp.setTestOnBorrow(true); pp.setTestOnConnect(true); pp.setTestWhileIdle(true); pp.setMaxWait(1000); pp.setMinEvictableIdleTimeMillis(1); pp.setTimeBetweenEvictionRunsMillis(5000); pp.setValidationInterval(1); pp.setValidationQuery(SELECT 1 FROM DUAL); pp.setRemoveAbandoned(true); pp.setRemoveAbandonedTimeout(5); pp.setJdbcInterceptors(org.apache.tomcat.jdbc.pool.interceptor.QueryTimeoutInterceptor(queryTimeout=3)); dataSource = new DataSource(); dataSource.setPoolProperties(pp); Thank you in advance!
Re: Tomcat server starting problem -- GET /cgi-bin/im0dcsr9/b2b_index.jsp?dpAuthProxyStatus=Fail HTTP/1.1 500 539
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ravi, On 11/4/14 11:35 PM, Goli, Ravi (FKN) - contr wrote: When I try to start the tomcat by running the httpd. I get the below internal server error displayed on the console. You are already confused, or at least I am. Apache Tomcat is a Java servlet container and Apache httpd is a (non-Java) web server. Running httpd does not launch Tomcat. Furthermore, it would be surprising to see the below message on any console. When you say concole do you mean that you used your web browser to connect and the browser displayed this message? In the access log the below highlighted is all I see. I do not understand yet, what the issue is. It was all working good. Once it was working well, what did you change? Please remember that httpd and Tomcat are different services (processes) and both need to be started in order for them to talk to each other. I am having a sofea (kind of angularJs based architecture) based application running on the tomcat. The issue started happening when I turned on my system from sleep/hibernation, basically I didn't shut down the tomcat properly before that, not sure if it was shut down even. But then I killed the tomcat and I restarted the tomcat didn't fix it. I even restarted my machine that too didn't fix it. I am still analyzing. How do you start Tomcat normally? Please share any inputs. Thanks. 127.0.0.1 - - [04/Nov/2014:22:38:01 -0500] GET /cgi-bin/im0dcsr9/b2b_index.jsp?dpAuthProxyStatus=Fail HTTP/1.1 500 539 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Did you look at any of the log files in Tomcat's logs/ directory? How have you connected httpd to Tomcat? mod_jk? mod_proxy_ajp? mod_proxy_http? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWjT5AAoJEBzwKT+lPKRYS9kQAIxqwqCMHk3yN2+hEeKi0OPk rQdkTBdiFzBPDdFcyB9YsWic+wn7JI8aZdeOK5j3S+IP2pxsSqorlxN0oZdCVKgY oPNwmNN3JrwbgJ7sItcvtifrBn+pDHe8mAvhNwwnQoN7DDJsvRFCGQc5a/YH1L9w kf4qjWChmE0ga74hWcfpeu72Veb4FImr/8wTiiQLv8mYaNtaRkI9u8kCTp4GNpKC 9lKqXyxV5kIZRlEvBoY2gtI4AjgQ6rbBdmnkVU/NU9IPXxIyzdks3upPJg7v2b2D zobPHGwCooDFlGr/bVumeo5Gve+XXs1fvGVMv9Dz6I/fqL5o77f5nJp9L/osP0hO IuE5Jza0N7cjUwIN50aMjX9nJSuoWZMtChBc4p+bFJ0yCvoxTCJAw+nUar6BTHvx 0nqWyFBFgu/ssx1hTRdGRvf570vqWskGUxdBVBMqtlDYqYVc6DiDiYIcfcRM+2/5 mw932reR/vCiAKXjuqDg119I/dRnFKYmAheOOsAl1/QwLOx7JbXqJOUQxJAlRSSS kKeHNcxN1jq+WFWoX9pjnV7pczAjIedwxIma1Mn3r6ka0AiOC3sSWShkIVrNd1Uv PKq7RvLdUh+I/xA2ahiP4uXDADCLFfss7M/1i7Qs53goCeI+OmXx1MqaqpJiSgR/ o4gSJZHVusILJhC33TB3 =xKSJ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat JDBC pool - too many connections in TIME_WAIT state
On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta v.b.kuk...@gmail.com wrote: Hello all! I have developed an application using Tomcat JDBC pool. Everything is fine except that the pool leaves hundreds of TCP connections in TIME_WAIT state, I have to ask, but are you sure it's the pool? TCP connections in the TIME_WAIT state would indicate that a connection was closed. Given that the job of the pool is to keep the connections open and reuse them, it just seems a little odd. which kills the server sooner or later... Could you please suggest what to fix, my configuration is below: PoolProperties pp = new PoolProperties(); String connprops = oracle.net.CONNECT_TIMEOUT=3000;oracle.jdbc.ReadTimeout=3000;oracle.net.READ_TIMEOUT=3000; pp.setUsername(user); pp.setPassword(pass); pp.setConnectionProperties(connprops); pp.setDriverClassName(oracle.jdbc.OracleDriver); pp.setTestOnBorrow(true); pp.setTestOnConnect(true); pp.setTestWhileIdle(true); pp.setMaxWait(1000); pp.setMinEvictableIdleTimeMillis(1); pp.setTimeBetweenEvictionRunsMillis(5000); pp.setValidationInterval(1); pp.setValidationQuery(SELECT 1 FROM DUAL); pp.setRemoveAbandoned(true); pp.setRemoveAbandonedTimeout(5); pp.setJdbcInterceptors(org.apache.tomcat.jdbc.pool.interceptor.QueryTimeoutInterceptor(queryTimeout=3)); dataSource = new DataSource(); dataSource.setPoolProperties(pp); Nothing is jumping out at me as incorrect. Maybe try without the connection properties (i.e. the driver level timeouts)? Maybe try increasing the log level for org.apache.tomcat.jdbc.pool to FINEST or DEBUG. That might generate some additional logging to show why the connections are being closed. Also, check that your server is not timing out the connection, perhaps due to a server side limit. I've see this happen a lot. Although it seems unlikely, it's probably also worth checking that there's no firewall or network device that could be closing the connections. Dan Thank you in advance!
Re: Trying to filter noise from catalina.out.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Daniel, On 11/5/14 7:31 AM, Daniel Mikusa wrote: On Tue, Nov 4, 2014 at 6:12 PM, Brandon Darbro bdar...@uievolution.com wrote: Looking for configuration help. Using tomcat7 7.0.34 from rpm package tomcat7-7.0.34-3.jpp6.noarch. Followed the instructions for using log4j for catalina.out found here: http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j These are instructions for using Log4j with Tomcat. It would enable you to control the files that Tomcat creates with log content. This includes files like catalina.-mm-dd.log, localhost.-mm-dd.log and other files that by default have the date in their name, however it does not allow you to control catalina.out. Yes and no. You can't control things like file rotation using log4j, but you can affect some of the logging that ends up going to the console. You need to make sure that all logs are being either filtered completely (like logger.com.fakename.services.cache.ehcache.level=ERROR) or directed to a different appender (aka log destination) by doing logger.com.fakename.services.cache.ehcache=[level],APPENDER where APPENDER is the log destination where the logs should flow. I believe by default that a log of things go to the console, and thus into catalina.out. The catalina.out file represents anything written to STDOUT or STDERR by Tomcat or your applications. This would include things like an application directly writing to System.out or System.err or an application that is configured to log to STDOUT / STDERR or as some logging framework's call it the console. If you have application's writing to STDOUT / STDERR directly, you can use Tomcat's swallowOutput option to capture this output and run it through the logging system. http://tomcat.apache.org/tomcat-7.0-doc/config/context.html If you have applications that are logging to STDOUT / STDERR, you can control what's logged by editing the application specific logging configuration or by instructing them to log to a file and not STDOUT / STDERR. Well, yes, but the better solution is to stop using System.out and System.err and instead use a proper logger. Using commons-logging works great. If replacing System.(out|err) represents a big job, then you can cheat a bit and put swallowOutput=true in your Context element to redirect these streams to the application logger (which must be properly configured). Then all that noise won't go to catalina.out. For the record, Tomcat writes very little to STDOUT / STDERR and it doesn't use EHCache so it's almost certain that the exception you're seeing is coming from an application. Tomcat's current trunk has exactly 64 System.(out|err).print statements (which actually might be move than necessary) and those are usually printed in cases of sever problems (like OutOfMemoryError, where you can't rely on the logging system to work properly). Most of the drivel that is written to catalina.out can be filtered or written to other logs by changing the defaults. Anything coming from the application should be the responsibility of the application author. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWjlDAAoJEBzwKT+lPKRY8a8QAMJqVxay4h3Lml3p1v1SnaGf y6VQ1MeEj9NsOjEn9grImnCuL8cA6A6/BYALXmDGP+Tso/rw0Id98SAKtAelwDq1 zr8WmAIrOtyrE2UgGV8L7WvWTtJs+K9YZdZF+ChQNAfuQAFnnVxieH9uW7QepCQs 9dSp1mjyj8J/NGxTc01T/7l3E2DFoCJ8Z1wqUUa+HURyn3EXd8VW/b9Bxslvw99K e1FN+IksjZDYGrxjf1Ofom2XsPb42Wy76OJffqCTbCYuui2bM1O7BFnbH/001MAc Qt8hFUiLf70SjKH0tF2EOT1ZXRNr2PKNqckkJooUfroMq27pnTnVfsMrBsAcJBr2 ZxywqSWc2b0iQuXm85eDlTVoYg6L61DhvHnsQhhclJEvw5c4pUTA5fguuw1hQ4Qg Ga9P5UbkWOtrrlMS6Ofa6wQkPf8uKDExHmAC4lxta6IUAD8DTlypn1TDlzgh/QZc v9BzUuNF0WuqYpQ2u+PpcomQAKY9l9KG2B0nlMZKR2F5saDF/Johm036v4fj24Sp AuzW3gHKyCqVcKtOkwH/s8SvFrzsW7Tf66qe0fnWpAUtmsFD2YntoTE6hDerHPvE eau0gKRhXOhOmEwMLEVwrFrb3YCFNaQzbHl0NihoC2TpbesaxPaA9zdEsHY3FLHs /wJmuNKZop71DAt3oo0e =KhTg -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Weird (apocryphal) reference to Tomcat in Wikipedia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, I was reading the Wikipedia entry on .properties format yesterday (http://en.wikipedia.org/wiki/.properties) and I saw a mention of Apache Tomcat that doesn't make any kind of sense to me: In Apache Tomcat the exclamation mark denotes a Negation operator when used as the first non blank character in a line[citation needed]. I'm the one that added the [citation needed] with a note that I think this is false. Does anyone know if there was some kind of ancient version of Tomcat that read its own .properties files and added some kind of magic to do what the above says? I think it's a complete fabrication with no basis in reality. Any ideas? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWjnkAAoJEBzwKT+lPKRY8pUQAMK+pSKZ0DCVJtHIEtyWPkW7 hMjUof2+j4ycs/xPUuvAM1wxBDk7JwxMCstvL1ARrmbAjFaCqWnf6xbhT929prjC 1uc+h7Dl2mzcqm0wgU2CQMpx3ryd2fQ8it9BpqF+Fm9YNoMQM2jFI5r/v3NLTTlr m18ag0TPvdgfJR3nQE63WzhqIRGHDIK4drfzJDXWSs4yK1gjXr9nmXwuSYWbthal FnOspepPXXBR6FuQAZu+8niNtFC4UZ9fF2ZO2m+xNc72TSHCrblmNl6HcZ/gKhGK 8o9VzS/K90w7Dsaurfi89onHdY7TLdECqbMuBsNASY6Gfb12Av07pItSIfMOtF7S +nyYsAROHm8+yDD1wu1tF1UvFTY5ZS2mhr7iZ03gBjBqDXjEm2Ux3WPBr7jg1Fv5 MxASa7owd6j7/9kDQBj/7BHp/8eOHpVnDCRSc7hvdtRwzul47ZXcahCOTRui0WHb SST7QM8aNiasCRX7GTY1JOhJLYNbgD8sCiiRXbTeLKeSh+SRGWuQ7McfByI4A4He VbR069JmMnZR/d6TFx4jpciHgS1DLWKjBvARHdYouaztb+zBMmnjIBj19TYshkCG 8OQqnUBC5ht+zbjVOH2Cx+z7BnFLoduf7sa3cwpJjPVty1lFNmXkxaOZ5/XaORI8 FlICnpF8rKy4F/D95l8K =quF/ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Weird (apocryphal) reference to Tomcat in Wikipedia
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, I was reading the Wikipedia entry on .properties format yesterday (http://en.wikipedia.org/wiki/.properties) and I saw a mention of Apache Tomcat that doesn't make any kind of sense to me: In Apache Tomcat the exclamation mark denotes a Negation operator when used as the first non blank character in a line[citation needed]. I'm the one that added the [citation needed] with a note that I think this is false. Does anyone know if there was some kind of ancient version of Tomcat that read its own .properties files and added some kind of magic to do what the above says? I think it's a complete fabrication with no basis in reality. Any ideas? Maybe a very indirect reference to : http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html (see : Exclusions and rule disabling) but, like you, I think that this reference is quite irrelevant in that Wikipedia article. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Weird (apocryphal) reference to Tomcat in Wikipedia
On Wed, Nov 5, 2014 at 9:31 AM, André Warnier a...@ice-sa.com wrote: Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, I was reading the Wikipedia entry on .properties format yesterday (http://en.wikipedia.org/wiki/.properties) and I saw a mention of Apache Tomcat that doesn't make any kind of sense to me: In Apache Tomcat the exclamation mark denotes a Negation operator when used as the first non blank character in a line[citation needed]. I'm the one that added the [citation needed] with a note that I think this is false. Does anyone know if there was some kind of ancient version of Tomcat that read its own .properties files and added some kind of magic to do what the above says? I think it's a complete fabrication with no basis in reality. Any ideas? Maybe a very indirect reference to : http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html (see : Exclusions and rule disabling) but, like you, I think that this reference is quite irrelevant in that Wikipedia article. Nice find André! bonus points.
Re: Weird (apocryphal) reference to Tomcat in Wikipedia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 11/5/14 10:31 AM, André Warnier wrote: Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, I was reading the Wikipedia entry on .properties format yesterday (http://en.wikipedia.org/wiki/.properties) and I saw a mention of Apache Tomcat that doesn't make any kind of sense to me: In Apache Tomcat the exclamation mark denotes a Negation operator when used as the first non blank character in a line[citation needed]. I'm the one that added the [citation needed] with a note that I think this is false. Does anyone know if there was some kind of ancient version of Tomcat that read its own .properties files and added some kind of magic to do what the above says? I think it's a complete fabrication with no basis in reality. Any ideas? Maybe a very indirect reference to : http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html (see : Exclusions and rule disabling) Good call. This actually might be the source of that text. but, like you, I think that this reference is quite irrelevant in that Wikipedia article. I agree. This is one single instance of one file that typically ends in .properties that has these semantics. It's not even correct to say that Apache Tomcat does this... it's really Apache mod_jk that does this, and mod_jk isn't a Java program (though of course, .properties isn't exclusive to the Java world). I'm sure that mod_jk doesn't follow the exact rules of Java .properties specifications like using \ as an escape character, trimming leading spaces, etc. I think I'll update the Wikipedia article. Rather than removing the text, I think I'll move it into another section and explain. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWkSkAAoJEBzwKT+lPKRYsvUP/3+jCHDiAkVhVZJOYB9eqd0V RIlTwxM0nJ5aT8E00IvPtzKY96wm1tk1ealNtYBPz8Y80IQ+8qSunNfVgTxHfWX+ bUjm09JNRoNeic2QDBMGzgVUtCGRZ98CEWrbMmbk2WW6cWN/q15kgt283INe8x9B fPz2GWSxUMUxbSMJJITXa4Iy9MzrgY3FLVlz4+86UosBla2GrJisO/gK2MWhLi2H m1EB8+eBk3gGfti7aiyxcuUo9IRHz30Er5VCoMWbmpSdRMURkid3sIb1jHuKYcB7 fDaq7TB+2GZPkg/jfSGiopkqgmZsUhN/N0kNghKj8lmKC5uRGFT8CEPWbLlnFNvN 2bvDpAtc9jwaMUWGWuFbcM7O50Gxl/1JmnuxfHBfpQ68jPUE2VypOFQcik7RZtYx fAPwSnETWNozhhDvTziZOOGb2qcLz7eEH7WsWeaTI1G0A1fqCeOWUjx2pIeDIHtG qObh51c0+iymlYBh0DE/PS5jb3s5PN2m4Jp6GFGqbKuaTIXVe6T+Jl/2xwaZ8YxO SY4Upv4scnFPJTJzIBqbI8zK/hFwjFnZbfD5MXs65LEzgs9gSrXNPp0t2r8pVHG8 bNHLtRhoiQjnlg1s+EuoiGqDHwO7HwpVD4045/U/cGpkD+2CltsIQ0aX0JSiVIoG Vvg1GLhJqc+3rYCduvBo =VJ5E -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 7 deployments context
What am I doing wrong or its not possible at all? Saludos cordiales, José Ignacio Monreal Bailey | Ingeniero Civil en Computación *Cuidemos del medio ambiente. Por favor no imprimas este e-mail si no es necesario.* On Wed, Nov 5, 2014 at 10:22 AM, Jose Monreal jmonr...@gmail.com wrote: Looking for deployment and configuration help. Using Tomcat 7.0.56 I'm trying to deploy my applications (WAR) using the context in the META-INF/context.xml, without luck. I've been reading the documentation and can't find a way to do this, even though the documentation says its possible. What I'm getting as the context is the name of the WAR. Is this possible to do? What files and what do I have to put inside of them? Kind regards, José
RE: Tomcat 7 deployments context
From: Jose Monreal [mailto:jmonr...@gmail.com] Subject: Tomcat 7 deployments context Using Tomcat 7.0.56 I'm trying to deploy my applications (WAR) using the context in the META-INF/context.xml, without luck. What exactly have you set in your context.xml? What exactly does or does not happen? I've been reading the documentation and can't find a way to do this, even though the documentation says its possible. To do what? What I'm getting as the context is the name of the WAR. Which is precisely what you should get and the documentation clearly states that. Is this possible to do? Is what possible to do? You've provided essentially no information about what you're trying to do, what you've attempted, and what the results were. We're not mind readers. - 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: Tomcat 7 deployments context
Sorry for the but information or no information at all provided. What I'm trying to achieve is that when deploying my app on tomcat, this will take the context from the META-INF/context.xml and deploy it with that path(context) that's different from the name of the war. From the documentation I get that disabling autoDeploy and deployOnStartup should do the job, but with that configuration tomcat won't deploy anything at all, not even the apps already deployed in the webapps directory. Lets say my war filename is myapp.war but the context is /ws/test/application/2.3/, Is it possible for tomcat to take that context and deploy the app with that context? how? - José On Wed, Nov 5, 2014 at 2:39 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Jose Monreal [mailto:jmonr...@gmail.com] Subject: Tomcat 7 deployments context Using Tomcat 7.0.56 I'm trying to deploy my applications (WAR) using the context in the META-INF/context.xml, without luck. What exactly have you set in your context.xml? What exactly does or does not happen? I've been reading the documentation and can't find a way to do this, even though the documentation says its possible. To do what? What I'm getting as the context is the name of the WAR. Which is precisely what you should get and the documentation clearly states that. Is this possible to do? Is what possible to do? You've provided essentially no information about what you're trying to do, what you've attempted, and what the results were. We're not mind readers. - 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: Tomcat 7 deployments context
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jose, On 11/5/14 12:51 PM, Jose Monreal wrote: Sorry for the but information or no information at all provided. What I'm trying to achieve is that when deploying my app on tomcat, this will take the context from the META-INF/context.xml and deploy it with that path(context) that's different from the name of the war. You need to take your META-INF/context.xml file and put it into CATALINA_BASE/conf/[engine]/[host]/[appname].xml From the documentation I get that disabling autoDeploy and deployOnStartup should do the job, but with that configuration tomcat won't deploy anything at all, not even the apps already deployed in the webapps directory. It will deploy the applications in conf/.../[appname].xml as above. Lets say my war filename is myapp.war but the context is /ws/test/application/2.3/, Is it possible for tomcat to take that context and deploy the app with that context? how? Take your META-INF/context.xml file and copy it into CATALINA_BASE/conf/[engine]/[host]/ws#test#application#2.3.xml [engine] the name of your Engine in server.xml and it almost always Catalina. [host] is the name of the Host under which the context should be deployed. If you are using a default configuration (which seems like a good idea in general), this will be localhost. So, put your file into CATALINA_BASE/conf/[engine]/[host]/ws#test#application#2.3.xml Make sure that you: 1. Remove any path parameter from Context 2. Add a docBase to your ws#test#application#2.3.xml pointing to the WAR 2. Either keep autoDeploy=false or move your WAR file out of webapps/ and adjust the docBase in your deployment descriptor accordingly, otherwise you'll get a double-deployment Please read http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context before replying again. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWmupAAoJEBzwKT+lPKRY8xsP/AtD705SRAfih3sy7X5zPgGu 2SbuoOzIvjJc9hFgGOlaA1PTGKsibtX8U2kY23jylNyakt/UvQhlx76hRVPj5lI6 4IHXj3zn9u+shFo0zFKneGpDbNEmgA/v7kMt0VP0xZROCFjdjO2Jxq3Cwrmmk7K8 8cRuK3J0FA3ABrDTQAKfzqTmhVmElPIiDnp8KRIlUekiqBmgAskeoflO67eYKDsH 6Tg3gjuGiJL+9Dc8kA8my6Qtxs+I7/j2oGk3sbfQ3sruPwarbQS+ZA7JNaugUarJ A3uaNXs2Fw3e55x0Zp9ud5SCe+J4sBEgPsQAuCRYQAwm/6JU5hWEN6SinEwvZnhQ ZU+1NtfghBSUkHNvazbcxGUlXpwJAwHj3fwEk4ezIkv4bCUm7rj0snQf24kFl777 6jbv6ih8n/TSkS94HWmd4EKFEla0nEWzYC3u335fWFzopS+zaaSriQUQVldsQmPa IV2/ZMNsRLnqrTXyG0uSWZs12ScLMIBDyu4nnnd7HRpd++A2ACi0cePOeSWv3BvD bdTQVWj6JAgcPY2fXLcFSs6uVfJJXMB/24nNtTWxjakKgAeGXae9tW+9iUpoG0Za 4246P8D71SH8p451+Zb0RXObKuTIdK4E4iYJBYe7Vc94C2qSchJbGwVt09p7JDN8 0XEwugAjlPhV8uBLJw+Q =lqob -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Security Best Practices on Windows Service
hi, what are the security best practices for running Tomcat as a Windows Service? is the local system account safe or am I better off creating a new user and giving it write permissions only to the Tomcat runtime folders and read permissions to the web contents folder? TIA -- Igal Sapir Railo Core Developer http://getRailo.org/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Moving tomcat Ver 6.0
Hi All Sorry new user to this We have a Win server 2003 running Tomcat and our software I need to move this to a new win 2008 R2 server Is there an easy way to move everything over etc. Looking at easiest way to move everything over. Or if you are familiar with this and can assist setting up and moving could look at that possibility as well Nick Wall AScT IT Manager nick.w...@mvtcanada.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Trying to filter noise from catalina.out.
Am 05.11.2014 um 00:12 schrieb Brandon Darbro: Looking for configuration help. Using tomcat7 7.0.34 from rpm package tomcat7-7.0.34-3.jpp6.noarch. Followed the instructions for using log4j for catalina.out found here: http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j Took the example log4j.properties file from the instructions above, corrected the logging paths for /var/log/tomcat7, and put it through a properties to xml converter. Replaced log4j.properties with log4j.xml, and logging is working. Now we want to try and filter out an Exception we are willing to live with, but can't have overflowing our log. Added the following filter: filter class=org.apache.log4j.filter.ExpressionFilter param name=expression value=EXCEPTION ~= java.io.NotSerializableException / param name=acceptOnMatch value=false/ /filter Yet we continue to get the exception in the log: Nov 4, 2014 1:52:45 PM net.sf.ehcache.distribution.RMISynchronousCacheReplicator replicatePutNotification SEVERE: Exception on replication of putNotification. error marshalling arguments; nested exception is: java.io.NotSerializableException: com.fakename.services.cache.ehcache.EHCacheServiceImpl. Continuing... java.rmi.MarshalException: error marshalling arguments; nested exception is: java.io.NotSerializableException: com.fakename.services.cache.ehcache.EHCacheServiceImpl at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138) ...snip... Caused by: java.io.NotSerializableException: com.fakename.services.cache.ehcache.EHCacheServiceImpl at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) ...snip... What am I doing wrong? Full xml and/or log of error available if requested. The formatting of this message looks like it is *not* written using Log4J, but instead using java.util.logging. To rule out mail reformatting: If the Date and timestamp is on one line, and the text starting with SEVERE on the second line, then my guess is correct. As others are indicating: these messages are not written by Tomcat, but instead by your application, which seems to use java.util.logging, which by default loggs to console = STDOUT which is redirected by Tomcat catalina.sh script to catalina.out. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Weird (apocryphal) reference to Tomcat in Wikipedia
Am 05.11.2014 um 16:39 schrieb Christopher Schultz: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 11/5/14 10:31 AM, André Warnier wrote: Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, I was reading the Wikipedia entry on .properties format yesterday (http://en.wikipedia.org/wiki/.properties) and I saw a mention of Apache Tomcat that doesn't make any kind of sense to me: In Apache Tomcat the exclamation mark denotes a Negation operator when used as the first non blank character in a line[citation needed]. I'm the one that added the [citation needed] with a note that I think this is false. Does anyone know if there was some kind of ancient version of Tomcat that read its own .properties files and added some kind of magic to do what the above says? I think it's a complete fabrication with no basis in reality. Any ideas? Maybe a very indirect reference to : http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html (see : Exclusions and rule disabling) Good call. This actually might be the source of that text. but, like you, I think that this reference is quite irrelevant in that Wikipedia article. I agree. This is one single instance of one file that typically ends in .properties that has these semantics. It's not even correct to say that Apache Tomcat does this... it's really Apache mod_jk that does this, and mod_jk isn't a Java program (though of course, .properties isn't exclusive to the Java world). I'm sure that mod_jk doesn't follow the exact rules of Java .properties specifications like using \ as an escape character, trimming leading spaces, etc. I think I'll update the Wikipedia article. Rather than removing the text, I think I'll move it into another section and explain. If you don't want to remove it, you can add it as an example for existing custom variations of the properties format. Note though, that uriworkermap.properties does not implement most of the standard specifics of the Java properties file format, so it is not a superset. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat JDBC pool - too many connections in TIME_WAIT state
this is part of the TCP lifecycle, you can adjust this timeout yourself on the Operating system level http://www.cs.northwestern.edu/~agupta/cs340/project2/TCPIP_State_Transition_Diagram.pdf cat /proc/sys/net/ipv4/tcp_fin_timeoutecho 15 /proc/sys/net/ipv4/tcp_fin_timeout On Wed, Nov 5, 2014 at 7:36 AM, Daniel Mikusa dmik...@pivotal.io wrote: On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta v.b.kuk...@gmail.com wrote: Hello all! I have developed an application using Tomcat JDBC pool. Everything is fine except that the pool leaves hundreds of TCP connections in TIME_WAIT state, I have to ask, but are you sure it's the pool? TCP connections in the TIME_WAIT state would indicate that a connection was closed. Given that the job of the pool is to keep the connections open and reuse them, it just seems a little odd. which kills the server sooner or later... Could you please suggest what to fix, my configuration is below: PoolProperties pp = new PoolProperties(); String connprops = oracle.net.CONNECT_TIMEOUT=3000;oracle.jdbc.ReadTimeout=3000;oracle.net.READ_TIMEOUT=3000; pp.setUsername(user); pp.setPassword(pass); pp.setConnectionProperties(connprops); pp.setDriverClassName(oracle.jdbc.OracleDriver); pp.setTestOnBorrow(true); pp.setTestOnConnect(true); pp.setTestWhileIdle(true); pp.setMaxWait(1000); pp.setMinEvictableIdleTimeMillis(1); pp.setTimeBetweenEvictionRunsMillis(5000); pp.setValidationInterval(1); pp.setValidationQuery(SELECT 1 FROM DUAL); pp.setRemoveAbandoned(true); pp.setRemoveAbandonedTimeout(5); pp.setJdbcInterceptors(org.apache.tomcat.jdbc.pool.interceptor.QueryTimeoutInterceptor(queryTimeout=3)); dataSource = new DataSource(); dataSource.setPoolProperties(pp); Nothing is jumping out at me as incorrect. Maybe try without the connection properties (i.e. the driver level timeouts)? Maybe try increasing the log level for org.apache.tomcat.jdbc.pool to FINEST or DEBUG. That might generate some additional logging to show why the connections are being closed. Also, check that your server is not timing out the connection, perhaps due to a server side limit. I've see this happen a lot. Although it seems unlikely, it's probably also worth checking that there's no firewall or network device that could be closing the connections. Dan Thank you in advance!
Re: Security Best Practices on Windows Service
On Wed, Nov 5, 2014 at 1:34 PM, Igal @ getRailo.org i...@getrailo.org wrote: hi, what are the security best practices for running Tomcat as a Windows Service? is the local system account safe Define safe. LocalSystem has too many privs that a Tomcat service account doesn't need in my opinion. or am I better off creating a new user and giving it write permissions only to the Tomcat runtime folders and read permissions to the web contents folder? In my previous employment, we did that. Create a local user account and set permissions to the Tomcat installation directory and optional CATALINA_BASE (if you separated them). We did not use domain accounts for the Tomcat service account because the Tomcat service account did not need access to network resources in our setup. Create a strong password. Leo
Re: Moving tomcat Ver 6.0
On Wed, Nov 5, 2014 at 1:48 PM, Nick Wall nick.w...@mvtcanada.com wrote: Hi All Sorry new user to this We have a Win server 2003 running Tomcat and our software I need to move this to a new win 2008 R2 server Is there an easy way to move everything over etc. Looking at easiest way to move everything over. Or if you are familiar with this and can assist setting up and moving could look at that possibility as well Nick Wall AScT IT Manager nick.w...@mvtcanada.com You might as well consider getting the latest version of Tomcat while you're at it, and then moving your webapps to that new installation. You will want to check the customizations (if you made any) in web.xml, server.xml, tomcat-users.xml and anything under conf/Catalina/localhost that you placed there intentionally in the 2003 Tomcat installation. Don't forget to use the same service account, if you created one. You will also want to check the 2003 tomcat7w.exe for any custom options you used there, like memory settings, etc. leo
RE: Moving tomcat Ver 6.0
-Original Message- From: Leo Donahue [mailto:donahu...@gmail.com] Sent: November-05-14 12:32 PM To: Tomcat Users List Subject: Re: Moving tomcat Ver 6.0 On Wed, Nov 5, 2014 at 1:48 PM, Nick Wall nick.w...@mvtcanada.com wrote: Hi All Sorry new user to this We have a Win server 2003 running Tomcat and our software I need to move this to a new win 2008 R2 server Is there an easy way to move everything over etc. Looking at easiest way to move everything over. Or if you are familiar with this and can assist setting up and moving could look at that possibility as well Nick Wall AScT IT Manager nick.w...@mvtcanada.com You might as well consider getting the latest version of Tomcat while you're at it, and then moving your webapps to that new installation. You will want to check the customizations (if you made any) in web.xml, server.xml, tomcat-users.xml and anything under conf/Catalina/localhost that you placed there intentionally in the 2003 Tomcat installation. Don't forget to use the same service account, if you created one. You will also want to check the 2003 tomcat7w.exe for any custom options you used there, like memory settings, etc. Leo HI Leo Thanks for the reply and info :) Can I just copy the folder/files you mention and put in the new installation on the 2008 server ? As for a service account I have no idea if one exists as this was installed about 5 yrs ago and no one is left in the company that knows anything about it - Hence why I'm on this :) lol Nick
Re: Moving tomcat Ver 6.0
On Wed, Nov 5, 2014 at 2:36 PM, Nick Wall nick.w...@mvtcanada.com wrote: -Original Message- From: Leo Donahue [mailto:donahu...@gmail.com] Sent: November-05-14 12:32 PM To: Tomcat Users List Subject: Re: Moving tomcat Ver 6.0 On Wed, Nov 5, 2014 at 1:48 PM, Nick Wall nick.w...@mvtcanada.com wrote: Hi All Sorry new user to this We have a Win server 2003 running Tomcat and our software I need to move this to a new win 2008 R2 server Is there an easy way to move everything over etc. Looking at easiest way to move everything over. Or if you are familiar with this and can assist setting up and moving could look at that possibility as well Nick Wall AScT IT Manager nick.w...@mvtcanada.com You might as well consider getting the latest version of Tomcat while you're at it, and then moving your webapps to that new installation. You will want to check the customizations (if you made any) in web.xml, server.xml, tomcat-users.xml and anything under conf/Catalina/localhost that you placed there intentionally in the 2003 Tomcat installation. Don't forget to use the same service account, if you created one. You will also want to check the 2003 tomcat7w.exe for any custom options you used there, like memory settings, etc. Leo HI Leo Thanks for the reply and info :) Can I just copy the folder/files you mention and put in the new installation on the 2008 server ? If the installation was done using the Tomcat zip version and it is not running as a windows service, yes, you should be able to do that. Don't put all your eggs in this basket for the moment, you need more info. As for a service account I have no idea if one exists as this was installed about 5 yrs ago and no one is left in the company that knows anything about it - Hence why I'm on this :) lol Nick I kinda wonder though if there is a windows service associated with this Tomcat. Do you see anything called Tomcat6 in the windows services panel?
RE: Moving tomcat Ver 6.0
-Original Message- From: Leo Donahue [mailto:donahu...@gmail.com] Sent: November-05-14 12:47 PM To: Tomcat Users List Subject: Re: Moving tomcat Ver 6.0 On Wed, Nov 5, 2014 at 2:36 PM, Nick Wall nick.w...@mvtcanada.com wrote: -Original Message- From: Leo Donahue [mailto:donahu...@gmail.com] Sent: November-05-14 12:32 PM To: Tomcat Users List Subject: Re: Moving tomcat Ver 6.0 On Wed, Nov 5, 2014 at 1:48 PM, Nick Wall nick.w...@mvtcanada.com wrote: Hi All Sorry new user to this We have a Win server 2003 running Tomcat and our software I need to move this to a new win 2008 R2 server Is there an easy way to move everything over etc. Looking at easiest way to move everything over. Or if you are familiar with this and can assist setting up and moving could look at that possibility as well Nick Wall AScT IT Manager nick.w...@mvtcanada.com You might as well consider getting the latest version of Tomcat while you're at it, and then moving your webapps to that new installation. You will want to check the customizations (if you made any) in web.xml, server.xml, tomcat-users.xml and anything under conf/Catalina/localhost that you placed there intentionally in the 2003 Tomcat installation. Don't forget to use the same service account, if you created one. You will also want to check the 2003 tomcat7w.exe for any custom options you used there, like memory settings, etc. Leo HI Leo Thanks for the reply and info :) Can I just copy the folder/files you mention and put in the new installation on the 2008 server ? If the installation was done using the Tomcat zip version and it is not running as a windows service, yes, you should be able to do that. Don't put all your eggs in this basket for the moment, you need more info. As for a service account I have no idea if one exists as this was installed about 5 yrs ago and no one is left in the company that knows anything about it - Hence why I'm on this :) lol Nick I kinda wonder though if there is a windows service associated with this Tomcat. Do you see anything called Tomcat6 in the windows services panel? Leo Yes I just checked and there is a service running called Apache Tomcat As you can tell I have no clue to this installation :) Nick
Re: Moving tomcat Ver 6.0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Nick, On 11/5/14 2:48 PM, Nick Wall wrote: We have a Win server 2003 running Tomcat and our software I need to move this to a new win 2008 R2 server Is there an easy way to move everything over etc. Looking at easiest way to move everything over. It depends upon how you have everything set up. If you have a mostly default configuration and all your web applications are deployed into Tomcat's webapps/ directory, then you should be able to just copy the whole Tomcat directory from one machine to another. There are a few caveats: 1. If you are switching architectures (e.g. 32-bit to 64-bit, IA64 to x86_64, etc.) and you are using the tcnative library, then you'll have to make sure you place the library that matches your destination architecture into the right place (usually Tomcat's bin/ directory). 2. If you are running Tomcat as a Windows Service, then you'll have to re-register the service on the target machine once you've moved the files over. You can get a lot of mileage out of running the following on the command-line of the destination server: C:\ SET CATALINA_HOME=C:\Path\To\Tomcat C:\ SET CATALINA_BASE=C:\Path\To\Tomcat C:\ %CATALINA_HOME%\bin\service.bat install You might want to run CATALINA_HOME\bin\tomcat6w.exe on the old machine and make sure all your settings are copied-over to the new one. 3. You may have net networking components of services on the destination machine, so make sure you don't have any port conflicts. The easiest way to check for this is to start Tomcat and look at the catalina.out log file in Tomcat's logs/ directory. If it doesn't say anything about not being able to bind to a port, then you should be okay. Or if you are familiar with this and can assist setting up and moving could look at that possibility as well You can contact folks off-list if they invite you to do so. I'm not a great resource for Windows deployments, but I'll happily take your money and help you out ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWo7CAAoJEBzwKT+lPKRYZsMP/jIK+bNJpQ+YFMXXxBkXQloc JZonapaGyQhMx9sfYph/vjMwYhfEIAHktbyHqL962hpzSOfDf5bP11HX5UuJY66V PswNQNXhnyZbPHFVvItjBLv18+UwBClGxzgjjrcQXuzInLmyPdine6gzLxrWmPRL N00qCrKgWQh0bXT3C61xnmMTtj40aRGehZKwH1MiuMHTrnr0Ass5feqzMwO4JEgy u/BKzm8qcg36OCR8dvZ4XSl6TeDcDGakQWai25SXZUnNix/dmfBiMdsLXEBdAsCY LZyyqKj0d1G3iVBqqw1E+4qdKtCv5dXgBNz6qkQFpV9Z2isNGNvSezxympvX8VxD WV8CeYpuSJ5nOW2ukWjpuq+tJw3RF7HvR1uqJpkyQSJ85smc16Vri8H2PudjZN3/ hMyLlTWwEBOotFB4nHaJfSVQ0PfwuZxngk4PWjhi7mhOkSIsKX9FoghtJ/zWJCjR 5X5s2BwaytE9zxlsiyhM/C9cMdW2bxeQ5wbb5ROCrE97V1yvNZRyOvfd4UCE+POd Ora6NHbyh07rQJDmin7nBcYVTtLU9wtEfEvnMJH4/63zWN5xjzmlK0by9eBn9vbE Climj9nyVNquC1rj12bP6bZi57QXrRUUyyc/RPd3WKY/9z45Z94xAtu/Vn/d/4EN FFg8R/OQcTXO3kPQMjJw =22/F -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Weird (apocryphal) reference to Tomcat in Wikipedia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, On 11/5/14 9:53 AM, Christopher Schultz wrote: All, I was reading the Wikipedia entry on .properties format yesterday (http://en.wikipedia.org/wiki/.properties) and I saw a mention of Apache Tomcat that doesn't make any kind of sense to me: In Apache Tomcat the exclamation mark denotes a Negation operator when used as the first non blank character in a line[citation needed]. I'm the one that added the [citation needed] with a note that I think this is false. Does anyone know if there was some kind of ancient version of Tomcat that read its own .properties files and added some kind of magic to do what the above says? I think it's a complete fabrication with no basis in reality. Any ideas? Leo pointed out that the Wikipedia page for Apache Tomcat is an atrocity in and of itself. I would encourage anyone who has any free time to go in there and make appropriate edits. I fixed the introduction a bit today, but it looks like the whole thing could use an overhaul. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWo+AAAoJEBzwKT+lPKRYc4YP/jyZ8QdoYIRtabRGgBBSCJJV 4WjIdE/fuf4nK6Zm5le82uQVp/svkJYPu6AaDCZ77Ar4OZcagMbuIj4rRXLa/urA krlVKxiWxCMT7iDZeYaIhMxsTCzglfFqcbM3zfgHRbPSlmt0O9YuJFL/S+bN8NsE GkCx56YbdU0zPDYiYOKNfrzElDizaKhpkyHY6ApGaDolXhTDf5kJXtaNHKuBcqML +Mwebnd5UpxfXGfzPD0lMiN4pdXylTaeClPseathX/KjPBj8iG0FD5kCC/8CLX3b BzhhV8fc7CmZ8Y/IROA9weYG5OeHPOOyo4nWr2aFX3oKCN8yJrarbZQhIMyM8FDc /Xtuhf9JXAfX3KL611YkchOFMXDkJ8PnpmYUph5CJGl5bNnjAJPbK26Ny7UpIDVw YfIfHFO3wUZVT7YVW61sA4HA/gL4Kz+t8GGUbKUJ0tHW2mx7qZ+6isQQsMwFSkPc sgPF8JCoVfTOs1LbUZiwxjw333DBv7agUcIFNyxgUnOUuDbjHLZAKt0T6xaUWMJ0 gO8AZ0bnsSlQybl6+HQhJ8gju+anTL8jaHu3mUs7TmnfdMEe88qPBeGTv8dXsfVR 8J64NNF1hoRX19pFstBdM4w8Xe0497fE7MQ8DddOfVrleZyTUq2W8CmcYqU1yh6s zXQiwl2ShHlpX0M8qjew =a+1s -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Moving tomcat Ver 6.0
From: Nick Wall [mailto:nick.w...@mvtcanada.com] Subject: RE: Moving tomcat Ver 6.0 Can I just copy the folder/files you mention and put in the new installation on the 2008 server ? Never, never, never copy configuration files from one version of Tomcat to another. The properties change drastically between levels, as do some of the defaults. You need to examine each .xml file in your current installation, read the documentation for that level and the new level, and then create the appropriate equivalent for the new one. - 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: Moving tomcat Ver 6.0
Nick, On Wed, Nov 5, 2014 at 2:55 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Nick, On 11/5/14 2:48 PM, Nick Wall wrote: We have a Win server 2003 running Tomcat and our software I need to move this to a new win 2008 R2 server Is there an easy way to move everything over etc. Looking at easiest way to move everything over. It depends upon how you have everything set up. If you have a mostly default configuration and all your web applications are deployed into Tomcat's webapps/ directory, then you should be able to just copy the whole Tomcat directory from one machine to another. There are a few caveats: 1. If you are switching architectures (e.g. 32-bit to 64-bit, IA64 to x86_64, etc.) and you are using the tcnative library, then you'll have to make sure you place the library that matches your destination architecture into the right place (usually Tomcat's bin/ directory). 2. If you are running Tomcat as a Windows Service, then you'll have to re-register the service on the target machine once you've moved the files over. You can get a lot of mileage out of running the following on the command-line of the destination server: C:\ SET CATALINA_HOME=C:\Path\To\Tomcat C:\ SET CATALINA_BASE=C:\Path\To\Tomcat C:\ %CATALINA_HOME%\bin\service.bat install You might want to run CATALINA_HOME\bin\tomcat6w.exe on the old machine and make sure all your settings are copied-over to the new one. Yes. I think I told you to check tomcat7w.exe. Chris is correct, it would be tomcat6w.exe, since you are on version 6 something. 3. You may have net networking components of services on the destination machine, so make sure you don't have any port conflicts. The easiest way to check for this is to start Tomcat and look at the catalina.out log file in Tomcat's logs/ directory. If it doesn't say anything about not being able to bind to a port, then you should be okay. You can also run at the command prompt: netstat -ano to see what ports are being used and by what process.
Re: Moving tomcat Ver 6.0
On Wed, Nov 5, 2014 at 2:53 PM, Nick Wall nick.w...@mvtcanada.com wrote: -Original Message- From: Leo Donahue [mailto:donahu...@gmail.com] I kinda wonder though if there is a windows service associated with this Tomcat. Do you see anything called Tomcat6 in the windows services panel? Leo Yes I just checked and there is a service running called Apache Tomcat As you can tell I have no clue to this installation :) Nick Generic steps: First step would be to decide whether you want to deploy a 32bit or 64bit version of Tomcat. 1. Download the latest Tomcat (32bit or 64bit, your decision) 1.b Determine whether you want to download the zip or windows installer version of that architecture. In your case, probably the later. 2. Download the latest java sdk (same architecture as you picked above). 3. Install the java sdk, set the %JAVA_HOME% system environment variable. if you need help, ask. 4. Install Tomcat using the windows service installer. If you used a specific windows user account to run the previous service, make sure you set that in in the service properties. 5. In your previous Tomcat installation, you need to take note of all of the settings and apply them to your new install. This is the hard part. You will want to compare the following files in the old and new installs: tomcat-install-directory/conf: context.xml server.xml tomcat-users.xml web.xml tomcat-install-directory/bin run tomcat6w.exe you are looking for any custom settings for memory and other options... (trying to recall the exact names of the tabs at the moment, where I am now we block Tomcat because we use a different web server, can't even install it here.. sorry list) 6. Copy your webapps from the Tomcat6 webapps dir to Tomcat8 web apps dir. I would also investigate any custom settings to the webapps/manager/META-INF/context.xml in the previous Tomcat6. You don't know if there was a custom valve or something applied in there other than the default. 6.b (Optional) Get rid of the docs and examples directories in your new Tomcat, or move them somewhere else if you want to keep them. 7. Make sure you copy the old ROOT web app directory to the new Tomcat. 8. Hard to say, but you might also have had custom jar files in the previous tomcat6-install-directory/lib Only way to know is to compare what was in there. This sucks that you have no documentation on the previous install, makes your life a little harder. I'm sure others will chime in with things I have forgotten. leo
SSL Root Cert install
I'm running Apache Tomcat 7 on Windows Server 2008 R2 with Java jdk 1.8.0_25. I was able to use the keytool.exe command with the -genkey switch to create a keystore. I then used keytool.exe to create a CSR which I submitted to an issuer and received a certificate. I have to use keytool.exe to import the Root and Chain certificates first. I can't get the import of the Root certificate to work. I get the error message keytool error: java.io.FileNotFoundException: C:\Users\Administrator\root.cer (The system cannot find the file specified) Searches I do for this error seem to only net me results when people run keytool.exe and it can't find their .keystore. Keytool.exe finds my keystore just fine, it can't find the actual root.cer file though. I've tried putting that cert file in the C:\Users\Administrator folder with the .keystore file, I've put it in the Java jdk folders, I've put it in the tomcat7 folder, and keytool.exe still can't find it. I've download the Microsoft Process Monitor util and setup a filter to watch for any commands/errors related to my root.cer file, and the keytool.exe process can access the root.cer file, even though the import fails. I've modified the -file command to use the current directory, I've passed it the full path to the root.cer file in multiple locations, nothing is working, and I've run out of ideas for things to try. Has anyone else seen this problem before?
Re: SSL Root Cert install
On 06/11/2014 8:46 AM, Matthew Smith matt.trad...@gmail.com wrote: I'm running Apache Tomcat 7 on Windows Server 2008 R2 with Java jdk 1.8.0_25. I was able to use the keytool.exe command with the -genkey switch to create a keystore. I then used keytool.exe to create a CSR which I submitted to an issuer and received a certificate. I have to use keytool.exe to import the Root and Chain certificates first. I can't get the import of the Root certificate to work. I get the error message keytool error: java.io.FileNotFoundException: C:\Users\Administrator\root.cer (The system cannot find the file specified) Searches I do for this error seem to only net me results when people run keytool.exe and it can't find their .keystore. Keytool.exe finds my keystore just fine, it can't find the actual root.cer file though. I've tried putting that cert file in the C:\Users\Administrator folder with the .keystore file, I've put it in the Java jdk folders, I've put it in the tomcat7 folder, and keytool.exe still can't find it. I've download the Microsoft Process Monitor util and setup a filter to watch for any commands/errors related to my root.cer file, and the keytool.exe process can access the root.cer file, even though the import fails. I've modified the -file command to use the current directory, I've passed it the full path to the root.cer file in multiple locations, nothing is working, and I've run out of ideas for things to try. Has anyone else seen this problem before? What are the file permissions on the certificate? Is it readable to the user you are running the keytool with?
RE: Moving tomcat Ver 6.0
Thanks all so far I will take a look at this again tomorrow and see what I can figure out Nick -Original Message- From: Leo Donahue [mailto:donahu...@gmail.com] Sent: November-05-14 1:31 PM To: Tomcat Users List Subject: Re: Moving tomcat Ver 6.0 On Wed, Nov 5, 2014 at 2:53 PM, Nick Wall nick.w...@mvtcanada.com wrote: -Original Message- From: Leo Donahue [mailto:donahu...@gmail.com] I kinda wonder though if there is a windows service associated with this Tomcat. Do you see anything called Tomcat6 in the windows services panel? Leo Yes I just checked and there is a service running called Apache Tomcat As you can tell I have no clue to this installation :) Nick Generic steps: First step would be to decide whether you want to deploy a 32bit or 64bit version of Tomcat. 1. Download the latest Tomcat (32bit or 64bit, your decision) 1.b Determine whether you want to download the zip or windows installer version of that architecture. In your case, probably the later. 2. Download the latest java sdk (same architecture as you picked above). 3. Install the java sdk, set the %JAVA_HOME% system environment variable. if you need help, ask. 4. Install Tomcat using the windows service installer. If you used a specific windows user account to run the previous service, make sure you set that in in the service properties. 5. In your previous Tomcat installation, you need to take note of all of the settings and apply them to your new install. This is the hard part. You will want to compare the following files in the old and new installs: tomcat-install-directory/conf: context.xml server.xml tomcat-users.xml web.xml tomcat-install-directory/bin run tomcat6w.exe you are looking for any custom settings for memory and other options... (trying to recall the exact names of the tabs at the moment, where I am now we block Tomcat because we use a different web server, can't even install it here.. sorry list) 6. Copy your webapps from the Tomcat6 webapps dir to Tomcat8 web apps dir. I would also investigate any custom settings to the webapps/manager/META-INF/context.xml in the previous Tomcat6. You don't know if there was a custom valve or something applied in there other than the default. 6.b (Optional) Get rid of the docs and examples directories in your new Tomcat, or move them somewhere else if you want to keep them. 7. Make sure you copy the old ROOT web app directory to the new Tomcat. 8. Hard to say, but you might also have had custom jar files in the previous tomcat6-install-directory/lib Only way to know is to compare what was in there. This sucks that you have no documentation on the previous install, makes your life a little harder. I'm sure others will chime in with things I have forgotten. leo
Re: SSL Root Cert install
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Matthew, On 11/5/14 4:44 PM, Matthew Smith wrote: I'm running Apache Tomcat 7 on Windows Server 2008 R2 with Java jdk 1.8.0_25. I was able to use the keytool.exe command with the -genkey switch to create a keystore. I then used keytool.exe to create a CSR which I submitted to an issuer and received a certificate. I have to use keytool.exe to import the Root and Chain certificates first. I can't get the import of the Root certificate to work. I get the error message keytool error: java.io.FileNotFoundException: C:\Users\Administrator\root.cer (The system cannot find the file specified) Searches I do for this error seem to only net me results when people run keytool.exe and it can't find their .keystore. Keytool.exe finds my keystore just fine, it can't find the actual root.cer file though. I've tried putting that cert file in the C:\Users\Administrator folder with the .keystore file, I've put it in the Java jdk folders, I've put it in the tomcat7 folder, and keytool.exe still can't find it. I've download the Microsoft Process Monitor util and setup a filter to watch for any commands/errors related to my root.cer file, and the keytool.exe process can access the root.cer file, even though the import fails. I've modified the -file command to use the current directory, I've passed it the full path to the root.cer file in multiple locations, nothing is working, and I've run out of ideas for things to try. Has anyone else seen this problem before? What exact commands are you running, and where are your files? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUWvHPAAoJEBzwKT+lPKRYLzcP/3kjm/8/FiEHEVlPUfcmNZrF vEQzOzNug9dh58tNebNYbnWzFUSeKxKTmjgYQZK4InJlJvOsZ9n8fRSJIVHftoHy EDLqQMNb/SdO4d10Wf/DveskjJHA3z2e96I752Kn/iic7RXtHfco8Is8+yJafJmb mqWZh1TLSoG2F/3M0iS/FNaiMW4WcFlbmfZqflaKyV9qu4udjynRebAhqD6efl5X McKU9rZuYnF7e8ViQRgoYLyft4yTYiSVMFQ/u1ucv6Mtfa8zkF28WcOnzgIaSLLs qjBu29EpE1nfL28K2/slx5MhppLzPNhQS/Q0unG7IUSNzwokpN9ceS1UVvXa/5Qh vu5JokS1RVnYEkj1RxBRc9PIfYJLL/UpWPT7uP+u42fef12WRaxMTojaLRKK7r1Z cR4rrJ4pj4VMx3yRCfyrPJpLczwSbMTuiDXVq013ZdqI+/3mJXNAFEdRJ7i+ZqSY u+emjYI173xEC57zZnWrZK1bNRFJOLfle1oXrEXBvRQnXWOflbS+9Eabu8pwW8o/ mtT9P6oGQN+0+0qGzMjZdfe+0nik0hamq9AoQolq/jqUG2eDBsIuH2Cofem7NexC n8qpk0xTMrGTNby0PR1IPdxR1UYMCnAiyROFIyUWpHOVW/18Y63USyh3+/QoYdvC L4kQshR7oD0j3u6JVDyo =R06R -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat JDBC pool - too many connections in TIME_WAIT state
I have received additional details - the application starts getting java.sql.SQLException: Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found, although the amount of listeners in the DB is large enough. I have some concerns about the removeAbandonedTimeout property, it is set to 5 seconds now. Maybe the pool abandones every connection after 5 seconds, opens a new connection, and the previous connection goes to TIME_WAIT status consuming server resources? Thank you! 2014-11-05 23:15 GMT+03:00 Filip Hanik fi...@hanik.com: this is part of the TCP lifecycle, you can adjust this timeout yourself on the Operating system level http://www.cs.northwestern.edu/~agupta/cs340/project2/TCPIP_State_Transition_Diagram.pdf cat /proc/sys/net/ipv4/tcp_fin_timeoutecho 15 /proc/sys/net/ipv4/tcp_fin_timeout On Wed, Nov 5, 2014 at 7:36 AM, Daniel Mikusa dmik...@pivotal.io wrote: On Wed, Nov 5, 2014 at 9:13 AM, Vasily Kukhta v.b.kuk...@gmail.com wrote: Hello all! I have developed an application using Tomcat JDBC pool. Everything is fine except that the pool leaves hundreds of TCP connections in TIME_WAIT state, I have to ask, but are you sure it's the pool? TCP connections in the TIME_WAIT state would indicate that a connection was closed. Given that the job of the pool is to keep the connections open and reuse them, it just seems a little odd. which kills the server sooner or later... Could you please suggest what to fix, my configuration is below: PoolProperties pp = new PoolProperties(); String connprops = oracle.net.CONNECT_TIMEOUT=3000;oracle.jdbc.ReadTimeout=3000;oracle.net.READ_TIMEOUT=3000; pp.setUsername(user); pp.setPassword(pass); pp.setConnectionProperties(connprops); pp.setDriverClassName(oracle.jdbc.OracleDriver); pp.setTestOnBorrow(true); pp.setTestOnConnect(true); pp.setTestWhileIdle(true); pp.setMaxWait(1000); pp.setMinEvictableIdleTimeMillis(1); pp.setTimeBetweenEvictionRunsMillis(5000); pp.setValidationInterval(1); pp.setValidationQuery(SELECT 1 FROM DUAL); pp.setRemoveAbandoned(true); pp.setRemoveAbandonedTimeout(5); pp.setJdbcInterceptors(org.apache.tomcat.jdbc.pool.interceptor.QueryTimeoutInterceptor(queryTimeout=3)); dataSource = new DataSource(); dataSource.setPoolProperties(pp); Nothing is jumping out at me as incorrect. Maybe try without the connection properties (i.e. the driver level timeouts)? Maybe try increasing the log level for org.apache.tomcat.jdbc.pool to FINEST or DEBUG. That might generate some additional logging to show why the connections are being closed. Also, check that your server is not timing out the connection, perhaps due to a server side limit. I've see this happen a lot. Although it seems unlikely, it's probably also worth checking that there's no firewall or network device that could be closing the connections. Dan Thank you in advance!