Friday, September 23, 2011

Slow WebLogic start because of "Inadequate Entropy"

Sometimes WebLogic servers need several minutes to start, hanging at this point (BEA-170019) in the log files, just before the security realm is initialized:

<...> <Notice> <Log Management> <BEA-170019> <The server log file /.../weblogic/user_projects/domains/tomis/servers/.../logs/....log is opened. All server side log events will be written to this file.>

<...> <Notice> <Security><BEA-090082> <Security initializing using security realm myrealm.>

WebLogic is waiting for the random number generator to be initialized at this stage. The default generator uses the entropy of the machine to initialize. If there is no or few entropy (mouse movement, network or disk I/O) on the machine, this takes very long.

You can speed up this by setting a java parameter:

-Djava.security.egd=file:/dev/./urandom

But you should think twice before doing this on a production machine: Actually, this replaces the genuine random number generator by a pseudo-random number generator, which means this is less secure!

No comments:

Post a Comment