Re: JK Connector
Rename your app archive ROOT.war and deploy it. Tomcat will use it as unnamed context Ciao, e 2006/12/22, wolverineny ny [EMAIL PROTECTED]: Hello, How can I configure JK connector to redirect all requests to a particular webapp. http://localhost/index.html http://localhost:8080/myapp/index.html I am trying not to expose the webapp name myapp in the URL. I cannot configure myapp as a *default* app on Tomcat either. Do I need to use some kind of URL rewriting or is there a simple elegant solution? Please let me know if you need more details. thanks, Raj -- Le montagne sono così: devi assecondarle anche se ti sputano in faccia fiele e veleno. Perdi se pensi di essere più forte. Vinci se pensi che non c'è nessuna battaglia. - Hans Kammerlander
Re: Tomcat on Gentoo from the horse, no hear say.
Don't flame, remember it's Christmas. Recompiling Java apps isn't strictly necessary but from a maintainer point of view it makes sense: they want to assure that the distribution they provide is as complete and workable as possible. That includes the ability to build, patch, integrate any software cohesively with all the other packages. Eg: at work I've seen CRM software that bundles it's own JBoss tree and there's no way in hell it'll integrate with an external instance; given your pov it's all right and sound but for me, as a sysadmin, it sucks as I have to accept and track yet another exception to my architectural plan. There's space for bytecode consumers and for source builders, the point is that both should be taken care for; especially if the latter help keeping in touch with the userbase working with your wares. 2006/12/24, Leon Rosenberg [EMAIL PROTECTED]: On 12/24/06, William L. Thomson Jr. [EMAIL PROTECTED] wrote: Ask and you shall be answered in detail :) On Sun, 2006-12-24 at 11:20 -0500, David Smith wrote: 1. Compiling tomcat. Why??? Because it's FOSS why not? I might want to use a newer version of things Tomcat is compiled against. There are tons of reasons, thus the link I provided before. Here it is again for reference. http://www.gentoo.org/proj/en/java/why-build-from-source.xml Sorry, I don't buy it. The only valid reason to rebuild tomcat (or other java programs / packages) is to patch them, and if I'd wish to do it, I would go to the svn of the maintainer and not play around with probably broken distribution packages (and yes, they ARE all broken, gento, suse, debian, ubuntu). I think you would spare your users tons of problems if you would just re-distribute the binaries from tomcat.apache.org and not mess around with things. Noone who runs tomcat for professional reasons can allow the os to do atomatic updates on it, and what is the other reason for packaging? And for the newbies the binaries tomcat.apache.org provides are perfect (at least they work!). Btw, when we are on it, can you please remove gcj from the distro? This thing is really just annoying! :-) regards 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] -- Le montagne sono così: devi assecondarle anche se ti sputano in faccia fiele e veleno. Perdi se pensi di essere più forte. Vinci se pensi che non c'è nessuna battaglia. - Hans Kammerlander
Clustering with mod_jk
Hello List, scenario: - 4 node tc 5.0.28 vertical cluster ( :-| same server... still testing, but it could have been 8) listening on ajp Connector address=x.x.x.x port=8009 maxProcessors=150 minProcessors=50 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 - 1 httpd 2.0.52 with mod_ajp 1.2.15 and prefork config on RH AS4, kernel 2.6.9-5.EL sticky sessions are disabled to avoid stress scripts hitting only one node IfModule prefork.c StartServers 40 MinSpareServers80 MaxSpareServers280 ServerLimit4096 MaxClients 4096 MaxRequestsPerChild 4096 /IfModule - 1 application where a couple of thousand users should hammer the app deployed on the webapp What happens is the app takes the stresser for a ride until 240 circa users then starts to die; jkmonitor sees linear increase on busy and max requests on only one node and pages hang; disabling the node moves the hung request handling to the next node. Where's the bottleneck? Any known bug in mod_jk? Should I increase threads on the tomcat nodes? Tnx, e - 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: Clustering with mod_jk
Using mpm_worker gave less impressive results; I'd say about 1/2, a much worse load average (way more than 5), and lots of swap. Seems like prefork works better on linux and I'm surprised. Anyway, assuming that I got the maxProcessors wrong I should have seen queues building up @ 150*4 instead they start 50% that value. The thing that makes me think it's a mod_jk issue is the fact that suddenly all request flow locks onto a node and stays busy until I restart apache. e On 01/set/06, at 21:21GMT+02:00, Filip Hanik - Dev Lists wrote: since you are using prefork, you must set cachesize=1 for your workers.properties file. However, you have 4096 MaxClients, in order to serve this up in tomcat, your JK connector should have maxProcessors=4096. An alternative, and safe solution, although much less performance, is to set MaxRequestsPerChild 1, this way you can get away with MaxClients 4096 and still have a much less maxProcessor value on Tomcat Filip Edoardo Causarano wrote: Hello List, scenario: - 4 node tc 5.0.28 vertical cluster ( :-| same server... still testing, but it could have been 8) listening on ajp Connector address=x.x.x.x port=8009 maxProcessors=150 minProcessors=50 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 - 1 httpd 2.0.52 with mod_ajp 1.2.15 and prefork config on RH AS4, kernel 2.6.9-5.EL sticky sessions are disabled to avoid stress scripts hitting only one node IfModule prefork.c StartServers 40 MinSpareServers80 MaxSpareServers280 ServerLimit4096 MaxClients 4096 MaxRequestsPerChild 4096 /IfModule - 1 application where a couple of thousand users should hammer the app deployed on the webapp What happens is the app takes the stresser for a ride until 240 circa users then starts to die; jkmonitor sees linear increase on busy and max requests on only one node and pages hang; disabling the node moves the hung request handling to the next node. Where's the bottleneck? Any known bug in mod_jk? Should I increase threads on the tomcat nodes? Tnx, e - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.7/435 - Release Date: 8/31/2006 - 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: Creating /WEB-INF folders for virtualhosts
I understand your frustration, I haven't gone without my own. You must realize though that jsp under tomcat is not like php under ~/ public_html user dirs. Perhaps it's a limit of tomcat but you can't (as far as I know) do useraccount mass vhosting. Every explicitly declared host declaration in server.xml has a dir (the famous webapps) to which the appropriate / resolves. Within that, single war archives plug in, as if they were custom business extensions to the server; except for the ROOT.war that resolves to unprefixed resources not belonging to any context (as in http://example.com/context/ resource.jsp). You can't do what you expect out of the box, unless you build a framework, contained within a web application, whose entry point examines the requested URL and redirects it to some jsp repository for processing (sounds trivial with some regexp within a * responder servlet). Regarding the issue about multiple filesystem paths resolving and feeding resources... have you configured mod_jk? Direct-to-tomcat interaction feeds straight to the Host appbase=this-is-it!... path (which unprefixed is relative to $CATALINA_BASE) while with jk pass-through you may feed resources not intercepted by JkMount from the directory configured under htttpd. Ciao, e On 21/ago/06, at 08:47GMT+02:00, John Hinton wrote: Edoardo Causarano wrote: The host appbase attribute specifies the directory where the wars (exploded or left intact) are stored and is not a documentroot in the apache httpd sense. The latter would be the ROOT.war webapp to which root relative paths unmatched by any other war prefix resolve. Distribution of object instances across multiple contexts belongs to the J2EE container problem space (JBoss, WebSphere, Geronimo, JonAS, etc...) while Tomcat is a web container (a component of J2EE). You could dump some singletons in the shared classloader (classes loaded from the shared library path) but then you must be careful about reference counting in these classes or you'll have leaks (in the sense that references aren't really released and the gc won't reclaim the objects) and eventually eat all the jvm memory; suggestion: use lifecycle listeners in the webapp. You could set the crossContext attribute to true and do as in http://forum.java.sun.com/thread.jspa? threadID=580846messageID=2956369 but not unless you have total control on the server and you can still do forwards in struts without relaxing webapp isolation. Ciao, e I finally got my test.jsp file to run. I'm simply struggling with path problems.. what it does vs. what I want it to do. I have total control of the server. This is a shared hosting server. For that reason I would like to give users the ability to upload/delete any of their files. This is what works: If I create a directory, lets call it jspusername in /usr/local/ tomcat/webapps and then create the WEB-INF directory with classes and lib in that. If I place the test.jsp file in the jspusername directory, as I have things configured now, it will execute via http://domainname.com/jspusername/test.jsp and test.jsp will even pull images from the domains /var/www/ username/public_html/images directory by using ../images in the html link to get down to that directory. A bit of a surprise. What I would like, is to be able to put test.jsp in /var/www/ username/public_html or any user created directory in that directory. I just can't seem to find the key to this. In fact, I can't even find where tomcat is setting the default directory to / usr/local/tomcat/webapps. If someone has a good idea about how to do this it would be greatly appreciated. I'm totally new to jakarta/tomcat and have been pounding on this thing for about 4 days. I've done only tiny amounts of programming a long time ago in java, so please understand I'm not up to speed with the Sun lingo. End of Question A side note: The installation actually wasn't so bad, but this pathing for a shared hosting environment has been extremely confusing. Googling for hours and hours yielded some results, but basically I never found any one page with enough info.. and then in combination with different installation pathing mixed with older versions... I'd rather have made a trip to a torture dungeon. I can't help but wonder how many people are not using the programming language due to a lack of webservers with the ability to run them... due to this painful process. Almost every bit of information I could find stopped short of talking about virtualhost and those that didn't were installs of older versions which I feared would not work for a reason I wouldn't figure out for yet more days. Really, even within the tomcat documentation, I can't remember ever seeing that a webapps directory must contain a WEB-INF directory. It did clearly say that a web.xml file for your application should be put
Re: Creating /WEB-INF folders for virtualhosts
The host appbase attribute specifies the directory where the wars (exploded or left intact) are stored and is not a documentroot in the apache httpd sense. The latter would be the ROOT.war webapp to which root relative paths unmatched by any other war prefix resolve. Distribution of object instances across multiple contexts belongs to the J2EE container problem space (JBoss, WebSphere, Geronimo, JonAS, etc...) while Tomcat is a web container (a component of J2EE). You could dump some singletons in the shared classloader (classes loaded from the shared library path) but then you must be careful about reference counting in these classes or you'll have leaks (in the sense that references aren't really released and the gc won't reclaim the objects) and eventually eat all the jvm memory; suggestion: use lifecycle listeners in the webapp. You could set the crossContext attribute to true and do as in http://forum.java.sun.com/thread.jspa? threadID=580846messageID=2956369 but not unless you have total control on the server and you can still do forwards in struts without relaxing webapp isolation. Ciao, e On 19/ago/06, at 05:55GMT+02:00, John Hinton wrote: John Hinton wrote: Seems I have everything running up to the point of a test.jsp file being excuted within a virtualhost's user directory. If I understand correctly, there should be a WEB-INF directory in the virtualhost root directory, with a web.xml document there. My snag.. is there a built in way to create this directory and the info it should contain? If I am to create this directory, what permissions should it have? And what about additional classes and librarys, such are are in the default server directory? A good example of the web.xml file would be helpful as well. OK, perhaps I should start over.. I am a server admin and have no experience with jsp. I need to run this system especially for a virtual host client. I seem to have the basics of installation working as I can get to the manager pages. However when I try to open a test.jsp file in that client's virtualhost public_html directory, I get the following error. HTTP Status 404 - /test.jsp -- -- *type* Status report *message* _/test.jsp_ *description* _The requested resource (/test.jsp) is not available._ -- -- Apache Tomcat/5.5.9 My OS is CentOS 3.6 in this case. Could someone please try to help me through this? Actually, I'm not really even sure what The requested resource (/test.jsp) is not available means? Is this a path to test.jsp problem or a notice that for some reason it can't be run? Thanks, John Hinton - 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: BOOBIES!
Everyone, please chill out. The duck picture is a funny pun, no need to see some kind of macho-sexist-cover-up-minimization-of-a-serious- issue paranoia. BTW, Mr. Harris still hasn't excused himself to the gals in this list... time to do so and close the issue. Ideally everyone should excuse himself, close the issue and get a drink: it's July, damn hot weather all over and people just loose a healthy fraction of their restraint. Ciao, e - 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 5.0.28 reaches OS open files limit
Hmm... I'll check. Thanks e 2006/5/26, [EMAIL PROTECTED] [EMAIL PROTECTED]: I have a problem with some tomcat servers that regularly start thowing exceptions about too many open files (the stacktrace is in a network socket aperture). One solution is increasing the ulimit but would disabling http keepalives reduce the open file count? Do you use Runtime.getProcess() anywhere? That opens three file handles that you have to close (stdin, stdout, stderr). I ran into this problem myself a while ago. _M_ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Le montagne sono così: devi assecondarle anche se ti sputano in faccia fiele e veleno. Perdi se pensi di essere più forte. Vinci se pensi che non c'è nessuna battaglia. - Hans Kammerlander
Tomcat 5.0.28 reaches OS open files limit
Hello list, I have a problem with some tomcat servers that regularly start thowing exceptions about too many open files (the stacktrace is in a network socket aperture). One solution is increasing the ulimit but would disabling http keepalives reduce the open file count? tnx, e - 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 5.0.28 reaches OS open files limit
Very strangely, applying maxKeepAliveRequests=1 will cause an apparently unrelated exception: Tomcat will complain it cant find the Oracle jdbc drivers nowhere in the library path. I don't understand this... e Alle 14:45, mercoledì 24 maggio 2006, Dirk Moolman ha scritto: I don't know which parameter it is, but how about increasing the kernel parameter that handles open files ?Unless your application just keeps growing in terms of open files, and you need to start killing off processes like you mentioned with the http keepalives. -Original Message- From: Edoardo Causarano [mailto:[EMAIL PROTECTED] Sent: 24 May 2006 12:47 PM To: Tomcat Users List Subject: Tomcat 5.0.28 reaches OS open files limit Hello list, I have a problem with some tomcat servers that regularly start thowing exceptions about too many open files (the stacktrace is in a network socket aperture). One solution is increasing the ulimit but would disabling http keepalives reduce the open file count? tnx, e - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information on this e-mail including any attachments relates to the official business of DigiCare (Pty) Ltd. The information is confidential and legally privileged and is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised and as such any disclosure, copying, distribution or any action taken or omitted in reliance on it is unlawful. Please notify the sender immediately if it has inadvertently reached you and do not read, disclose or use the content in any way. No responsibility whatsoever is accepted by DigiCare (Pty) Ltd if the information is, for whatever reason, corrupted or does not reach its intended destination. The views expressed in this e-mail are the views of the individual sender and should in no way be construed as the views of DigiCare (Pty) Ltd, except where the sender has specifically stated them to be the views of DigiCare (Pty) Ltd. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Edoardo Causarano Direzione Operazioni Tecnologia Area Sistemi Laziomatica S.p.A. Via Adelaide Bono Cairoli, 68 00145 Roma mobile: --- fisso: +39 0651689829 [EMAIL PROTECTED] www.laziomatica.it - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Intercepting Context exceptions
Hello list, I'm managing some legacy web apps, some jsp and other servlet based, that lack good Exception handling (or at least Logging and reporting). Rather than a plain blank page I'd like to return some infomative message within sone nice html message. Most importantly I'd like to log these exceptions in a more suitable way than the present. How can I implement and install an Exception trap handler to perform at least the said logging? Thank you very much, e -- Le montagne sono così: devi assecondarle anche se ti sputano in faccia fiele e veleno. Perdi se pensi di essere più forte. Vinci se pensi che non c'è nessuna battaglia. - Hans Kammerlander
Re: FarmWarDeployer instructions
Alle Tuesday 21 March 2006 18:05, Filip Hanik - Dev Lists ha scritto: Thank you Filip, please bear me one more time. I understand that only the tomcat cluster master should have a watchDir configured and watchEnabled set to true. The deployDir of all tomcat cluster members should point to the clustered Host appBase attribute; in case the Cluster element is defined on the Service, the directory should be the parent of the enclosed Host appBase attributes. Is this correct? The watchDir doesn't have anything to do with the appBase folders and can be exposed using any network filesystem (eg. CIFS, DAV or NFS) as long as the tomcat cluster master process can access it. Is this correct? In order to get the farm deployment running I do not have to download the tomcat-deployer package. Right? If directories don't exist (especially the tempDir) will Tomcat crash and burn or silently fail to farm deploy? e only one server should have (watchEnabled=true), this is the location where you deploy all your files. if you enable it on all servers, then just be careful so that you don't deploy the same file in two locations and end up with a deployment collission. tempDir=/tmp/war-temp/ -- The directory the deployer uses to assemble file transfers deployDir=/tmp/war-deploy/ -- the directory where the deployer deploys the WAR file to watchDir=/tmp/war-listen/ -- the listen directory, this is where you drop in a new file so that the deployer can pick it up watchEnabled=false --true means we are watching for new deployments, false means we act as a slave, only get deployments from other nodes. Filip Edoardo Causarano wrote: Hello list, I've managed to get a test cluster working. ATM all cluster members have their own copy of deployed servlets and jsp pages. as well as the apache httpd frontend that contains an unpacked copy of the war file for static file serving. The current config is awkward to maintain but apparently the org.apache.catalina.cluster.deploy.FarmWarDeployer class takes care of replicating the wars across the cluster. Ideally (unlesss I don't have a clue) the apache cluster lead has a tomcat running in JNI mode where deploys are performed. The other tomcat only cluster members are notified of the new deployment and get their local copy syncronized. Does tomcat sync on the multicast channel or must I export the lead's webapps dir on NFS and point the other members' watch dir to it? Can anyone post their (sanitized) config so I can get the gist of it? Thanks, e (btw, yesterday it wouldn't work because one of the two test machines didn't have mcast in the kernel... grrr) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Disclaimer -- Ai sensi del D. Lgs. n. 196/2003, si precisa che le informazioni contenute in questo messaggio e negli eventuali allegati sono riservate e per uso esclusivo del destinatario. Qualsiasi diffusione, distribuzione o copia della presente comunicazione non autorizzata per iscritto è severamente proibita ed espongono il responsabile alle relative conseguenze civili e penali. Chiunque riceva questo messaggio per errore, è pregato di distruggerlo insieme agli eventuali allegati, non trattenendone copia, e di informare immediatamente Laziomatica S.p.A. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Questions on Clustering
Hello list, I have some questions on Tomcat 5.5.15 clustering. The apache httpd server connects to the cluster members with mod_jk. All the cluster members have the jvmRoute attribute set to the same value cluster as well as the same multicast group. Multicast routes are activated on the appropriate network interfaces with the command: route add -net 224.0.0.0 netmask 240.0.0.0 dev eth1 On the server logs I get these messages: 1616281 [Cluster-MembershipSender] DEBUG org.apache.catalina.cluster.mcast.McastService - Mcast send ping from member org.apache.catalina.cluster.mcast.McastMember[tcp://127.0.0.2:4001,catalina,127.0.0.2,4001, alive=100] 1616282 [Cluster-MembershipReceiver] DEBUG org.apache.catalina.cluster.mcast.McastService - Mcast receive ping from member org.apache.catalina.cluster.mcast.McastMember[tcp://127.0.0.2:4001,catalina,127.0.0.2,4001, alive=1612675] I'm a bit surprised by the loopback addresses... does this mean that the server is only reading itself on the multicast group? How can I verify that the cluster members are properly acting in sync? Must the directories for temporary deployment exist BEFORE launching Tomcat? Thank you, e - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Questions on Clustering
Thanks Filip... e Alle 17:30, lunedì 20 marzo 2006, Filip Hanik - Dev Lists ha scritto: you have several problems: 1. jvmRoute should be a unique value on each tomcat, not the same across all. 2. you have used (tcpListenAddress=auto) - what this does, is look up your hostname, and then resolves that to an IP address. The problem on your computer is that your local hostname resolves to 127.0.0.1, it should resolve to the computers actual IP address. You can either hardcode your IP in the tcpListenAddress attribute or you have to fix your /etc/hosts (and any other file that is not configured correctly) file to not resolve your computer name to localhost Filip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]