You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2020/02/07 09:00:24 UTC

[jira] [Commented] (HTTPCLIENT-2050) Conscrypt fails with "Socket is closed" exception with HttpClient 5.0-beta7

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-2050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17032218#comment-17032218 ] 

Oleg Kalnichevski commented on HTTPCLIENT-2050:
-----------------------------------------------

[~andrewparks] The same code works for me with JRE 1.7, 1.8. 11 and 12 and consistently fails with JRE 13. I do not think this problem has anything to do with HttpClient but rather is a compatibility issue of Conscrypt TLS with Java 13 TLS code.

Oleg 

> Conscrypt fails with "Socket is closed" exception with HttpClient 5.0-beta7
> ---------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-2050
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2050
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 5.0 Beta7
>         Environment: Tested on both MacOS 10.15.2 and on CentOS 7.7 (on completely different machines). OpenJDK 13 used.
>            Reporter: Andrew Parks
>            Priority: Major
>              Labels: conscrypt
>         Attachments: Test.java, get-dependencies-compile-run.sh, linux.txt, log4j2.xml, macos.txt
>
>
> Test case attached, which attempts to use HttpClient to connect to [https://www.wikipedia.org/] both with and without Conscrypt. 
> The following error appears only when using Conscrypt:
> Exception in thread "main" java.net.SocketException: Socket is closed
>         at org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:384)
>         at org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:225)
>         at org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:276)
> To replicate this, please put the attached get-dependencies-compile-run.sh, Test.java and log4j2.xml files into an empty directory. Then run get-dependencies-compile-run.sh, which will download the necessary jars, compile the Java code, and run it.
> The full debug output when tested on Linux and MacOS are contained in the linux.txt and macos.txt files attached.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org