Why does my client machine need too much time to connect when the authentication is required?
Estimated Reading Time: 1 MinutesOn Linux/Unix, in order to encrypt passwords, Java access to /dev/random, a special file that serves as a random number generator.
It allows access to environmental noise collected from device drivers and other sources.
The bits of noise are stored in a pool. When the pool is empty, reads from /dev/random will block until additional environmental noise is gathered.
A counterpart to /dev/random is /dev/urandom which reuses the internal pool to produce more pseudo-random bits.
This means that the call will not block, but the output may contain less entropy than the corresponding read from /dev/random.
If your client needs too much time to connect when the authentication is required, you might consider to instruct Java to use /dev/urandom instead of /dev/random, by adding the following option to the Application Server startup command-line:
-Djava.security.egd=file:///dev/urandom