Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time
Rainer, Thanks for that. Yes we are going for a mix of both really. But I'll run some bench marks against both sticky and none sticky to see how it gets on. Yes in production if we want to stop/undeploy/deploy a webapp we will set the worker status to stopped. This issue came up as more of a what if test. Regards Ben On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote: Using sticky sessions will allow only requests without sessions to be balanced freely. If you've either got many sessions, or your sessions are relatively short, than load balancing will statistically still good. Only in case of few long lasting sessions, you could experience the problem, that some heavy-use sessions might go to the same node. In case you've got only two nodes and you are building an HA infrastructure, the optimality of the load balancing is not important, because one node needs to be able to carry the full load anyhow. Throughput oriented webapps balance best with method Request. Most installations I know observe a good load balancing although they are using stickyness. I would rate a deviation of +/- 15% load difference relative to the arithmetic mean over a 10 minute interval as good. Periods of low load don't count at all. Regards, Rainer ben short wrote: So how does setting sticky sessions to true and the default value for the Load Balancing Directive 'method' (defaults to request) interact then? On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote: Apart from all the other things I wrote: don't turn off session stickyness, even if you use replication. Turn it off only, if you've got a really good reason. The fact that switching the backend between requests is possible with replication should not lead to the assumption, that it is a good idea to do this continuously. ben short wrote: Hi Rainer, By shutdown I mean I have clicked the 'stop' link on the tomcat manager page. Im also using session replication between the two tomcats. I have just tried turning off firefoxes cache and I see the same result. On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote: Hi Ben, I don't know what exactly you mean by shutdown, but mod_jk has no memory/cache/buffer for parts or all of an earlier response. It does buffer parts of a request for reusing it during failover, but not with responses and not between different requests. If the webapp is not available on the target system, there is no way how mod_jk could return with 50 lines of correct response. Those 50 lines might either come from your backend (what is shutdown), or from some other cache (browser, between browser and Apache, mod_cache_* inside Apache, between Apache and Tomcat). Nevertheless for production, I would always use a cleaner way of disabling a context: before undeploying first set the activation of the worker to stooped, which means it will no longer forward any requests and the load balancer will transparantly choose another worker. No recovery and errors. If you use sessions without replication, you could also set a worker to disabled before going into stopped. With disabled requests for existing sessions will still be forwarded, but no requests without sessions. Depending on your session timing the target might thus get slowly out of use. Also add timeouts to your config. We have a new docs page for 1.2.24 (which will go live tomorrow). You can have a look at it under http://tomcat.apache.org/dev/dist/tomcat-connectors/jk/docs/jk-1.2.24/generic_howto/timeouts.html and consider using the option recovery_options. Regards, Rainer ben short wrote: Hi, I have a odd issue occurring with my tomcat cluster serving ~50 lines of the page from a stopped webapp. My setup is as follows... Box 1 Apache running a jk mod loadbalancer. It loadbalances between an instance of tomcat on this box and on box 2. Box 2 Apache running a jk mod loadbalancer. It loadbalances between an instance of tomcat on this box and on box 1. Software... OS RH 4 Tomcat 6.0.13 Java 1.6.0_01 Apache 2.2.4 Mod_jk 1.2.23 workers.properties (same on both boxes) # JK Status worker config worker.list=jkstatus worker.jkstatus.type=status # Presentaton Load Balancer Config worker.list=preslb worker.preslb.type=lb worker.preslb.balance_workers=jcpres1,jcpres2 worker.preslb.sticky_session=0 worker.jcpres1.port=8009 worker.jcpres1.host=192.168.6.171 worker.jcpres1.type=ajp13 worker.jcpres1.lbfactor=1 worker.jcpres1.fail_on_status=503,400,500,909 worker.jcpres2.port=8009 worker.jcpres2.host=192.168.6.174 worker.jcpres2.type=ajp13 worker.jcpres2.lbfactor=1 worker.jcpres2.fail_on_status=503,400,500,909 My problem... If i stop the webapp on box 2, wait for a while and make a request I get about 50 lines of the expected page in my browser ( assuming the request went to the
Stop a webapp from being started when tomcat starts
Hi, Is it possible to configure tomcat to not start a specific webapp when it starts up? Ben - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stop a webapp from being started when tomcat starts
On Tuesday 31 July 2007 11:02, ben short wrote: Hi, Is it possible to configure tomcat to not start a specific webapp when it starts up? Ben - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ben, Just set the permissions to on the webapp directory and it won`t startup again when tomcat gets a restart. *Note* it doesn`t get listed as well so you can`t manually start the application anymore. Matt pgp8LuGnHmIZI.pgp Description: PGP signature
Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time
I have altered the code to write out which webapp generated the page to the html, so i can see where the partial responses are comming from. What I see is I stop the webapp on box 2. I make a request and I see part of the page. The html shows that the partial page was generated by the running webapp on box 1. On a slightly different note, I have the mod_jk logging set to debug. When it logs out the packets that its received from the webapps it doesn't show all the html page. For instance I see two full packets traced out then a half full one and that's it. But the page renders ok in the browser. I have a example log if anyone would like to see it. On 7/31/07, ben short [EMAIL PROTECTED] wrote: Rainer, Thanks for that. Yes we are going for a mix of both really. But I'll run some bench marks against both sticky and none sticky to see how it gets on. Yes in production if we want to stop/undeploy/deploy a webapp we will set the worker status to stopped. This issue came up as more of a what if test. Regards Ben On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote: Using sticky sessions will allow only requests without sessions to be balanced freely. If you've either got many sessions, or your sessions are relatively short, than load balancing will statistically still good. Only in case of few long lasting sessions, you could experience the problem, that some heavy-use sessions might go to the same node. In case you've got only two nodes and you are building an HA infrastructure, the optimality of the load balancing is not important, because one node needs to be able to carry the full load anyhow. Throughput oriented webapps balance best with method Request. Most installations I know observe a good load balancing although they are using stickyness. I would rate a deviation of +/- 15% load difference relative to the arithmetic mean over a 10 minute interval as good. Periods of low load don't count at all. Regards, Rainer ben short wrote: So how does setting sticky sessions to true and the default value for the Load Balancing Directive 'method' (defaults to request) interact then? On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote: Apart from all the other things I wrote: don't turn off session stickyness, even if you use replication. Turn it off only, if you've got a really good reason. The fact that switching the backend between requests is possible with replication should not lead to the assumption, that it is a good idea to do this continuously. ben short wrote: Hi Rainer, By shutdown I mean I have clicked the 'stop' link on the tomcat manager page. Im also using session replication between the two tomcats. I have just tried turning off firefoxes cache and I see the same result. On 7/30/07, Rainer Jung [EMAIL PROTECTED] wrote: Hi Ben, I don't know what exactly you mean by shutdown, but mod_jk has no memory/cache/buffer for parts or all of an earlier response. It does buffer parts of a request for reusing it during failover, but not with responses and not between different requests. If the webapp is not available on the target system, there is no way how mod_jk could return with 50 lines of correct response. Those 50 lines might either come from your backend (what is shutdown), or from some other cache (browser, between browser and Apache, mod_cache_* inside Apache, between Apache and Tomcat). Nevertheless for production, I would always use a cleaner way of disabling a context: before undeploying first set the activation of the worker to stooped, which means it will no longer forward any requests and the load balancer will transparantly choose another worker. No recovery and errors. If you use sessions without replication, you could also set a worker to disabled before going into stopped. With disabled requests for existing sessions will still be forwarded, but no requests without sessions. Depending on your session timing the target might thus get slowly out of use. Also add timeouts to your config. We have a new docs page for 1.2.24 (which will go live tomorrow). You can have a look at it under http://tomcat.apache.org/dev/dist/tomcat-connectors/jk/docs/jk-1.2.24/generic_howto/timeouts.html and consider using the option recovery_options. Regards, Rainer ben short wrote: Hi, I have a odd issue occurring with my tomcat cluster serving ~50 lines of the page from a stopped webapp. My setup is as follows... Box 1 Apache running a jk mod loadbalancer. It loadbalances between an instance of tomcat on this box and on box 2. Box 2 Apache running a jk mod loadbalancer. It loadbalances between an instance of tomcat on this box and on box 1. Software... OS RH 4 Tomcat 6.0.13 Java 1.6.0_01 Apache 2.2.4
[ANN] Apache Tomcat JK 1.2.24 Web Server Connector released
The Apache Tomcat team is pleased to announce the immediate availability of version 1.2.24 of the Apache Tomcat Connectors. It contains connectors, which allow a web server such as Apache HTTPD, Microsoft IIS and Sun Web Server to act as a front end to the Tomcat web application server. This version contains several enhancements and fixes a number of minor bugs of the previous version 1.2.23. See http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html for a complete list of changes. Source distribtions can be downloaded from an Apache Software Foundation mirror at: http://tomcat.apache.org/download-connectors.cgi Binary distributions for a number of different operating systems and web servers can be downloaded from an Apache Software Foundation mirror at: http://tomcat.apache.org/download-connectors.cgi Documentation for using Apache Tomcat Connectors can be found at: http://tomcat.apache.org/connectors-doc/ Thank you, -- The Apache Tomcat Team - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DLL files for connecting Apache Httpd and Tomcat
Hi, I am hosting multiple sites on one Windows 2003 box using Apache 2.2.4 The sites are all built on Joomla 1.4 and therefore I have PHP 5.2.1 and MySql installed. Everything works fine. I also have Tomcat 5.5 installed and running happily on port 8080. I now have need to build a site using JSP/servlets but naturally I need to pass the requests for JSPs through the webserver to Tomcat as I want access to the site through port 80. I have done this before a few years ago but now I can not find the required mod_jk2- 2.43.dll The official Apache binary download page at http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.23/ purports to being for Win32 but other than the ISAPI_redirect DLL files the rest are .so files for UNIX/linux. Is this an oversight on Apache's part? I would really appreciate help on getting this issue sorted. I know it can be done but I can not find the correct files anywhere and I don't fancy building from source. As a follow up to the original question: could a link the Apache httpd server with the Tomcat container in Glassfish? I would ideally like to have a full J2EE server. Many thanks Hugh Acland
Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time
ben short wrote: I have altered the code to write out which webapp generated the page to the html, so i can see where the partial responses are comming from. What I see is I stop the webapp on box 2. I make a request and I see part of the page. The html shows that the partial page was generated by the running webapp on box 1. On a slightly different note, I have the mod_jk logging set to debug. When it logs out the packets that its received from the webapps it doesn't show all the html page. For instance I see two full packets traced out then a half full one and that's it. But the page renders ok in the browser. I have a example log if anyone would like to see it. Log level debug truncates packet dump to I think 1KB, log level trace shows all of the packets. Maybe interesting for you: the ReplicationValve has two configurable attributes, that allow you to detect from the app, if the request went to the same node as the last request of the same session before, i.e. if a failover happended. The first attribute is primaryIndicator (Default: false), if set to true, it will enable this feature. When the feature is enabled, there is an additional request attribute (not: parameter), with name org.apache.catalina.ha.tcp.isPrimarySession (this is a string name) and its value is a Boolean, true if the request went to the sticky node, false, if it switched nodes. The name of the request attribute can be changed from the default org.apache.catalina.ha.tcp.isPrimarySession to something else, by setting the attribute primaryIndicatorName=myname for the ReplicationValve. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DLL files for connecting Apache Httpd and Tomcat
Hi Hugh, - jk2 has been deprecated a long time ago. Please use jk, which is fully supported and now contains most of the features, that were created for jk2 - the *.so files in the download directory for win32/win64 are actually windows libraries. You can use them. Only there name is a little misleading. - we released 1.2.24 some minutes ago. You might consider using this version instead of 1.2.23. - yes in principle you can use JK with glassfish, there are some blogs about what to do on the app server side. Search the web for ajp or ajp13 and glassfish. On the web server side in general everything works the same as for Tomcat. The web container inside glassfish is a fork of Tomcat. So not all fixes for the AJP connector of Tomcat might be included with glassfish. Fixes during the last year include support for bigger AJP packets (needed e.g. probably when using client certificates ot using very huge http headers) and support for up- and downloads bigger than 2 GB. Regards, Rainer Hugh Acland wrote: Hi, I am hosting multiple sites on one Windows 2003 box using Apache 2.2.4 The sites are all built on Joomla 1.4 and therefore I have PHP 5.2.1 and MySql installed. Everything works fine. I also have Tomcat 5.5 installed and running happily on port 8080. I now have need to build a site using JSP/servlets but naturally I need to pass the requests for JSPs through the webserver to Tomcat as I want access to the site through port 80. I have done this before a few years ago but now I can not find the required mod_jk2- 2.43.dll The official Apache binary download page at http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.23/ purports to being for Win32 but other than the ISAPI_redirect DLL files the rest are .so files for UNIX/linux. Is this an oversight on Apache's part? I would really appreciate help on getting this issue sorted. I know it can be done but I can not find the correct files anywhere and I don't fancy building from source. As a follow up to the original question: could a link the Apache httpd server with the Tomcat container in Glassfish? I would ideally like to have a full J2EE server. Many thanks Hugh Acland - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat with 8 GB memory
so now we have to identify if our application is 64bit compatible or 32bit compatible. would not this be a very difficult situation as far as porting to 64bit is concerned? Andrew Miehs wrote: On 29/07/2007, at 9:08 PM, David Smith wrote: ...but people advice that 64bit are 20 - 30% slower than the 32bit ... Could these people offer any evidence to this? Cite any benchmarks? I would like to see the evidence of this before believing it to be true. We did test with out application - (running more than 10 tomcats using F5s for Load balancing) and came to the belief that we could deal with 15% more users online at the same time. As I said, though, this was OUR application - maybe yours is different... For our purposes however we also found Intel 5160s packed more punch per $ than AMD Opterons - (Thankfully we don't have to worry about paying the power bills in our colocation)... Cheers Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tomcat-with-8-GB-memory-tf4149367.html#a11922831 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Latest MS patches
From: Willett, Jr., Edward W. (Contractor) Sent: Tuesday, July 31, 2007 8:13 AM To: 'users@tomcat.apache.org' Subject: Latest MS patches Does anyone know of any problem with Tomcat 6.0.1 and the latest MS patches. Eddie
RE: Tomcat Administration
Found it in some location in netbeans installation. I deleted the file. I still see the same message. Now neither MS or google desktop search lead to any results, I still see the same message when I visit the administration page. This is a nightmare! Caldarale, Charles R wrote: From: SophieKlusn [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat Administration The contents of admin.xml are as follows: That all looks reasonable. I am still confounded with where the error page is being served from. Might be time for a full search of your system for the admin message. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tomcat-Administration-tf4178709.html#a11923091 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat with 8 GB memory
On 31/07/2007, at 2:04 PM, Mohan2005 wrote: so now we have to identify if our application is 64bit compatible or 32bit compatible. If your application is only JAVA, then no porting is required. Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
secured authentication / connection
Hello all, On my webapp, I'm currently using a Tomcat-based form authentication. But I would like to switch to an encrypted authentication. And the long-term goal would be to have my users browse my webapp entirely with an https connection. Can anyone point me to a relevant tutorial ? I have found lot of information, indeed, but they are all either Apache-based (and I would like to rely entirely on Tomcat, regarding security features), either Tomcat-based but with form authentication only. Thanks in advance, Pierre
Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time
I'm not getting anywhere with this :( I have set the logging to trace for mod_jk and I can see all the response packets. I have also turned on our applications response logging and can see that the running webapp writes the full page to the response. I can then see it all in the mod_jk logs. But the browser only shows a partial page. On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote: ben short wrote: I have altered the code to write out which webapp generated the page to the html, so i can see where the partial responses are comming from. What I see is I stop the webapp on box 2. I make a request and I see part of the page. The html shows that the partial page was generated by the running webapp on box 1. On a slightly different note, I have the mod_jk logging set to debug. When it logs out the packets that its received from the webapps it doesn't show all the html page. For instance I see two full packets traced out then a half full one and that's it. But the page renders ok in the browser. I have a example log if anyone would like to see it. Log level debug truncates packet dump to I think 1KB, log level trace shows all of the packets. Maybe interesting for you: the ReplicationValve has two configurable attributes, that allow you to detect from the app, if the request went to the same node as the last request of the same session before, i.e. if a failover happended. The first attribute is primaryIndicator (Default: false), if set to true, it will enable this feature. When the feature is enabled, there is an additional request attribute (not: parameter), with name org.apache.catalina.ha.tcp.isPrimarySession (this is a string name) and its value is a Boolean, true if the request went to the sticky node, false, if it switched nodes. The name of the request attribute can be changed from the default org.apache.catalina.ha.tcp.isPrimarySession to something else, by setting the attribute primaryIndicatorName=myname for the ReplicationValve. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Quesion on starting tomcat (as a windows service) from Ant
Obviously you should try to figure out who is using that file. But if you want to do it like old days.. Do this in your ANT property name=service value=Tomcat5/ target name=stop description=Stops the ${service} exec executable=cmd.exe arg line=/C net stop ${service}/ /exec /target target name=start description=Starts the ${service} exec executable=cmd.exe arg line=/C net start ${service}/ /exec /target If is linux you will do a service start tomcatd or service stop tomcatd regards -Original Message- From: Lenny Wintfeld [mailto:[EMAIL PROTECTED] Sent: Monday, July 30, 2007 5:16 PM To: Asensio, Rodrigo Subject: RE: Quesion on starting tomcat (as a windows service) from Ant Rodrigo Thanks for the feedback. As it works out, when I drop the war into \webapps, tomcat partially deletes the previous version in the directory below webapps and then can't proceed. The problem is log4j.properties is being used by another (at this point unknown) app (definitely not one of mine). The end result is Tomcat remains running with a partially deleted web app and no way to deploy that app. The only way to fix the problem is to stop tomcat delete the offending web app's directory tree and restart tomcat. The windows services version of tomcat is controlled by Procrun whic is not usable by Ant; forcing me to use a manual process. If you know how to stop the WinXP Services version of tomcat from a command prompt, I'd appreciate hearing about it. I realize that in the liong run the best thing to do is to find out what other program is holding a reference to log4j.properties, but that will be a difficult job, since other than tomcat and procrun no other java programs are running, as far as I can tell. Thanks and please reply if you have any additional advice. Lenny Wintfeld This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DLL files for connecting Apache Httpd and Tomcat
Hi Hugh, jk autoconf is broken for quite some time now. You can use mod_jk without autoconf, but you will need a little time to setup the config. There are a couple of descriptions concerning configuration in the JK docs. We might repair autoconf some time, but you shouldn't really use it at the moment. It's not only a question of making it spit out a configuration, but also about how good this configuration is. The core feature of autoconf was, that it knows, which contexts are deployed in Tomcat, so it can set up JkMount directives. Also it knows, which port the AJP connector listens to. Both things can be really easily setup by hand. As a starter, read http://tomcat.apache.org/connectors-doc/generic_howto/quick.html and when it works, go deeper into the documentation to read more about better production settings. Regards, Rainer Hugh Acland wrote: Thanks Rainer, I have done some more reading and have deduced that I need to use Tomcat to generate the auto/mod_jk.conf file by starting tomcat with the -jkconf option. This doesn't work as I get: C:\Program Files\Apache Software Foundation\Tomcat 5.5\bintomcat5 jkconf [2007-07-31 12:37:35] [410 prunsrv.c] [error] The operation completed successfully. [2007-07-31 12:37:35] [1269 prunsrv.c] [error] Load configuration failed Two questions (one retorical!) : how do I generate the auto/mod_jk.conf file successfully and why doesn't Tomcat ship with this already in place?! Many thanks again, Hugh - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time
You could dig deeper into two different directions: - protocol: is the content-length in the response headers correct? Or does it use chunked transfer, and is this OK? - sniff the network in front of the apache: do the packets actually get send back to the browser? Regards, Rainer ben short wrote: I'm not getting anywhere with this :( I have set the logging to trace for mod_jk and I can see all the response packets. I have also turned on our applications response logging and can see that the running webapp writes the full page to the response. I can then see it all in the mod_jk logs. But the browser only shows a partial page. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stop a webapp from being started when tomcat starts
On Tue, 2007-07-31 at 05:28 -0400, Matthew Whittaker-Williams wrote: On Tuesday 31 July 2007 11:02, ben short wrote: Hi, Is it possible to configure tomcat to not start a specific webapp when it starts up? Ben - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ben, Just set the permissions to on the webapp directory and it won`t startup again when tomcat gets a restart. *Note* it doesn`t get listed as well so you can`t manually start the application anymore. Matt You used to be able to do this in tomcat 5.0.28 but can't seem to in 5.5.23, unless I'm missing something. In the Host section of your server.xml if you set autoDeploy=false and deployOnStartup=false then you could drop your context descriptor files in the conf/engine/host/ directory and start them up that way. Since the manager app has a manager.xml file located there you could still use the manager app as well. In tomcat 5.5.23 if you set deployOnStartup=false then nothing out of the appBase gets deployed nor do any of the apps referenced by the context descriptors (manager app doesn't get deployed). I wish you could have a deployOnStartup for apps in the appBase and a different deployOnStartup for context descriptors in conf/engine/host/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: secured authentication / connection
Pierre Goupil wrote: Hello all, On my webapp, I'm currently using a Tomcat-based form authentication. But I would like to switch to an encrypted authentication. And the long-term goal would be to have my users browse my webapp entirely with an https connection. Can anyone point me to a relevant tutorial ? I have found lot of information, indeed, but they are all either Apache-based (and I would like to rely entirely on Tomcat, regarding security features), either Tomcat-based but with form authentication only. http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: secured authentication / connection
From: Pierre Goupil [mailto:[EMAIL PROTECTED] Subject: secured authentication / connection Can anyone point me to a relevant tutorial ? Besides configuring SSL as Mark T pointed out, you need to read section 12 of the servlet spec: http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index.html Section 12.5.3 is specifically for form-based authentication. To force SSL for everything, use a transport-guarantee of CONFIDENTIAL in conjunction with a url-pattern of /* in your app's WEB-INF/web.xml file. For example: security-constraint web-resource-collection web-resource-nameProtect Everything/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameRequiredRoleHere/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat with 8 GB memory
On Fri, Jul 27, 2007 at 07:25:26PM -0400, Christopher Schultz wrote: The reverse is true. First of all, no home user ever bought an 8-bit machine. Um, ask the owner of an Apple ][ about that. Likewise my Synertek SYM-1 used an 8-bit 6502 processor, as did designs by Atari, Commodore, etc. Then there were a number of designs built around the Zilog Z80, by Radio Shack, Sinclair, and others. Intel's line never caught on beyond the industrial and hobbyist markets until the 8086, but there were plenty of others. CP/M's market was 8-bit machines. -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is intuitive he means the exact opposite. pgpA8kcMoJEn5.pgp Description: PGP signature
Re: Tomcat with 8 GB memory
I think what we're seeing here is the reason for the oft-heard, seldom-heeded advice that the only benchmark which means anything is *your application*. Once you see how the code you care about performs, *then* you can bum a few cycles here and there to tune it up. Generalities such as 64-bit machines are faster/slower really don't say much outside the context of a specific application. -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is intuitive he means the exact opposite. pgp78pRVntwp4.pgp Description: PGP signature
Problem to configure servelet on Tomcat6
Hi, I've configured Tomacat 6 for Servlet but I've this error: *message* *description* _The server encountered an internal error () that prevented it from fulfilling this request._ *exception* javax.servlet.ServletException: Servlet.init() for servlet default threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584) org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508) java.lang.Thread.run(Unknown Source) *root cause* java.lang.NumberFormatException: For input string: java.lang.NumberFormatException.forInputString(Unknown Source) java.lang.Integer.parseInt(Unknown Source) java.lang.Integer.parseInt(Unknown Source) org.apache.catalina.servlets.DefaultServlet.init(DefaultServlet.java:221) javax.servlet.GenericServlet.init(GenericServlet.java:212) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584) org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508) java.lang.Thread.run(Unknown Source) *note* _The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs._ Apache Tomcat/6.0.13 How can resolve this problem? Hoping a reply. Sincerally yours, Fabbris Pierluigi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem to configure servelet on Tomcat6
catch the NumberFormatException check the given parameter: if your parameter is empty or is different that a number, set it to a default value http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NumberFormatException.html it is more a servlet problem than a tomcat problem F. Hi, I've configured Tomacat 6 for Servlet but I've this error: *message* *description* _The server encountered an internal error () that prevented it from fulfilling this request._ *exception* javax.servlet.ServletException: Servlet.init() for servlet default threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584) org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508) java.lang.Thread.run(Unknown Source) *root cause* java.lang.NumberFormatException: For input string: java.lang.NumberFormatException.forInputString(Unknown Source) java.lang.Integer.parseInt(Unknown Source) java.lang.Integer.parseInt(Unknown Source) org.apache.catalina.servlets.DefaultServlet.init(DefaultServlet.java:221) javax.servlet.GenericServlet.init(GenericServlet.java:212) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584) org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508) java.lang.Thread.run(Unknown Source) *note* _The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs._ Apache Tomcat/6.0.13 How can resolve this problem? Hoping a reply. Sincerally yours, Fabbris Pierluigi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem to configure servelet on Tomcat6
From: Fabbris Pierluigi [mailto:[EMAIL PROTECTED] Subject: Problem to configure servelet on Tomcat6 java.lang.NumberFormatException: For input string: java.lang.NumberFormatException.forInputString(Unknown Source) java.lang.Integer.parseInt(Unknown Source) java.lang.Integer.parseInt(Unknown Source) org.apache.catalina.servlets.DefaultServlet.init(DefaultServlet.java:221 ) The above line is trying to retrieve the value of the debug init-param nested inside the servlet declaration for the DefaultServlet. You have apparently changed this from 0 to an empty (or at least non-numeric) string. Don't do that. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Encoding/Decoding
This test page results are shown: Latin Character input Capital A with Circumflex ^: Â Greek Character input Omega: Ù without decode=Latin%3A+%C3%82+Greek%3A+%C3%99 with decode=Latin: Â Greek: Ù It appears the encoding is set to IS0 8859-1 since the character encoding maps correctly to that character set. Here are my server.xml settings: Connector port=8009 URIEncoding=UTF-8 useBodyEncodingForURI=true enableLookups=false redirectPort=8443 debug=1 protocol=AJP/1.3 / Connector port=8080 URIEncoding=UTF-8 useBodyEncodingForURI=true maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=8 connectionTimeout=2 disableUploadTimeout=true / Any ideas what I am doing wrong would be greatly appreciated. Joe -Original Message- From: root [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 11:00 AM To: Russo, Joe Subject: %@ page import=java.text.* % %@ page import=java.io.* % %@ page import=java.net.* % %@ page import=java.rmi.* % %@ page import=rapidReview.core.tables.* % %@ page import=rapidReview.core.util.* % %@ page import=rapidReview.core.services.protocol.* % %@ page import=java.util.* % %@ page import=java.sql.* % %@ page import=rapidReview.util.JSPUtil % %@ page language=java contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 % html head titleCharacter Encoding/Decoding UTF-8/title /head body bgcolor=White % //request.setCharacterEncoding(UTF-8); //response.setCharacterEncoding(UTF-8); //response.setContentType(text/html;charset=UTF-8); ConnectionPool cp = null; Connection con = null; String url = null; String user = null; String password = null; String dbDriver = null; String schemaName = null; String ms_no = null; String newl, newg = null; boolean isConnected = false; MsSupplimentaryDetails msd = new MsSupplimentaryDetails(); String encoding = null; char greek = 0xD9; char latin = 0xC2; % % dbDriver = oracle.jdbc.driver.OracleDriver; schemaName = dba55688!!a;@@; user = pwruser; password = r20dmbo; url = jdbc:oracle:thin:@richtestdb01:1521:devrapid; ms_no = CAN-06-2483; //ms_no = CAN-07-0321; encoding = UTF-8; newl = Latin: ; newg = Greek: ; //encoding = IS0-8859-1; //encoding = ISO-10646; //encoding = IS0-8859-16; cp = new ConnectionPool(url, user, password, dbDriver, 1, 1, schemaName); con = cp.getConnection(); msd.setConnection(schemaName, con); MsSupplimentaryDetails[] msd_arr = msd.fetchData(where ms_no = ' + ms_no + '); % form name=ChangeDecision method=post table border=0 width=100% cellpadding=4 cellspacing=1 tr valign=top td bgcolor=#cfcfcffont face=arial size=2b div align=centerMS Supplimentary Details/div/b /font/td /tr tr tdLatin Character input Capital A with Circumflex ^: %=latin% /td /tr tr tdGreek Character input Omega: %=greek% /td /tr /table /form % out.write(br); out.write(blinkfont color=bluewithout decode/font/blink= + msd_arr[0].getAbstracts()); String abstracts = newl + latin + + newg + greek; abstracts = URLEncoder.encode(abstracts, UTF-8); abstracts = RRUtil.validateString(abstracts,true); try{ msd.update(SET abstract='' , WHERE MS_NO=' + ms_no + '); msd.update(SET abstract=' + abstracts + ' , WHERE MS_NO=' + ms_no + '); con.commit(); } catch(Exception ex){ out.write(brbr exception: + ex); } out.write(brbr); out.write(blinkfont color=bluewith decode/font/blink= + URLDecoder.decode(msd_arr[0].getAbstracts(),UTF-8)); % /body /html - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time
Ok I have used wireshark and see that the request is sent to the apache httpd. The next first packet i get back contains the following... HTTP/1.1 200 OK Date: Tue, 31 Jul 2007 14:57:25 GMT Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a mod_jk/1.2.23 Content-Length: 1090 ***NOTE every line but this has a \r\n shown in the middle frame of wireshark *** Cache-Control: no-cache Pragma: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Language: en-GB Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html;charset=UTF-8 !--Rail Timestamp: -- !--Generated by Journeycheck 4.0-RC5 on host jc-pres2.nexusalpha.com -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html lang=english .head ..meta http-equiv=Content-Type content=text/html;charset=UTF-8/ ..meta http-equiv=expires content=0/ ..meta http-equiv=cache-control content=no-cache/ ..meta http-equiv=pragma content=nocache/ ..meta http-equiv=Content-Language content=en-us/ ..meta content=Nexus Alpha:Andrew Langmead, Ben Short, Lawrence Chan name=author/ ..meta content=journey check,rail,journey,nexus alpha,plan,disruption,transport,trains name=keywords/ ..meta content=Allows you to check your journey with a particular rail company name=description/ ..!--META HTTP-EQUIV=RefreshCONTENT=10; URL=http://www.jcheck.com/firstcapitalconnect/;-- .. ..link href=/resources/common/web/css/common.css rel=stylesheet type=text/css/ ..!--script type=text/javascript src=/resources/common/web/javascript Which is whats being shown in the browser, if i view the source. Next I see more packets that say 'Continuation or non-HTTP traffic' in the Info column of wireshark. When I look at the byte output I can see that its the rest of the page. If i use wireshark to view the same request with the webapp started I dont see the initial HTTP/1.1 200 OK packet, so i assume that each packet contains the correct headers for chunking to work correctly. So it seams that im getting a dodgy content length in the first packet if the request goes to the stoppped webapp first. Or infact the whole chunking thing is not working correctly. On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote: You could dig deeper into two different directions: - protocol: is the content-length in the response headers correct? Or does it use chunked transfer, and is this OK? - sniff the network in front of the apache: do the packets actually get send back to the browser? Regards, Rainer ben short wrote: I'm not getting anywhere with this :( I have set the logging to trace for mod_jk and I can see all the response packets. I have also turned on our applications response logging and can see that the running webapp writes the full page to the response. I can then see it all in the mod_jk logs. But the browser only shows a partial page. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time
ben short wrote: Ok I have used wireshark and see that the request is sent to the apache httpd. The next first packet i get back contains the following... HTTP/1.1 200 OK Date: Tue, 31 Jul 2007 14:57:25 GMT Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a mod_jk/1.2.23 Content-Length: 1090 ***NOTE every line but this has a \r\n shown in the middle frame of wireshark *** All Headers are supposed to end with \r\n, but I would find it very strange, if this does not do it (I can not really think of a reson for that, but who knows...) Cache-Control: no-cache Pragma: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Language: en-GB Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html;charset=UTF-8 Is length 1090 correct?`So does the full body have that length? !--Rail Timestamp: -- !--Generated by Journeycheck 4.0-RC5 on host jc-pres2.nexusalpha.com -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html lang=english .head ..meta http-equiv=Content-Type content=text/html;charset=UTF-8/ ..meta http-equiv=expires content=0/ ..meta http-equiv=cache-control content=no-cache/ ..meta http-equiv=pragma content=nocache/ ..meta http-equiv=Content-Language content=en-us/ ..meta content=Nexus Alpha:Andrew Langmead, Ben Short, Lawrence Chan name=author/ ..meta content=journey check,rail,journey,nexus alpha,plan,disruption,transport,trains name=keywords/ ..meta content=Allows you to check your journey with a particular rail company name=description/ ..!--META HTTP-EQUIV=RefreshCONTENT=10; URL=http://www.jcheck.com/firstcapitalconnect/;-- .. ..link href=/resources/common/web/css/common.css rel=stylesheet type=text/css/ ..!--script type=text/javascript src=/resources/common/web/javascript Which is whats being shown in the browser, if i view the source. Next I see more packets that say 'Continuation or non-HTTP traffic' in the Info column of wireshark. When I look at the byte output I can see that its the rest of the page. If i use wireshark to view the same request with the webapp started I dont see the initial HTTP/1.1 200 OK packet, so i assume that each packet contains the correct headers for chunking to work correctly. But the first line is mandatory for HTTP responses! So in the good case, something is slipping the observation. We could ignore that, but if we don't see something in the good case, we must question the observation in the bad case too. So it seams that im getting a dodgy content length in the first packet if the request goes to the stoppped webapp first. Or infact the whole chunking thing is not working correctly. If there is a Cntent-Length header, there is no chunking involved. Chunking gives a way of telling the length of small chunks of the answer. For dynamic content it's often difficult to tell the full length in advance, but a Content-Length header has to come before the body. So chunking is used to prevent the need of buffering the full body before sending it out. The reposnse you showed us above does not use chunking, but instead the content-length header, which is OK and stable for content with easy to determine length. Which browser is it? If you can reproduce the problem with firefox, there are very good plugins, that can show you details of communication and content from inside the browser. A good example is FireBug, which I can recommend. Even if you usually use MSIE, it might be important to cross check with Firefox in order to find out if the problem is browser specific. Regards, Rainer On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote: You could dig deeper into two different directions: - protocol: is the content-length in the response headers correct? Or does it use chunked transfer, and is this OK? - sniff the network in front of the apache: do the packets actually get send back to the browser? Regards, Rainer ben short wrote: I'm not getting anywhere with this :( I have set the logging to trace for mod_jk and I can see all the response packets. I have also turned on our applications response logging and can see that the running webapp writes the full page to the response. I can then see it all in the mod_jk logs. But the browser only shows a partial page. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat cluster serving ~50 lines of the page when a request hits a stopped webapp for the first time
Is length 1090 correct?`So does the full body have that length? Yes firefox reports that the page is 1k in size, via the web developer's tool bar. I have seen it happen in IE 6 and 7 also. Would it be possible for me to email you directly the output of wireshark for both one bad and one good attempt? I really appreciate you helping me out on this one. Regards Ben Short On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote: ben short wrote: Ok I have used wireshark and see that the request is sent to the apache httpd. The next first packet i get back contains the following... HTTP/1.1 200 OK Date: Tue, 31 Jul 2007 14:57:25 GMT Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a mod_jk/1.2.23 Content-Length: 1090 ***NOTE every line but this has a \r\n shown in the middle frame of wireshark *** All Headers are supposed to end with \r\n, but I would find it very strange, if this does not do it (I can not really think of a reson for that, but who knows...) Cache-Control: no-cache Pragma: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Language: en-GB Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html;charset=UTF-8 Is length 1090 correct?`So does the full body have that length? !--Rail Timestamp: -- !--Generated by Journeycheck 4.0-RC5 on host jc-pres2.nexusalpha.com -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html lang=english .head ..meta http-equiv=Content-Type content=text/html;charset=UTF-8/ ..meta http-equiv=expires content=0/ ..meta http-equiv=cache-control content=no-cache/ ..meta http-equiv=pragma content=nocache/ ..meta http-equiv=Content-Language content=en-us/ ..meta content=Nexus Alpha:Andrew Langmead, Ben Short, Lawrence Chan name=author/ ..meta content=journey check,rail,journey,nexus alpha,plan,disruption,transport,trains name=keywords/ ..meta content=Allows you to check your journey with a particular rail company name=description/ ..!--META HTTP-EQUIV=RefreshCONTENT=10; URL=http://www.jcheck.com/firstcapitalconnect/;-- .. ..link href=/resources/common/web/css/common.css rel=stylesheet type=text/css/ ..!--script type=text/javascript src=/resources/common/web/javascript Which is whats being shown in the browser, if i view the source. Next I see more packets that say 'Continuation or non-HTTP traffic' in the Info column of wireshark. When I look at the byte output I can see that its the rest of the page. If i use wireshark to view the same request with the webapp started I dont see the initial HTTP/1.1 200 OK packet, so i assume that each packet contains the correct headers for chunking to work correctly. But the first line is mandatory for HTTP responses! So in the good case, something is slipping the observation. We could ignore that, but if we don't see something in the good case, we must question the observation in the bad case too. So it seams that im getting a dodgy content length in the first packet if the request goes to the stoppped webapp first. Or infact the whole chunking thing is not working correctly. If there is a Cntent-Length header, there is no chunking involved. Chunking gives a way of telling the length of small chunks of the answer. For dynamic content it's often difficult to tell the full length in advance, but a Content-Length header has to come before the body. So chunking is used to prevent the need of buffering the full body before sending it out. The reposnse you showed us above does not use chunking, but instead the content-length header, which is OK and stable for content with easy to determine length. Which browser is it? If you can reproduce the problem with firefox, there are very good plugins, that can show you details of communication and content from inside the browser. A good example is FireBug, which I can recommend. Even if you usually use MSIE, it might be important to cross check with Firefox in order to find out if the problem is browser specific. Regards, Rainer On 7/31/07, Rainer Jung [EMAIL PROTECTED] wrote: You could dig deeper into two different directions: - protocol: is the content-length in the response headers correct? Or does it use chunked transfer, and is this OK? - sniff the network in front of the apache: do the packets actually get send back to the browser? Regards, Rainer ben short wrote: I'm not getting anywhere with this :( I have set the logging to trace for mod_jk and I can see all the response packets. I have also turned on our applications response logging and can see that the running webapp writes the full page to the response. I can then see it all in the mod_jk logs. But the browser only shows a partial page. - To start a new topic, e-mail:
Recovery from OutOfMemoryError?
Our Tomcat-based app suffers from occasional OutOfMemoryErrors. We have found that we need to manually restart Tomcat when these happen; frequently the Tomcat process appears to be working after the error, but is actually crippled in one way or another by the loss of some key thread. We would very much like to trigger an automated Tomcat restart when an OOME occurs. Does anyone have suggestions on the cleanest, safest way to arrange this? (We're running Tomcat as a normal process under Linux, if that matters.) -- Craig Berry Principal Architect and Technical Manager PortBlue Corporation (http://www.portblue.com/)
Re: Recovery from OutOfMemoryError?
variant 1: a log watcher that checks for OOMe and restarts tomcat variant 2: fix the bug :-) regards Leon On 7/31/07, Craig Berry [EMAIL PROTECTED] wrote: Our Tomcat-based app suffers from occasional OutOfMemoryErrors. We have found that we need to manually restart Tomcat when these happen; frequently the Tomcat process appears to be working after the error, but is actually crippled in one way or another by the loss of some key thread. We would very much like to trigger an automated Tomcat restart when an OOME occurs. Does anyone have suggestions on the cleanest, safest way to arrange this? (We're running Tomcat as a normal process under Linux, if that matters.) -- Craig Berry Principal Architect and Technical Manager PortBlue Corporation (http://www.portblue.com/) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recovery from OutOfMemoryError?
Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space, so that's going to be tough. I'd thought of the log watcher, but that seems a rather blunt instrument; I was thinking there might be some kind of Tomcat (or JVM) intrinsic mechanism for this. -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 9:46 AM To: Tomcat Users List Subject: Re: Recovery from OutOfMemoryError? variant 1: a log watcher that checks for OOMe and restarts tomcat variant 2: fix the bug :-) regards Leon On 7/31/07, Craig Berry [EMAIL PROTECTED] wrote: Our Tomcat-based app suffers from occasional OutOfMemoryErrors. We have found that we need to manually restart Tomcat when these happen; frequently the Tomcat process appears to be working after the error, but is actually crippled in one way or another by the loss of some key thread. We would very much like to trigger an automated Tomcat restart when an OOME occurs. Does anyone have suggestions on the cleanest, safest way to arrange this? (We're running Tomcat as a normal process under Linux, if that matters.) -- Craig Berry Principal Architect and Technical Manager PortBlue Corporation (http://www.portblue.com/) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
1. you may have a memory leak in your code... do some profiling 2. check out abandoned sessions that are due to expire perhaps you can lower the session timeout and that will make some memory available earlier. Craig Berry wrote: Our Tomcat-based app suffers from occasional OutOfMemoryErrors. We have found that we need to manually restart Tomcat when these happen; frequently the Tomcat process appears to be working after the error, but is actually crippled in one way or another by the loss of some key thread. We would very much like to trigger an automated Tomcat restart when an OOME occurs. Does anyone have suggestions on the cleanest, safest way to arrange this? (We're running Tomcat as a normal process under Linux, if that matters.) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: secured authentication / connection
Erf... It wasn't especially out of my reach. But (as many, I presume), when I'm looking for info, I tend to google around, where there is info fresh from the source... Thanks to both of you and I will try to use more the official documentation, in the future. Cheers, Pierre 2007/7/31, Caldarale, Charles R [EMAIL PROTECTED]: From: Pierre Goupil [mailto:[EMAIL PROTECTED] Subject: secured authentication / connection Can anyone point me to a relevant tutorial ? Besides configuring SSL as Mark T pointed out, you need to read section 12 of the servlet spec: http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index.html Section 12.5.3 is specifically for form-based authentication. To force SSL for everything, use a transport-guarantee of CONFIDENTIAL in conjunction with a url-pattern of /* in your app's WEB-INF/web.xml file. For example: security-constraint web-resource-collection web-resource-nameProtect Everything/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameRequiredRoleHere/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Si le sang ne coule pas assez chaud dans tes veines, je le répandrais sur le sable pour qu'il bouille au soleil. (Maraxus de Kelde)
RE: Recovery from OutOfMemoryError?
From: Craig Berry [mailto:[EMAIL PROTECTED] Subject: RE: Recovery from OutOfMemoryError? Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space Let's put it another way: your webapp and/or JVM configuration aren't set up properly to handle the number of users you have; don't blame it on the users (or Tomcat). What JVM do you have installed? What version of Tomcat? What OS? Are you sure you're out of heap space, or is some other resource being exhausted, such as file handles? If it's really heap space, is it the PermGen? Do you have a memory leak in your webapp? Have you profiled what's going on to see the real cause of the problem? - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
On 31/07/2007, at 6:52 PM, Craig Berry wrote: Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space, so that's going to be tough. I'd thought of the log watcher, but that seems a rather blunt instrument; I was thinking there might be some kind of Tomcat (or JVM) intrinsic mechanism for this. How much heap space do you have set?! Why don't you just increase it? If not, why not decrease the number of users you allow onto the server? Restarting Tomcat is even more 'blunt' then allowing access to fewer users... Confused... Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recovery from OutOfMemoryError?
Oh, I'm not blaming either one. Normally, our server is quite adequate to handle the expected user load. Every now and then we get a perfect storm of too many users asking for too many large-memory requests, and an OOME happens. We're investigating ways to increase capacity, but in the mean time, automating recovery would help keep the 3am phone calls from happening. We're running Java 6 and Tomcat 6. It's definitely heap space that's running out, and we're actively profiling various load scenarios to spot the most likely targets for memory-use reduction. But again, a short-term technique to automate the restart would help a lot. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 10:00 AM To: Tomcat Users List Subject: RE: Recovery from OutOfMemoryError? From: Craig Berry [mailto:[EMAIL PROTECTED] Subject: RE: Recovery from OutOfMemoryError? Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space Let's put it another way: your webapp and/or JVM configuration aren't set up properly to handle the number of users you have; don't blame it on the users (or Tomcat). What JVM do you have installed? What version of Tomcat? What OS? Are you sure you're out of heap space, or is some other resource being exhausted, such as file handles? If it's really heap space, is it the PermGen? Do you have a memory leak in your webapp? Have you profiled what's going on to see the real cause of the problem? - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recovery from OutOfMemoryError?
The trouble is that our memory demand per user session is unpredictable. Some user sessions do things that barely touch the heap; other sessions can make huge demands. It depends on what the user chooses to do during the session. So throttling user count down to make it utterly safe would be impractical. Instead, statistically, it's unlikely that more than one or two memory-hungry sessions will be active at any given time. When we get more than that at once, we risk an OOME. -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 10:01 AM To: Tomcat Users List Subject: Re: Recovery from OutOfMemoryError? On 31/07/2007, at 6:52 PM, Craig Berry wrote: Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space, so that's going to be tough. I'd thought of the log watcher, but that seems a rather blunt instrument; I was thinking there might be some kind of Tomcat (or JVM) intrinsic mechanism for this. How much heap space do you have set?! Why don't you just increase it? If not, why not decrease the number of users you allow onto the server? Restarting Tomcat is even more 'blunt' then allowing access to fewer users... Confused... Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat with 8 GB memory
There can be hidden dependencies on native code. For example, JDBC drivers (OCI, ...). Fortunately there are usually corresponding 64 bit libraries available - you just need to update PATH or LD_LIBRARY_PATH. - Alexey. Andrew Miehs wrote: On 31/07/2007, at 2:04 PM, Mohan2005 wrote: so now we have to identify if our application is 64bit compatible or 32bit compatible. If your application is only JAVA, then no porting is required. Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexey N. Solofnenko http://trelony.cjb.net/ Pleasant Hill, CA (GMT-8 usually) smime.p7s Description: S/MIME Cryptographic Signature
RE: Recovery from OutOfMemoryError?
From: Craig Berry [mailto:[EMAIL PROTECTED] Subject: RE: Recovery from OutOfMemoryError? It depends on what the user chooses to do during the session. Again, try another point of view. It's what the webapps choose to do in response to user requests that provoke the problem. Is there some spot in your code that's making a grab for a big array and failing to handle the possibility of allocation failure? Or have you simply over-configured the number of connector threads for the size heap you're running? - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
hi Craig, if you get OutOfMemoryError reliably in your log, you might consider the tanukisoftware Java Service Wrapper as an intermediate solution. It can watch the output and automatically restart Tomcat. I would not combine it with an app, that has a very high volume of log output though. Also I think, the output must go throw STDOUT, so if the error occurs in different log files, you have to throw all those together to stdout. Of course with log frameworks you can define stdout as an additional log target. Setting this service wrapper up will take you some time, but it's a very powerful wrapper. Java 6 has -XX:OnOutOfMemoryError=cmd1 args...;cmd2 ... which could also be useful (sending mail etc.). I don't really know how reliable it is, but setup is definitely faster than the service wrapper. If this works, report it back,, it might be useful for others as well. Be careful when designing cmd and args about assumptions concerning current working directory and environment. Regards, Rainer Craig Berry wrote: Our Tomcat-based app suffers from occasional OutOfMemoryErrors. We have found that we need to manually restart Tomcat when these happen; frequently the Tomcat process appears to be working after the error, but is actually crippled in one way or another by the loss of some key thread. We would very much like to trigger an automated Tomcat restart when an OOME occurs. Does anyone have suggestions on the cleanest, safest way to arrange this? (We're running Tomcat as a normal process under Linux, if that matters.) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
On 31/07/2007, at 7:19 PM, Caldarale, Charles R wrote: From: Craig Berry [mailto:[EMAIL PROTECTED] Subject: RE: Recovery from OutOfMemoryError? It depends on what the user chooses to do during the session. Again, try another point of view. It's what the webapps choose to do in response to user requests that provoke the problem. Is there some spot in your code that's making a grab for a big array and failing to handle the possibility of allocation failure? Or have you simply over-configured the number of connector threads for the size heap you're running? I would also strongly agree with the fix the problem solution, but if you really want to 'kick' your users out - then have a look at swatch. IIRC it can perform a task on receiving a log message. Cheers Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recovery from OutOfMemoryError?
Dear Craig, You are familiar with, even with enough systemmemory, JVM uses limited memory? I your application consumes much memory, you could change settings in the tomcat6.conf file: #JAVA_OPTS=-Xminf0.1 -Xmaxf0.3 JAVA_OPTS=-Xmx1024M -Xms512M Or higher, depending on your systemconfiguration. Not too high though. You need testing, for this could lead Tomcat not to start. (second, consider using -server setting: JAVA_OPTS=- server -Xmx1024M -Xms512M More information on http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/java.html#standard Marco -Oorspronkelijk bericht- Van: Craig Berry [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 31 juli 2007 18:44 Aan: users@tomcat.apache.org Onderwerp: Recovery from OutOfMemoryError? Our Tomcat-based app suffers from occasional OutOfMemoryErrors. We have found that we need to manually restart Tomcat when these happen; frequently the Tomcat process appears to be working after the error, but is actually crippled in one way or another by the loss of some key thread. We would very much like to trigger an automated Tomcat restart when an OOME occurs. Does anyone have suggestions on the cleanest, safest way to arrange this? (We're running Tomcat as a normal process under Linux, if that matters.) -- Craig Berry Principal Architect and Technical Manager PortBlue Corporation (http://www.portblue.com/) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
On 31/07/2007, at 7:39 PM, Marco wrote: Dear Craig, You are familiar with, even with enough systemmemory, JVM uses limited memory? I your application consumes much memory, you could change settings in the tomcat6.conf file: #JAVA_OPTS=-Xminf0.1 -Xmaxf0.3 JAVA_OPTS=-Xmx1024M -Xms512M mx and ms should be the same for a server application. And as mentioned by someone earlier, you will probably want to increase MaxPermSize as well. -Xmx1500m -Xms1500m -XX:MaxPermSize=256m Cheers Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recovery from OutOfMemoryError?
Hi, Marco, Yes, our memory allocation sizes are carefully selected, and set near the maximum available in 32-bit Java. We're investigating running under a 64-bit JVM to enable the use of additional heap space. -Original Message- From: Marco [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 10:40 AM To: 'Tomcat Users List' Subject: RE: Recovery from OutOfMemoryError? Dear Craig, You are familiar with, even with enough systemmemory, JVM uses limited memory? I your application consumes much memory, you could change settings in the tomcat6.conf file: #JAVA_OPTS=-Xminf0.1 -Xmaxf0.3 JAVA_OPTS=-Xmx1024M -Xms512M Or higher, depending on your systemconfiguration. Not too high though. You need testing, for this could lead Tomcat not to start. (second, consider using -server setting: JAVA_OPTS=- server -Xmx1024M -Xms512M More information on http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/java.html#standard Marco -Oorspronkelijk bericht- Van: Craig Berry [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 31 juli 2007 18:44 Aan: users@tomcat.apache.org Onderwerp: Recovery from OutOfMemoryError? Our Tomcat-based app suffers from occasional OutOfMemoryErrors. We have found that we need to manually restart Tomcat when these happen; frequently the Tomcat process appears to be working after the error, but is actually crippled in one way or another by the loss of some key thread. We would very much like to trigger an automated Tomcat restart when an OOME occurs. Does anyone have suggestions on the cleanest, safest way to arrange this? (We're running Tomcat as a normal process under Linux, if that matters.) -- Craig Berry Principal Architect and Technical Manager PortBlue Corporation (http://www.portblue.com/) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: secured authentication / connection
Quote from the Tomcat doc : *** It is important to note that configuring Tomcat to take advantage of secure sockets is usually only necessary when running it as a stand-alone web server. When running Tomcat primarily as a Servlet/JSP container behind another web server, such as Apache or Microsoft IIS, it is usually necessary to configure the primary web server to handle the SSL connections from users. Typically, this server will negotiate all SSL-related functionality, then pass on any requests destined for the Tomcat container only after decrypting those requests. *** I'm using Tomcat 5.5, Apache 2.0.55 mod_jk 1.2.18. I'd really like to manage my SSL from within Tomcat, mainly because I feel more comfortable with it than with Apache. But I still need Apache in front of it, in order to be able to use the port 80 this sort of things. Does this mean that I can, but that I will then have to configure my Apache / jk a bit more than with straight-forward http connections ? How to do this ? Cheers, Pierre
Re: secured authentication / connection
SSL as a protocol is not designed to allow for this sort of man-in-the-middle configuration. Either tomcat handles the ssl and listens on port 443 or Apache httpd handles the ssl and listens on 443. --David Pierre Goupil wrote: Quote from the Tomcat doc : *** It is important to note that configuring Tomcat to take advantage of secure sockets is usually only necessary when running it as a stand-alone web server. When running Tomcat primarily as a Servlet/JSP container behind another web server, such as Apache or Microsoft IIS, it is usually necessary to configure the primary web server to handle the SSL connections from users. Typically, this server will negotiate all SSL-related functionality, then pass on any requests destined for the Tomcat container only after decrypting those requests. *** I'm using Tomcat 5.5, Apache 2.0.55 mod_jk 1.2.18. I'd really like to manage my SSL from within Tomcat, mainly because I feel more comfortable with it than with Apache. But I still need Apache in front of it, in order to be able to use the port 80 this sort of things. Does this mean that I can, but that I will then have to configure my Apache / jk a bit more than with straight-forward http connections ? How to do this ? Cheers, Pierre - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: secured authentication / connection
From: Pierre Goupil [mailto:[EMAIL PROTECTED] Subject: Re: secured authentication / connection But I still need Apache in front of it, in order to be able to use the port 80 this sort of things. Tomcat can quite happily use port 80; what else do you need httpd for? (We'll assume you mean httpd when you refer to Apache, since both Tomcat and httpd are Apache products.) - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: secured authentication / connection
I have some static HTML content. But I will handle it with Tomcat too, in order to ease things regarding my present need. So I will stick to Tomcat for SSL management and won't use Apache *Httpd* ;-) any more... Easy. As easy as my need in fact. Actually, my only sensitive need is to have SSL connections from end-to-end, as this is an application for a persons goods security firm. I don't want to take any risk with this kind of data. I'm going to investigate the use of port 80 with tomcat, now ! Thanx again ! Pierre 2007/7/31, Caldarale, Charles R [EMAIL PROTECTED]: From: Pierre Goupil [mailto:[EMAIL PROTECTED] Subject: Re: secured authentication / connection But I still need Apache in front of it, in order to be able to use the port 80 this sort of things. Tomcat can quite happily use port 80; what else do you need httpd for? (We'll assume you mean httpd when you refer to Apache, since both Tomcat and httpd are Apache products.) - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Si le sang ne coule pas assez chaud dans tes veines, je le répandrais sur le sable pour qu'il bouille au soleil. (Maraxus de Kelde)
Re: secured authentication / connection
Port 80 is for unencrypted traffic. The default port for SSL (https protocol) is 443. --David Pierre Goupil wrote: I have some static HTML content. But I will handle it with Tomcat too, in order to ease things regarding my present need. So I will stick to Tomcat for SSL management and won't use Apache *Httpd* ;-) any more... Easy. As easy as my need in fact. Actually, my only sensitive need is to have SSL connections from end-to-end, as this is an application for a persons goods security firm. I don't want to take any risk with this kind of data. I'm going to investigate the use of port 80 with tomcat, now ! Thanx again ! Pierre 2007/7/31, Caldarale, Charles R [EMAIL PROTECTED]: From: Pierre Goupil [mailto:[EMAIL PROTECTED] Subject: Re: secured authentication / connection But I still need Apache in front of it, in order to be able to use the port 80 this sort of things. Tomcat can quite happily use port 80; what else do you need httpd for? (We'll assume you mean httpd when you refer to Apache, since both Tomcat and httpd are Apache products.) - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: secured authentication / connection
Ooops... Yes, definitely... But I still need the port 80 for my purely static (unencrypted) content. The connections to my webapp will be encrypted from end-to-end using its context name, but all the content accessible within the default context will be static. Pierre 2007/7/31, David Smith [EMAIL PROTECTED]: Port 80 is for unencrypted traffic. The default port for SSL (https protocol) is 443. --David Pierre Goupil wrote: I have some static HTML content. But I will handle it with Tomcat too, in order to ease things regarding my present need. So I will stick to Tomcat for SSL management and won't use Apache *Httpd* ;-) any more... Easy. As easy as my need in fact. Actually, my only sensitive need is to have SSL connections from end-to-end, as this is an application for a persons goods security firm. I don't want to take any risk with this kind of data. I'm going to investigate the use of port 80 with tomcat, now ! Thanx again ! Pierre 2007/7/31, Caldarale, Charles R [EMAIL PROTECTED]: From: Pierre Goupil [mailto:[EMAIL PROTECTED] Subject: Re: secured authentication / connection But I still need Apache in front of it, in order to be able to use the port 80 this sort of things. Tomcat can quite happily use port 80; what else do you need httpd for? (We'll assume you mean httpd when you refer to Apache, since both Tomcat and httpd are Apache products.) - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Si le sang ne coule pas assez chaud dans tes veines, je le répandrais sur le sable pour qu'il bouille au soleil. (Maraxus de Kelde)
Re: Recovery from OutOfMemoryError?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Craig, Craig Berry wrote: Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space, so that's going to be tough. Too many users logged-in, or too many simultaneous connections? If the latter, you can simply limit the number of simultaneous (active) connections using the Connector attributes in server.xml. If the former, you have many options (from easiest to most difficult): 1. Increase the heap size (you probably already did that). 2. Shorten the session timeout to destroy sessions more quickly. 3. Buy more memory. 4. Cluster your applications among multiple servers. 5. Lighten the amount of information you store in the session to reclaim memory. I'd thought of the log watcher, but that seems a rather blunt instrument; I was thinking there might be some kind of Tomcat (or JVM) intrinsic mechanism for this. Not really. There's no global exception listener or anything. Exceptions are generally handled by the thread that is executing at the time. A thread that suffers an OOME is pretty much hosed, anyway, so counting on it to do any kind of recovery is difficult. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGr4pK9CaO5/Lv0PARAt0kAJwL8lOl5sJCxcMxcgxB4xrWObWiwACfceQn yBcBzdFnAjafIoBa7Pqo3vY= =pydn -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
How about keeping track of how many of these big operations are running (using a synchronized counter) and returning a 503 status for big requests that come in when the system is busy? Only the servlet(s) or page(s) that handle these big requests would be limited, the rest of the webapp would keep handling requests as normal. -- Len On 7/31/07, Craig Berry [EMAIL PROTECTED] wrote: The trouble is that our memory demand per user session is unpredictable. Some user sessions do things that barely touch the heap; other sessions can make huge demands. It depends on what the user chooses to do during the session. So throttling user count down to make it utterly safe would be impractical. Instead, statistically, it's unlikely that more than one or two memory-hungry sessions will be active at any given time. When we get more than that at once, we risk an OOME. -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 10:01 AM To: Tomcat Users List Subject: Re: Recovery from OutOfMemoryError? On 31/07/2007, at 6:52 PM, Craig Berry wrote: Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space, so that's going to be tough. I'd thought of the log watcher, but that seems a rather blunt instrument; I was thinking there might be some kind of Tomcat (or JVM) intrinsic mechanism for this. How much heap space do you have set?! Why don't you just increase it? If not, why not decrease the number of users you allow onto the server? Restarting Tomcat is even more 'blunt' then allowing access to fewer users... Confused... Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recovery from OutOfMemoryError?
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? A thread that suffers an OOME is pretty much hosed, anyway, so counting on it to do any kind of recovery is difficult. Why do you say that? The only thing that failed is the allocation of some particular object, leaving the rest of the thread's state intact. In most cases, it's easy to return a failure notification to the caller of whatever method encountered the error. Unless one's design is based on wishful thinking, of course... - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question on starting tomcat (as a windows service) from Ant
Buddy, you should not have such servlet-.jar inside the WEB INF/lib, print me a list of fiels inside yoru web-inf Pls, write to the list. tks -Original Message- From: Lenny Wintfeld [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 2:55 PM To: Asensio, Rodrigo Subject: Question on starting tomcat (as a windows service) from Ant Rodrigo, Thanks for the feedback. That's essentially what I did as a stopgap measure. Got a little more basic even: Downloaded another copy of Tomcat for windows, but didn't use the windows installer. Instead, I'm using the version that installs startup.bat and shutdown.bat and I'm exec'ing them from Ant. I sure wish I could find what other app might be using log4j.properties. I find now, also, a similar problem where after dropping the .war into .../webapps it can't delete the whole directory because a file different than log4j.properties has a second reference: servlet-api.jar in the .../WEB-INF/lib directory. Very annoying but I can still make progress, just being slowed down by it. -Lenny Wintfeld This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee. Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law. If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system. If you have any questions about this e-mail please notify the sender immediately. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classloading Question
I am connecting my application to a Oracle XE database and I am having a weird issue with classloading. According to the classloading documentation [1] I should be placing the Oracle JDBC jar file ojdbc14.jar in $CATALINA_HOME/shared/lib, but when I do that, my application throws a Cannot load JDBC driver class 'oracle.jdbc.OracleDriver' exception. This also happens if I move the jar file to WEB-INF/lib too. The only way I can get it to work is to place it in $CATALINA_HOME/common/lib Any ideas? I've attached my test case and it's the application level context.xml file thanks -- brian [1] - http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html = index.jsp (well, the important parts) = InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup(java:comp/env/jdbc/XEDB); Connection conn = ds.getConnection(); = context.xml = ?xml version=1.0 encoding=UTF-8? Context Resource name=jdbc/XEDB type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:brian/password@//localhost:1521/XE maxActive=8 / /Context - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classloading Question
What version of TC are you using? I wouldn't put the jar file there, no! Try in %TC HOME%\common\lib, whereever that is. -Original Message- From: Brian Munroe [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 3:50 PM To: Tomcat Users List Subject: Classloading Question I am connecting my application to a Oracle XE database and I am having a weird issue with classloading. According to the classloading documentation [1] I should be placing the Oracle JDBC jar file ojdbc14.jar in $CATALINA_HOME/shared/lib, but when I do that, my application throws a Cannot load JDBC driver class 'oracle.jdbc.OracleDriver' exception. This also happens if I move the jar file to WEB-INF/lib too. The only way I can get it to work is to place it in $CATALINA_HOME/common/lib Any ideas? I've attached my test case and it's the application level context.xml file thanks -- brian [1] - http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html = index.jsp (well, the important parts) = InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup(java:comp/env/jdbc/XEDB); Connection conn = ds.getConnection(); = context.xml = ?xml version=1.0 encoding=UTF-8? Context Resource name=jdbc/XEDB type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:brian/password@//localhost:1521/XE maxActive=8 / /Context - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classloading Question
On 7/31/07, Propes, Barry L [EMAIL PROTECTED] wrote: What version of TC are you using? I wouldn't put the jar file there, no! I am using 5.5.23. Wouldn't put it where? shared/lib? Try in %TC HOME%\common\lib, whereever that is. I did, and it works, but from my understanding of the classloading documentation, you should technically place application level jars in $CATALINA_HOME/shared/lib, in which it does not work. -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classloading Question
From: Brian Munroe [mailto:[EMAIL PROTECTED] Subject: Re: Classloading Question I did, and it works, but from my understanding of the classloading documentation, you should technically place application level jars in $CATALINA_HOME/shared/lib, in which it does not work. Depends on whether or not you're letting Tomcat manage the pool. If you are, the driver jar has to go where Tomcat can see it as well, and that's common/lib. Look here for details: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.h tml - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classloading Question
On 7/31/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: Look here for details: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.h tml Heh, II was wondering about that. I just gleamed that and found this gem: Drivers for older Oracle versions may be distributed as *.zip files rather than *.jar files. Tomcat will only use *.jar files installed in $CATALINA_HOME/common/lib. Therefore classes111.zip or classes12.zip will need to be renamed with a .jar extension. Since jarfiles are zipfiles, there is no need to unzip and jar these files - a simple rename will suffice. Bam, right there in front of me! thanks! -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configuring PHP on Tomcat 6.0
Does anyone have a good reference for installing PHP on Tomcat 6.0? There is no good info at php.net and the instructions I've found through Google talk about modifying an httpd.conf file that is not in Tomcat. I have a feeling these instructions are for older versions of Tomcat (Google is starting to suck). I have always heard how easy PHP is, not true so far. Thx. Mike Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
How about using SoftReference to store _large_ or some session data? It must add additional overhead due to data re-retrieval needed in case it has been collected, but at least its guaranteed that you will never get an oome, and chances are good, that you will loose inactive sessions earlier. regards leon p.s. of course only a workaround but may help if data size is unpredictable. On 7/31/07, Craig Berry [EMAIL PROTECTED] wrote: The trouble is that our memory demand per user session is unpredictable. Some user sessions do things that barely touch the heap; other sessions can make huge demands. It depends on what the user chooses to do during the session. So throttling user count down to make it utterly safe would be impractical. Instead, statistically, it's unlikely that more than one or two memory-hungry sessions will be active at any given time. When we get more than that at once, we risk an OOME. -Original Message- From: Andrew Miehs [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 31, 2007 10:01 AM To: Tomcat Users List Subject: Re: Recovery from OutOfMemoryError? On 31/07/2007, at 6:52 PM, Craig Berry wrote: Fixing the bug would be cool, but the bug is actually just too many users contending for the same heap space, so that's going to be tough. I'd thought of the log watcher, but that seems a rather blunt instrument; I was thinking there might be some kind of Tomcat (or JVM) intrinsic mechanism for this. How much heap space do you have set?! Why don't you just increase it? If not, why not decrease the number of users you allow onto the server? Restarting Tomcat is even more 'blunt' then allowing access to fewer users... Confused... Andrew - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
On 7/31/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? A thread that suffers an OOME is pretty much hosed, anyway, so counting on it to do any kind of recovery is difficult. Why do you say that? The only thing that failed is the allocation of some particular object, leaving the rest of the thread's state intact. In most cases, it's easy to return a failure notification to the caller of whatever method encountered the error. Unless one's design is based on wishful thinking, of course... Thats however strongly depend on where it happened... if for example the code in question was a middleware stub which is left in unpredictable state, or the orb itself, or any kind of stack somewhere, or a processing queue, or some background threads... or 3rd party libraries... chances to recover from an oome are pretty low in my opinion, and even if you recover (unless it was an unusually expensive request) the next request you get will bring you into same situation... I think there are very few places where an oome should be caught and can be handled properly, or you have to surround each new with try/catch regards Leon - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? A thread that suffers an OOME is pretty much hosed, anyway, so counting on it to do any kind of recovery is difficult. Why do you say that? The only thing that failed is the allocation of some particular object, leaving the rest of the thread's state intact. In my experience, OOMEs are not just caused by the failure of a large allocation, such as a huge array or something, but rather tons of small allocations. One extra value object that puts the heap over the top. In most cases, it's easy to return a failure notification to the caller of whatever method encountered the error. In these cases, attempting to open a file, start a process, send an email, or even generating an error page, etc. would simply result in another OOME. Actually, my past experience has been that it's the GC thread that OOMEs, not a worker thread. In this case, the VM really is hosed. You have taken issue with this assertion in the past. It has always been my understanding that a JVM that suffers an OOME is all but done for. The OP would seem to corroborate this claim, since it sounds like his whole app server becomes unresponsive once he gets an OOME (hence the early morning phone calls). If your assertion (OOMEs can be ignored, since only one allocation fails and the rest of the VM is fine) were true, then the OP would not be getting any calls in the middle of the night: the user would simply re-try the request and (hopefully) get a result the second time. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGr7bI9CaO5/Lv0PARAkZcAJ99hua96HcbrNesDPoSkHwFmHG6xgCfW+Ee PclChFZVgdQRK8zHBmJ5jrE= =WUiw -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recovery from OutOfMemoryError?
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? Thats however strongly depend on where it happened... if for example the code in question was a middleware stub which is left in unpredictable state, or the orb itself, or any kind of stack somewhere, or a processing queue, or some background threads... or 3rd party libraries... Agreed - but the above defines software of somewhat questionable quality, not written with robustness in mind. But if it's not a critical environment, the occasional outage may not matter, so robust algorithms are not always needed. I think there are very few places where an oome should be caught and can be handled properly, or you have to surround each new with try/catch Certainly you don't want try/catch everywhere, but as you say, it is needed in state-altering places so that restoration to a usable condition can be done when necessary. Employing techniques such as acquiring all necessary data structures before manipulating pointers in doubly-linked lists go a long way towards eliminating the need for complex backout mechanisms; but these often aren't learned until something catastrophic happens. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? Thats however strongly depend on where it happened... if for example the code in question was a middleware stub which is left in unpredictable state, or the orb itself, or any kind of stack somewhere, or a processing queue, or some background threads... or 3rd party libraries... Agreed - but the above defines software of somewhat questionable quality, not written with robustness in mind. But if it's not a critical environment, the occasional outage may not matter, so robust algorithms are not always needed. Are you suggesting that all methods should be written as a loops around attempts to do real work, catching OOME and re-trying until the work gets done? That's what it sounds like, here. IMHO, it's not a library's problem if there wasn't enough memory to perform its duty. It's the driver's responsibility to catch and re-attempt anything important. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGr7gq9CaO5/Lv0PARAjYhAJ0eyYzCaDls9rsjrvoJS6xu6XogCgCeKgr+ acntG1IntJLIABNbcEFKOh0= =thpd -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
On 8/1/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: ... but these often aren't learned until something catastrophic happens. great sentence :-) Leon - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recovery from OutOfMemoryError?
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? Are you suggesting that all methods should be written as a loops around attempts to do real work, catching OOME and re-trying until the work gets done? Sort of, but not at the method level - something on a larger scale. Think recoverable database operations, where nothing is permanently stored until a commit happens. And perpetual retry isn't needed - just a failure return to the caller. IMHO, it's not a library's problem if there wasn't enough memory to perform its duty. It's the driver's responsibility to catch and re-attempt anything important. Agreed. Unfortunately, many such drivers seem to ignore the possibility of failure of libraries. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5 configuration
In Tomcat 5.0.28, I had this in my server.xml: Host name=test-infonline.matc.edu appBase=/www/apps/tomcat/webapps Context path= docBase=./ /Host and in the webapps directory I had an index.html page that redirected to the servlet: meta http-equiv=refresh content=0;URL=http://test-infonline.matc.edu/test-infonline/test-infonline; This probably wasn't the correct way, but it was the only way I could direct the dns to the application. http://test-infonline.matc.edu Now on Tomcat 5.5 this doesn't work. It takes me straight to the tomcat default page. I really want to have 3 domain names on one server and be able to type in all three urls and go to the correct web application. What am I doing wrong? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I start Tomcat as a service using the HotSpot VM
I can start Tomcat with the HotSpot VM using the -server JVM option in startup.bat. But when I try to start Tomcat as a service with the -server option in the registry key HKEY_LOCAL_MACHINE-Software-Apache Software Foundation-Procrun 2.0-PortalServer-Parmeters-Java-Options it won't start. The event log is vague: The Apache Tomcat PortalServer service terminated with service-specific error 0 (0x0). I can add other JVM options to the Options value such as -XX:NewSize, -XX:MaxNewSize, etc., and it starts without problem. But the -server option kills it. Is there a specific key value for the -server option? Using: Windows 2003 Server Tomcat 5.0.28 jdk1.5.0_09 Thanks, Ron -- View this message in context: http://www.nabble.com/How-do-I-start-Tomcat-as-a-service-using-the-HotSpot-VM-tf4197361.html#a11937794 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring PHP on Tomcat 6.0
On 7/31/07, Mike Duffy [EMAIL PROTECTED] wrote: Does anyone have a good reference for installing PHP on Tomcat 6.0? Probably not; AFAIK it doesn't exist :-) There is no good info at php.net and the instructions I've found through Google talk about modifying an httpd.conf file that is not in Tomcat. That's because PHP is typically run on Apache httpd, hence references to its config file -- Tomcat is a Servlet container, not a general-purpose web server. PHP 4 has code for building a PHP servlet which kinda worked but not, in my experience, too reliably. PHP 5 dropped that altogether. If you only want PHP, use Apache httpd. There are bundled installers for various platforms, but it's not hard to build (on Linux, at least). HTH, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I start Tomcat as a service using the HotSpot VM
rmiller [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I can start Tomcat with the HotSpot VM using the -server JVM option in startup.bat. But when I try to start Tomcat as a service with the -server option in the registry key HKEY_LOCAL_MACHINE-Software-Apache Software Foundation-Procrun 2.0-PortalServer-Parmeters-Java-Options it won't start. The event log is vague: The Apache Tomcat PortalServer service terminated with service-specific error 0 (0x0). I can add other JVM options to the Options value such as -XX:NewSize, -XX:MaxNewSize, etc., and it starts without problem. But the -server option kills it. Is there a specific key value for the -server option? It is easier to use the tomcat5w.exe utility to change this, but from regedit, you change the value of the ...\Java\Jvm entry to point to the server version of jvm.dll. Using: Windows 2003 Server Tomcat 5.0.28 jdk1.5.0_09 Thanks, Ron -- View this message in context: http://www.nabble.com/How-do-I-start-Tomcat-as-a-service-using-the-HotSpot-VM-tf4197361.html#a11937794 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring PHP on Tomcat 6.0
Mike Duffy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does anyone have a good reference for installing PHP on Tomcat 6.0? There is no good info at php.net and the instructions I've found through Google talk about modifying an httpd.conf file that is not in Tomcat. I have a feeling these instructions are for older versions of Tomcat (Google is starting to suck). http://wiki.apache.org/tomcat/UsingPhp is what is in the Tomcat docs. For a better Google search, try http://www.google.com/search?q=php+servlet. I have always heard how easy PHP is, not true so far. Thx. Mike Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring PHP on Tomcat 6.0
Another alternative to Apache httpd, and this is my personal preference, I'm running this server (.php enabled) on two windows box's and they work flawlessly.. Abyss X1 web server (freeware version) More info. http://www.aprelium.com/ And to install .php support for that server: http://www.aprelium.com/abyssws/php5win.html Real easy stuff to install and set up and the price is right Cheers On 7/31/07, Hassan Schroeder [EMAIL PROTECTED] wrote: On 7/31/07, Mike Duffy [EMAIL PROTECTED] wrote: Does anyone have a good reference for installing PHP on Tomcat 6.0? Probably not; AFAIK it doesn't exist :-) There is no good info at php.net and the instructions I've found through Google talk about modifying an httpd.conf file that is not in Tomcat. That's because PHP is typically run on Apache httpd, hence references to its config file -- Tomcat is a Servlet container, not a general-purpose web server. PHP 4 has code for building a PHP servlet which kinda worked but not, in my experience, too reliably. PHP 5 dropped that altogether. If you only want PHP, use Apache httpd. There are bundled installers for various platforms, but it's not hard to build (on Linux, at least). HTH, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I start Tomcat as a service using the HotSpot VM
Thanks for clarifying this Bill. As it turns out service.bat creates the service to use the server version of jvm.dll by default; the Jvm arguement is pointing to D:\Java\jdk1.5.0_09\jre\bin\server\jvm.dll. Should have noticed that :) Do you know of any other JVM tuning arguement odities when starting Tomcat as a service? It is easier to use the tomcat5w.exe utility to change this, but from regedit, you change the value of the ...\Java\Jvm entry to point to the server version of jvm.dll. -- View this message in context: http://www.nabble.com/How-do-I-start-Tomcat-as-a-service-using-the-HotSpot-VM-tf4197361.html#a11938811 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recovery from OutOfMemoryError?
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? (Sorry for not responding sooner. Went out to dinner and to see the Spider Pig movie :-) Actually, my past experience has been that it's the GC thread that OOMEs, not a worker thread. Assuming we're talking about a current HotSpot-based JVM, the threads doing GCs cannot get OOMEs, since they are dedicated to doing just GC operations, and never do any object allocations themselves. On older JVMs (and some from other vendors), the thread that initially encounters an allocation failure also does the GC; if the GC fails to recover enough memory, it can generate an OOME for itself. It has always been my understanding that a JVM that suffers an OOME is all but done for. The JVM itself doesn't care about any exceptions thrown at the application. There are certainly a ton of applications that handle such error conditions very badly, and hang themselves up by doing such things as trying to display messages rather than nulling out now useless references. Some of the stress-testing of our JVM involves running apps designed to provoke OOMEs; these readily recover and keep on truckin'. The OP would seem to corroborate this claim, since it sounds like his whole app server becomes unresponsive once he gets an OOME (hence the early morning phone calls). The supposed timing of the phone calls leaves me somewhat skeptical; what are they running where the peak load occurs at 3 AM? If your assertion (OOMEs can be ignored, since only one allocation fails and the rest of the VM is fine) were true, then the OP would not be getting any calls in the middle of the night: the user would simply re-try the request and (hopefully) get a result the second time. That's not what I said at all. Each logical module should be designed to handle such situations, typically by discarding what has been done up to the point of failure, and then returning an error to its caller. What is likely to have happened instead in the OP's case is that the app encountering the OOME had no provision at all for error recovery, and simply quit, leaving many now useless objects around with live references to them. It may have even made matters worse by trying to generate an error message of some sort. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring PHP on Tomcat 6.0
you might wnna take a look at this http://quercus.caucho.com/ i havent use it, but maybe its is useful for you. On 8/1/07, Mike Duffy [EMAIL PROTECTED] wrote: Does anyone have a good reference for installing PHP on Tomcat 6.0? There is no good info at php.net and the instructions I've found through Google talk about modifying an httpd.conf file that is not in Tomcat. I have a feeling these instructions are for older versions of Tomcat (Google is starting to suck). I have always heard how easy PHP is, not true so far. Thx. Mike Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Andre- When the hammer is the only tool that you have, every problem seems like a nail
RE: Tomcat 5.5 configuration
From: Susan Richards [mailto:[EMAIL PROTECTED] Subject: Tomcat 5.5 configuration In Tomcat 5.0.28, I had this in my server.xml: Host name=test-infonline.matc.edu appBase=/www/apps/tomcat/webapps Context path= docBase=./ /Host The above - having docBase equal to appBase - was never intended to work; that it ever did anything useful at all was an accident. In current versions of Tomcat, do not put Context elements in server.xml, and do not use the path or docBase attributes, except in special circumstances. I really want to have 3 domain names on one server and be able to type in all three urls and go to the correct web application. If you mean that the three domain names each have a separate default webapp, then you should set up three Host elements in server.xml, one for each desired domain name. Within each Host define a unique value for its appBase directory. Under each appBase directory, install the appropriate webapp as ROOT.war or in the ROOT directory (case sensitive naming). No filter required. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recovery from OutOfMemoryError?
I have recently changed a lot of my old perceptions on this matter after reading this excellent article: http://www.ibm.com/developerworks/java/library/j-jtp01274.html If you change your mindset when you write your apps to consider how the garbage collector actually operates, then those memory errors are less likely to come back and bite you. And on the subject of soft references, I started using them as well as transient decelerations on some objects I didn't need to persist in serializable classes and it really helps reduce the load. Java 6 also comes with JConsole, a really handy profiling tool, make the most of it. Peter Caldarale, Charles R wrote: From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Recovery from OutOfMemoryError? (Sorry for not responding sooner. Went out to dinner and to see the Spider Pig movie :-) Actually, my past experience has been that it's the GC thread that OOMEs, not a worker thread. Assuming we're talking about a current HotSpot-based JVM, the threads doing GCs cannot get OOMEs, since they are dedicated to doing just GC operations, and never do any object allocations themselves. On older JVMs (and some from other vendors), the thread that initially encounters an allocation failure also does the GC; if the GC fails to recover enough memory, it can generate an OOME for itself. It has always been my understanding that a JVM that suffers an OOME is all but done for. The JVM itself doesn't care about any exceptions thrown at the application. There are certainly a ton of applications that handle such error conditions very badly, and hang themselves up by doing such things as trying to display messages rather than nulling out now useless references. Some of the stress-testing of our JVM involves running apps designed to provoke OOMEs; these readily recover and keep on truckin'. The OP would seem to corroborate this claim, since it sounds like his whole app server becomes unresponsive once he gets an OOME (hence the early morning phone calls). The supposed timing of the phone calls leaves me somewhat skeptical; what are they running where the peak load occurs at 3 AM? If your assertion (OOMEs can be ignored, since only one allocation fails and the rest of the VM is fine) were true, then the OP would not be getting any calls in the middle of the night: the user would simply re-try the request and (hopefully) get a result the second time. That's not what I said at all. Each logical module should be designed to handle such situations, typically by discarding what has been done up to the point of failure, and then returning an error to its caller. What is likely to have happened instead in the OP's case is that the app encountering the OOME had no provision at all for error recovery, and simply quit, leaving many now useless objects around with live references to them. It may have even made matters worse by trying to generate an error message of some sort. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Peter Stavrinides Albourne Partners (Cyprus) Ltd Tel: +357 22 750652 If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]