You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Bob Arthur <re...@datacash.com> on 2005/01/13 20:26:45 UTC
Axis hanging when entropy expires
Hi,
A colleague was recently trying to set up Axis 1.2 RC2 on his
development machine. He got as far as seeing the root page, and having
HappyAxis display OK. Also, he was able to view the list of services,
and download the wsdl from them
Unfortunately, attempting to call any end-point either from the browser
or from a precompiled stub would simply hang for > 1 minute.
After much trawling through the source, making use of debug logging, we
tracked the problem down to the SOAPPart constructor, where it called
SessionUtils.generateSessionId().
It turns out that for some reason, his debian (woody) linux (2.4.23)
machine was not refreshing its entropy, and had run out. This caused
SecureRandom.nextBytes to hang indefinitely while it tried to seed
itself. Rebooting the machine solved his problem.
I'm not convinced that this should be raised as a bug in Axis, as it was
clearly caused by the OS. However, I thought I'd let you know, partly
so it's on record for others who may have the same problem, but also in
case anyone thinks there's a case for somehow making the SecureRandom
stuff more defensive.
For example, in SessionUtils.getRandom, when instantiating the
SecureRandom object, we could immediately call nextBytes in a timed
thread. This would force the object to seed itself or throw an
exception if it times out.
Many thanks,
Bob.
Re: Axis hanging when entropy expires
Posted by Steve Loughran <st...@apache.org>.
Bob Arthur wrote:
> Hi,
>
> A colleague was recently trying to set up Axis 1.2 RC2 on his
> development machine. He got as far as seeing the root page, and having
> HappyAxis display OK. Also, he was able to view the list of services,
> and download the wsdl from them
>
> Unfortunately, attempting to call any end-point either from the browser
> or from a precompiled stub would simply hang for > 1 minute.
>
> After much trawling through the source, making use of debug logging, we
> tracked the problem down to the SOAPPart constructor, where it called
> SessionUtils.generateSessionId().
>
> It turns out that for some reason, his debian (woody) linux (2.4.23)
> machine was not refreshing its entropy, and had run out. This caused
> SecureRandom.nextBytes to hang indefinitely while it tried to seed
> itself. Rebooting the machine solved his problem.
>
"Debian unstable" is the platform nobody wants to see on a bugrep.
Anything can have happened. I remember when Ant got a bugrep that <touch
> wouldnt work ...turns out that File.setlastModified() wasnt working.
I'm not in favour of adding checks to the code to deal with interim
releases of any OS.
What you could do is add some more stuff to happyaxis.jsp...