TC7: trigger seeding of SecureRandom
Hi There We've just upgraded out web app to TC7. It seems the following is being outputted repeatedly on the console for each page load: trigger seeding of SecureRandom done seeding SecureRandom Closer inspection reveals, the Tomcat class SessionIdGenerator using SecureRandom. Is this normal? Why would SecureRandom have to be seeded so often? I am also worried about the Tomcat console log filling up over time. Thanks Jamie - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Isapi redirector log file is always empty - IIS 7.5 - Tomcat 7.0.26 - Isapi 1.2.30 - Win2008 R2
On 18/05/2012 00:58, ann ramos wrote: Hi, I have set up our system to do SSO. The setup works fine because whenever the user access the system, they are automatically logged in to the system. Following are the steps that I used to set up Isapi: 1. Manually created the folders Apache Software Foundation\Jakarta Isapi Redirector. Then inside those folders I created a sub folder bin, conf and log. 2. I manually created the registry entries. The set up works because the system functions as SSO. The only thing is that my isapi_redirect.log is always empty even though I set the log_level to debug. I tried searching the internet but I'm not getting anywhere. I would appreciate any thoughts and ideas that you can share so I can resolve my problem. Thanks and regards. Peeves Small note, next time please start an entirely new thread - rather than replying to an existing one* and just editing the subject body. p * RE: Tomcat 4.0 Tomcat 6.0 AuthenticatorBase -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: TC7: trigger seeding of SecureRandom
On 21/05/2012 08:18, Jamie wrote: Hi There We've just upgraded out web app to TC7. It seems the following is being outputted repeatedly on the console for each page load: trigger seeding of SecureRandom done seeding SecureRandom Can you post the full information from the log file, including the lines before and after these entries? p Closer inspection reveals, the Tomcat class SessionIdGenerator using SecureRandom. Is this normal? Why would SecureRandom have to be seeded so often? I am also worried about the Tomcat console log filling up over time. Thanks Jamie - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
RE: Threads in Tomcat
A little late for the party but nonetheless: I'm using Quartz for something similar. I use a framework that has a startup and shutdown hook. This I where I configure Quartz and launch the thread/worker (in startup hook) and shutting it down nicely (in shutdown hook). This way you don't have to worry about memory leaks when redeploying your webapp. As Tim mentioned you still have to take care of any concurrency between the availability check and the servlets accessing the Wikis though (my worker runs once a day and writes to a database, the webapp servlets then reads from the database). Med venlig hilsen/Kind regards Casper/Kalle -Original Message- From: Tim Watts [mailto:t...@cliftonfarm.org] Sent: 18. maj 2012 21:54 To: Tomcat Users List Subject: Re: Threads in Tomcat On Fri, 2012-05-18 at 12:14 -0400, Vance - wrote: I'm maintaining a Web application for searching multiple wikis, this app runs under Tomcat 6. I need to modify a servlet so it instantiates a 'Thread' subclass to perform a wiki availability check every so often, say every 30 minutes. Given that I'm no expert on the use of threads, a co-worker suggested the following questions to look into: Might want to study the classes interfaces in java.util.concurrent instead of using a raw Thread. Concurrency often ends up being trickier than it first appears and the classes interfaces in this package were designed to handle a lot of these subtle details for you. The Executors class in particular has some pre-built common configurations ready to instantiate. · Does the spawned thread have a time limit imposed by Tomcat? · Does it take up worker thread space from other Tomcat threads? I believe the simple answer to these is No. Which is to say I don't believe Tomcat per se enforces such limits. However, it may be possible that an active SecurityManager could impose them. Would be unusual though -- especially the 1st question. I'd appreciate any help anyone could give w.r.t. these questions. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: DefaultServlet socketWrite hang
if you look deeper under the hood of Java NET/IO you will see that there is no configurable timeout for writing blocking IO. The best thing you can do is upgrade to Tomcat 6, and use the NIO connector (protocol=org.apache.coyote.http11.Http11NioProtocol) as that has a configurable timeout for writing data. best Filip - Original Message - From: Douglas Briere douglas.bri...@ca.com To: 'users@tomcat.apache.org' Sent: Tuesday, May 15, 2012 4:18:00 PM Subject: DefaultServlet socketWrite hang Hello, We are using tomcat 5.5.30. I saw the following 26 times at one of customers sites. Our web server is used to launch JNLP applications, so I believe this was downloading the client jar files. However, java webstart caches after the first occurrence so this is a bit odd. Has anyone seen this before? It appears these threads are getting stalled out. Could a socket timeout be configured? Thanks. at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:751) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:774) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:584) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:365) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:352) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:396) at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:385) at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1839) at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:929) at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:385) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:500) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at
Re: aliases attribute tomcat7
On 17/05/2012 07:11, Michael Ravits wrote: Hey Pidster, This is the tag I've used: Context aliases=/img/images=/home/michaelr/images,/img/thumbs=/home/michaelr/thumbs/Context It could have been a permissions problem but I gather that if docBase works, this must work as well permission wise. Thanks, Michael 2012/5/17, Pid p...@pidster.com: On 17/05/2012 06:41, Michael Ravits wrote: Hi Everybody, I just can't get this to work. Installed Tomcat 7.0.21 on ubuntu 11 using apt-get. I deployed ROOT.war and then went on to configure aliases. Tried adding the attribute in: Obvious question: what exactly did you try? p $CATALINA_BASE/conf/Catalina/localhost/ROOT.xml This applies to the default context and seems to work OK on my install. Can you try using a fresh download from Apache? $CATALINA_BASE/conf/Catalina/localhost/context.xml This would only work for an application called '/context'. If your app is called something else, it won't work. $CATALINA_BASE/conf/Catalina/localhost/context.xml.default $CATALINA_BASE/conf//context.xml I don't know if it works in the default context, but I'd assume not - or at least that it's not such a good idea to set it for all Contexts. p But nothing seems to work.. In the mean while I've resorted to adding: $CATALINA_BASE/conf/Catalina/localhost/img.xml With docBase attribute pointing at the right place and it works. But it seems to me that aliases is more appropriate. Does anyone know what I'm doing wrong? How should I debug this? Thanks, Michael - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Threads in Tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vance, On 5/18/12 12:29 PM, Vance - wrote: The servlet I have in mind for modification is the one responsible for performing the search as well as for getting the next page of search results. If one or more of the wikis is unavailable, I want to display an error message on the search results page. I'm not sure that's entirely relevant. The wiki availability check won't be done all the time, as I mentioned before, just every so often, say, every 30 minutes. Again, not sure that's relevant. If you are going to do things periodically, then the place to kick-off the thread is in a ServletContextListener and not in a servlet. Why would using a ServletContextListener be better than using a servlet? Because that's the most appropriate place to do it: servlets can be started and stopped, started multiple times, run in parallel, etc. -- however the container wants to do things. ServletContextListeners are well-defined to only be called on startup and shutdown. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+6myQACgkQ9CaO5/Lv0PCIWgCePuqidEy+iLnmzQTF5bNvJlBJ ffIAoKvQ8Xp2v15Q7Xia9i1qlCmA2jWl =kA23 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: TC7: trigger seeding of SecureRandom
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jamie, On 5/21/12 3:18 AM, Jamie wrote: We've just upgraded out web app to TC7. It seems the following is being outputted repeatedly on the console for each page load: trigger seeding of SecureRandom done seeding SecureRandom Hmm. Closer inspection reveals, the Tomcat class SessionIdGenerator using SecureRandom. Since you've looked at the code, have you found any indication that it would log a) any message like this at all or b) to the console? What makes you suspect SessionIdGenerator when there are other classes in Tomcat that use SecureRandom? Is this normal? I've never seen it. Then again, I've never run your web app in my environment. Why would SecureRandom have to be seeded so often? I can't imagine why. I would recommend looking through your webapp's code for clues. There isn't anything I am also worried about the Tomcat console log filling up over time. You shouldn't be logging to stdout, then. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+6nGsACgkQ9CaO5/Lv0PAHsgCfWahEvD+tBt2B7M8Dg6RWuuQb PfkAn2CNoWYOXav2qXmtaeVbbU8u6hj4 =UTit -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: I have /subapp/a and /subapp/b. Can i have different sessions for them?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Teo, On 5/18/12 3:37 PM, Teo wrote: Let's say i have 2 main entry points into my application: /subapp/a and /subapp/b. They are part of the same webapp but they are somehow different and i want to distinguish between them. Having a separate session for each of them would be the greatest thing Why JSESSIONID? Why not some other cookie? I can see several other ways to do this, but it would help if you could explain what kinds of things you want to do when the user is in a different sub-section of the webapp. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+6oGcACgkQ9CaO5/Lv0PBw2ACfSEQNVwNEGNfg/ehJC76J4Ckt XKsAoMMuseRkZXyrIl7KdM4T563wGxaM =vgko -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org