[jboss-user] [Security & JAAS/JBoss] - Issue for java.io.EOFException: /dev/[u]random closed

informsantosh do-not-reply at jboss.com
Wed Aug 29 11:12:17 EDT 2007


Here is the issue I had
Issue for java.io.EOFException: /dev/random closed
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Server VM (build 1.5.0_01-b08, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
SunOS housuntrwl2 5.8 Generic_117350-46 sun4u sparc SUNW,Ultra-80

A DESCRIPTION OF THE PROBLEM :
When we were writing interface for integration we have encouterted following problem. Custom application was offering web service for the accessing the application data. We wrote the interface and it was working fine in Windows environment which was development environment. We then ported application for Dev which was solaris and we did the load testing and it was fine there too. When we moved this code to production. After each 15-20 days we saw we are getting the exception as

2007-06-05 13:58:05,041 ERROR [com.dynegy.eai.cp2contract.ECMOperations] Exception running CMSClient: updateCounterPartyjava.security.ProviderException: nextBytes() failed
2007-06-05 13:58:05,051 INFO [STDOUT] AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.security.ProviderException: nextBytes() failed
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.security.ProviderException: nextBytes() failed
at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:261)
at sun.security.provider.NativePRNG$RandomIO.access$200(NativePRNG.java:108)
at sun.security.provider.NativePRNG.engineNextBytes(NativePRNG.java:97)
at java.security.SecureRandom.nextBytes(SecureRandom.java:413)
at org.apache.axis.utils.SessionUtils.generateSessionId(SessionUtils.java:62)
at org.apache.axis.SOAPPart.(SOAPPart.java:163)
at org.apache.axis.Message.setup(Message.java:377)
at org.apache.axis.Message.(Message.java:246)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:130)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invokeTransport(AxisClient.java:150)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:289)
at org.apache.axis.client.Call.invokeEngine(Call.java:2838)
at org.apache.axis.client.Call.invoke(Call.java:2824)
at org.apache.axis.client.Call.invoke(Call.java:2501)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at com.dynegy.eai.cp2contract.ecm.ECMServiceSoapSoapBindingStub.invokeEvent(ECMServiceSoapSoapBindingStub.java:578)
at com.dynegy.eai.cp2contract.ecm.ECMClient.updateBO(ECMClient.java:41)
at com.dynegy.eai.cp2contract.ECMOperations.updateCounterParty(ECMOperations.java:132)
at com.dynegy.eai.cp2contract.facade.CPContractFacade.updateCounterParty(CPContractFacade.java:89)
at com.dynegy.eai.cp2contract.facade.CPContractFacade.processCounterParty(CPContractFacade.java:49)
at com.dynegy.eai.cp2contract.CPSink.process(CPSink.java:42)
at com.dynegy.eai.common.adbsubscriber.controller.ContractSubscriberControllerImpl.process(ContractSubscriberControllerImpl.java:50)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:222)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:66)
at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: java.io.EOFException: /dev/random closed?
at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:191)
at sun.security.provider.NativePRNG$RandomIO.ensureBufferValid(NativePRNG.java:238)
at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:252)
... 31 more

{http://xml.apache.org/axis/}hostname:cr1sunprwl2
2007-06-05 13:58:05,051 INFO [STDOUT] java.security.ProviderException: nextBytes() failed
2007-06-05 13:58:05,052 INFO [STDOUT] at org.apache.axis.AxisFault.makeFault(AxisFault.java:104)
2007-06-05 13:58:05,053 INFO [STDOUT] at org.apache.axis.client.AxisClient.invoke(AxisClient.java:308)
2007-06-05 13:58:05,053 INFO [STDOUT] at org.apache.axis.client.Call.invokeEngine(Call.java:2838)
2007-06-05 13:58:05,053 INFO [STDOUT] at org.apache.axis.client.Call.invoke(Call.java:2824)
2007-06-05 13:58:05,053 INFO [STDOUT] at org.apache.axis.client.Call.invoke(Call.java:2501)
2007-06-05 13:58:05,054 INFO [STDOUT] at org.apache.axis.client.Call.invoke(Call.java:2424)
2007-06-05 13:58:05,054 INFO [STDOUT] at org.apache.axis.client.Call.invoke(Call.java:1835)
2007-06-05 13:58:05,054 INFO [STDOUT] at com.dynegy.eai.cp2contract.ecm.ECMServiceSoapSoapBindingStub.invokeEvent(ECMServiceSoapSoapBindingStub.java:578)
2007-06-05 13:58:05,055 INFO [STDOUT] at com.dynegy.eai.cp2contract.ecm.ECMClient.updateBO(ECMClient.java:41)
2007-06-05 13:58:05,055 INFO [STDOUT] at com.dynegy.eai.cp2contract.ECMOperations.updateCounterParty(ECMOperations.java:132)
2007-06-05 13:58:05,055 INFO [STDOUT] at com.dynegy.eai.cp2contract.facade.CPContractFacade.updateCounterParty(CPContractFacade.java:89)
2007-06-05 13:58:05,055 INFO [STDOUT] at com.dynegy.eai.cp2contract.facade.CPContractFacade.processCounterParty(CPContractFacade.java:49)
2007-06-05 13:58:05,056 INFO [STDOUT] at com.dynegy.eai.cp2contract.CPSink.process(CPSink.java:42)
2007-06-05 13:58:05,056 INFO [STDOUT] at com.dynegy.eai.common.adbsubscriber.controller.ContractSubscriberControllerImpl.process(ContractSubscriberControllerImpl.java:50)
2007-06-05 13:58:05,056 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
2007-06-05 13:58:05,057 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2007-06-05 13:58:05,057 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
2007-06-05 13:58:05,057 INFO [STDOUT] at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:222)
2007-06-05 13:58:05,057 INFO [STDOUT] at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
2007-06-05 13:58:05,058 INFO [STDOUT] at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:66)
2007-06-05 13:58:05,058 INFO [STDOUT] at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
2007-06-05 13:58:05,058 INFO [STDOUT] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
2007-06-05 13:58:05,059 INFO [STDOUT] Caused by: java.security.ProviderException: nextBytes() failed
2007-06-05 13:58:05,059 INFO [STDOUT] at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:261)
2007-06-05 13:58:05,059 INFO [STDOUT] at sun.security.provider.NativePRNG$RandomIO.access$200(NativePRNG.java:108)
2007-06-05 13:58:05,060 INFO [STDOUT] at sun.security.provider.NativePRNG.engineNextBytes(NativePRNG.java:97)
2007-06-05 13:58:05,060 INFO [STDOUT] at java.security.SecureRandom.nextBytes(SecureRandom.java:413)
2007-06-05 13:58:05,060 INFO [STDOUT] at org.apache.axis.utils.SessionUtils.generateSessionId(SessionUtils.java:62)
2007-06-05 13:58:05,060 INFO [STDOUT] at org.apache.axis.SOAPPart.(SOAPPart.java:163)
2007-06-05 13:58:05,061 INFO [STDOUT] at org.apache.axis.Message.setup(Message.java:377)
2007-06-05 13:58:05,061 INFO [STDOUT] at org.apache.axis.Message.(Message.java:246)
2007-06-05 13:58:05,062 INFO [STDOUT] at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:130)
2007-06-05 13:58:05,062 INFO [STDOUT] at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
2007-06-05 13:58:05,062 INFO [STDOUT] at org.apache.axis.client.AxisClient.invokeTransport(AxisClient.java:150)
2007-06-05 13:58:05,062 INFO [STDOUT] at org.apache.axis.client.AxisClient.invoke(AxisClient.java:289)
2007-06-05 13:58:05,063 INFO [STDOUT] ... 20 more
2007-06-05 13:58:05,063 INFO [STDOUT] Caused by: java.io.EOFException: /dev/random closed?
2007-06-05 13:58:05,063 INFO [STDOUT] at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:191)
2007-06-05 13:58:05,064 INFO [STDOUT] at sun.security.provider.NativePRNG$RandomIO.ensureBufferValid(NativePRNG.java:238)
2007-06-05 13:58:05,064 INFO [STDOUT] at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:252)
2007-06-05 13:58:05,064 INFO [STDOUT] ... 31 more
2007-06-05 13:58:05,064 ERROR [com.dynegy.eai.cp2contract.CPSink] Exception occurred in the CPSink Class
2007-06-05 13:58:05,077 ERROR [com.dynegy.eai.cp2contract.CPSink]
Error Message: ; nested exception is:
java.security.ProviderException: nextBytes() failed
Error Stack Trace : AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.security.ProviderException: nextBytes() failed
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.security.ProviderException: nextBytes() failed
at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:261)
at sun.security.provider.NativePRNG$RandomIO.access$200(NativePRNG.java:108)
at sun.security.provider.NativePRNG.engineNextBytes(NativePRNG.java:97)
at java.security.SecureRandom.nextBytes(SecureRandom.java:413)
at org.apache.axis.utils.SessionUtils.generateSessionId(SessionUtils.java:62)
at org.apache.axis.SOAPPart.(SOAPPart.java:163)
at org.apache.axis.Message.setup(Message.java:377)
at org.apache.axis.Message.(Message.java:246)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:130)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invokeTransport(AxisClient.java:150)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:289)
at org.apache.axis.client.Call.invokeEngine(Call.java:2838)
at org.apache.axis.client.Call.invoke(Call.java:2824)
at org.apache.axis.client.Call.invoke(Call.java:2501)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at com.dynegy.eai.cp2contract.ecm.ECMServiceSoapSoapBindingStub.invokeEvent(ECMServiceSoapSoapBindingStub.java:578)
at com.dynegy.eai.cp2contract.ecm.ECMClient.updateBO(ECMClient.java:41)
at com.dynegy.eai.cp2contract.ECMOperations.updateCounterParty(ECMOperations.java:132)
at com.dynegy.eai.cp2contract.facade.CPContractFacade.updateCounterParty(CPContractFacade.java:89)
at com.dynegy.eai.cp2contract.facade.CPContractFacade.processCounterParty(CPContractFacade.java:49)
at com.dynegy.eai.cp2contract.CPSink.process(CPSink.java:42)
at com.dynegy.eai.common.adbsubscriber.controller.ContractSubscriberControllerImpl.process(ContractSubscriberControllerImpl.java:50)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:222)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:66)
at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: java.io.EOFException: /dev/random closed?
at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:191)
at sun.security.provider.NativePRNG$RandomIO.ensureBufferValid(NativePRNG.java:238)
at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:252)
... 31 more

{http://xml.apache.org/axis/}hostname:cr1sunprwl2

java.security.ProviderException: nextBytes() failed
at org.apache.axis.AxisFault.makeFault(AxisFault.java:104)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:308)
at org.apache.axis.client.Call.invokeEngine(Call.java:2838)
at org.apache.axis.client.Call.invoke(Call.java:2824)
at org.apache.axis.client.Call.invoke(Call.java:2501)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:1835)
at com.dynegy.eai.cp2contract.ecm.ECMServiceSoapSoapBindingStub.invokeEvent(ECMServiceSoapSoapBindingStub.java:578)
at com.dynegy.eai.cp2contract.ecm.ECMClient.updateBO(ECMClient.java:41)
at com.dynegy.eai.cp2contract.ECMOperations.updateCounterParty(ECMOperations.java:132)
at com.dynegy.eai.cp2contract.facade.CPContractFacade.updateCounterParty(CPContractFacade.java:89)
at com.dynegy.eai.cp2contract.facade.CPContractFacade.processCounterParty(CPContractFacade.java:49)
at com.dynegy.eai.cp2contract.CPSink.process(CPSink.java:42)
at com.dynegy.eai.common.adbsubscriber.controller.ContractSubscriberControllerImpl.process(ContractSubscriberControllerImpl.java:50)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:222)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:66)
at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
Caused by: java.security.ProviderException: nextBytes() failed
at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:261)
at sun.security.provider.NativePRNG$RandomIO.access$200(NativePRNG.java:108)
at sun.security.provider.NativePRNG.engineNextBytes(NativePRNG.java:97)
at java.security.SecureRandom.nextBytes(SecureRandom.java:413)
at org.apache.axis.utils.SessionUtils.generateSessionId(SessionUtils.java:62)
at org.apache.axis.SOAPPart.(SOAPPart.java:163)
at org.apache.axis.Message.setup(Message.java:377)
at org.apache.axis.Message.(Message.java:246)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:130)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invokeTransport(AxisClient.java:150)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:289)
... 20 more
Caused by: java.io.EOFException: /dev/random closed?
at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:191)
at sun.security.provider.NativePRNG$RandomIO.ensureBufferValid(NativePRNG.java:238)
at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:252)
... 31 more

2007-06-05 13:58:05,079 ERROR [com.dynegy.eai.cp2contract.CPSink] ; nested exception is:
java.security.ProviderException: nextBytes() failed
2007-06-05 13:58:05,080 ERROR [com.dynegy.eai.common.adbsubscriber.controller.ContractSubscriberControllerImpl] Error processing data for Interface: CP->RCM
2007-06-05 13:58:05,123 INFO [com.dynegy.eai.common.adbsubscriber.controller.ContractSubscriberControllerImpl] Finished processing CP data for all rows..
2007-06-05 13:58:05,124 INFO [com.dynegy.eai.common.adbsubscriber.controller.ContractSubscriberControllerImpl] CP->RCM Interface waiting for timer poll
2007-06-05 13:58:05,131 INFO [com.dynegy.eai.common.adbsubscriber.controller.ContractSubscriberControllerImpl] CounterParty > Contract processing interface: CP->RCM




Then we restarted the application, and it solved the issue. It was working fine.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Call the custom web service for login and it will fail for reproducing the random acceess number after sometime.

EXPECTED -
It should generate the unlimited random number for authentication, the way it works on Windows

REPRODUCIBILITY :
This bug can be reproduced occasionally.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079222#4079222

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079222



More information about the jboss-user mailing list