<< ARM芯片介绍 | 首页 | 高性能服务器架构 >>

Linux下WebLogic10.3用random device代替访问urandom导致启动缓慢挂起?

在Linux下启动Weblogic10.3时停在一个地方很久也没响应,好像死掉了,到底是什么原因呢?看一下thread dump:

   java.lang.Thread.State: RUNNABLE
        at java.io.FileInputStream.readBytes(Native Method)
        at java.io.FileInputStream.read(FileInputStream.java:199)
        at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:185)
        at sun.security.provider.NativePRNG$RandomIO.implGenerateSeed(NativePRNG.java:202)
        - locked <0xedab49d0> (a java.lang.Object)
        at sun.security.provider.NativePRNG$RandomIO.access$300(NativePRNG.java:108)
        at sun.security.provider.NativePRNG.engineGenerateSeed(NativePRNG.java:102)
        at java.security.SecureRandom.generateSeed(SecureRandom.java:495)
        at com.bea.security.utils.random.AbstractRandomData.ensureInittedAndSeeded(AbstractRandomData.java:83)
        - locked <0xef612b88> (a com.bea.security.utils.random.SecureRandomData)
        at com.bea.security.utils.random.AbstractRandomData.getRandomBytes(AbstractRandomData.java:97)
        - locked <0xef612b88> (a com.bea.security.utils.random.SecureRandomData)
        at com.bea.security.utils.random.AbstractRandomData.getRandomBytes(AbstractRandomData.java:92)
 

this problem is quite common on our linux blades. Looks like the urandom-Device stops responding or Jrockit is trying to access the random device instead of urandom.
Anyway, it can be fixed by:

a) patching <java.home>/jre/lib/security/java.security and replacing "securerandom.source=file:/dev/urandom" with "securerandom.source=file:/dev/./urandom"

b) or by starting your jvm with -Djava.security.egd=file:/dev/./urandom

c) added a symlink for /dev/random to point to /dev/urandom on your linux host

标签 : ,



发表评论 发送引用通报