|
For everyone's future benefit:
http://docs.codehaus.org/display/JETTY/Connectors+slow+to+startup regards I've encountered the same problem on Ubuntu 8.04, so I think we can say this is a general problem with Java + Linux on machines with not enough activity. See also these related Java bugs:
I've investigated this further and discovered that using new SecureRandom() instead of SecureRandom.getInstance("SHA1PRNG") works fine. See also these two related java bugs: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6202721 As mentioned before, this is a really difficult to track bug and I think it would be better if jetty worked properly out of the box instead of relying on an obscure configuration. Would it be acceptable from a security perspective for jetty to use "new SecureRandom()" instead of "SHA1PRNG"? I know this is not a Jetty problem, but if Sun does not want to fix it ... Thank you. We will investigate this, but will be cautious before changing.
However, we may bracket the init with Log.info messages so that is it easier to diagnose. I cannot see why new SecureRandom() would work any differently to SecureRandom.getInstance("SHA1PRNG"), if the Sun provider is the only one installed on the system. In that case, SHAPRNG1 will be the only algorithm, so the two cases should be identical, at least according to the javadoc for jdk1.5
Which raises another point, that the behaviour may be different if you switch jdk versions if you don't provide the name of the algorithm. Certainly the javadoc for jdk1.6 indicates different behaviour for new SecureRandom(). See So, I would rather that we stuck with providing the explicit name of the algorithm, and providing a) better docs (done?) and b) better logging (I'll do that now). Jan Log comments added in trunk rev 3608 and jetty-6 rev 3609.
|
|||||||||||||||||||||||||||||||||||||||||||||||
I will leave this issue open until we document on the wiki.