ibtoold CFNetwork SSLHandshake failed error during xcodebuild

Originator:kelan
Number:rdar://22410990 Date Originated:2015-08-24
Status:Closed Resolved:
Product:Developer Tools Product Version:Xcode 6.4 (6E35b), OS X Yosemite 10.10.5 (14F27)
Classification:Serious Bug Reproducible:Sometimes
 
I have a script that builds my project for CI, by calling xcodebuild for a few Schemes.

It has worked great, until today.

Starting this morning, I have been getting frequent (but not 100%) failures, with error messages like:

    2015-08-24 16:02:38.679 ibtoold[38183:509542] CFNetwork SSLHandshake failed (-9806)
    2015-08-24 16:02:38.949 ibtoold[38183:509542] CFNetwork SSLHandshake failed (-9802)
    2015-08-24 16:02:39.276 ibtoold[38183:509542] CFNetwork SSLHandshake failed (-9824)
    2015-08-24 16:02:39.373 ibtoold[38183:509542] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)


This has happened both on my CI machine (running Jenkins), and on my local machine.

When it happened on my local machine, I saw this in Console.app:

    8/24/15 1:48:08.573 PM ibtoold[39230]:  DVTAssertions: Warning in /SourceCache/DVTFrameworks/DVTFrameworks-7714/DVTFoundation/Downloadables/DVTDownloadableIndex.m:73
    Details:  Error Domain=NSURLErrorDomain Code=-1200 "Failed to download index with errors: (
        "Error Domain=NSURLErrorDomain Code=-1200 \"An SSL error has occurred and a secure connection to the server cannot be made.\" UserInfo=0x7fd93d094d40 {_kCFStreamErrorDomainKey=3, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorCodeKey=-9824, NSUnderlyingError=0x7fd93843f090 \"An SSL error has occurred and a secure connection to the server cannot be made.\", NSErrorPeerCertificateChainKey=(\n), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://developer.apple.com/library/downloads/docset-index-6.4.0-7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90.dvtdownloadableindex, NSErrorFailingURLStringKey=https://developer.apple.com/library/downloads/docset-index-6.4.0-7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90.dvtdownloadableindex, NSErrorClientCertificateStateKey=0}",
        "Error Domain=NSURLErrorDomain Code=-1200 \"An SSL error has occurred and a secure connection to the server cannot be made.\" UserInfo=0x7fd93d674830 {_kCFStreamErrorDomainKey=3, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorCodeKey=-9824, NSUnderlyingError=0x7fd938e54c60 \"An SSL error has occurred and a secure connection to the server cannot be made.\", NSErrorPeerCertificateChainKey=(\n), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex, NSErrorFailingURLStringKey=https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex, NSErrorClientCertificateStateKey=0}"
    )" UserInfo=0x7fd93d01e780 {NSLocalizedDescription=Failed to download index with errors: (
        "Error Domain=NSURLErrorDomain Code=-1200 \"An SSL error has occurred and a secure connection to the server cannot be made.\" UserInfo=0x7fd93d094d40 {_kCFStreamErrorDomainKey=3, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorCodeKey=-9824, NSUnderlyingError=0x7fd93843f090 \"An SSL error has occurred and a secure connection to the server cannot be made.\", NSErrorPeerCertificateChainKey=(\n), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://developer.apple.com/library/downloads/docset-index-6.4.0-7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90.dvtdownloadableindex, NSErrorFailingURLStringKey=https://developer.apple.com/library/downloads/docset-index-6.4.0-7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90.dvtdownloadableindex, NSErrorClientCertificateStateKey=0}",
        "Error Domain=NSURLErrorDomain Code=-1200 \"An SSL error has occurred and a secure connection to the server cannot be made.\" UserInfo=0x7fd93d674830 {_kCFStreamErrorDomainKey=3, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorCodeKey=-9824, NSUnderlyingError=0x7fd938e54c60 \"An SSL error has occurred and a secure connection to the server cannot be made.\", NSErrorPeerCertificateChainKey=(\n), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex, NSErrorFailingURLStringKey=https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex, NSErrorClientCertificateStateKey=0}"
    )}
    Object:   <DVTDownloadableIndexSourceDocs: 0x7fd93d078130>
    Method:   -init
    Thread:   <NSThread: 0x7fd93843e930>{number = 7, name = (null)}
    Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.




I can load https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex in a browser, and using `curl https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex`).  However, `curl -I …` gives:
    HTTP/1.1 401 Unauthorized
    Server: nginx
    Date: Mon, 24 Aug 2015 23:17:56 GMT
    Content-Type: text/html
    Content-Length: 188
    Connection: keep-alive

Comments

These errors have gone away. We didn't change anything locally, so presumably it was a server-side problem that has been fixed.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!