Re: single instance of background job?
Hi, This should be strait forward if you use terracotta. If you have a NFS that all Tomcat instances share, using FileChannel::lock is way cheaper than any other solution. -lg On Sun, Jan 11, 2009 at 2:30 AM, Rusty Wright wrote: > This isn't really a Tomcat question I'm guessing but I don't know where else > to ask. > > In our setup we have multiple Tomcats behind a load balancer. I have a > background task that will run once a day, via Quartz. All Tomcats will be > using the same war so they will all run the job, but I need it so only one > of them runs the job. > > I'm looking for ideas for how to implement this. At the moment all I can > think of is to use a table in a database with a unique constraint on a > column, and each background process tries to insert today's date > (-mm-dd) and the one that succeeds runs the job, and the ones that > don't, do nothing. > > Thanks > > > - > 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
Linux Runtime Script
Hi, Does anyone has a Linux script to run Tomcat as Linux services, i.e. the runlevel scripts ? I have tried to make one, but in case there is a proven script that has been deployed somewhere... can someone please share ? Thanks, Feris
Re: Implementing service chaining with Tomcat6
What options are available to you to determine if the daemon is ready? For example, does it create a lock file? If so, you could modify your tomcat startup script in /etc/init.d, the one that calls /usr/local/tomcat/bin/startup.sh, and have it check if the daemon is ready and wait until it is, then when it is proceed and start tomcat. For example, here's a little /bin/sh script that waits for the file /bin/zzz to be created and sleeps 5 seconds and keeps checking: while test ! -f /tmp/zzz do echo "sleeping for 5 seconds" /bin/sleep 5 done echo "here we go" uma...@comcast.net wrote: I am using Tomcat6.0.14 with Jdk1.6 on Linux RH4. My application comprises a daemon and Tomcat6. The daemon is slow in starting up. I need Tomcat6 to be started after the daemon is operational. While the daemon is a Java application, its a third-party tool whose src I do not control. Is there any mechanism within Tomcat configuration by which I could implement this "chaining" or synchronization such that catalina.sh starts Tomcat VM after the daemon is somehow determined to be active? Tx, - U - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org From - Sat - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
single instance of background job?
This isn't really a Tomcat question I'm guessing but I don't know where else to ask. In our setup we have multiple Tomcats behind a load balancer. I have a background task that will run once a day, via Quartz. All Tomcats will be using the same war so they will all run the job, but I need it so only one of them runs the job. I'm looking for ideas for how to implement this. At the moment all I can think of is to use a table in a database with a unique constraint on a column, and each background process tries to insert today's date (-mm-dd) and the one that succeeds runs the job, and the ones that don't, do nothing. Thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Implementing service chaining with Tomcat6
I am using Tomcat6.0.14 with Jdk1.6 on Linux RH4. My application comprises a daemon and Tomcat6. The daemon is slow in starting up. I need Tomcat6 to be started after the daemon is operational. While the daemon is a Java application, its a third-party tool whose src I do not control. Is there any mechanism within Tomcat configuration by which I could implement this "chaining" or synchronization such that catalina.sh starts Tomcat VM after the daemon is somehow determined to be active? Tx, - U - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Strange parser behavior from adding log4j
> From: Ken Bowen [mailto:kbo...@als.com] > > Mark, > > I checked out rev 733300 from /tomcat/tc6.0x/trunk, built it and the > relase, and used an unzipped copy of apache-tomcat-6.0-snapshot. > Unfortunately, the same error still happens when I start up my webapp: > > ERROR org.apache.commons.digester.Digester - Parse Error at line 405 > column 17: The content of element type "struts-config" must match > "(display-name?,description?,data-sources?,form-beans?,global- > exceptions?,global-forwards?,action-mappings?,controller?,message- > resources*,plug-in*)". > org.xml.sax.SAXParseException: The content of element type "struts- > config" must match "(display-name?,description?,data-sources?,form- > beans?,global-exceptions?,global-forwards?,action- > mappings?,controller?,message-resources*,plug-in*)". > at > org > .apache > .xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown > Source) > ..etc... > > Any other thoughts?? Hmm. A couple. 1. Is the XML file it is complaining about valid? 2. Can you build a simple test case? If so, open a bugzilla entry and attach your test case. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Strange parser behavior from adding log4j
Mark, I checked out rev 733300 from /tomcat/tc6.0x/trunk, built it and the relase, and used an unzipped copy of apache-tomcat-6.0-snapshot. Unfortunately, the same error still happens when I start up my webapp: ERROR org.apache.commons.digester.Digester - Parse Error at line 405 column 17: The content of element type "struts-config" must match "(display-name?,description?,data-sources?,form-beans?,global- exceptions?,global-forwards?,action-mappings?,controller?,message- resources*,plug-in*)". org.xml.sax.SAXParseException: The content of element type "struts- config" must match "(display-name?,description?,data-sources?,form- beans?,global-exceptions?,global-forwards?,action- mappings?,controller?,message-resources*,plug-in*)". at org .apache .xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ..etc... Any other thoughts?? Thanks, Ken On Jan 9, 2009, at 5:17 AM, Mark Thomas wrote: From: Ken Bowen [mailto:kbo...@als.com] [Tomcat 6.0.18, java 1.5.0_16, struts 1.2.8] Has anyone any thoughts on what might be happening here? Could be a variation of https://issues.apache.org/bugzilla/show_bug.cgi?id=45933 Can you try testing with a build from trunk? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
to Set permission of apache_tomcat_6.0.16
Hi all, I really dont know anything about apache-tomcat-6.0.16 server configuration.so i have issue like how to create virtual directory in apache-tomcat-6.0.16 server or is there any default directory i want to set it's permission like which we set in IIS of microsoft. In IIS there is one property of virtual directory is " Execute permission " i want to set that permission to script only in tomcat so how can i set in apache-tomcat-6.0.16 server. please Help me I am really in trouble. Please Help ME Waiting for reply Thanks in advance.. -- View this message in context: http://www.nabble.com/to-Set-permission-of-apache_tomcat_6.0.16-tp21388742p21388742.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: SSL and client-authentication with smartcard
> From: Benoit Maupas [mailto:bmau...@yahoo.fr] > > I am using Tomcat with SSL and client-authentication by smartcard. My > application uses Struts2 and Spring-Security. I would like to : > 1/ get current SSL session retrieved from session-id There isn't (at the moment) a direct relationship. Version 3.0 of the servlet spec (Tomcat 7) may change that as it explicitly mentions using SSL sessions. > 2/ close current SSL session in order to force end-user to typein again > his pin code (i.e. a logout function) Should be simple in Tomcat 7. For Tomcat 6 and earlier you'll need to do this yourself. I don't know how easy this will be until we have written the code for Tomcat 7. > 3/ detect a smartcard removal This could be tricky. It depends what the browser does when the smart card is removed. I think, based on a previos thread, the SSL session and connection remain valid so tere is no way for Tomcat to detect this. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problems with disableproxyCache="false"
> From: Al Blake [mailto:a...@blakes.net] > > When I include the code: > > > className="org.apache.catalina.authenticator.NoLoginAuthenticator" > disableProxyCaching="false"/> > > > In server.xml tomcat hangs on startup. Comment the line out and > everything is fine and the application works - but the IE users cant > use the app(!). That isn't a valid Context element. If you want to apply settings to every content, put them in CATALINA_HOME/conf/context.xml, not server.xml Also, securePagesWithPragma="false" is usually a better option than disableProxyCaching="false" Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Memory Leak(?) causing tomcat to store 57610801 tomcat objects in ONE request
> From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com] > > I was recently hunting what I thought to be a memory leak in our > application. What happens is that the Old Gen Space is running full at > once and then tomcat freezes > because java is busy with Full GC all the time. I've managed to create > a memory dump shortly before the crash and the top5 looked like that: > > 14481362 instances of class org.apache.tomcat.util.buf.ByteChunk > 14471293 instances of class org.apache.tomcat.util.buf.CharChunk > 14464658 instances of class org.apache.tomcat.util.buf.MessageBytes > 7113296 instances of class org.apache.tomcat.util.http.MimeHeaderField > 7080192 instances of class javax.servlet.http.Cookie > > Other classes looked as normal (I was making jmap histograms all the > time and comparing). > > Now, the funny thing is that all that data was bound to ONE request. I > checked the manager status page previously and it showed only one > active request, but lasting more than 5 hours: > > S18757746 ms0 KB0 KBXXX.XXX.XXX.XXX www.site.com > POST /searchboxright.html?linkId=XXX|SearchBoxRight|NA| HTTP/1.1 > > By analyzing the dump I found that all MimeHeaderFields were in one > large array belonging to one response object, belonging to the > request, with remote ip equal to the XXX.XXX.XXX.XXX ip of the request > in the manager. > > I understand that sicne the request lasted 5 hours all the data went > into old space filling it out and causing the problem, but HOW can it > actually happen that a response object contains 8.000.000 mime > headers? App/Tomcat stuck in a loop adding cookie headers? Do you have any thread dumps? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Memory Leak(?) causing tomcat to store 57610801 tomcat objects in ONE request
2009/1/10 Caldarale, Charles R : >> From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com] >> Subject: Memory Leak(?) causing tomcat to store 57610801 >> tomcat objects in ONE request >> >> HOW can it actually happen that a response object >> contains 8.000.000 mime headers? > > Must be a very productive servlet... > > Sounds like you've got a rather ugly (and probably infinite) loop in your > webapp. Might want to put a trap in org.apache.tomcat.util.http.MimeHeaders > to catch generation of an excessive number of header fields. > I agree with Charles. But, to note: the count of MimeHeaderField instances mentioned in the message is of the same range as the count of Cookie instances. Thus I think that all those header fields are derivatives of the enormous count of cookies that your application created. I remembered about the following incident from two months ago, when programming error caused a session to be reestablished many times in a row: http://www.nabble.com/multiple-Set-Cookie-headers-in-initial-http-response-td20437761.html ("multiple Set-Cookie headers in initial http response"). Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org