For everyone, who's still interested in the solution:
It happens to be a problem with the os:

---------------------
Re: SecureRandom on Linux
Author: mbjones Jul 23, 2004 1:15 PM (reply 1 of 1) I ran into the same problem with JDK 1.4.1_01 and JDK 1.4.2_05 running on Redhat Linux using kernel 2.4.9.

After running the issue in the debugger for a while, I found it was always hanging on a read in a native method while trying to generate a secure seed in sun.security.provider.SeedGenerator which is called from sun.security.provider.SecureRandom. I got this error whether I was calling SecureRandom directly, or whether it was just used by the SSL libraries in setting up a secure SSL connection with a server. See below for a stack trace of where it was hanging.

The problem seemed to be that the security provider used /dev/random as an entropy generator, and it somehow wasn't working. By editing the $JAVA_HOME/jre/lib/security/java.security file and changing the property:

securerandom.source=file:/dev/random
to:

securerandom.source=file:/dev/urandom

the problem disappeared for me. So there seems to be some issue with the OS access to /dev/random. Hope this helps with your issue.




Reply via email to