Weblogic administration console way too slow

30,032

Turns out weblogic uses random number generator during startup. Because of the bug in java it reads random bits from /dev/random. There are almost no problems with /dev/random except that it is extremely slow. It takes sometimes 10 minutes or more to generate one number. Simple solution exists – using /dev/urandom instead. It is not that good as /dev/random, but at least it is instant. Java somehow maps /dev/urandom file to /dev/random. That’s why default settings in $JAVA_HOME/jre/lib/security/java.security are useless, they just do not make any sense.

Problem fix is very simple – adding string export JAVA_OPTIONS="-Djava.security.egd=file:/dev/./urandom" to the /etc/bash.bashrc file. Usage of /dev/./urandom instead of simple /dev/urandom is another hack. JVM does not understand the option value otherwise.

Be aware of this problem if you try to setup weblogic under UNIX-based OS.

Share:
30,032
altern
Author by

altern

I'm a software engineer, configuration manager, instructor, musician. My passion is software configuration management and related stuff: version control continuous integration build management deployment management dependency management merge management release management Check out my training dedicated to software configuration management. You can see presentation slides on my slideshare page.

Updated on July 14, 2022

Comments

  • altern
    altern almost 2 years

    I've installed weblogic 10.3.3, configured simple domain with default configuration. And after starting weblogic I cannot use it via admin console because it is starting too slow (~10 mins). It seems that admin console application is being deployed incorrectly. Even when I enable 'staging' mode in AdminConsole deployment options, it does not help. Does anybody have a solution for this problem? It really bugs me out.


    Configuration properties:

    Server: Dell PowerEdge r410 server (Six-core Intel® Xeon® x64 CPU, 8GB RAM)

    OS: Ubuntu Maverick 10.10 x86_64

    Weblogic: 10.3.3 x64 (used wls1033_generic.jar file for installation)

    Java: 1.6.0_17_i586 (tried with different jdk's including x64, but it does not work either)

  • kevinpowe
    kevinpowe about 13 years
    On a reasonably configured machine, WebLogic Server will run up fairly quickly - a vanilla WebLogic Server domain will come up in under a minute. If the domain has more complex applications deployed (particularly frameworks like SOA Suite or WLI) then it can take longer, but that's the application initialising, not WebLogic Server itself. The distinction between WebLogic Server's boot time and your applications initialising is an important one.
  • Burhan Ali
    Burhan Ali about 12 years
    Bug 4705093: Use /dev/urandom rather than /dev/random if it exists and Bug 6202721: SHA1PRNG reads from /dev/random even if /dev/urandom selected explain some of the background of this. A shame that it's still a problem after such a long time.
  • altern
    altern about 12 years
    @BurhanAli: I can say that it this bug cost me a job :( real shame
  • Burhan Ali
    Burhan Ali about 12 years
    Oh dear. Sorry to hear that. :(
  • virgo47
    virgo47 over 10 years
    Just another of Java "non-issues" (and I like Java otherwise). There are even bugs to preserve backward compatibility, which is ... abominable. Let's save some trouble to people using Java for 5 years and cause even more trouble for the rest of them that will be using it for next 30 or so. Sometimes I even wish Java dies sooner for sins like this. :-( Real shame. Especially when you hit this bug with Oracle product (wls 11g 10.3.6). Obviously this question/answer saved me tons of troubles. Big thanks
  • Nagappa L M
    Nagappa L M over 9 years
    have you changed any default configuration ?
  • Nagappa L M
    Nagappa L M over 9 years
    what to do in case windows machine ?
  • Mike Argyriou
    Mike Argyriou almost 5 years
    Better to clarify that this works for Debian-based Linux flavors (see askubuntu.com/questions/815066/…). For other distributions add it to the WebLogic process owner in ~/.bashrc (not sure for /etc/profile though).