You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Juraj Martinka (JIRA)" <ji...@apache.org> on 2013/04/15 09:06:15 UTC

[jira] [Reopened] (HTTPCLIENT-1339) SSLPeerUnverifiedException occurs randomly when calling resource via HTTPS

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juraj Martinka reopened HTTPCLIENT-1339:
----------------------------------------


Ok:
Add 1) I've tried to follow examples and consume response entity as well as closing httpclient manager after each request (See updated gist https://gist.github.com/jumarko/34c20054d3d85eaff5a7)=> Still the same problem.
Have you ever tried to run this unit test and reproduce the problem? It's strange that old httpclient doesn't suffer from this issue, isn't it?

Add 2) 
Using google.com server is reasonably reliable way how to reproduce the problem. You can use some other well-known server if you want. I know that google (after I exceed some number of requests) will keep to return status 503 but this is not an issue because before this I am able to reproduce issue several times.
In reality, we are experiencing this problem when communicating with our servers, but we do not want provide this servers for testing  and we want to be sure that problem is NOT in our infrastructure.

Furthermore, we are experiencing this issue when using sardine library (https://code.google.com/p/sardine/), but I've tried to demonstrate that real problem is not in sardine but in httpclient itself (sardine uses httpclient 4).

Please, be so kind and try to investigate this problem a little bit further instead of closing it prematurely.
                
> SSLPeerUnverifiedException occurs randomly when calling resource via HTTPS
> --------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1339
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1339
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>    Affects Versions: 4.2.3
>            Reporter: Juraj Martinka
>            Priority: Critical
>
> HttpClient (tested against 4.1 version and 4.2.3) suffers from SSLPeerUnverifiedException.
> It can occur randomly, mainly when calling some secured resource in a concurrent fashion.
> However, each time there is a new HttpClient instance some this might not be related to the threads issues.
> I've created two unit tests - https://gist.github.com/jumarko/34c20054d3d85eaff5a7
> * HttpClientPeerUnverifiedTest - using HttpClient 4.x errors occures in a random fashion -> sometimes zero failures, but more often than not there  is at least one SSLPeerUnverifiedException
> * OldHttpClientPeerUnverifiedTest - using HttpClient 3.1 everything is working OK
> Stacktrace:
> {code}
> javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
> at sun.security.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
> at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
> at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
> at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
> at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:151)
> at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:125)
> at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:641)
> at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
> at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
> at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:1066)
> at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:1044)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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