0

I'm getting the following error:

java.net.SocketException: Connection reset
    done
    at java.net.SocketInputStream.read(SocketInputStream.java:210)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
    at sun.security.ssl.InputRecord.read(InputRecord.java:503)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:746)
    at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:722)
    at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:306)
    at DescargaModulos.Prueba1.main(Prueba1.java:101)
BUILD SUCCESSFUL (total time: 53 seconds)

My code: jsoup 1.11.3 and jdk 1.8

String url = "https://intranet:8106/ctx/jsp/index.jsp";
Connection.Response respuesta = Jsoup.connect(url)
      .data(cabezeras)
      .userAgent(USER_AGENT)
      .method(Connection.Method.GET)
      .execute();

---->KO

for url = "https://gtihub.com" -> OK

Thanks

Klaus Gütter
  • 11,151
  • 6
  • 31
  • 36
javichu
  • 11
  • 1
  • Hello, can you edit your question properly and make it easier to understand. Make sure to clearly state what you tried – Stoogy Jan 03 '19 at 13:49
  • The problem is not related to Jsoup. There is problem with connection. You can have a look for example here: https://stackoverflow.com/q/62929/6578434 – Luk Jan 03 '19 at 14:27
  • You are using ssl. Check if you have proper certificates – Luk Jan 03 '19 at 14:28
  • Possible duplicate of [How to connect via HTTPS using Jsoup?](https://stackoverflow.com/questions/7744075/how-to-connect-via-https-using-jsoup) – Zack Jan 09 '19 at 19:57

0 Answers0