Hub hangs up on start
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 /dev/urandom
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
-Djava.security.egd=/dev/zrandom
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:
Please sign in to leave a comment.
On my server entrpy is 1344:
and yet YouTrack fails to start with:
Thoughts?
Thanks, Kirill
i run JAR installation as a service on ubuntu, to fix this issue I had to change
systemd
service file this way:ExecStart=/usr/bin/java -Djava.security.egd=/dev/zrandom -jar /home/youtrack/youtrack.jar --J-Xmx512M 8080