Bug 193426 - [dstore] Connecting to an dstore server running SSL results in exception being on the target using dstore
Summary: [dstore] Connecting to an dstore server running SSL results in exception bein...
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P5 trivial (vote)
Target Milestone: 2.0.1   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-19 20:43 EDT by David Dykstal CLA
Modified: 2007-07-04 13:58 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Dykstal CLA 2007-06-19 20:43:39 EDT
Set up a dstore daemon running SSL. Attempt a connection but refuse the certificate offered by the connection. The daemon thread accepting the connection prints several SSL exceptions. This should clean up silently instead.
Comment 1 David Dykstal CLA 2007-06-19 20:44:40 EDT
Here are the stack traces for the terminated threads:

javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1173)
        at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:65)
        at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
        at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
        at java.io.InputStreamReader.read(InputStreamReader.java:167)
        at java.io.BufferedReader.fill(BufferedReader.java:136)
        at java.io.BufferedReader.readLine(BufferedReader.java:299)
        at java.io.BufferedReader.readLine(BufferedReader.java:362)
        at org.eclipse.dstore.core.server.ServerLauncher$ConnectionListener.listen(ServerLauncher.java:210)
        at org.eclipse.dstore.core.server.ServerLauncher$ConnectionListener.run(ServerLauncher.java:116)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
        at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:525)
        at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:723)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1057)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(SSLSocketImpl.java:1757)
        at org.eclipse.dstore.core.server.ServerLauncher.run(ServerLauncher.java:623)
Exception in thread "Thread-7" java.lang.NullPointerException
        at java.io.Writer.write(Writer.java:126)
        at org.eclipse.dstore.core.server.ServerLauncher$ConnectionListener.listen(ServerLauncher.java:295)
        at org.eclipse.dstore.core.server.ServerLauncher$ConnectionListener.run(ServerLauncher.java:116)
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1173)
        at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:65)
        at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
        at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
        at java.io.InputStreamReader.read(InputStreamReader.java:167)
        at java.io.BufferedReader.fill(BufferedReader.java:136)
        at java.io.BufferedReader.readLine(BufferedReader.java:299)
        at java.io.BufferedReader.readLine(BufferedReader.java:362)
        at org.eclipse.dstore.core.server.ServerLauncher$ConnectionListener.listen(ServerLauncher.java:210)
        at org.eclipse.dstore.core.server.ServerLauncher$ConnectionListener.run(ServerLauncher.java:116)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:117)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1584)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:866)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1057)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(SSLSocketImpl.java:1757)
        at org.eclipse.dstore.core.server.ServerLauncher.run(ServerLauncher.java:623)
Exception in thread "Thread-8" java.lang.NullPointerException
        at java.io.Writer.write(Writer.java:126)
        at org.eclipse.dstore.core.server.ServerLauncher$ConnectionListener.listen(ServerLauncher.java:295)
        at org.eclipse.dstore.core.server.ServerLauncher$ConnectionListener.run(ServerLauncher.java:116)
Comment 2 David Dykstal CLA 2007-06-19 21:03:22 EDT
Changing the title. Once I have gotten this I get these stack traces printed every time I attempt to use the server launcher. It doesn't appear to keep the connection from proceding however.
Comment 3 David McKnight CLA 2007-07-04 13:08:56 EDT
I've taken out the stack trace prints.
Comment 4 Martin Oberhuber CLA 2007-07-04 13:14:48 EDT
Shouldn't we be logging exceptions somehow?

At least when we are running in "debug mode"? I understand that dstore does provide some -Dxxx settings for enabling verbosity and logging?
Comment 5 David McKnight CLA 2007-07-04 13:58:59 EDT
DataStore provides logging once a datastore server is started but in this case we don't have a datastore yet - this is a separate process that launches datastores.    If we want to provide logging here we should open a separate enhancement.