Issue while connecting to Database from JAVA program.
Cannot create PoolableConnectionFactory (IO Error: Connection reset)
This is sometimes an intermittent issue but it can be easily reproduced by reducing the randomness on the Server
watch -n 1 cat /proc/sys/kernel/random/entropy_avail
cat /dev/random > random_bits.bin
Once the issue is consistently reproduced, we can add the following JVM option and start the program.
-Djava.security.egd=file:///dev/urandom
This should solve the problem.
If it doesn’t, please feel free to comment here.