localhost-startStop-1
is trying to create a new instance of SecureRandom
and it’s stuck trying to read data from an entropy source. This typically occurs because the source has been depleted. The default entropy source is /dev/random
. It’s known as a blocking source as it will block when an attempt is made to read random data and none is available. Another source on Linux is /dev/urandom
. Its main benefit over /dev/random
is that it’s non-blocking. There’s some debate over whether or not using /dev/urandom
will make things less secure. This article may be of interest.
In summary, using /dev/urandom
will avoid the problem you’re seeing, at the possible cost of decreased security. You can configure Spring Boot’s embedded Tomcat instance to use /dev/urandom
via a system property:
-Djava.security.egd=file:/dev/./urandom