sitespeedio / sitespeed.io

sitespeed.io is an open-source tool for comprehensive web performance analysis, enabling you to test, monitor, and optimize your website’s speed using real browsers in various environments.
https://www.sitespeed.io/
MIT License
4.76k stars 603 forks source link

javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake #1071

Closed bryanp closed 8 years ago

bryanp commented 8 years ago

Getting this error when crawling some sites.

~  $ sitespeed.io -u https://www.pakyow.org/
info: OS: 'darwin 15.5.0', Node.js: 'v5.6.0', sitespeed.io: '3.11.7', PhantomJS: '2.1.1', java: '1.8.0_40', browsertime: '0.12.3'
info: Will crawl from start point https://www.pakyow.org/ with crawl depth 1
error: Error from the crawl: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
error: Error from the crawl:

error: Error from the crawl: The start url: https://www.pakyow.org/ couldn't be fetched, response code Unknown error

info: Didn't get any URLs
error:  Error: No URLs to analyze
    at Object.module.exports.fineTuneUrls (/Users/bryanp/.node/lib/node_modules/sitespeed.io/lib/util/util.js:354:18)
    at /Users/bryanp/.node/lib/node_modules/sitespeed.io/lib/analyzeOneSite.js:52:12
    at fn (/Users/bryanp/.node/lib/node_modules/sitespeed.io/node_modules/async/lib/async.js:746:34)
    at /Users/bryanp/.node/lib/node_modules/sitespeed.io/node_modules/async/lib/async.js:1213:16
    at /Users/bryanp/.node/lib/node_modules/sitespeed.io/node_modules/async/lib/async.js:166:37
    at /Users/bryanp/.node/lib/node_modules/sitespeed.io/node_modules/async/lib/async.js:706:43
    at /Users/bryanp/.node/lib/node_modules/sitespeed.io/node_modules/async/lib/async.js:167:37
    at /Users/bryanp/.node/lib/node_modules/sitespeed.io/node_modules/async/lib/async.js:1209:30
    at /Users/bryanp/.node/lib/node_modules/sitespeed.io/lib/analyzeOneSite.js:102:5
    at /Users/bryanp/.node/lib/node_modules/sitespeed.io/lib/crawler/crawler.js:119:18

Ran a test with SSLLabs and all seems well with the certificate. At first I thought it was related to SNI, but it doesn't fail on other servers that use SNI. Unsure what other debugging I can do at this point. Let me know if there are other details I can provide or how I can help!

softwareklinic commented 8 years ago

can u use -v (verbose/debug) -- will print additional info

bryanp commented 8 years ago

@softwareklinic tried that but it doesn't seem print any extra details about things that happen before the crawl

soulgalore commented 8 years ago

Hey @bryanp have had a lot of problems with SSL in Java. Can you try the 4.0 alpha version (or just clone master and try it out) there we don't use Java. I'm out on vacation for the moment but will get back in a week or so and do the final testing so we can make the beta.

Best Peter

bryanp commented 8 years ago

@soulgalore Getting a different error using master:

sitespeed.io [master] $ ./bin/sitespeed.js https://www.pakyow.org/
[2016-07-25 16:39:35] Versions OS: darwin 15.5.0 nodejs: v5.6.0 sitespeed.io: 4.0.0-alpha.5 browsertime: 1.0.0-alpha.22 coach: 0.24.2
[2016-07-25 16:39:37] Starting chrome for analysing https://www.pakyow.org/ 3 time(s)
[2016-07-25 16:39:37] Testing url https://www.pakyow.org/ run 1
[2016-07-25 16:39:38] https://www.pakyow.org/ generated the following error in Browsertime BrowserError: session not created exception
from disconnected: unable to connect to renderer
  (Session info: chrome=51.0.2704.103)
  (Driver info: chromedriver=2.22.397929 (fb72fb249a903a0b1041ea71eb4c8b3fa0d9be5a),platform=Mac OS X 10.11.5 x86_64)
from disconnected: unable to connect to renderer
  (Session info: chrome=51.0.2704.103)
  (Driver info: chromedriver=2.22.397929 (fb72fb249a903a0b1041ea71eb4c8b3fa0d9be5a),platform=Mac OS X 10.11.5 x86_64)
    at BrowsertimeError (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/lib/support/errors.js:4:31)
    at BrowserError (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/lib/support/errors.js:12:31)
    at /Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/lib/core/seleniumRunner.js:73:15
    at tryCatcher (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/promise.js:502:31)
    at Promise._settlePromise (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/promise.js:559:18)
    at Promise._settlePromise0 (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/promise.js:604:10)
    at Promise._settlePromises (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/promise.js:679:18)
    at Async._drainQueue (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
---------------------------------------------
    at Async._schedule (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/schedule.js:12:53)
    at Async._queueTick (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/async.js:157:14)
    at AsyncSettlePromises [as settlePromises] (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/async.js:88:10)
    at Promise._reject (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/promise.js:646:15)
    at Promise._rejectCallback (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/promise.js:465:10)
    at reject (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/bluebird/js/release/thenables.js:79:17)
    at ManagedPromise.invokeCallback_ (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/selenium-webdriver/lib/promise.js:1379:14)
    at TaskQueue.execute_ (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/selenium-webdriver/lib/promise.js:2913:14)
    at TaskQueue.executeNext_ (/Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/selenium-webdriver/lib/promise.js:2896:21)
    at /Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/selenium-webdriver/lib/promise.js:2775:27
    at /Users/bryanp/Downloads/sitespeed.io/node_modules/browsertime/node_modules/selenium-webdriver/lib/promise.js:639:7
    at process._tickCallback (node.js:402:9)
[2016-07-25 16:39:38] Render HTML for 1 page(s)
[2016-07-25 16:39:40] Error TypeError: /Users/bryanp/Downloads/sitespeed.io/lib/plugins/html/templates/domains.pug:5
    3|
    4| mixin rows(domainStats)
  > 5|   each domain in domainStats
    6|     tr
    7|       td.url.assetsurl(data-title='Domain') #{domain.domainName}
    8|       +statsCell(domain.blocked, 'Blocked', 'max')

Cannot read property 'length' of undefined
    3|
    4| mixin rows(domainStats)
  > 5|   each domain in domainStats
    6|     tr
    7|       td.url.assetsurl(data-title='Domain') #{domain.domainName}
    8|       +statsCell(domain.blocked, 'Blocked', 'max')

Cannot read property 'length' of undefined
    at Object.pug_mixins.rows.pug_interp [as rows] (eval at wrap (/Users/bryanp/Downloads/sitespeed.io/node_modules/pug/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:90:32)
    at eval (eval at wrap (/Users/bryanp/Downloads/sitespeed.io/node_modules/pug/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:296:19)
    at template (eval at wrap (/Users/bryanp/Downloads/sitespeed.io/node_modules/pug/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:329:185)
    at /Users/bryanp/Downloads/sitespeed.io/lib/plugins/html/renderer.js:36:27
    at tryToString (fs.js:414:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:401:12)
From previous event:
    at Object.renderTemplate (/Users/bryanp/Downloads/sitespeed.io/lib/plugins/html/renderer.js:36:8)
    at HTMLBuilder._renderSummaryPage (/Users/bryanp/Downloads/sitespeed.io/lib/plugins/html/htmlBuilder.js:159:67)
    at /Users/bryanp/Downloads/sitespeed.io/lib/plugins/html/htmlBuilder.js:95:27
    at Array.map (native)
    at HTMLBuilder.renderHTML (/Users/bryanp/Downloads/sitespeed.io/lib/plugins/html/htmlBuilder.js:95:8)
    at Object.close (/Users/bryanp/Downloads/sitespeed.io/lib/plugins/html/index.js:87:29)
    at /Users/bryanp/Downloads/sitespeed.io/lib/sitespeed.js:35:49
From previous event:
    at runOptionalFunction (/Users/bryanp/Downloads/sitespeed.io/lib/sitespeed.js:35:6)
    at /Users/bryanp/Downloads/sitespeed.io/lib/sitespeed.js:94:32
From previous event:
    at /Users/bryanp/Downloads/sitespeed.io/lib/sitespeed.js:94:16
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at /Users/bryanp/Downloads/sitespeed.io/lib/sitespeed.js:81:12
    at /Users/bryanp/Downloads/sitespeed.io/node_modules/mkdirp/index.js:30:20
    at FSReqWrap.oncomplete (fs.js:82:15)
From previous event:
    at Object.run (/Users/bryanp/Downloads/sitespeed.io/lib/sitespeed.js:78:8)
    at /Users/bryanp/Downloads/sitespeed.io/bin/sitespeed.js:24:22
From previous event:
    at Object.<anonymous> (/Users/bryanp/Downloads/sitespeed.io/bin/sitespeed.js:23:4)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:140:18)
    at node.js:1001:3

Cloned and did npm install -- not sure what else I could be missing here.

soulgalore commented 8 years ago

No, the problem is not the install, somehow the Chromedriver can't start Chrome. Can you try update Chrome to 52 and/or test with Firefox.

cigoe commented 8 years ago

I hit the same issue testing a domain with cloudflare and the canary build as of this comment is able to connect and profile just fine.

bryanp commented 8 years ago

@soulgalore Tried again today from master, same error with Chrome 53. When I try with Firefox the browser launches but sitespeed doesn't seem to think it has:

sitespeed.io [master] $ ./bin/sitespeed.js https://www.pakyow.org/ -b firefox
[2016-09-26 15:46:59] Versions OS: darwin 15.6.0 nodejs: v5.6.0 sitespeed.io: 4.0.0-beta.3 browsertime: 1.0.0-beta.5 coach: 0.27.0
[2016-09-26 15:47:00] Starting firefox for analysing https://www.pakyow.org/ 3 time(s)
[2016-09-26 15:47:00] Testing url https://www.pakyow.org/ run 1
[2016-09-26 15:48:00] Browser failed to start in time, trying one more time.
[2016-09-26 15:49:00] https://www.pakyow.org/ generated the following error in Browsertime BrowserError: Failed to start browser in 60 seconds.
    at BrowsertimeError (/Users/bryanp/Code/lib-js/sitespeed.io/node_modules/browsertime/lib/support/errors.js:4:31)
    at BrowserError (/Users/bryanp/Code/lib-js/sitespeed.io/node_modules/browsertime/lib/support/errors.js:12:31)
    at /Users/bryanp/Code/lib-js/sitespeed.io/node_modules/browsertime/lib/core/seleniumRunner.js:79:15
From previous event:
    at SeleniumRunner.start (/Users/bryanp/Code/lib-js/sitespeed.io/node_modules/browsertime/lib/core/seleniumRunner.js:78:13)
From previous event:
    at /Users/bryanp/Code/lib-js/sitespeed.io/node_modules/browsertime/lib/core/engine.js:232:17
From previous event:
    at Engine.run (/Users/bryanp/Code/lib-js/sitespeed.io/node_modules/browsertime/lib/core/engine.js:231:8)
    at /Users/bryanp/Code/lib-js/sitespeed.io/lib/plugins/browsertime/analyzer.js:88:26
From previous event:
    at Object.analyzeUrl (/Users/bryanp/Code/lib-js/sitespeed.io/lib/plugins/browsertime/analyzer.js:88:8)
    at Object.processMessage (/Users/bryanp/Code/lib-js/sitespeed.io/lib/plugins/browsertime/index.js:150:27)
    at /Users/bryanp/Code/lib-js/sitespeed.io/lib/support/queueHandler.js:157:57
    at drainItem (/Users/bryanp/Code/lib-js/sitespeed.io/node_modules/concurrent-queue/index.js:92:21)
    at Immediate.drain [as _onImmediate] (/Users/bryanp/Code/lib-js/sitespeed.io/node_modules/concurrent-queue/index.js:73:84)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
    at SeleniumRunner.startBrowser (/Users/bryanp/Code/lib-js/sitespeed.io/node_modules/browsertime/lib/core/seleniumRunner.js:37:10)
    at SeleniumRunner.start (/Users/bryanp/Code/lib-js/sitespeed.io/node_modules/browsertime/lib/core/seleniumRunner.js:42:25)
    at runIteration (/Users/bryanp/Code/lib-js/sitespeed.io/node_modules/browsertime/lib/core/engine.js:158:21)
    at /Users/bryanp/Code/lib-js/sitespeed.io/node_modules/browsertime/lib/core/engine.js:233:25
    at processImmediate [as _immediateCallback] (timers.js:383:17)
soulgalore commented 8 years ago

Hm @tobli has also had the same problem on his Mac. I tried the URL and it worked for me both in FF and Chrome.

soulgalore commented 8 years ago

Hopefully this works with new browser and drivers, please reopen if don't.