CLONE [JBREM-971] - Enhance server-side connection error handling so certain (potentially
revealing) socket-related exceptins are not discarded
-----------------------------------------------------------------------------------------------------------------------------------------------
Key: JBREM-996
URL:
http://jira.jboss.com/jira/browse/JBREM-996
Project: JBoss Remoting
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 2.4.0.CR2 (Pinto)
Reporter: Ovidiu Feodorov
Assigned To: Ovidiu Feodorov
Priority: Minor
Fix For: 2.4.0.GA (Pinto)
A SSL connection (for example) may fail due to handshake problems, but Remoting would
discard the original exception and throw a different and less relevant exception, thus
hiding the original cause of the error.
Example:
The server reports
Caused by: java.net.SocketException: Socket Closed
at java.net.PlainSocketImpl.setOption(Unknown Source)
at java.net.Socket.setSoTimeout(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.setSoTimeout(Unknown Source)
at
org.jboss.remoting.transport.socket.SocketWrapper.setTimeout(SocketWrapper.java:85)
at
org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:168)
at
org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:66)
while in fact the root problem is:
14:39:38,174 ERROR [STDERR] javax.net.ssl.SSLException: Received fatal alert:
internal_error
14:39:38,175 ERROR [STDERR] at
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
14:39:38,175 ERROR [STDERR] at
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
14:39:38,175 ERROR [STDERR] at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1657)
14:39:38,175 ERROR [STDERR] at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:932)
14:39:38,175 ERROR [STDERR] at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)
14:39:38,175 ERROR [STDERR] at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:623)
14:39:38,175 ERROR [STDERR] at
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
14:39:38,175 ERROR [STDERR] at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
This makes troubleshooting of a potential simple problem such a misspelled truststore file
name laborious and time consuming.
The server-side code could be modified to log relevant exceptions.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira