Bug 47276 - Repeated log warnings when /dev/urandom is not readable
Summary: Repeated log warnings when /dev/urandom is not readable
Status: RESOLVED DUPLICATE of bug 46967
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.27
Hardware: Other AIX
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-27 23:33 UTC by Tim Whittington
Modified: 2009-07-17 10:41 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Whittington 2009-05-27 23:33:42 UTC
When the /dev/urandom device is not readable by the Tomcat process, we see repeated "Failed to close randomIS" messages logged at the WARN level.

The issue appears to be in ManagerBase.setRandomFile - if the random device is not readable it fails to open the file (i.e. construct the FileInputStream - at least on AIX this fails immediately), and then blindly tries to close the inputstream resulting in an NPE and the "Failed to close randomIS" message.

A quick null check before closing would probably fix this.
A solution that warned once on an inaccessible random device and didn't try to reopen it thereafter might be better.
Comment 1 Konstantin Kolinko 2009-07-17 10:41:58 UTC
It is duplicate of bug 46967, that is already fixed in the 6.0.x branch.

*** This bug has been marked as a duplicate of bug 46967 ***