Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2743517A99 for ; Fri, 23 Jan 2015 15:57:35 +0000 (UTC) Received: (qmail 91413 invoked by uid 500); 23 Jan 2015 15:57:35 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 91368 invoked by uid 500); 23 Jan 2015 15:57:35 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 91356 invoked by uid 99); 23 Jan 2015 15:57:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jan 2015 15:57:35 +0000 Date: Fri, 23 Jan 2015 15:57:35 +0000 (UTC) From: "Chris Kistner (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HTTPCLIENT-1478) https calls ignore http.socket.timeout during SSL Handshake MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14289433#comment-14289433 ] Chris Kistner commented on HTTPCLIENT-1478: ------------------------------------------- Ensure that you've specified a timeout value, otherwise it would still get stuck in 4.3.6: {noformat}SocketConfig sc = SocketConfig.custom() .setSoTimeout(Settings.getHttpTimeoutConnect()) .build();{noformat} > https calls ignore http.socket.timeout during SSL Handshake > ----------------------------------------------------------- > > Key: HTTPCLIENT-1478 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1478 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpConn > Affects Versions: 4.3 Final, 4.3.1, 4.3.2, 4.3.3 > Environment: All > Reporter: Jonah Schwartz > Priority: Minor > Fix For: 4.3.4 > > > https calls ignore http.socket.timeout during SSL Handshake. This can result in a https call hanging forever waiting for socket read. > In both SSLSocketFactory and SSLConnectionSocketFactory, sslsock.startHandshake(); is called before socket timeout is set on the socket. This means timeout is not respected during the SSL handshake, and the thread can hang with a stacktrace that looks like this: > org.apache.http.impl.client.AbstractHttpClient.doExecute > org.apache.http.impl.client.DefaultRequestDirector.execute > org.apache.http.impl.client.DefaultRequestDirector.tryConnect > org.apache.http.impl.conn.ManagedClientConnectionImpl.open > org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection > org.apache.http.conn.ssl.SSLSocketFactory.connectSocket > org.apache.http.conn.ssl.SSLSocketFactory.connectSocket > sun.security.ssl.SSLSocketImpl.startHandshake > sun.security.ssl.SSLSocketImpl.startHandshake > sun.security.ssl.SSLSocketImpl.performInitialHandshake > sun.security.ssl.SSLSocketImpl.readRecord > sun.security.ssl.InputRecord.read > sun.security.ssl.InputRecord.readV3Record > sun.security.ssl.InputRecord.readFully > java.net.SocketInputStream.read > java.net.SocketInputStream.socketRead0 -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org