RE: tomcat memory leak problem
As stated below profiling (Yourkit is a very good recommendation, you can try their early access version http://www.yourkit.com/eap/index.jsp) will give you more insight in your tomcat application. Sometimes changing your memory / garbage collect parameters can change the world for you. For more insight read: http://www.informit.com/guides/content.aspx?g=javaseqNum=253 http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html Hubert -Original Message- From: Piller Sébastien [mailto:pi...@hmcrecord.ch] Sent: 05 February 2009 17:25 To: Tomcat Users List Subject: Re: tomcat memory leak problem Are you sure you don't have any thread or task (I mean, quartz or so) that is running and consume memory? I agree, this sounds quite strange (our app is running for several weeks and don't have any major issue, we sometimes need to restart tomcat because it hangs, but our memory is under control, and we use lotz of external api like spring, hibernate, wicket, etc.) Could you maybe profile it using Yourkit or any other tool? fcxjp a écrit : My system environment is: Windows 2000 Server. JDK 1.5, tomcat 5.5, Oracle 9 The problems are: 1. After tomcat was started, the memory of the tomcat was normal, about 200M-300M. But after a certain time(this time was not set), the memory began to grow, and the growing speed was so fast that in about 5 minites the maximum would be reached. The difference of this problem with other problems I've checked is, in other problems, the memory growing speed is continual and not so fast, while in our problem the memory didn't grow at the beginning, but after a certain time instead. 2. There is another strange phenomenon here. We restarted tomcat at 23:30 last night. We checked the log at 8:00 this morning and found out the system was not used by anyone during this time. But the memory of tomcat had reached to 1.5G, which is the maximun of tomcat's memory. Later, after some users began to use this system, tomcat' memory dropped to 500M+. How and why was the memory collected? By the way, we have cheched the code for any optimization, including StringBuffer, Vector, datasource connections, etc., which only resulted with a faster response speed for users, not any influence for the memory problem. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: sessions lost after redeploy
The sessions are saved inside $CATALINA_HOME/work/catalina/localhost/APPNAME/sessions.ser In case you deploy a new version of your application or make modifications, I suppose Tomcat sees this as a new application and removes your current APP work-dir, and thus it's sessions.ser file Correct me if I'm wrong. Pieter On Thu, 2009-02-05 at 20:05 -0800, J Robert Ray wrote: Hello, I have an app running in tomcat 6.0.18, using the default session manager. If I stop and start tomcat, or if I use the reload button in the manager, my sessions are preserved. But if I copy a new .war into webapps, or touch the existing .war, so that my app redeploys, my sessions are deleted. Is this expected behavior? It would speed up my development cycle if I could deploy a new build of the app without having to re-login to the app in the browser. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Subcontext, filter problem.
Caldarale, Charles R yazmış: i am currently using the third one. but it is a bit slow and i dont want to use a filter for such a task. There's nothing wrong with using a filter to catch references to the external directory. The speed of such a filter should be the same as if Tomcat were serving the static resource itself, so there may be a problem in how you've implemented it. You might want to compare your filter code with that in Tomcat's DefaultServlet to see what the differences are. - Chuck I think i will override, FileDirContext.protected File file(String name) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
Bill Davidson wrote: I really would like to be able to run these kind of tools across a firewall. I can't believe there are no provisions for it. Seems there is now. Haven't tried it yet, but will soon, if I can upgrade that Tomcat. Previous messages in this thread give more clues. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Realm Issue
Scott wrote: I figured it out. The style sheet just has to be in a directory that isn't locked down. It's a common occurrence with authentication via login pages : the initial access triggers a redirect to a login page, which itself contains items to be retrieved from a protected area, which requests thus trigger re-directs to the login page etc.. It's a lot of fun with frames and iframes and such.. Motto : keep the login page simple. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
André Warnier wrote: start) su - tomcatuser -c /var/lib/jvm/java $CONFIDENTIAL_SETTINGS -jar All of your 'confidential settings' will be visible to all users with one command: ps aux There're ways to restrict such listing to only your processes. But anyway, command line arguments are not a good place to specify confidential values. In my opinion there're mostly two cases: 1. Customer doesn't know anything, or knows very little about passwords, architecture, etc. So you usually embed such information in some kind of configuration file (web.xml or some other properties file), etc. In short words: you know all the details, but you will not break/steal customer's service/data. 2. Customer is security-aware. So either he isn't your customer anymore ;-) Or you do not have any access to his infrastructure. You're forced to use JNDI resources so you usually do not need any usernames/passwords. Even if, username is useless without access to customer's infrastructure. Finally, his team will review war file before deploy anyway. In my opinion it is mush simpler, more secure to have just another tomcat installation, dedicated for one special-and-important application, run by dedicated user, than to mess with some strange JVM startup options. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
How about md5sum? Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
One final item before I leave this thread please. 2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: onf//marge/atom.xml No. First off, unless you have something specific to define for your webapp (e.g., a Resource or Realm, you don't need a Context element. If you do need a Context, it is normally placed inside the webapp in META-INF/context.xml. AFAIK I don't need any resource specification. Does this mean that I can dispense with the atom/META-INF directory totally? I.e. it is redundant for this usage of Tomcat? atom |-- META-INF | |-- context.xml |-- WEB-INF . regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
2009/2/6 Peter Crowther peter.crowt...@melandra.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] AFAIK I don't need any resource specification. Does this mean that I can dispense with the atom/META-INF directory totally? I.e. it is redundant for this usage of Tomcat? atom |-- META-INF | |-- context.xml |-- WEB-INF . If you don't need anything in context.xml, you don't need the context.xml file. If there are no files in META-INF, you don't need the directory. Thanks Peter. regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
Thanks Andre. That paints a good picture! Only generality I'd like to add. The general purpose of my-app web.xml and 'all apps' web.xml. Is it TC 'configuration' (Chaz isn't going to like that, but I do like an overview, even if it's only 80%). I'm saying config, since it provides response mime types, params etc. 2009/2/5 André Warnier a...@ice-sa.com: Part 4 : By some incredible clever setup, that default web.xml happens to contain a table of Mime mappings, telling the default servlet that if what it has to return this time is some file ending in .jpg, it should include a HTTP header Content-type: image/jpeg (so that the browser would know how to handle this correctly). Or if the file ends in .xls, it should return a header Content-type: application/vnd.ms-excel (or something like that).(*) Question: Using your analogy of 'my-app' web.xml being used first, then falling back on 'all-apps' web.xml, can I add 'specials' in the list of mime type? I'm thinking of application/atom+xml So, in other words, if you change something in these Mime mappings, chances are that your Tomcat is going to start returning images while telling the browser they are Word documents, and things like that which make for an entertaining display in the web browser. I'm looking at a mc - mc service, so I'm not expecting browsers. Which is probably not what you want. (Proudly, based on recent teaching by Chuck. Have I got it right, Chuck ?) (*) Of course if the browser is IE, it doesn't matter anyway, because IE will not believe what the server tells it and do its own thing. grin/ If the browser is IE I'll No I won't. Thanks Andre. Nice and clear. (Note the comment about Chaz in the background :-) Close enough! -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Backup of TOMCAT required
If copying whole product installs from old server to new server works, then great. I personally would have downloaded and installed fresh, then configured the new system to match the old system and copied only the app code. Just me. --David Randhir singh wrote: the java and tomcat version is same in the old and the new. We had copied $JAVA_HOME also from the old to the new. I guess, then, copying the tomcat again is not required? regards -Original Message- From: David Smith [mailto:d...@cornell.edu] Sent: Friday, February 06, 2009 1:31 AM To: Tomcat Users List Subject: Re: Backup of TOMCAT required Quick answer: No. Copy over your app and configure the new tomcat to match the old one. I highly recommend hand configuring tomcat rather than just copying config files though. The review is good practice and config files -- particularly server.xml -- have changed over time. The thing that would concern me more is if tomcat and/or java version changes from old to new. If that's the case, you will have to test your app in the new environment before going live. --David Randhir singh wrote: Thanks, for your answer. But, my real question is whether we need to copy the latest copy of $TOMCAT_HOME from the old server to the new server as it is just a web server and not our application code. regards -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Thursday, February 05, 2009 9:34 PM To: Tomcat Users List Subject: RE: Backup of TOMCAT required Good Morning Singh- any technical reasons for staying with an outdated 1.4 JVM..as you wont be able to take advantage of advanced gc and generics in JVM 6 ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: randhir.si...@elitecore.com To: users@tomcat.apache.org Subject: Backup of TOMCAT required Date: Thu, 5 Feb 2009 21:19:24 +0530 I had a doubt that should the backup of TOMCAT be taken as we are going to swap our server to a new one with better congifuration. I will explain the environment of our system a little 1) Application server- JBOSS 2) Web server- Apache tomcat 3) Application details- Java(1.4.2) Actually, I had taken the backup of TOMCAT around a week back in preparation of the swap for migration. But, one change is going to happen in our application in the form of a hotfix tomorrow and our migration is scheduled for day after. So, should a backup of TOMCAT be taken after our application hotfix is applied. Also, should a back of java($JAVA_HOME) and ant($ANT_HOME) be taken, we use j2sdk1.4.x for java and apache-ant-1.6.1 for ant. I hope, my question is clear. Please, help in solving the doubt. regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.233 / Virus Database: 270.10.18/1935 - Release Date: 02/04/09 16:35:00 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
On Fri, Feb 6, 2009 at 1:06 PM, Dave Pawson dave.paw...@gmail.com wrote: One final item before I leave this thread please. AFAIK I don't need any resource specification. Does this mean that I can dispense with the atom/META-INF directory totally? I.e. it is redundant for this usage of Tomcat? atom |-- META-INF | |-- context.xml |-- WEB-INF . Basically yes, however: In one of your previous posts you had the definition Context reloadable=true If you want this behaviour explicitely, you'll nee the context-definition. From the docs: [ snip ] == Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand. [ snap ] == Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: mod_jk
1) As far as I know, no, mod_jk does not read workers.properties dynamically. 2) Yes and no, it will not send a request unless communication has been established with the worker, it may happen that the worker fails, or someone shut it down. Depending on how you configure the workers and the number of workers, it can retry the request and/or try a different worker. Mod_jk will mark the worker on error when it does not respond, and it will try again after a configurable time -but it tries again with an actual request-. It would be really nice if you could test availability of a node with a configurable request instead of a live production request... (hint, hint) Regards __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Upgrade .. a Tomcat
André Warnier wrote: Hi. Now I'm going to ask a question, sotto-voce, humbly, and don't get upset. There happens to be this Tomcat 5.5.20 you see, running under Linux Debian Etch. It wasn't me who installed it, it was the sysadmin, and he's a really difficult guy to relate to, and he has the power switch. But suppose, just suppose, that I would quietly want to bring this Tomcat 5.5.20 up to the 5.5.25+ level, just so that I could try the Listener mentioned here : http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html Do you think I could download a real 5.5 Tomcat from tomcat.apache.org, untargz it to some temporary directory, and replace just the few bits that would bring it up to level, without the sysadmin even noticing ? And if so, any idea of which are the relevant bits for that Listener ? Or is that kind of thing really likely to bring the whole building down ? (I would of course backup any relevant bit before I do that, and this is a development system in a remote central European town, not the one controlling the airspace above Minnesota). If it matters, the current Tomcat is running so : Using CATALINA_BASE: /usr/share/tomcat5.5 Using CATALINA_HOME: /usr/share/tomcat5.5 Using CATALINA_TMPDIR: /usr/share/tomcat5.5/temp Using JRE_HOME: /usr/lib/jvm/java-1.5.0-sun Server version: Apache Tomcat/5.5 Server built: Jan 20 2008 12:32:00 Server number: 5.5.20.0 OS Name:Linux OS Version: 2.6.18-6-686 Architecture: i386 JVM Version:1.5.0_14-b03 JVM Vendor: Sun Microsystems Inc. I suppose you could just trade out the jars that changed given it's a minor version upgrade. Doing it without the admin noticing is a different story. Your better off convincing the admin to upgrade and cite security fixes as the reason. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlet use. TC6, FC10
2009/2/6 Gregor Schneider rc4...@googlemail.com: AFAIK I don't need any resource specification. Basically yes, however: In one of your previous posts you had the definition Context reloadable=true If you want this behaviour explicitely, you'll nee the context-definition. From the docs: [ snip ] == Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand. [ snap ] == Rgds Gregor Certainly for development (this could be some time for me:-) it seems worthwhile. Just reading up on filters and valves, certainly for a valve I need to specify it in webapps/atom/WEB-INF/context.xml so (for the moment) I guess I'll leave it. Thanks Gregor. regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Upgrade .. a Tomcat
From: David Smith [mailto:d...@cornell.edu] Subject: Re: Upgrade .. a Tomcat I suppose you could just trade out the jars that changed In this case, he can't: the listener of interest is *not* in the jars - it's only in the Tomcat source download, and has to be compiled by whomever wants to use it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: And how about this mod_jk.log ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, André Warnier wrote: Because the first part of this test had to be done by a non-specialist customer on a workstation to which I did not have access, I ended up writing a simple Perl script based on the integral LWP module, to better trace the problem at the workstation level. I'd just like to point out that there are two existing tools that may have helped you our a lot: wget (often installed be default on many Linuxes these days) and httping (which is not, but freely available and has a simple make compile strategy). Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMPx0ACgkQ9CaO5/Lv0PBEJQCdHlLSnx3tMBLVMTLmvfX4UkJG 6/0AoJs61rLhETYsuDV2CDE6yvSGhD1f =YV3l -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? Unless the client specifies that one single mime type (and no other), I want to reject it Unless you have an extremely specialized client in mind, you will be rejecting all requests. No browser will ever limit itself to a single mime type. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
André Warnier wrote: In addition, it would avoid having to put some potentially sensible values in a web-xml file which has to be readable by the Tomcat user. Also some other, than web.xml, file with sensible values has to readable by Tomcat user ;-) -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: mod_jk
Well... as far as I know there is an option to check if a backend is available (up to a certain level). Look in the documentation for ping_mode (mod_jk 1.2.27) http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html Hubert -Original Message- From: gerhardus.geldenh...@gta-travel.com [mailto:gerhardus.geldenh...@gta-travel.com] Sent: 06 February 2009 14:19 To: users@tomcat.apache.org Subject: RE: mod_jk 1) As far as I know, no, mod_jk does not read workers.properties dynamically. 2) Yes and no, it will not send a request unless communication has been established with the worker, it may happen that the worker fails, or someone shut it down. Depending on how you configure the workers and the number of workers, it can retry the request and/or try a different worker. Mod_jk will mark the worker on error when it does not respond, and it will try again after a configurable time -but it tries again with an actual request-. It would be really nice if you could test availability of a node with a configurable request instead of a live production request... (hint, hint) Regards __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, André Warnier wrote: I have been put right about that by someone else already. Yeah, I'm about 2 days behind on all the drivel on the list. ;) Not everyone agrees with that solution by the way, because the JConsole may interfere with the JVM on the same system (specially on mine, seen it has less RAM than Chuck's portable phone). Well, the solution /will/ work, but may not be a good one. If you thrash your production server, it's not a really good solution, now, is it? Assuming Chuck has an iPhone, which has 128MB of RAM, I'm not sure I'd want to run a JVM on that server in the first place. Something tells me we've been over this before so I won't beat a dead horse. There's an interesting other solution here : http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html Seems one /can/ now fix that second port, which would allow it setting 2 tunnels beforehand, if I understand this correctly. Cool. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMTdYACgkQ9CaO5/Lv0PCFjgCdEor1GVBKDPgxbt2oihsnMclm sJoAnRJ7zO+cq+a8+skQyYQfi24FkVEP =ZBek -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deleting web application specific log files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Asish, Please do not post your question more than once unless several days have gone by without a response. Ashish Sarna wrote: I am using tomcat6 to deploy my web applications. For logging the messages which come through httpServletRequest.getSession().getServletContext().log(Some message); calls. Note that you can do httpServlet.getServletContext().log(Some message) if you don't want to depend upon the session. This works perfectly to rotate the log files nightly. But I want to delete the log files after some time (say, set a property so that log files older than 5 days are deleted). Is there some way of doing this? I believe neither j.u.l.i not log4j include this capability. If you use size-based rolling, log4j's RollingFileAppender will delete old files for you. java.util.logging.FileHandler has two properties to specify the maximum log file count and maximum file size : This is similar to log4j's capabilities mentioned above. java.util.logging.FileHandler.limit=102400 java.util.logging.FileHandler.count=5 but, when I try to use java.util.logging.FileHandler in place of org.apache.juli.FileHandler, no messages get logged through getServletContext().log(Some message); calls. It seems that tomcat does not support java.util.logging. Is there a workaround for this? What happens when you use o.a.j.FileHandler with this configuration, instead of using j.u.l.FileHandler? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMUQsACgkQ9CaO5/Lv0PDmPQCffZV4FWRpM3DoYnlLF/9d54ob y+sAoJy/v3MCZ2nLA2EBN5qT/7DY7kEH =EIQf -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to createnew native thread
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to createnew native thread Assuming Chuck has an iPhone, which has 128MB of RAM I do, but it's a 3G, with 16 GB of storage memory. It appears that the 128MB of RAM was for the previous generation, dissections of the new one show 512 MB chips installed. Also, it looks like all code has to fit inside the true RAM, but a portion of it is used as a paging area for the data storage; consequently apps seem to have direct access to most of the 16 GB as a heap. (But I'm not an iPhone developer, so the above is just hearsay.) - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Subcontext, filter problem.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Yavuz Kavus [mailto:yavuzka...@gmail.com] Subject: Re: Subcontext, filter problem. i am currently using the third one. but it is a bit slow and i dont want to use a filter for such a task. There's nothing wrong with using a filter to catch references to the external directory. I would instead use a servlet, and map it to the appropriate URI prefix. Why bother writing your own URI-parsing and recognition code when Tomcat can do it for you? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMVAoACgkQ9CaO5/Lv0PBoLwCfSLwXEsZMa6FoQENdIOVkV3b1 zaUAoMMlsxRl2/pOHDyvwGF9NU45Yaqm =DtSO -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to dispatch HTTP requests from a servlet to an external server?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Albrecht, albrecht andrzejewski wrote: The client request first hit my Servlet, then should be dispatched to a physically distant machine to be analyzed, then my Servlet should read the response of this second server, and finally send response to client. Like a proxy? Do you need to process the request from within the servlet at all, or are you really just proxying? If you're just proxying, might I recommend something like squid (http://www.squid-cache.org/)? I'm sure you can disable caching and make it always forward requests. My first idea was to use something like Apache httpclient, or anyway, writing a java HTTP client allowing my servlet to send GET request before returning httpResponse. Httpclient will work. I don't recommend writing your own client unless you have some decent Java chops... lots of ways to leak resources and stuff when you're working with URLConnections. I wonder if there were other better solutions, which could be more RequestDispatcher-like. I don't think there's really anything out there like RemoteRequestDispatcher.forward(request, response), but you could write one that wraps, say, httpclient. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMVRMACgkQ9CaO5/Lv0PAt6QCcCuodj12SNtIqrRFczag+903S hHIAnRXCbKkI09XP6jymopQE5XWCZBDA =CJc9 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
2009/2/6 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? I'm coming down in favour of a valve, rather than a filter, to make it container specific, Which is a good reason not to use a valve. Unless you need access to Tomcat internals, use a filter. ? Unclear why Charles? To make it 'filter' all server traffic? AFAIK I don't need access to any internals. regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
Well, I'n not Chuck, but to answer your question: On Fri, Feb 6, 2009 at 11:39 AM, Dave Pawson dave.paw...@gmail.com wrote: Is a filter the right TC tool for that Charles? Yes Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
From: Dave Pawson [mailto:dave.paw...@gmail.com] I'm coming down in favour of a valve, rather than a filter, to make it container specific, Which is a good reason not to use a valve. Unless you need access to Tomcat internals, use a filter. ? Unclear why Charles? To make it 'filter' all server traffic? AFAIK I don't need access to any internals. Valves only work with Tomcat. Filters work with other servlet containers. Most of the readers of this list would regard portability between servlet containers as a Good Thing. Certainly you should be reading the servlet spec (or a tutorial on it) rather than the Tomcat docs if you want to understand why Tomcat does a numberof the things it does! Valves and filters do similar things at the highest level: they intercept the request and response and allow the valve/filter to do things with those requests and responses. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
On Feb 6, 2009, at 10:20 AM, Dave Pawson wrote: 2009/2/6 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? I'm coming down in favour of a valve, rather than a filter, to make it container specific, Which is a good reason not to use a valve. Unless you need access to Tomcat internals, use a filter. ? Unclear why Charles? To make it 'filter' all server traffic? AFAIK I don't need access to any internals. You seem to be making this much more complicated than it needs to be. First, if you really need your templates to be secure, this won't solve the problem because someone can easily duplicate your client. And if you don't /really/ need it secure, why do it? If you do need it secure, why not just use a security constraint. If there are just a few people that need to access the templates, you could use the default tomcat-users.xml setup - easy. http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#MemoryRealm best, -Rob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? ? Unclear why Charles? 1) Filter specifications are documened. 2) Filters are not subject to change with every Tomcat release. To make it 'filter' all server traffic? Yes, that was what you said you wanted to do. It won't be looking at all server traffic, just what's directed to your webapp. Other traffic (e.g., Tomcat manager) is not affected. AFAIK I don't need access to any internals. Then you definately don't want a valve. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Subcontext, filter problem.
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Subcontext, filter problem. I would instead use a servlet, and map it to the appropriate URI prefix. Yes, that's what I told him to do - extend the DefaultServlet so it can target the external resources and still have the advantages of sendfile and caching already present in DefaultServlet. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat Domain for redirects
Hi all, I'm not that good at configuring Tomcat so I thought I'd ask here. My problem is that I have a server that is running Tomcat 5.5 and an Apache server that runs on port 80 and uses mod_jk to redirect all incoming requests to the tomcat server. So far, so good. The problem is that I want to access the server from outside my local network, so instead of accessing http://server1/app/ I now have http://server1.example.com/app/ which automatically redirects to an index page, but on the wrong address (http://server1/ app/welcome instead of http://server1.example.com/app/welcome) which is kind of annoying. As this happens in many different places I assume that the tomcat server somehow believes that he is server1 instead of server1.example.com. Any directions on where to look? Regards, Chris -- http://blog.snyke.net - Christian Decker http://blog.snyke.net -- View this message in context: http://www.nabble.com/Tomcat-Domain-for-redirects-tp21874907p21874907.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? I'm coming down in favour of a valve, rather than a filter, to make it container specific, Which is a good reason not to use a valve. Unless you need access to Tomcat internals, use a filter. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
2009/2/6 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? Unless the client specifies that one single mime type (and no other), I want to reject it Unless you have an extremely specialized client in mind, you will be rejecting all requests. No browser will ever limit itself to a single mime type. That's it. Again, my code, hence very specialised. No browsers, IE or FF! Just my java end point. I'm coming down in favour of a valve, rather than a filter, to make it container specific, although I can't find much documentation on valve coding. Something that perhaps checks the request string and header? Any suggestions please? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
Bill Barker wrote: André Warnier a...@ice-sa.com wrote in message news:498ad66a.4080...@ice-sa.com... Mikolaj Rydzewski wrote: André Warnier wrote: if I have a webapp consistig of just a couple of classes and a WEB-INF/web.xml config file, but this web.xml file contains some parameters that are each-client-dependent, and some customers are insisting to receive the updates as a war file, how can I achieve that ? Someone earlier here mentioned that you could put the settings in a file outside the application, but that is not possible in this case, or is it ? You can have web.xml parameter, e.g. context-param param-nameconfig-file-location/param-name param-value/filesystem/path or URL or some-other-location/param-value /context-param And then you can retrieve parameter value, thus, read config file. Idea is, that param-value is the same for every client/build. E.g. points to configuration file in $CATALINA_HOME/conf. So you can have one war file and client dependant configurations. Ok, that would work if you wrote the webapp yourself, and all the filters that go with it. It would however not work if there are some customer-specific parameters in web.xml, that are outside of your control. (I'm thinking for example of a UrlRewrite or jCIFS filter) Would there be a way to create a war file that does not contain a WEB-INF/web.xml file, but maybe contains a soft link to a whole web.xml file located somewhere else ? The basic idea is : I could still give my customer a war-file that he can deploy containing my updated classes of jars or whatever, but it would not overwrite his customer-specific web.xml when he deploys it. I think this issue is so general/generic that there must exist some way, no ? This is totally Tomcat specific, so won't necessarily port if you decide to change containers (but without looking probably still works for GlassFish and JBoss). Tomcat does Ant style variable replacement when parsing web.xml (both the one in conf and the one in WEB-INF). So something like context-param param-nameconfig-file-location/param-name param-value${my.config.file.location}/param-value /context-param will work if the System property my.config.file.location is set by the startup script/Windows service manager. That sounds like a good idea ! Usually, there are only a few parameters that change per customer, like the IP address of some external server, or some login id/pw for a remote service. That would really do the trick in most cases. In addition, it would avoid having to put some potentially sensible values in a web-xml file which has to be readable by the Tomcat user. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: servlet use. TC6, FC10
From: Dave Pawson [mailto:dave.paw...@gmail.com] AFAIK I don't need any resource specification. Does this mean that I can dispense with the atom/META-INF directory totally? I.e. it is redundant for this usage of Tomcat? atom |-- META-INF | |-- context.xml |-- WEB-INF . If you don't need anything in context.xml, you don't need the context.xml file. If there are no files in META-INF, you don't need the directory. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
2009/2/6 Robert Koberg r...@koberg.com: Which is a good reason not to use a valve. Unless you need access to Tomcat internals, use a filter. ? Unclear why Charles? To make it 'filter' all server traffic? AFAIK I don't need access to any internals. You seem to be making this much more complicated than it needs to be. First, if you really need your templates to be secure, this won't solve the problem because someone can easily duplicate your client. And if you don't /really/ need it secure, why do it? Only one aspect of security Rob. As needed I'll look at others later. Can you suggest alternatives to achieve what I want, rather than something else? If you do need it secure, why not just use a security constraint. If there are just a few people that need to access the templates, you could use the default tomcat-users.xml setup - easy. Not what I'm asking for. regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
2009/2/5 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? Unless the client requests application/xml I want to refuse the request. I don't think you quite appreciate the situation yet. An HTTP client does not *request* any particular mime type; the client *may* specify the mime types it would like to accept in response, OK, being precise: Unless the client specifies that one single mime type (and no other), I want to reject it with an error. Equally if no mime type is specified I'll refuse to serve a response other than an error. but the server is pretty much allowed to return whatever it wants (or a 406, at the server's discretion). If the client doesn't like a response type of application/xml, too bad for the client. Exactly what I'm after. Is a filter the right TC tool for that Charles? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
2009/2/6 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? ? Unclear why Charles? 1) Filter specifications are documented. 2) Filters are not subject to change with every Tomcat release. Makes sense, certainly with TC upgrades! To make it 'filter' all server traffic? Yes, that was what you said you wanted to do. It won't be looking at all server traffic, just what's directed to your webapp. Other traffic (e.g., Tomcat manager) is not affected. AFAIK I don't need access to any internals. Then you definately don't want a valve. Understood. Thanks. btw, The Sun specs page is a bit convoluted. http://java.sun.com/products/servlet/download.html 2.4 final or 2.5 maint release. which is TC 6 compliant to please? regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Upgrade .. a Tomcat
Besides, it's Debian, and, if I'm not mistaken, it's a packaged installation. Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
Bill Barker wrote: This is totally Tomcat specific, so won't necessarily port if you decide to change containers (but without looking probably still works for GlassFish and JBoss). Tomcat does Ant style variable replacement when parsing web.xml (both the one in conf and the one in WEB-INF). So something like context-param param-nameconfig-file-location/param-name param-value${my.config.file.location}/param-value /context-param will work if the System property my.config.file.location is set by the startup script/Windows service manager. That sounds like a good idea ! Usually, there are only a few parameters that change per customer, like the IP address of some external server, or some login id/pw for a remote service. That would really do the trick in most cases. In addition, it would avoid having to put some potentially sensible values in a web-xml file which has to be readable by the Tomcat user. (And even by me, come to think of it). And we don't even have to change the applications. I'll expand that a bit for later reference by dummies like me : Under Unix/Linux, the /etc/init.d/tomcat script is run by root, so such settings could set as some variable which would be expanded in the line calling up the JVM, no matter which user the JVM starts under, like : file : /etc/confidential/tomcat_settings.sh (only readable by root) REALLY_CONFIDENTIAL_SETTINGS=-D myfilter.auth.pw=secretpw ... file : /etc/init.d/tomcat CONFIDENTIAL_SETTINGS= if [ -f /etc/confidential/tomcat_settings.sh ]; then . /etc/confidential/tomcat_settings.sh fi ... start) su - tomcatuser -c /var/lib/jvm/java $CONFIDENTIAL_SETTINGS -jar file : (tomcat_home)/webapps/myapp/WEB-INF/web.xml ... init-param param-namesecretpw/param-name param-value$(myfilter.auth.pw)/param-value /init-param ... So now we can give the customer a new war file, with an update of his application, including a WEB-INF/web.xml file, and he can just install it and overwrite his existing web.xml, without even us having to know the secret password. Great ! Please feel free to comment, particularly if there is a mistake above. Also, I believe the above - if correct - could be a useful addition to the Tomcat FAQ, but I can't figure out if (or how) to add something there. It seems to display immutable page everywhere and I can't find an option to add something. I guess this could better be another post. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
On 03.02.2009 16:31, Steve Cohen wrote: We have an application that runs under Tomcat under RHEL 5.0 and is launched by a jsvc daemon. It chugs along seemingly fine on several servers, yet yesterday crashed on one of them with the above exception seemingly without experiencing any kind of abnormal load. I am trying to get a handle on this. System is $ uname -a Linux 2.6.18-92.1.22.el5 #1 SMP Fri Dec 5 09:29:46 EST 2008 i686 i686 i386 GNU/Linux Java version: java -version java version 1.5.0_16 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02) Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing) no special JVM memory settings are used when launching tomcat, just the default memory allocations. I have read in some places that this particular form of OutOfMemoryError is actually made worse by increasing the memory size. I need to deploy some thread and memory monitoring setup to get a handle on this. I wouldn't put so much work into making X11 work. You need to find out your memory situation and your thread situation. The error says: when trying to start a new thread, native memory allocation failed and thus the thread could not be created. So the reason is, that you ran out of native memory in the process. The cure is either to reduce the amount of memory needed or to reduce the number of threads needed. Concerning Memory: Basically your process uses Java memory (Heap and Permanent generation) and native memory (thread stacks and other native memory). If you are using a 32Bit system or VM, the address space is 4GB per process, but that space is divided in some part available for the process, and some part used by the kernel for data associated with the process. The part actually available for the process depends as far as i know on kernel settings and can be either 1, 2, or 3 GB (I would expect 2GB). Heap, Perm and native memory has to fit into this. I'm not quite sure about the thread stacks, but I assume those must fit into the 1/2/3 GB too. Process memory can be inspected using the proc file system. The file /proc/MYPID/maps (MYPID is the process id of your Tomcat process) contains a table of memory areas used by the process. The hex numbers at the beginning of each line shows starting and ending addresses, the differences are the sizes of the areas. Check whether you can verify, that the process is close to one of those magic limits. Then check, how big your heap and your permanent generation is. You can do this with jstat. I would sugest you find a good sizing for your app and don't proceed with automatic 8and thus unknown) sizing. If total memory is close to the limit and heap+perm is close to the total memory, you know that your java memory is to big for 32bits. If total memory is close to the limit and heap+perm is much lower, then there's something which consumes large native memory. It could be threads (see next) or some embedded native component, e.g. some library included via JNI. Threads: Use kill -QUIT MYPID with MYPID the process id of your Tomcat. It will write a thread dump (not: memory dump) to catalina.out. This dump contains all Java threads of your process and the stacks they are in. See how many these are and to which components they belong. With a thread dump you can find out, whether you have extremely many Java threads. You need to be the owner of the Tomcat process or root to be able to send a signal to the process. You need to be able to read catalina.out to analyse the output. Use the -L flag of ps to look at all threads of the Tomcat process. Check whether there are many more threads in ps, than there are in the Java thread dump. If so, you have some native component inside, that creates additional threads. In this case use gstack, to check, what those are doing (to get an idea, what they are used for). If you can verify that you run our of native memory, but you can reduce neither memory size not thread count, you can start playing around with the thread stack size using -Xss. But this will be tedious. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? 2.4 final or 2.5 maint release. which is TC 6 compliant to please? RTFM: http://tomcat.apache.org/ It's on the *first* page... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? Is it TC 'configuration' I'm saying config, since it provides response mime types, params etc. Strictly speaking, it's not Tomcat configuration, but webapp configuration, since the elements and values are defined by the servlet spec. The term Tomcat configuration is normally limited to those Tomcat-unique settings in files such as server.xml, catalina.properties, and context.xml. Question: Using your analogy of 'my-app' web.xml being used first, then falling back on 'all-apps' web.xml, can I add 'specials' in the list of mime type? I'm thinking of application/atom+xml Yes. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with mod_jk and Tomcat Native Connectors on Solaris
On 02.02.2009 20:01, Jorge Medina wrote: I am having problems with the mod_jk module 1.2.26 and Tomcat Native connectors running in Solaris 10. The problem occurs in both processors x86 (64-bit) and sparc (64-bit). (The problem does not occur on RedHat EL5 64-bit). On the mod_jk workers.properties file I am specifying a value for reply_timeout: worker.localworker.reply_timeout=1(10 seconds) I am anticipating that some requests would need more time, so I decided to run my test suite just increasing the value to 3. Oddly, with this value and running the same set of tests I get sporadic errors. The mod_jk log shows the following message when this occurs: [error] ajp_get_reply::jk_ajp_common.c (1730) : (localworker) Timeout with waiting reply from tomcat. Tomcat is down, stopped or nertwork problems (errno=145) I am using the following components: Apache Web Server 2.2.11 APR 1.3.3 APR-util 1.3.4 openssl-0.9.8 mod_jk1.2.26 Before debugging a problem you might consider switching to 1.2.27, because once everything works, you'll most likely not do the upgrade ;) Tomcat 6.0.16 Tomcat Native Connectors 1.1.12 (using same APR version as Apache) Please update to 1.1.16. There have been a couple of fixes in tcnative. jsvc Sun Java JDK 1.6 I also found that the problem only occurs if the Tomcat Native Connectors is enabled in Tomcat. I can't figure why increasing the reply timeout would actually produce the errors it is supposed to prevent!! I don't really understand: why do you think the timeout produces the problem? Setting the timeout means, that any reply taking longer than the timeout will be interrupted inside Apache and logged. So setting no timeout will not produce any log statements (by default the timeout is off), but I expect that you will still have long running requests. To find out about the response times and the requests with long response times, add %D to your Apache LogFormat (response times in microseconds) and activate an access log in tomcat too, with a pattern that also contains %D 8response times in milliseconds). That way you can control during your tests, what tomcat resp. Apache think the response time actually was. After verifying that Tomcat actually needs to long for some requests, you need to start to analse why (locking in application, waiting for backend or database, etc.). You can use Java thread dumps for this (kill -QUIT). Any help is appreciated. I would like to benefit from the Tomcat Native Connectors, but I can't figure what I am configuring wrong. Try 1.1.16. --- Below is my workers.properties ... --- worker.list= wlb, jkwatch, jkmanage # Properties for worker: localworker worker.localworker.type=ajp13 worker.localworker.host=localhost worker.localworker.port=8009 worker.localworker.lbfactor=1 worker.localworker.connection_pool_timeout=600 worker.localworker.socket_keepalive=True worker.localworker.socket_timeout=60 ### this parameter causes trouble if increased to 3 worker.localworker.reply_timeout=1 # # Defining a load balancer (with a single worker, the local worker) worker.wlb.type=lb worker.wlb.balance_workers=localworker worker.wlb.max_reply_timeouts=3 I would add cping/cpong. See http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html --- ... and here is the segment of server.xml --- Connector port=8009 protocol=AJP/1.3 connectionTimeout=60 enableLookups=false bufferSize=32768 maxThreads=3000/ - Jorge - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Error in building mod_jk for Apache 2.2.x and Tomcat 4.x
On 03.02.2009 13:29, Shweta Parakh -X (shparakh - Infosys at Cisco) wrote: I am trying to build mod_jk for Apache 2.2.11 and Tomcat 4.1.39 on Solaris platform 1. Downloaded mod_jk (version 1.2.27) source from http://tomcat.apache.org/download-connectors.cgi and is kept in /opt/mod_jk-1.2.27 directory 2. Installed apache2 in /opt/apache-2.2.11 directory. 3. I am able to configure mod_jk using below command to generate Makefile ./configure --with-apxs2=/opt/apache-2.2.11/usr/local/apache2/bin/apxs --with-java-home=/opt/support/java/Java1.6.0_05/bin/java --with-apache=/opt/apache 2.2.11/usr/local/apache2 There is no switch --with-apxs2 in mod_jk's configure. Use: ./configure --with-apxs=/opt/apache-2.2.11/usr/local/apache2/bin/apxs and forget about the other options. --with-apache tries to build a static module and likely you don't want that (I didn't try for a long time). Your path looks *very* strange. Note that you can't simply move some Apache httpd build from one directory to another and expect it to work. If someone build your httpd for /usr/local, in general you can't simply install it into /opt/apache-2.2.11/usr/local. A couple of files will need to be adopted to the new path. Your mileage may vary. 4. I could see 3 Makefiles are generated (Makefile, Makefile.in, Makefile.am) in /opt/mod_jk-1.2.27/native But I am getting below error while running make : make[1]: *** [lib_jk.la] Error 1 make[1]: Leaving directory `/opt/mod_jk-1.2.27/native/apache-2.0' make: *** [all-recursive] Error 1 5. libtool is being given below mentioned arguments : ./libtool --mode=link gcc -o lib_jk.la -static -rpath /opt/apache-2.2.11/usr/local/apache2/modules/jk mod_jk.lo It shouldn't use ./libtool for Apache 2.x, instead the libtool in your Apache configuration detected by apxs -q LIBTOOL. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Domain for redirects
From: Christian Decker [mailto:decker.christ...@gmail.com] Subject: Tomcat Domain for redirects I have a server that is running Tomcat 5.5 and an Apache server that runs on port 80 and uses mod_jk to redirect all incoming requests to the tomcat server. So let's start at the beginning. Why do you have httpd in the picture at all, if everything's being sent to Tomcat? Simplify your life. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: And how about this mod_jk.log ?
On 06.02.2009 14:46, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, André Warnier wrote: Because the first part of this test had to be done by a non-specialist customer on a workstation to which I did not have access, I ended up writing a simple Perl script based on the integral LWP module, to better trace the problem at the workstation level. I'd just like to point out that there are two existing tools that may have helped you our a lot: wget (often installed be default on many Linuxes these days) and httping (which is not, but freely available and has a simple make compile strategy). and curl ... But André: thanks a lot for the feedback about the final resolution! So we can still pretend client errors are not mod_jk's fault :)) Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem with mod_jk and Tomcat Native Connectors on Solaris
Hallo Rainer! Danke für dein Hilfe. I will follow your recommendation on upgrading, and I will need to learn how to configure a more verbose log and interpret them. I found out the following: - My client code (a java Axis2 client) had a timeout (I found it was 30 sec, I was under the assumption the default was 60s). When the client timeoust I would get a message Read timed out - The above timeout was too short, the client would timeout before Apache (mod_jk) had a chance to retry the request to Tomcat. I played with both timeouts, making sure the client timeout was always larger than the mod_jk reply_timeout for at least a factor of 2. This works pefectly in RedHat, but not in Solaris 10 (I tried sparc and x86, both compiled in 64-bit) In Solaris, I think the Tomcat Native library just loses some requests. No matter how I configured the timeouts and retries, I always get some sporadic 504 Gateway timeout. Disabling the Tomcat Native library and keeping everything in mod_jk the same works fine. So, for now I just disabled the Tomcat Native Library. Thanks again for your response. -Jorge -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Friday, February 06, 2009 11:38 AM To: Tomcat Users List Subject: Re: Problem with mod_jk and Tomcat Native Connectors on Solaris On 02.02.2009 20:01, Jorge Medina wrote: I am having problems with the mod_jk module 1.2.26 and Tomcat Native connectors running in Solaris 10. The problem occurs in both processors x86 (64-bit) and sparc (64-bit). (The problem does not occur on RedHat EL5 64-bit). On the mod_jk workers.properties file I am specifying a value for reply_timeout: worker.localworker.reply_timeout=1(10 seconds) I am anticipating that some requests would need more time, so I decided to run my test suite just increasing the value to 3. Oddly, with this value and running the same set of tests I get sporadic errors. The mod_jk log shows the following message when this occurs: [error] ajp_get_reply::jk_ajp_common.c (1730) : (localworker) Timeout with waiting reply from tomcat. Tomcat is down, stopped or nertwork problems (errno=145) I am using the following components: Apache Web Server 2.2.11 APR 1.3.3 APR-util 1.3.4 openssl-0.9.8 mod_jk1.2.26 Before debugging a problem you might consider switching to 1.2.27, because once everything works, you'll most likely not do the upgrade ;) Tomcat 6.0.16 Tomcat Native Connectors 1.1.12 (using same APR version as Apache) Please update to 1.1.16. There have been a couple of fixes in tcnative. jsvc Sun Java JDK 1.6 I also found that the problem only occurs if the Tomcat Native Connectors is enabled in Tomcat. I can't figure why increasing the reply timeout would actually produce the errors it is supposed to prevent!! I don't really understand: why do you think the timeout produces the problem? Setting the timeout means, that any reply taking longer than the timeout will be interrupted inside Apache and logged. So setting no timeout will not produce any log statements (by default the timeout is off), but I expect that you will still have long running requests. To find out about the response times and the requests with long response times, add %D to your Apache LogFormat (response times in microseconds) and activate an access log in tomcat too, with a pattern that also contains %D 8response times in milliseconds). That way you can control during your tests, what tomcat resp. Apache think the response time actually was. After verifying that Tomcat actually needs to long for some requests, you need to start to analse why (locking in application, waiting for backend or database, etc.). You can use Java thread dumps for this (kill -QUIT). Any help is appreciated. I would like to benefit from the Tomcat Native Connectors, but I can't figure what I am configuring wrong. Try 1.1.16. --- Below is my workers.properties ... --- worker.list= wlb, jkwatch, jkmanage # Properties for worker: localworker worker.localworker.type=ajp13 worker.localworker.host=localhost worker.localworker.port=8009 worker.localworker.lbfactor=1 worker.localworker.connection_pool_timeout=600 worker.localworker.socket_keepalive=True worker.localworker.socket_timeout=60 ### this parameter causes trouble if increased to 3 worker.localworker.reply_timeout=1 # # Defining a load balancer (with a single worker, the local worker) worker.wlb.type=lb worker.wlb.balance_workers=localworker worker.wlb.max_reply_timeouts=3 I would add cping/cpong.
Re: Limit connections to tomcat via mod_jk
On 04.02.2009 14:13, ben short wrote: Hi, We have Apache Httpd 2.4.4 in front of Tomcat 6.0.13 and are using mod_jk to talk between them. Apache Httpd is using prefork configured to allow 256 processes. Tomcat also has 256 threads available. When a user requests a page one call to the Tomcat is made followed by many requests to get static content served up by Apache Httpd. When under load we find that pages take a long time to load due to the number of requests. We believe that by increasing the number of Apache Httpd processes available the pages should load faster as the majority of requests are for static content. What we need to be able to do is limit the number of concurrent requests from Apache Httpd to Tomcat. Meaning that we could have 768 Apache processes available for static content and 256 threads for tomcat. That would be a limiter for the busy value. What would you expect as a response, once the limit is reached? When an additional dynamic request comes in, should it wait for some time, or directly return an error to free the httpd thread for handling static requests? Note: Although often 80% of all requests are for static content, since static content is so much faster (when not being huge), often much less than 50% of all active requests are for static content. And once your dynamic handling capacity is full, what would it help to still be able to serve static content? Of course in case your static content isn't related to the webapps, the story is different. But then you should consider using a separate httpd instance. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk
On 06.02.2009 00:34, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohit, Mohit Anchlia wrote: 1. Does apache read worker.properties dynamically? So if I change worker.property would it be dynamically read by mod_jk. mod_jk will not reload the workers.properties file, but if you use a separate mappings file, and you have mod_jk version 1.2.20 or later, you can use the JkMountFileReload directive and have it reload that at intervals. See http://tomcat.apache.org/connectors-doc/reference/apache.html for more details. To avoid confusion: JkMountFilereload is for the JkMountFile not JkWorkersFile (i.e. uriworkermap.properties instead of workers.properties). Having a dynamic workers.properties would be nice too, but initalizing the workers is much more deeper down in the stack, so doing it dynamically is harder than just switching to a new mounting map. Maybe some day ... Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Deadlock situation detected/avoided with jk_log_lock
Hi, I was doing some stress test (with apache ab, 100 users, 100K requests) to compare an Apache prefork and worker mpm. The test url is a simple hello servlet on Tomcat 6.0.x via mod_jk. On my Sparc Solaris 10 server with only the Apache set to worker mpm I see following error messages in my jk log: Apache/2.2.11 (Unix) with mod_jk/1.2.26 on Solaris 10. . . . [Thu Jan 08 11:42:28 2009] [error] (45)Deadlock situation detected/avoided: apr_global_mutex_lock(jk_log_lock) failed . . . [Thu Jan 08 11:42:29 2009] [emerg] (45)Deadlock situation detected/avoided: apr_proc_mutex_lock failed. Attempting to shutdown process gracefully. [Thu Jan 08 11:42:29 2009] [error] (45)Deadlock situation detected/avoided: apr_global_mutex_lock(jk_log_lock) failed . . . these errors do not appear to impact the test results and the jk log file seems complete. I can suppress the errors by choosing another Mutex in the Apache directive AcceptMutex, such as sysvsem or pthread. For Solaris 10 the default mutex for worker MPM is fcntl. Setting the Mutex sysvsem (also the default on Linux) marginally improves the request time. Can someone explain what exactly these errors means? when does it occur? I would have almost expect a detected/avoided to be a [warn] instead of an [error]. I have seen the trail http://markmail.org/message/dedqpmrrkpa224ns but I'd like to hear updated experiences that people have with sysvsem mutexes on Solaris 10 - what is the better mutex? sysvsme, posixsem, pthread **? any comment will be appreciated. Many thanks, Fredk -- View this message in context: http://www.nabble.com/Deadlock-situation-detected-avoided-with-jk_log_lock-tp21876381p21876381.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
Dave Pawson wrote: Thanks Andre. That paints a good picture! Only generality I'd like to add. The general purpose of my-app web.xml and 'all apps' web.xml. Is it TC 'configuration' (Chaz isn't going to like that, but I do like an overview, even if it's only 80%). I'm saying config, since it provides response mime types, params etc. 2009/2/5 André Warnier a...@ice-sa.com: Part 4 : By some incredible clever setup, that default web.xml happens to contain a table of Mime mappings, telling the default servlet that if what it has to return this time is some file ending in .jpg, it should include a HTTP header Content-type: image/jpeg (so that the browser would know how to handle this correctly). Or if the file ends in .xls, it should return a header Content-type: application/vnd.ms-excel (or something like that).(*) Question: Using your analogy of 'my-app' web.xml being used first, then falling back on 'all-apps' web.xml, can I add 'specials' in the list of mime type? I'm thinking of application/atom+xml Looking at a comment in the main conf/web.xml : !-- When serving static resources, Tomcat will automatically generate -- !-- a Content-Type header based on the resource's filename extension, -- !-- based on these mappings. Additional mappings can be added here (to -- !-- apply to all web applications), or in your own application's web.xml -- !-- deployment descriptor. -- So I guess yes, they are cumulated, if that is your question. So, in other words, if you change something in these Mime mappings, chances are that your Tomcat is going to start returning images while telling the browser they are Word documents, and things like that which make for an entertaining display in the web browser. I'm looking at a mc - mc service, so I'm not expecting browsers. Well, in your logfiles then probably. XML parsers might also be rather partial to input files with the wrong type. Which is probably not what you want. (Proudly, based on recent teaching by Chuck. Have I got it right, Chuck ?) (*) Of course if the browser is IE, it doesn't matter anyway, because IE will not believe what the server tells it and do its own thing. grin/ If the browser is IE I'll No I won't. Thanks Andre. Nice and clear. (Note the comment about Chaz in the background :-) Close enough! Yeah. But coming from Chuck, I think that's praise enough. I'm all thrilled that he didn't find anything in it that was contrary to the Servlet Specification, paragraph x.y. Or else he was distracted. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deadlock situation detected/avoided with jk_log_lock
On 06.02.2009 18:13, fredk2 wrote: I was doing some stress test (with apache ab, 100 users, 100K requests) to compare an Apache prefork and worker mpm. The test url is a simple hello servlet on Tomcat 6.0.x via mod_jk. On my Sparc Solaris 10 server with only the Apache set to worker mpm I see following error messages in my jk log: Apache/2.2.11 (Unix) with mod_jk/1.2.26 on Solaris 10. . . . [Thu Jan 08 11:42:28 2009] [error] (45)Deadlock situation detected/avoided: apr_global_mutex_lock(jk_log_lock) failed . . . [Thu Jan 08 11:42:29 2009] [emerg] (45)Deadlock situation detected/avoided: apr_proc_mutex_lock failed. Attempting to shutdown process gracefully. [Thu Jan 08 11:42:29 2009] [error] (45)Deadlock situation detected/avoided: apr_global_mutex_lock(jk_log_lock) failed . . . these errors do not appear to impact the test results and the jk log file seems complete. I can suppress the errors by choosing another Mutex in the Apache directive AcceptMutex, such as sysvsem or pthread. For Solaris 10 the default mutex for worker MPM is fcntl. Setting the Mutex sysvsem (also the default on Linux) marginally improves the request time. Can someone explain what exactly these errors means? when does it occur? I would have almost expect a detected/avoided to be a [warn] instead of an [error]. I have seen the trail http://markmail.org/message/dedqpmrrkpa224ns but I'd like to hear updated experiences that people have with sysvsem mutexes on Solaris 10 - what is the better mutex? sysvsme, posixsem, pthread **? any comment will be appreciated. I experienced this too a couple of times and once wrote a small C program to reproduce the problem. On Solaris the algorithm to detect a possible deadlock is very careful and returns EDEADLOCK even in situations were you can mathematically prove, that a deadlock is not possible. This happens in a multi-threaded environment when more than one mutex is used. Apache httpd and mod_jk use such a mutex and SSL also (so you can observe the same warnings without mod_jk only using SSL with httpd and doing stress tests). In older JK versions this could lead to a hang, but we worked around that a couple of versions ago. I generally recommend the pthread mutex for Solaris which doesn't have the problem and seems to be robust despite warnings about pthread mutexes in very old versions of Solaris. We even once had a discussion about changing the default httpd mutex on Solaris once, but I think that discussion didn't come to an end. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
Mikolaj Rydzewski wrote: André Warnier wrote: start) su - tomcatuser -c /var/lib/jvm/java $CONFIDENTIAL_SETTINGS -jar All of your 'confidential settings' will be visible to all users with one command: ps aux Ooops. chown root/root /bin/ps chmod 700 /bin/ps Damn! it sounded so nice. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk
gerhardus.geldenh...@gta-travel.com wrote: 1) As far as I know, no, mod_jk does not read workers.properties dynamically. 2) Yes and no, it will not send a request unless communication has been established with the worker, it may happen that the worker fails, or someone shut it down. Depending on how you configure the workers and the number of workers, it can retry the request and/or try a different worker. Mod_jk will mark the worker on error when it does not respond, and it will try again after a configurable time -but it tries again with an actual request-. It would be really nice if you could test availability of a node with a configurable request instead of a live production request... (hint, hint) Isn't that what ping is about ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk
On 06.02.2009 18:23, André Warnier wrote: gerhardus.geldenh...@gta-travel.com wrote: 1) As far as I know, no, mod_jk does not read workers.properties dynamically. 2) Yes and no, it will not send a request unless communication has been established with the worker, it may happen that the worker fails, or someone shut it down. Depending on how you configure the workers and the number of workers, it can retry the request and/or try a different worker. Mod_jk will mark the worker on error when it does not respond, and it will try again after a configurable time -but it tries again with an actual request-. It would be really nice if you could test availability of a node with a configurable request instead of a live production request... (hint, hint) Isn't that what ping is about ? Ping tests, whether there is something able to still process AJP on the other side of the connection. A configurable request would be able to talk to the application, so one could detect, whether it is still deployed, and if the request would be handled by an intelligent servlet it could respond with some sort of application layer health status. Worth filing an enhancement request, since Mladen put the Watchdog thread into 1.2.27, we can easily add more logic of that type. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: And how about this mod_jk.log ?
Chris, I'd just like to point out that there are two existing tools that may have helped you our a lot: wget (often installed be default on many Linuxes these days) and httping (which is not, but freely available and has a simple make compile strategy). I thought about those, but did not use wget, ab, curl etc.. because - the problem happened on users Windows workstations, and I wanted to test from there. Neither of the above are standard under Windows, some may be hard to find in Win32 binary version. - neither wget or these other tools, I believe, allow by themselves to run the test on a series of URLs, in a loop, with a variable time-out - I wasn't sure of the level of debugging information I'd get when there was a connection drop, without at the same time getting a lot of verbose stuff when no error was found - the Windows shell under which I would have had to do something in order to wrap any of the above to do what I wanted is not exactly my preferred programming environment - on the other hand, perl was already installed on the workstation and for things like that it is really great And let anyone who hasn't ever re-invented a personal version of the wheel throw me the first stone. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Upgrade .. a Tomcat
Gregor Schneider wrote: Besides, it's Debian, and, if I'm not mistaken, it's a packaged installation. I know that, but you're the first one to mention it, and it has been 3 days since the post. So my phrasing wasn't so bad. ;-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to create new native thread
Christopher Schultz wrote: [...] Assuming Chuck has an iPhone, which has 128MB of RAM, I'm not sure I'd want to run a JVM on that server in the first place. Something tells me we've been over this before so I won't beat a dead horse. Chuck assured us, on this forum, that his phone had waaay more memory than that. So either it's not an iPhone, or it's a hacked one. Probably has a JVM on it too. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Domain for redirects
Christian Decker wrote: [...] As this happens in many different places I assume that the tomcat server somehow believes that he is server1 instead of server1.example.com. I'm also going to start at the beginning, but in a different way. So why don't you force Tomcat to believe he /is/ server1.example.com ? Such as putting that name in your hosts file and in the Host tag, I guess. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to createnew native thread
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to createnew native thread Assuming Chuck has an iPhone, which has 128MB of RAM I do, but it's a 3G, with 16 GB of storage memory. It appears that the 128MB of RAM was for the previous generation, dissections of the new one show 512 MB chips installed. Well, there's no way I'm dissecting mine, but Wikipedia says both units have 128MB. Are you talking about two 512 Mbit SRAM dice? Also, it looks like all code has to fit inside the true RAM, but a portion of it is used as a paging area for the data storage; consequently apps seem to have direct access to most of the 16 GB as a heap. (But I'm not an iPhone developer, so the above is just hearsay.) That's interesting, and implies that apps that care to manage their own memory could be HUGE in terms of code size. I didn't realize the level of customization and specialization that had gone into the iPhone's version of OS X. Do you have a reference I could see? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMgToACgkQ9CaO5/Lv0PAKOwCffr/Bay0VVfJ8xwrOG35hAiXy UZwAn0Fx6rnZvKJlaCZ8Zd7qJ0dLveXt =O7hL -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Management app start
I have a client using our software and have set up for them a user for the management app. They brought up the management app and stopped the webapp, but cannot seem to get it started again. I had them e-mail the log, but no help. This is a remote client, so I'm stuck as to what to look at next. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, Rainer Jung wrote: Worth filing an enhancement request, since Mladen put the Watchdog thread into 1.2.27, we can easily add more logic of that type. Maybe ajping? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMghoACgkQ9CaO5/Lv0PBSKgCgrkYbLmw8dZjWJBqIsVwv1KOb aYcAn0VnuF6U0J7FBGFifEo6Pya3YwFi =mivz -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fun with the JVM crashing.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, Caldarale, Charles R wrote: From: Bill Davidson [mailto:bill...@gmail.com] Subject: Fun with the JVM crashing. I'm thinking that the JVM shouldn't be getting SIGSEGV's. You're right about that. However, it could also be an OS or hardware problem. You might want to run some serious memory tests on the box, just to eliminate the latter. +100! What is the architecture? Do you have physical access? If it's x86 and you do have physical access, 100% you should run memtest86+ against it. Let it run all night. If it's a production server, replace it with one you trust and then figure out what the problem is with the old box. We had 6 app servers at [bloated CA name removed to protect the guilty] in production and 2 of them were giving us SIG11's. The solution was to throw them out and replace them with 2 new ones. One of those sucked, too, so we had to play server-roulette again before we got all 6 good ones. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMg2sACgkQ9CaO5/Lv0PACwACgmYPdCqQLUoBxnJGtT/CLrsSQ M5AAnRjFYbOp6xqfFj1/mc4/Qn/G/7to =tvDm -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: sessions lost after redeploy
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, J Robert Ray wrote: Hello, I have an app running in tomcat 6.0.18, using the default session manager. If I stop and start tomcat, or if I use the reload button in the manager, my sessions are preserved. Good. That suggests your session data is properly serializable. But if I copy a new .war into webapps, or touch the existing .war, so that my app redeploys, my sessions are deleted. Are you sure that simply 'touch'ing the existing WAR causes your sessions to die? I can't account for that, but... If you recompile a class, the compiler assigns it a new serialVersionID (unless you specify one). If you have an object of a class (say, foo.bar.Baz) that was serialized with version X before the restart, and the class in the running server after the restart has version Y, then the object is not compatible and the de-serialization will fail. Are you getting any error messages? ClassCastException? Some weird versioning error? I have forgotten what the JVM says when these error occur... though the persistent session manager might ignore those errors. Is this expected behavior? It would speed up my development cycle if I could deploy a new build of the app without having to re-login to the app in the browser. You could explicitly version the classes whose objects you store in the session. Google for serialVersionID to see how to do this. But if your objects really are incompatible, it's going to fail, anyway. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMhGMACgkQ9CaO5/Lv0PDz3gCgjKpcJZRmweaoPKnV/ro6IvTo X/MAnj9xrK78lPJwwT1UOUuuWTL4W0PJ =jA8x -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to createnew native thread
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to createnew native thread Are you talking about two 512 Mbit SRAM dice? No, what's been reported on various mailing lists. Do you have a reference I could see? Again no, sorry. Just browsing lists after I bought one. As I said, it's hearsay. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Management app start
From: Hehl, Thomas [mailto:thomas.h...@acs-inc.com] Subject: Management app start This is a remote client, so I'm stuck as to what to look at next. How about looking at the Tomcat version, JRE/JDK in use, OS, etc. - and then telling us what they are. Or consult a psychic. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Management app start
Please forgive my foolishness as it is Friday afternoon and my brain must already be on weekend.:) Tomcat=6.0 Java=1.6 Redhat Linux 3.something. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, February 06, 2009 1:49 PM To: Tomcat Users List Subject: RE: Management app start From: Hehl, Thomas [mailto:thomas.h...@acs-inc.com] Subject: Management app start This is a remote client, so I'm stuck as to what to look at next. How about looking at the Tomcat version, JRE/JDK in use, OS, etc. - and then telling us what they are. Or consult a psychic. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
Dave Pawson wrote: 2009/2/6 Caldarale, Charles R chuck.caldar...@unisys.com: From: Dave Pawson [mailto:dave.paw...@gmail.com] Subject: Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type? Unless the client specifies that one single mime type (and no other), I want to reject it Unless you have an extremely specialized client in mind, you will be rejecting all requests. No browser will ever limit itself to a single mime type. That's it. Again, my code, hence very specialised. No browsers, IE or FF! Just my java end point. I believe that what Chuck is trying to tell you - and in many more words than his - is this : Your service, whatever it is, will have a listening TCP port, waiting for requests from your clients. Thus, any of many available programs out there (not talking only about browsers), can connect to that TCP port, and basically send anything they want to it. Including things resembling the requests you are expecting, with whatever HTTP headers they want to specify, including those which you would maybe use to attempt to distinguish your genuine clients from the others. Thus, rejecting requests on the base of something they include or not, unless the something is some secret encrypted key available only to your server and its genuine clients, will not be a good enough measure if your goal is to avoid someone downloading something from your server that they shouldn't. I (or anyone else on this list) can fake any such HTTP request, at any time, within 1 minute of you giving us the hostname and port, and download one of your xml templates. And we would not even have to write any new program to do it. If there is a secret key, and if it is fixed, then anyone once capturing a packet between your clients and your server, would be able to re-use that key and fake one of your clients forever. If the key is variable, but based on some simple algorithm, then 1) you would still have to develop the algorithm and 2) unless you are a cryptographic expert, someone will break it if there is enough interest to justify it, and even only for the fun of it. If security is one of your purposes thus, do not try to use things like content-type headers or the like, use a secure form of communication developed by experts and available for free, such as HTTPS. You would just have to plug-in the pieces, and then develop your application as if the security layer wasn't even there. And if security is not in the picture, then forgive me the above lecture, I got lost somewhere along about what your purpose really is. But if you're still interested, I have a similar lecture about the difference between Valves and servlets (or servlet filters), and why one may be more adapted than the other to any particular purpose. Not at any deep Tomcat/Java level though. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk
Hi Rainer, your comment about the watchdog sounds interesting. When you load balance it would seem useful to get feedback from Tomcat itself about its load so that the module can adjust dynamically its load (lbfactor) based on the Tomcat's performance rather than a session/socket count. One can wonder if such added complexity would be detrimental to the mod_jk stability. Rgds - Fred Rainer Jung-3 wrote: On 06.02.2009 18:23, André Warnier wrote: gerhardus.geldenh...@gta-travel.com wrote: 1) As far as I know, no, mod_jk does not read workers.properties dynamically. 2) Yes and no, it will not send a request unless communication has been established with the worker, it may happen that the worker fails, or someone shut it down. Depending on how you configure the workers and the number of workers, it can retry the request and/or try a different worker. Mod_jk will mark the worker on error when it does not respond, and it will try again after a configurable time -but it tries again with an actual request-. It would be really nice if you could test availability of a node with a configurable request instead of a live production request... (hint, hint) Isn't that what ping is about ? Ping tests, whether there is something able to still process AJP on the other side of the connection. A configurable request would be able to talk to the application, so one could detect, whether it is still deployed, and if the request would be handled by an intelligent servlet it could respond with some sort of application layer health status. Worth filing an enhancement request, since Mladen put the Watchdog thread into 1.2.27, we can easily add more logic of that type. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/mod_jk-tp21856049p21878692.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Can Tomcat accomplish this?
Hello: I was just wondering if Tomcat is able to do something similar to what I've described below. If not, does anyone have any recommendations on a Web Server that can? I'm attempting to find a web server that can basically act as a hub. Say if someone attempts to send a SOAP request to http://1.1.1.1/message1 it will redirect the message to the appropriate tool to handle it, whether it be a Java program or maybe even another web server. This next part is optional, but ideal. After the message is passed off to the appropriate handler, the web server then waits for the response and will then forward it to the original sender. So does anyone know if Tomcat is able to handle this, or of any other web server (open source) that can? Thanks, Chris Long
Re: Deadlock situation detected/avoided with jk_log_lock
Thanks Rainer, Do I understand you correctly that when Mr. Orton said to never use pthread nor posixsem mutex (http://marc.info/?l=apr-devm=108720968023158w=2) that is now obsolete news and that Solaris perfected pthread mutex support since. You mention that mod_jk uses pthread is that the same as the httpd itself? Some fellow at Covalent back in the early Apache 2.0 days, posted a white paper about his various mutex testing, but it does not appear to be available anymore. Would be interesting to know how it was tested and how it would playout today. Rgds - Fred Rainer Jung-3 wrote: On 06.02.2009 18:13, fredk2 wrote: I was doing some stress test (with apache ab, 100 users, 100K requests) to compare an Apache prefork and worker mpm. The test url is a simple hello servlet on Tomcat 6.0.x via mod_jk. On my Sparc Solaris 10 server with only the Apache set to worker mpm I see following error messages in my jk log: Apache/2.2.11 (Unix) with mod_jk/1.2.26 on Solaris 10. . . . [Thu Jan 08 11:42:28 2009] [error] (45)Deadlock situation detected/avoided: apr_global_mutex_lock(jk_log_lock) failed . . . [Thu Jan 08 11:42:29 2009] [emerg] (45)Deadlock situation detected/avoided: apr_proc_mutex_lock failed. Attempting to shutdown process gracefully. [Thu Jan 08 11:42:29 2009] [error] (45)Deadlock situation detected/avoided: apr_global_mutex_lock(jk_log_lock) failed . . . these errors do not appear to impact the test results and the jk log file seems complete. I can suppress the errors by choosing another Mutex in the Apache directive AcceptMutex, such as sysvsem or pthread. For Solaris 10 the default mutex for worker MPM is fcntl. Setting the Mutex sysvsem (also the default on Linux) marginally improves the request time. Can someone explain what exactly these errors means? when does it occur? I would have almost expect a detected/avoided to be a [warn] instead of an [error]. I have seen the trail http://markmail.org/message/dedqpmrrkpa224ns but I'd like to hear updated experiences that people have with sysvsem mutexes on Solaris 10 - what is the better mutex? sysvsme, posixsem, pthread **? any comment will be appreciated. I experienced this too a couple of times and once wrote a small C program to reproduce the problem. On Solaris the algorithm to detect a possible deadlock is very careful and returns EDEADLOCK even in situations were you can mathematically prove, that a deadlock is not possible. This happens in a multi-threaded environment when more than one mutex is used. Apache httpd and mod_jk use such a mutex and SSL also (so you can observe the same warnings without mod_jk only using SSL with httpd and doing stress tests). In older JK versions this could lead to a hang, but we worked around that a couple of versions ago. I generally recommend the pthread mutex for Solaris which doesn't have the problem and seems to be robust despite warnings about pthread mutexes in very old versions of Solaris. We even once had a discussion about changing the default httpd mutex on Solaris once, but I think that discussion didn't come to an end. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Deadlock-situation-detected-avoided-with-jk_log_lock-tp21876381p21879345.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Should I use the -server switch?
Caldarale, Charles R wrote: Most of the 64-bit Sun JVMs come only in -server mode, no -client version. Run java -version (without the quotes) to see what the default mode is. Checking that... $ ./java -version java version 1.6.0_11 Java(TM) SE Runtime Environment (build 1.6.0_11-b03) Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode) So no need for the switch, since it's already doing that. Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fun with the JVM crashing.
Caldarale, Charles R wrote: Only if that shows up repeatedly. It does. I'm thinking that the JVM shouldn't be getting SIGSEGV's. You're right about that. However, it could also be an OS or hardware problem. You might want to run some serious memory tests on the box, just to eliminate the latter. Does this particular system use ECC memory, or just plain old parity-checking DIMMs? Not sure. However, it has happened on three different boxes, always with the same CompileTask mentioned. You can also try either moving up to the recently released JDK 6u12, or dropping back to 6u7. Lots of changes went in at 6u10, and something might still be broken in there. The C2 compiler is an extremely complex beast. I'll try that. BTW, it also happened with 6u10. I'm wondering if -Xint might help. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Fun with the JVM crashing.
From: Bill Davidson [mailto:bill...@gmail.com] Subject: Re: Fun with the JVM crashing. However, it has happened on three different boxes, always with the same CompileTask mentioned. That pretty much eliminates hardware. BTW, it also happened with 6u10. Major changes went in between 6u7 and 6u10. I'm wondering if -Xint might help. Only if you want performance to go into the toilet - that's interpreter mode, also know as really, really, abominably slow. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fun with the JVM crashing.
Caldarale, Charles R wrote: Major changes went in between 6u7 and 6u10. Maybe I should try reverting to 6u7? I'm wondering if -Xint might help. Only if you want performance to go into the toilet - that's interpreter mode, also know as really, really, abominably slow. I was thinking it might make the CompileTask issue go away. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fun with the JVM crashing.
Bill Davidson wrote: Caldarale, Charles R wrote: Major changes went in between 6u7 and 6u10. Maybe I should try reverting to 6u7? Dammit. Looking back through my old hs_err*.log files, it also happened with 6u7. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Fun with the JVM crashing.
From: Bill Davidson [mailto:bill...@gmail.com] Subject: Re: Fun with the JVM crashing. Maybe I should try reverting to 6u7? That would be my next step. I was thinking it might make the CompileTask issue go away. Well it does, because the JVM won't use the compilers in interpreter mode. Consequently every byte code of every method is interpreted rather than being translated to native instructions. Performance is severely impacted. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Can Tomcat accomplish this?
Maybe an ESB ? (like Mule) -Original Message- From: Christopher Long [mailto:kord...@gmail.com] Sent: Friday, February 06, 2009 2:19 PM To: users@tomcat.apache.org Subject: Can Tomcat accomplish this? Hello: I was just wondering if Tomcat is able to do something similar to what I've described below. If not, does anyone have any recommendations on a Web Server that can? I'm attempting to find a web server that can basically act as a hub. Say if someone attempts to send a SOAP request to http://1.1.1.1/message1 it will redirect the message to the appropriate tool to handle it, whether it be a Java program or maybe even another web server. This next part is optional, but ideal. After the message is passed off to the appropriate handler, the web server then waits for the response and will then forward it to the original sender. So does anyone know if Tomcat is able to handle this, or of any other web server (open source) that can? Thanks, Chris Long - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Fun with the JVM crashing.
From: Caldarale, Charles R Subject: RE: Fun with the JVM crashing. Maybe I should try reverting to 6u7? That would be my next step. You could install a 32-bit JVM; that would give you the option of running either -server or -client. If the 32-bit -server mode crashes, you can try -client instead, which historically has had fewer problems. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can Tomcat accomplish this?
Unfortunately we're not looking for an ESB. We're looking specifically for a Web Server. Does anyone know if mod_jk will handle this type of thing? I'm attempting to find a web server that can basically act as a hub. Say if someone attempts to send a SOAP request to http://1.1.1.1/message1 it will redirect the message to the appropriate tool to handle it, whether it be a Java program or maybe even another web server. This next part is optional, but ideal. After the message is passed off to the appropriate handler, the web server then waits for the response and will then forward it to the original sender. Thanks, Chris Long On Fri, Feb 6, 2009 at 3:21 PM, Jorge Medina jmed...@e-dialog.com wrote: Maybe an ESB ? (like Mule) -Original Message- From: Christopher Long [mailto:kord...@gmail.com] Sent: Friday, February 06, 2009 2:19 PM To: users@tomcat.apache.org Subject: Can Tomcat accomplish this? Hello: I was just wondering if Tomcat is able to do something similar to what I've described below. If not, does anyone have any recommendations on a Web Server that can? I'm attempting to find a web server that can basically act as a hub. Say if someone attempts to send a SOAP request to http://1.1.1.1/message1 it will redirect the message to the appropriate tool to handle it, whether it be a Java program or maybe even another web server. This next part is optional, but ideal. After the message is passed off to the appropriate handler, the web server then waits for the response and will then forward it to the original sender. So does anyone know if Tomcat is able to handle this, or of any other web server (open source) that can? Thanks, Chris Long - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Fun with the JVM crashing.
Hi Bill My development workstation is a 64 bit Ubuntu 8.04. I've had numerous problems with SIGSEGV crashes when I run my applications under Eclipse 3.3, but the same machine also runs the same applications from the same version(s) of tomcat (6.0.14,6.0.16 and 6.0.18) I found that what seemed to affect the thing the most was 'loading up' the JVM. My app is actually 5 different wars - I get the most problems when all of them are loaded. I found it so frustrating that I've actually procured a 2nd 64 bit machine to try to see what common factors there are. For example, I was going to see if Eclipse 3.4 was better than 3.3. I tried b4 thru b16 and it seems to have made no difference. No real answer here, just me giving you some more background data. Regards Alan Chaney Bill Davidson wrote: I've submitted this to Sun a few times. No response. I was hoping someone here might have an idea of what to look for. Tomcat 6.0.18 RedHat 5.2Server Sun JVM # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x2b68e6a1db57, pid=10229, tid=1103006016 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # V [libjvm.so+0x564b57] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # --- T H R E A D --- Current thread (0x4bfe5c00): JavaThread CompilerThread0 daemon [_thread_in_native, id=10244, stack(0x41ae8000,0x41be9000)] siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x . Current CompileTask: C2:2525 com.myCompany.servlets.sales.blah.some.method(Lcom/myCompany/servlets/someClass;Lcom/myCompany/servlets/otherClass;Lcom/oreilly/servlet/ParameterParser;)V (425 bytes) .. - I'm wondering if that CompileTask is what's causing the problem. I'm thinking that the JVM shouldn't be getting SIGSEGV's. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org !DSPAM:498b962676632009820482! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can Tomcat accomplish this?
I may be missing something here, but it strikes me that this requirement has nothing to do with a web server in particular, and everything to do with the application code which you write to accomplish what you describe. On Feb 6, 2009, at 3:41 PM, Christopher Long wrote: Unfortunately we're not looking for an ESB. We're looking specifically for a Web Server. Does anyone know if mod_jk will handle this type of thing? I'm attempting to find a web server that can basically act as a hub. Say if someone attempts to send a SOAP request to http://1.1.1.1/message1 it will redirect the message to the appropriate tool to handle it, whether it be a Java program or maybe even another web server. This next part is optional, but ideal. After the message is passed off to the appropriate handler, the web server then waits for the response and will then forward it to the original sender. Thanks, Chris Long On Fri, Feb 6, 2009 at 3:21 PM, Jorge Medina jmed...@e-dialog.com wrote: Maybe an ESB ? (like Mule) -Original Message- From: Christopher Long [mailto:kord...@gmail.com] Sent: Friday, February 06, 2009 2:19 PM To: users@tomcat.apache.org Subject: Can Tomcat accomplish this? Hello: I was just wondering if Tomcat is able to do something similar to what I've described below. If not, does anyone have any recommendations on a Web Server that can? I'm attempting to find a web server that can basically act as a hub. Say if someone attempts to send a SOAP request to http://1.1.1.1/message1 it will redirect the message to the appropriate tool to handle it, whether it be a Java program or maybe even another web server. This next part is optional, but ideal. After the message is passed off to the appropriate handler, the web server then waits for the response and will then forward it to the original sender. So does anyone know if Tomcat is able to handle this, or of any other web server (open source) that can? Thanks, Chris Long - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Can Tomcat accomplish this?
From: Christopher Long [mailto:kord...@gmail.com] Subject: Re: Can Tomcat accomplish this? Unfortunately we're not looking for an ESB. That's too bad, because that's certainly what your requirement statement sounds like. We're looking specifically for a Web Server. There's no web server that does this. There are applications that run inside (or under) a web or app server that do this. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Pawson wrote: Only one aspect of security Rob. As needed I'll look at others later. Can you suggest alternatives to achieve what I want, rather than something else? Instead of using Accept header with a magic content-type, how about sending a custom header with some credentials included? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMr2kACgkQ9CaO5/Lv0PDpOwCeLOjsJIuh6rYxy9l3FJwEIWus u+EAoLCF6wKoKneKZIXHQ6gGjJat3FtN =K4uu -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC6 ${CATALINA_HOME}/conf/web.xml Is this the place to constrain the mime type?
On Feb 6, 2009, at 4:45 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Pawson wrote: Only one aspect of security Rob. As needed I'll look at others later. Can you suggest alternatives to achieve what I want, rather than something else? Instead of using Accept header with a magic content-type, how about sending a custom header with some credentials included? You mean like 'Authorization' ? :) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Classloaders
In server.xml , a Server may contain multiple Service elements. Each Service can define multiple Connectors but a single Engine. Each Engine can define multiple Hosts. How does this relate to the classloaders -if at all- ? I couldn't find any reference about it on: http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html Would Tomcat create a classloader per each Host ? Engine ? or Service? If I define two Services, are they isolated by different classloaders? -Jorge
RE: Classloaders
From: Jorge Medina [mailto:jmed...@e-dialog.com] Subject: Classloaders How does this relate to the classloaders -if at all- ? It doesn't. Would Tomcat create a classloader per each Host ? Engine ? or Service? Nope. If I define two Services, are they isolated by different classloaders? Nope. In 6.0, Tomcat creates a classloader for itself, plus one for each webapp. The system classloader is used start up Tomcat, but very little after that. There's no classloader separation for any of internally nested containers. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can Tomcat accomplish this?
On Feb 6, 2009, at 3:55 PM, Caldarale, Charles R wrote: From: Christopher Long [mailto:kord...@gmail.com] Subject: Re: Can Tomcat accomplish this? Unfortunately we're not looking for an ESB. That's too bad, because that's certainly what your requirement statement sounds like. We're looking specifically for a Web Server. There's no web server that does this. There are applications that run inside (or under) a web or app server that do this. - Chuck Maybe a reverse_proxy can do that. János - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: sessions lost after redeploy
On Fri, Feb 6, 2009 at 10:41 AM, Christopher Schultz ch...@christopherschultz.net wrote: But if I copy a new .war into webapps, or touch the existing .war, so that my app redeploys, my sessions are deleted. Are you sure that simply 'touch'ing the existing WAR causes your sessions to die? I can't account for that, but... Yes, I am certain. Touch blows away the sessions. But tomcat shutdown/restart preserves them. I tried enabling debug message for the manager, with Manager debug=4 /, and I have my logger configured to show ALL, but I don't see any messages from the manager in my logs. If you recompile a class, the compiler assigns it a new serialVersionID (unless you specify one). If you have an object of a class (say, foo.bar.Baz) that was serialized with version X before the restart, and the class in the running server after the restart has version Y, then the object is not compatible and the de-serialization will fail. Are you getting any error messages? ClassCastException? Some weird versioning error? I have forgotten what the JVM says when these error occur... though the persistent session manager might ignore those errors. I don't see anything relevant in the logs. My session consists of a single value, a Byte[], so I shouldn't have a problem with unserializable data. Besides, it reloads properly across a tomcat restart. Do you have an app that preserves sessions through a redeploy? Thanks for your help! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
André Warnier wrote: chown root/root /bin/ps chmod 700 /bin/ps User can build his own ps binary. Security by obscurity is not a good way to go. -- Mikolaj Rydzewski m...@ceti.pl - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
Mikolaj Rydzewski wrote: André Warnier wrote: chown root/root /bin/ps chmod 700 /bin/ps User can build his own ps binary. Security by obscurity is not a good way to go. I was just kidding. ;-) I'd still like to make it work though. It looks like such a nice way to solve the problem, apart from the fact that the -D command-line options do show up on the ps display. I've been trying to twist it with things like /usr/lib/jvm/java `cat hidden-file` ... and stuff like that, but of course it doesn't help either. Another thought : Isn't there a way to have Java read a properties file when it starts up ? Answering my own question : probably, but then it has again to be readable by the userid starting the JVM. Ok, so it does not work for things that one wants to keep hidden, but it still works for normal settings that might be different between customers, like the IP address of some external host. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
About logging
I have a problem that I haven't resolved yet around logging. I have log4j within my application, what I see is that every log line is written to my log file specified in log4j (as expected) but there is also one entry in catalina.out. I had asked this question in the thread http://marc.info/?l=tomcat-userm=122463910906594w=2 earlier but reading that thread again I have some more questions: 1. What does tomact julian jar do? 2. Would I still get tomcat specific entries in catalina.out, localhost, manager log files or do I then need to create new log4j file? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk
Sorry I am little confused about couple of things: 1. Based on what I read it looks like workers.properties is not loaded dynamically. And JkMountFileReload doesn't work for worker.properties but it works for uriworkermap.properties. 2. Wouldn't setting prepost timeout ensure that a check is made to see if remote machine is up before forwarding the request? On Fri, Feb 6, 2009 at 11:01 AM, fredk2 fre...@gmail.com wrote: Hi Rainer, your comment about the watchdog sounds interesting. When you load balance it would seem useful to get feedback from Tomcat itself about its load so that the module can adjust dynamically its load (lbfactor) based on the Tomcat's performance rather than a session/socket count. One can wonder if such added complexity would be detrimental to the mod_jk stability. Rgds - Fred Rainer Jung-3 wrote: On 06.02.2009 18:23, André Warnier wrote: gerhardus.geldenh...@gta-travel.com wrote: 1) As far as I know, no, mod_jk does not read workers.properties dynamically. 2) Yes and no, it will not send a request unless communication has been established with the worker, it may happen that the worker fails, or someone shut it down. Depending on how you configure the workers and the number of workers, it can retry the request and/or try a different worker. Mod_jk will mark the worker on error when it does not respond, and it will try again after a configurable time -but it tries again with an actual request-. It would be really nice if you could test availability of a node with a configurable request instead of a live production request... (hint, hint) Isn't that what ping is about ? Ping tests, whether there is something able to still process AJP on the other side of the connection. A configurable request would be able to talk to the application, so one could detect, whether it is still deployed, and if the request would be handled by an intelligent servlet it could respond with some sort of application layer health status. Worth filing an enhancement request, since Mladen put the Watchdog thread into 1.2.27, we can easily add more logic of that type. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/mod_jk-tp21856049p21878692.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to createnew native thread
From: Caldarale, Charles R Subject: RE: [OT] [Tomcat] [daemon] java.lang.OutOfMemoryError unable to createnew native thread No, what's been reported on various mailing lists. Looks like the true RAM on the iPhone is indeed just 128 MB, embedded in the same chip carrier as the ARM processor; here's the data sheet for it: http://sigma.octopart.com/472067/datasheet/Samsung-K4X1G163PC.pdf - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Running Derby on Tomcat
Hi, I've been trying to get Derby running on Tomcat with no luck. When I try to get a java server page to connect it keeps telling me that it can't find the derby client driver. I start Tomcat with this: #!/bin/sh JAVA_HOME=/lib/sun-jdk-1.5.0 JAVA_OPTS=-server CATALINA_HOME=/share/tomcat-5.5.14 CATALINA_BASE=$(cd $(dirname $0)/.. pwd) CATALINA_PID=$CATALINA_BASE/logs/catalina.pid export JAVA_HOME JAVA_OPTS CATALINA_HOME CATALINA_BASE CATALINA_PID $CATALINA_HOME/bin/catalina.sh $(basename $0) export DERBY_INSTALL=/home/qsys/derby export DERBY_HOME=/home/qsys/derby export CLASSPATH=$CLASSPATH:$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTALL/lib/derbyclient.jar:$DERBY_INSTALL/lib/derbytools.jar:. I can run the following and work with derby with simmilar code as the above (I added $DERBY_INSTALL/lib/derbyclient.jar to Tomcat start script): export DERBY_INSTALL=/home/qsys/derby export DERBY_HOME=/home/qsys/derby export CLASSPATH=$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTALL/lib/derbytools.jar:. /home/qsys/derby/bin/setEmbeddedCP java org.apache.derby.tools.sysinfo java org.apache.derby.tools.ij so the classpath is correct. Is there an obvious stupid mistake in how I am setting the classpath?
RE: Management app start
From: Hehl, Thomas [mailto:thomas.h...@acs-inc.com] Subject: RE: Management app start Tomcat=6.0 Java=1.6 Redhat Linux 3.something. They brought up the management app and stopped the webapp, but cannot seem to get it started again. I had them e-mail the log, but no help. Do you know what precisely was done via the Tomcat manager? You say the log, but there are numerous log files produced by Tomcat and various webapps; you really need to look at pretty much all of them. By any chance, does your webapp spawn extra threads, and not shut them down properly? Does it use any native 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Running Derby on Tomcat
From: michel [mailto:compu...@videotron.ca] Subject: Running Derby on Tomcat export CLASSPATH=$CLASSPATH:$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTA LL/lib/derbyclient.jar:$DERBY_INSTALL/lib/derbytools.jar:. Don't ever, ever, ever set CLASSTPATH for use with Tomcat. Any jars needed by your webapp should be in the webapp's WEB-INF/lib directory, or Tomcat's shared/lib directory. Follow the instructions on the Derby web pages: http://db.apache.org/derby/integrate/DerbyTomcat5512JPetStor.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Running Derby on Tomcat
Chuck, Thanks! I am using the default tomcat for my hosting and it has the classpath in the default startup. I am wondering if that isn't a reason for all the weird problems. Thanks again! - Original Message - From: Caldarale, Charles R chuck.caldar...@unisys.com To: Tomcat Users List users@tomcat.apache.org Sent: Friday, February 06, 2009 9:07 PM Subject: RE: Running Derby on Tomcat From: michel [mailto:compu...@videotron.ca] Subject: Running Derby on Tomcat export CLASSPATH=$CLASSPATH:$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTA LL/lib/derbyclient.jar:$DERBY_INSTALL/lib/derbytools.jar:. Don't ever, ever, ever set CLASSTPATH for use with Tomcat. Any jars needed by your webapp should be in the webapp's WEB-INF/lib directory, or Tomcat's shared/lib directory. Follow the instructions on the Derby web pages: http://db.apache.org/derby/integrate/DerbyTomcat5512JPetStor.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org