1

When I use urlread2() to access an API, I get the following error, which is not reproducible across different PCs with Matlab. What might be the problem causing it?

Error log:

??? Java exception occurred:
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
... 8 more

EDIT 1: @nkjt Added matlab and java versions.

Matlab version: 2011a

Matlab's java version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode

Prashanth
  • 1,033
  • 1
  • 12
  • 23
  • Possibly related: http://stackoverflow.com/questions/26604828/ and http://stackoverflow.com/questions/15589880/ . More information about the system that fails (MATLAB version, Java version, etc.) might help. – nkjt Apr 16 '15 at 09:23
  • I upgraded my system to Java 7 and made a environment variable `MATLAB_JAVA` point to `..\Program Files\jre` and by restarting matlab the problem got fixed. I know this is not a solution, but its just a work around. That's why am not posting this as an answer. – Prashanth Apr 16 '15 at 21:36

0 Answers0