java.io.EOFException: /dev/[u]random closed

在linux 或者 Solaris下如果碰到类似下面的异常信息:

这是由于 随机数读取报错引起的,一般的解决办法有以下三种:

 [1]、尝试删除随机数设备的连接,再重新绑定

[2]、Java 启动参数的修改

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

tips:注意红色字体部分。

[3]、java.security文件配置修改

打开%JDVA_HOME%/jre/lib/security/java.security 文件,找到如下内容:

securerandom.source=file:/dev/urandom

修改成:

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

tips:注意红色字体部分。

原创文章,转载请注明: 转载自micmiu – 软件开发+生活点滴[ http://www.micmiu.com/ ]

本文链接地址: http://www.micmiu.com/exception/dev-random-closed/

发表评论?

2 条评论。

  1. 我想问一下你的code部分是用 的什么插件么?

回复给 ooops ¬
取消回复


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">