Aug 152005

Just debugging some Java over the weekend and one thing that floated around was that using STRACE on various Java threads produced output that had the error:

EAGAIN (Resource temporarily unavailable)

Poking around there is a bug open with Sun about how Java produces random numbers on JDK 1.4. Looks like it reads in the /jre/lib/security/ file to determine which file on the operating system to get random numbers from. On Linux this is /dev/random. /dev/random has the possibility of becoming empty because it is essentially a list of random numbers produced by watching various system resources. The solution appears to be to change the value in the security file to use urandom instead. The changes would look like this:


/dev/urandom is will use /dev/random unless it is empty in which case it will use a pseudo-random number algorithm. Here is the bug for it:

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">