Sometimes, while running Hub on a dedicated server (including virtual machines, hosted servers, etc.) you might face a problem when Hub seems to hang up on start. Booting Hub might take up to 10 minutes or so.
We have discovered that the problem might occur when the server's entropy has been drained. Entropy is the measure of the random numbers available from
Draining of the server entropy might happen on any machine without hardware sources of the entropy (for example, mouse, keyboard or a video card); that is: any dedicated server.
How to check the entropy status? For example, on a Linux machine, you can do it by running the following command:
# cat /proc/sys/kernel/random/entropy_avail
If the result is anything less than 100-200, your server has a problem with the random bits, which in its turn causes the significant delay on application start.
You can work around this problem in two ways:
1. Either use a programmatic PRNG instead of default RNG supplied by the OS. To do so, use the Java start parameter
2. Or install rng-tools package and configure it to supply
/dev/urandom. Check this article describing the solution. This workaround is preferable to the first option, but, unfortunately, it is applicable only to the *nix systems.
In this article we have used materials from the following sources:
- "Check available entropy in Linux" by Major Hayden
- "Helping The Random Number Generator To Gain Enough Entropy With rng-tools (Debian Lenny)" by Falko Timme