KB Article #190140
SecureRelay starting very slowly
Problem
SecureRelay starts up very slowly, sometimes taking minutes.
Resolution
First of all, note that if it's just showing "Secure Relay router agent started" and not returning to the command prompt, that doesn't mean it's stuck; you just have to hit Enter.
If it's actually slow in startup, then a common cause is lack of entropy on the system.
To check that, run the command
cat /proc/sys/kernel/random/entropy_avail
and look at the results.
A value of 3000 or over is good; if it's far less than that (might be as low as 100-200), then it means that /dev/random hasn't been seeded.
There are several methods of dealing with this; if one doesn't work, try the next one.
Turn off the startup entropy test:
1. Copy the advanced.properties file from SECURERELAYHOME/samples/conf to SECURERELAYHOME/conf
2. Near the end of it, uncomment the entropy.test.randomBytes setting, and set its value to 0
3. Restart SecureRelay.
Set the randomness source:
In the JRE's java.security file (depending on the Java version, it may be in JAVAHOME/lib/security or JAVAHOME/conf/security),
find the line that sets securerandom.source, and change it to:
securerandom.source=file:/dev/urandom
Then restart.
Install rngd:
Install it using your typical package manager.
You may need to call it in order to provide entropy to /dev/random:
rngd -r /dev/urandom -o /dev/random -f -t 1