3

Environment: Headless Linux server Red Hat Enterprise Linux Server release 6.7 (Santiago) 2.6.32-573.12.1.e16.x86_64

I have a java(7) program that I run from command line that spawns multiple threads and hits a oracle database simultaneously using ojdbc7.

Intermittently I see connection reset error:

 Could not get JDBC Connection; nested exception is java.sql.SQLRecoverableException: IO Error: Connection reset

exactly as reported here and resolved here.

I tried the following to mitigate the issue:

Add these variations to my command line

  • -Djava.security.egd=file:///dev/urandom
  • -Djava.security.egd=file:/dev/../dev/urandom
  • -Djava.security.egd=file:/dev/./urandom

Tried adding to java.security file

  • securerandom.source=file:///dev/urandom
  • securerandom.source=file:/dev/../dev/urandom
  • securerandom.source=file:/dev/./urandom

Also tried ojdbc6

But I still see the issue. Which means that even with urandom in use, still there is not enough realtime entropy. Which is understandable, because when I run my java program, everything else is stopped (this is a application server with multiple running jvms, usually. )

I am wondering if there is anything I can do to 'cause' entropy on the server. I have limited access to this server so I am limited in what I can do. This java job is expected to run for a couple of hours, so I can not keep typing on the keyboard etc. May be run a simple program in the background that 'does' something?

Any ideas? I tried rngd command but apparently I do not have permission to use it. Any help greatly appreciated, been stuck with this issue for a while now.

Edit: I tried to run another java program (using java.awt.Robot) that simulates Keyboard presses continuously during my original program run, but due to limited permissions on the server I wasn't able to get it working. But in general, would that be a good way to ensure some entropy?

Community
  • 1
  • 1
Brian
  • 1,337
  • 5
  • 17
  • 34

0 Answers0