-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeffrey,

On 8/29/12 1:57 PM, Jeffrey Janner wrote:
> Aug 29, 2012 11:52:29 AM org.apache.catalina.session.ManagerBase
> setRandomFile WARNING: Error reading /dev/urandom 
> java.io.EOFException at
> java.io.DataInputStream.readFully(DataInputStream.java:180) at
> java.io.DataInputStream.readLong(DataInputStream.java:399) at
> org.apache.catalina.session.ManagerBase.setRandomFile(ManagerBase.java:548)
>
> 
at
org.apache.catalina.session.ManagerBase.getRandomBytes(ManagerBase.java:993)
> at
> org.apache.catalina.session.ManagerBase.init(ManagerBase.java:767) 
> at
> org.apache.catalina.session.StandardManager.start(StandardManager.java:630)

ManagerBase
> 
uses whatever it has been configured to use for the
"random file" and defaults to "/dev/urandom".

The code in question should not execute unless /dev/urandom actually
exists -- see line 546 here:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/tags/TOMCAT_6_0_33/java/org/apache/catalina/session/ManagerBase.java?view=markup

So, does /dev/urandom exist? Or, rather, does a file-exists check for
that path return true? Try this:

System.out.println(new File("/dev/urandom").exists());

...and see what happens.

There is a setRandomFile(String s) method on ManagerBase, but it is
not documented anywhere in the Tomcat 6 documentation (nor can it be
found in the Tomcat 7 documentation).

You could try to set the "randomFile" attribute on your <Manager>
element to point to some other file-based source of randomness, but I
doubt it will work. On Microsoft Windows, I think you want to have
that set to a path that does not exist so that
java.security.SecureRandom (by default) gets used for randomness.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlA+YwsACgkQ9CaO5/Lv0PAfiQCgs8t5/Q72qkuQrE1G6tCFDeGF
/qAAn3hHEtTHsQuWTK5mvEKbXOSw5AWF
=Ke5I
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to