Andrew Parks created HTTPCLIENT-2050:
----------------------------------------

             Summary: 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).
            Reporter: Andrew Parks
         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)}}
{{ at 
org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:244)}}
{{ at 
org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:148)}}
{{ at 
org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:409)}}
{{ at 
org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:164)}}
{{ at 
org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:174)}}
{{ at 
org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:135)}}

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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to