Re: Connector Setting Problem in tomcat 6.0.29
Dear chuck, I tried a lot. I am not able to point out the problem.Herewith i attached my server.xml file.. Please help me where i done mistake? ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- Note: A Server is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/server.html -- Server port=8005 shutdown=SHUTDOWN !--APR library loader. Documentation at /docs/apr.html -- Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -- Listener className=org.apache.catalina.core.JasperListener / !-- Prevent memory leaks due to use of particular java/javax APIs-- Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / !-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / !-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html -- GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / Resource name=jdbc/ctd auth=Container type=oracle.jdbc.pool.OracleDataSource driverClassName=oracle.jdbc.driver.OracleDriver factory=oracle.jdbc.pool.OracleDataSourceFactory url=jdbc:oracle:thin:@server:port:orcl user=user password=password maxActive=20 maxIdle=10 maxWait=-1 / /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container Note: A Service is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/service.html -- Service name=Catalina !--The connectors can use a shared executor, you can define one or more named thread pools-- Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=1000 minSpareThreads=150/ !-- A Connector represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / !-- A Connector using the shared thread pool-- !-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation -- !-- Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=1000 enableLookups=false disableUploadTimeout=true scheme=https secure=true clientAuth=false sslProtocol=TLS / -- !-- Define an AJP 1.3 Connector on port 8009 -- !-- Connector port=8009 protocol=AJP/1.3 redirectPort=8443 / -- !-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html -- !-- You should set jvmRoute to support load-balancing via AJP ie : Engine name=Catalina defaultHost=localhost jvmRoute=jvm1 -- Engine name=Catalina defaultHost=localhost !--For clustering, please take a
Re: Secondary instance of Tomcat on single server does not process requests
On 04/11/2010 19:21, Ari King wrote: On Thu, Nov 4, 2010 at 1:09 PM, Konstantin Kolinko knst.koli...@gmail.comwrote: 2010/11/4 Ari King ari.brandeis.k...@gmail.com: |-- conf |-- server.xml |-- web.xml Those two files are not sufficient. Note, that the conf folder is read only from the second instance. (The files in CATALINA_HOME\conf are never read). Which other files are needed? I tried copying all the files from the conf directory of the base configuration, but that didn't resolve the issue either. Also, I have changed the shutdown port from 8005 to 8006. Any other ideas/suggestions? Thanks. What does the log say? p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: Is there a GOOD AJP-based cluster reference?
On 04/11/2010 20:12, Jeffrey Janner wrote: Notice I don't have any ProxyPassReverse lines. From reading the docs, I'm not sure they are needed for AJP proxying. Check the value of the path attribute, in Set-Cookie: header when a session is created. p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Any tools to detect tomcat services failure, and start it again automatically?
Hi All, I am searching the tool (or script) to be used for my tomcat env, that it can keep running as daemon in background, detect the tomcat services (several versions of tomcat). If it found the services don't run, or have failure, it will start it again automatically. I think I can put the script in cronjob, and run every 5 minutes, or by other way, please recommend. My env is: Solaris 10 with Apache-tomcat 6.0.29 or Jakarta-tomcat 6.0.18 Regards, Bill
Re: Connector Setting Problem in tomcat 6.0.29
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rujin, On 11/5/2010 3:39 AM, rujin raj wrote: I tried a lot. I am not able to point out the problem.Herewith i attached my server.xml file.. Please help me where i done mistake? At this point, your server.xml does not match your original warning message. Please post an up-to-date copy of your (sanitized) server.xml and an updated copy of the warning you receive from Tomcat. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzT+xwACgkQ9CaO5/Lv0PCFiACgsPh9SVqTh284kfwq1n+iMAoB kXUAoKjE0IYzjTknf2wIIFwrctn0MPtp =9FB5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to run *.patch file in windows
Hi, Recently I downloaded one patch file from Apache bugzilla website.The extension of the file is filename.patch. How can i run the patch in windows environment Please help. Rujinraj
RE: Connector Setting Problem in tomcat 6.0.29
From: rujin raj [mailto:rujin...@gmail.com] Subject: Re: Connector Setting Problem in tomcat 6.0.29 I tried a lot. I am not able to point out the problem.Herewith i attached my server.xml file.. When posting long XML files, please strip out the comments, so we don't have to wade through the junk. Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=1000 minSpareThreads=150/ You finally have an Executor configured; that's good. Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / You failed to specify the executor attribute in the Connector, so the Connector will use its own thread pool, not the Executor. - 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: [OT] How to run *.patch file in windows
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rujun, On 11/5/2010 9:02 AM, rujin raj wrote: Recently I downloaded one patch file from Apache bugzilla website.The extension of the file is filename.patch. How can i run the patch in windows environment http://lmgtfy.com/?q=win32+patch - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzUAb0ACgkQ9CaO5/Lv0PD5nwCglp49/ojyHXQh46lOqGA4cfC2 z9cAn1uib3ZwgVueNC35ab/rgzR03kaE =x8LR -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to run *.patch file in windows
From: rujin raj [mailto:rujin...@gmail.com] Subject: How to run *.patch file in windows How can i run the patch in windows environment You don't, at least not directly. You have to apply the patch to the Tomcat source and rebuild from source. http://tomcat.apache.org/tomcat-6.0-doc/building.html - 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: [OT] How to run *.patch file in windows
You can use patch from the gnuwin32 project - http://gnuwin32.sourceforge.net/packages.html On Fri, Nov 5, 2010 at 8:08 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rujun, On 11/5/2010 9:02 AM, rujin raj wrote: Recently I downloaded one patch file from Apache bugzilla website.The extension of the file is filename.patch. How can i run the patch in windows environment http://lmgtfy.com/?q=win32+patch - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzUAb0ACgkQ9CaO5/Lv0PD5nwCglp49/ojyHXQh46lOqGA4cfC2 z9cAn1uib3ZwgVueNC35ab/rgzR03kaE =x8LR -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Connector Setting Problem in tomcat 6.0.29
Please how to add the executor attribute in connector Executor=enable or true Is it like this: Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 Executor=enable or true maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / Thanks for helping me upto this level.I am trying this from last one week. Regards rujin On 5 November 2010 18:37, Caldarale, Charles R chuck.caldar...@unisys.comwrote: From: rujin raj [mailto:rujin...@gmail.com] Subject: Re: Connector Setting Problem in tomcat 6.0.29 I tried a lot. I am not able to point out the problem.Herewith i attached my server.xml file.. When posting long XML files, please strip out the comments, so we don't have to wade through the junk. Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=1000 minSpareThreads=150/ You finally have an Executor configured; that's good. Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / You failed to specify the executor attribute in the Connector, so the Connector will use its own thread pool, not the Executor. - 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: Connector Setting Problem in tomcat 6.0.29
executor=executor_name, so in your case: executor=tomcatThreadPool This is shown in the default/sample server.xml under the comment !-- A Connector using the shared thread pool-- On Nov 5, 2010, at 9:49 AM, rujin raj wrote: Please how to add the executor attribute in connector Executor=enable or true Is it like this: Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 Executor=enable or true maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / Thanks for helping me upto this level.I am trying this from last one week. Regards rujin On 5 November 2010 18:37, Caldarale, Charles R chuck.caldar...@unisys.comwrote: From: rujin raj [mailto:rujin...@gmail.com] Subject: Re: Connector Setting Problem in tomcat 6.0.29 I tried a lot. I am not able to point out the problem.Herewith i attached my server.xml file.. When posting long XML files, please strip out the comments, so we don't have to wade through the junk. Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=1000 minSpareThreads=150/ You finally have an Executor configured; that's good. Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / You failed to specify the executor attribute in the Connector, so the Connector will use its own thread pool, not the Executor. - 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: Connector Setting Problem in tomcat 6.0.29
From: rujin raj [mailto:rujin...@gmail.com] Subject: Re: Connector Setting Problem in tomcat 6.0.29 Please how to add the executor attribute in connector You are expected to be able to read the documentation, for which the exact links have been given to you several times. If you're not capable of doing so, then you really need to hire someone competent to do it for you. Executor=enable or true Does that look like anything you can find in the doc? http://tomcat.apache.org/tomcat-6.0-doc/config/http.html To repeat what the doc says: A reference to the name in an Executor element. If this attribute is enabled, and the named executor exists, the connector will use the executor, and all the other thread attributes will be ignored. And remember that case matters. - 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
JSP Precompilation and Servlet 3.0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Tim has just given his talk at ApacheCon NA about Servlet 3.0 / Tomcat 7.0. It was really my first taste of the 3.0 spec and I had a thought about the new features available for webapp configuration /other/ than web.xml: - - web.xml fragments - - class annotations The current method for JSP precompilation (which I've never used, mind you, so forgive my ignorance if I'm incorrect) is cumbersome: - - run the compiler - - copy the new .class files somewhere - - drop a huge load of junk into web.xml It occurred to me that that these new servlet 3.0 features could help JSP precompilation. Let's see what Tomcat 7.0's JSP precompiler could do (roughly): $ jsp-precompile /path/to/jsps my-jsps.jar $ cp my-jsps.jar /path/to/webapps/mywebapp/WEB-INF/lib (done) The precompiler could translate and compile all of the classes and package them into a .jar file for you. Great. What about servlet mappings? Well, we have two options: 1. Use annotations in the translated .java files 2. Generate a web.xml fragment and stuff it into my-jsps.jar/WEB-INF/web-fragment.xml Does anyone have any preferences? I suppose it could be an option to the precompiler, or we could even do both (do duplicate mappings conflict?). Hopefully, this will make JSP precompilation less onerous for users. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzUER4ACgkQ9CaO5/Lv0PCfUgCgtgRRQd+Qw6X2aLDWyHq0STbd UzgAnR7DtoAKbzLOdRSLWFPX4Qjp9UN5 =k337 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JSP Precompilation and Servlet 3.0
On Fri, 05 Nov 2010 10:13:50 -0400, Christopher Schultz ch...@christopherschultz.net wrote: The precompiler could translate and compile all of the classes and package them into a .jar file for you. Great. What about servlet mappings? Well, we have two options: 1. Use annotations in the translated .java files 2. Generate a web.xml fragment and stuff it into my-jsps.jar/WEB-INF/web-fragment.xml Does anyone have any preferences? I suppose it could be an option to the precompiler, or we could even do both (do duplicate mappings conflict?). Hopefully, this will make JSP precompilation less onerous for users. Personally I do not like JSP precompiling. 1. I do not put into JSP anything that user should not see. 2. Cost of compilation with first request is acceptable. 3. Possibility to change produced markup either by me or customer is priceless. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: JSP Precompilation and Servlet 3.0
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: JSP Precompilation and Servlet 3.0 Hopefully, this will make JSP precompilation less onerous for users. I don't think the current mechanism is particularly onerous, since Tomcat supplies an ant script to do all the dirty work, including the update of web.xml. - 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.
Re: JSP Precompilation and Servlet 3.0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 11/5/2010 10:57 AM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: JSP Precompilation and Servlet 3.0 Hopefully, this will make JSP precompilation less onerous for users. I don't think the current mechanism is particularly onerous, since Tomcat supplies an ant script to do all the dirty work, including the update of web.xml. My understanding is that the ant script needs some help to get started: you can't simply run the JSP precompiler against an existing webapp without seeding web.xml, at least a bit. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzUHXIACgkQ9CaO5/Lv0PC0cACfWLkBucT/iYWJAqjYWhiNGs6B 9QoAniBXum2f5kKIJxRHVpgPa6wymP7Q =sSBm -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Any tools to detect tomcat services failure, and start it again automatically?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill, On 11/5/2010 7:51 AM, Bill Wang wrote: I am searching the tool (or script) to be used for my tomcat env, that it can keep running as daemon in background, detect the tomcat services (several versions of tomcat). If it found the services don't run, or have failure, it will start it again automatically. I don't run it myself so I'm not entirely sure of the details, but I believe that jsvc has the capability of detecting a JVM crash and restarting everything. There are situations where Tomcat might be considered down and yet the JVM is completely healthy: these scenarios are not detectable by jsvc, so you'll need an additional check as well. Modern JVMs have switches that allow you to run external commands under certain conditions (OOME... are there others?) -- you could use that as part of your strategy. I think I can put the script in cronjob, and run every 5 minutes, or by other way, please recommend. We do this in production in two ways: - - health check ping against a dynamic resource; if it succeeds, the server is up. we also report certain information that may predict a future problem (memory conditions, db pool stats, etc.) - - watching catalina.out; if we see something awful, we start ringing phones. we could auto-restart, but that's not desirable in our environment. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzUHqoACgkQ9CaO5/Lv0PAB4ACdG58Mi3ItAvwYOdAfdd1zUctP 4JwAmwb/HZPA9D5rJ0mUjx4v/rlleOEv =LSsV -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Any tools to detect tomcat services failure, and start it again automatically?
On Friday 05 November 2010 12:51:25 Bill Wang wrote: Hi All, I am searching the tool (or script) to be used for my tomcat env, that it can keep running as daemon in background, detect the tomcat services (several versions of tomcat). If it found the services don't run, or have failure, it will start it again automatically. I think I can put the script in cronjob, and run every 5 minutes, or by other way, please recommend. My env is: Solaris 10 with Apache-tomcat 6.0.29 or Jakarta-tomcat 6.0.18 Doesn't the Solaris 10 Service Management Framework provide that feature? You'd have to create an appropriate service script for tomcat though. Unforunately I only heard about the SMF from advertising, never used it myself. Regards, Bill Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Update the tomcat-users.xml file to reflect the new roles?
Hey, Would it make sense to update the conf/tomcat-users.xml file to account for the new roles? Here's my patch: 34a35,42 role rolename=manager-gui/ role rolename=manager-script/ role rolename=manager-jmx/ role rolename=manager-status/ user username=manager password=s3cret roles=manager-gui,manager-script,manager-jmx,manager-status/ role rolename=admin-gui/ role rolename=admin-script/ user username=admin password=s3cret roles=admin-gui,admin-script/
CometConnectionManagerValve in Tomcat 7:
In Tomcat 7, is the comet valve (org.apache.catalina.valves.CometConnectionManagerValve) required for native comet implementations (ie: org.apache.catalina.comet.CometProcessor), or servlet 3.0 comet implementations (ie: request.startAsync(), etc), or both? -- View this message in context: http://old.nabble.com/CometConnectionManagerValve-in-Tomcat-7%3A-tp30142860p30142860.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk makes ajp connector run out of free connections
On 04/11/2010 20:01, Marc Wilmots wrote: Honestlyno, I didn't. The mod_jk scared the hell out of mewouldn't you? :-) Using this option will have a strong performance penalty for Apache and Tomcat. Use this only as a last resort in case of unfixable network problems. Experience has shown that the impact is usually (YMMV) a lot less significant than that. You're right - we should update the docs. Mark I'll give it a try tomorrow and see what it gives. By the way, my last calculation about connection_pool_size was wrong. I forgot to include the second Apache server. The math would look like this then: Apache1 - 10 server processes x 15 x 4 (tomcats) = 600 Apache2 - 10 server processes x 15 x 4 (tomcats) = 600, which makes 1200 in total Each Tomcat would receive a maximum of 300 connections, which would leave 100 free connections per Tomcat. This would solve the problem that Tomcat runs out of connections. The thing is...not all of my available Apache connections can be used: Apache has 60 threads per server process (10) - 600 connections. connection_pool_size per server process: 15. This would mean only 15 of 60 possible connections per server process can actually establish a connection to Tomcat. In order to be able to server all Apache connections simultaneously, I would need 4 more Tomcats? 2010/11/5 Mark Thomas ma...@apache.org On 04/11/2010 19:27, Marc Wilmots wrote: The best solution would be to enable DisableReuse as Mark stated, although I'm afraid that would be too big of a performance hit. Have you tried it? The cost of the required CPING/CPONG isn't that different to the cost of creating a TCP/IP connection. On a fast local area network I doubt you'd notice it. The time taken to establish a TCP/IP connection is usually (YMMV so test it) the time taken to process a request. Mark - 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: Update the tomcat-users.xml file to reflect the new roles?
On 05/11/2010 11:27, Brooke Hedrick wrote: Hey, Would it make sense to update the conf/tomcat-users.xml file to account for the new roles? Providing a tomcat-users.xml file that includes a default user with a known password that has access to an administrative interface would be very, very bad from a security point of view. The current 7.0.x and 6.0.x files have all the necessary information in comments within the file. Mark Here's my patch: 34a35,42 role rolename=manager-gui/ role rolename=manager-script/ role rolename=manager-jmx/ role rolename=manager-status/ user username=manager password=s3cret roles=manager-gui,manager-script,manager-jmx,manager-status/ role rolename=admin-gui/ role rolename=admin-script/ user username=admin password=s3cret roles=admin-gui,admin-script/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: CometConnectionManagerValve in Tomcat 7:
On 05/11/2010 12:34, greenstar wrote: In Tomcat 7, is the comet valve (org.apache.catalina.valves.CometConnectionManagerValve) required for native comet implementations (ie: org.apache.catalina.comet.CometProcessor), or servlet 3.0 comet implementations (ie: request.startAsync(), etc), or both? There is no such thing as Servlet 3.0 comet. The comet async implementation and the Servlet 3.0 async implementation are completely separate. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: CometConnectionManagerValve in Tomcat 7:
markt-2 wrote: On 05/11/2010 12:34, greenstar wrote: In Tomcat 7, is the comet valve (org.apache.catalina.valves.CometConnectionManagerValve) required for native comet implementations (ie: org.apache.catalina.comet.CometProcessor), or servlet 3.0 comet implementations (ie: request.startAsync(), etc), or both? There is no such thing as Servlet 3.0 comet. The comet async implementation and the Servlet 3.0 async implementation are completely separate. ... therefore, CometConnectionManagerValve is completely unrelated to the Servlet 3.0 async implementation and not required. Thanks for clearing this up. btw, I was using the term comet as an umbrella term for all async methods (as is the usage here: http://en.wikipedia.org/wiki/Comet_(programming)). -Jeremy -- View this message in context: http://old.nabble.com/CometConnectionManagerValve-in-Tomcat-7%3A-tp30142860p30143793.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Is there a GOOD AJP-based cluster reference?
On 04.11.2010 21:24, Mark Eggers wrote: Interesting. I'll have to try something similar for my situation. What I'm trying to do is a bit of the reverse. I want hostname:80/tomcat-host/manager to end up at (tomcat-host) /manager for four different tomcat hosts. The forward stuff works fine, but the URLs coming back all drop the tomcat-host part. I guess reading some more documentation is in order. Some things are collected at http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html#URL%20Rewriting Don't overlook the pointers for mod_proxy_html, mod_substitute and mod_sed. Most of the steps are simplified by mod_proxy using ProxyPass, ProxyPassReverse and ProxyPassReverseCookiePath, all documented at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html If the response content contains URLs to fix and you can't get them fixed on the webapp side, then mod_substitue, mod_proxy_html or mod_sed can help changing the content on the fly. Of course this can get tedious if the links in the content are hard to find (and also needs some CPU resources). Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Any tools to detect tomcat services failure, and start it again automatically?
On 05.11.2010 16:17, Rainer Frey wrote: On Friday 05 November 2010 12:51:25 Bill Wang wrote: Hi All, I am searching the tool (or script) to be used for my tomcat env, that it can keep running as daemon in background, detect the tomcat services (several versions of tomcat). If it found the services don't run, or have failure, it will start it again automatically. I think I can put the script in cronjob, and run every 5 minutes, or by other way, please recommend. My env is: Solaris 10 with Apache-tomcat 6.0.29 or Jakarta-tomcat 6.0.18 Doesn't the Solaris 10 Service Management Framework provide that feature? You'd have to create an appropriate service script for tomcat though. Unforunately I only heard about the SMF from advertising, never used it myself. +1, if you primarily want to detect crashes, SMF is the way to go, at least if you like using what your platform provides. If you are looking for a more platform independent way jsvc is often used. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JSP Precompilation and Servlet 3.0
On 05/11/2010 15:06, Christopher Schultz wrote: Chuck, On 11/5/2010 10:57 AM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: JSP Precompilation and Servlet 3.0 Hopefully, this will make JSP precompilation less onerous for users. I don't think the current mechanism is particularly onerous, since Tomcat supplies an ant script to do all the dirty work, including the update of web.xml. My understanding is that the ant script needs some help to get started: you can't simply run the JSP precompiler against an existing webapp without seeding web.xml, at least a bit. I suggested generating annotated java a little while back and didn't get an overly enthusiastic reception, but I like the general idea of the JSPs being in their own jar. I think it would be good if Tomcat 7.0 featured and used Servlet 3.0 functions, the source is available and it'll help users get to know the spec. p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: JSP Precompilation and Servlet 3.0
While I like the idea of using web-fragment.xml for precompiled jsp's - it would require the meta-data complete flag to be set to false which may as a side effect allow other artifacts to be loaded too. Hopefully jsp-precompile is part of the webapp build/deploy process so a developer can ignore it during development. But an admin (or release manager) can ensure that all jsps do compile before release is deployed. Setting up jsp-precompilation is a PITA the first time or 2 but once you get the hang of it, the precompilation step can be part of a standard snippet which can be pulled in via ant import. (For those of us who love ant) -Tim On 11/5/2010 10:13 AM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Tim has just given his talk at ApacheCon NA about Servlet 3.0 / Tomcat 7.0. It was really my first taste of the 3.0 spec and I had a thought about the new features available for webapp configuration /other/ than web.xml: - - web.xml fragments - - class annotations The current method for JSP precompilation (which I've never used, mind you, so forgive my ignorance if I'm incorrect) is cumbersome: - - run the compiler - - copy the new .class files somewhere - - drop a huge load of junk into web.xml It occurred to me that that these new servlet 3.0 features could help JSP precompilation. Let's see what Tomcat 7.0's JSP precompiler could do (roughly): $ jsp-precompile /path/to/jsps my-jsps.jar $ cp my-jsps.jar /path/to/webapps/mywebapp/WEB-INF/lib (done) The precompiler could translate and compile all of the classes and package them into a .jar file for you. Great. What about servlet mappings? Well, we have two options: 1. Use annotations in the translated .java files 2. Generate a web.xml fragment and stuff it into my-jsps.jar/WEB-INF/web-fragment.xml Does anyone have any preferences? I suppose it could be an option to the precompiler, or we could even do both (do duplicate mappings conflict?). Hopefully, this will make JSP precompilation less onerous for users. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzUER4ACgkQ9CaO5/Lv0PCfUgCgtgRRQd+Qw6X2aLDWyHq0STbd UzgAnR7DtoAKbzLOdRSLWFPX4Qjp9UN5 =k337 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Connector Setting Problem in tomcat 6.0.29
Hi, Now my server.xml file is like this.As you told i added executor=tomcatThreradPool as follows Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=1000 minSpareThreads=150/ Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 executor=tomcatThreadPool maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / Still the minSpareThreads is not taken into account. On 5 November 2010 19:23, Jim Riggs apache-li...@riggs.me wrote: executor=executor_name, so in your case: executor=tomcatThreadPool This is shown in the default/sample server.xml under the comment !-- A Connector using the shared thread pool-- On Nov 5, 2010, at 9:49 AM, rujin raj wrote: Please how to add the executor attribute in connector Executor=enable or true Is it like this: Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 Executor=enable or true maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / Thanks for helping me upto this level.I am trying this from last one week. Regards rujin On 5 November 2010 18:37, Caldarale, Charles R chuck.caldar...@unisys.comwrote: From: rujin raj [mailto:rujin...@gmail.com] Subject: Re: Connector Setting Problem in tomcat 6.0.29 I tried a lot. I am not able to point out the problem.Herewith i attached my server.xml file.. When posting long XML files, please strip out the comments, so we don't have to wade through the junk. Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=1000 minSpareThreads=150/ You finally have an Executor configured; that's good. Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 maxThreads=1000 enableLookups=false disableUploadTimeout=true redirectPort=8443 / You failed to specify the executor attribute in the Connector, so the Connector will use its own thread pool, not the Executor. - 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