Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: H2Check.org fails #136

Closed
dezinezync opened this issue Jul 18, 2015 · 7 comments
Closed

Question: H2Check.org fails #136

dezinezync opened this issue Jul 18, 2015 · 7 comments

Comments

@dezinezync
Copy link

Hello,

I have a question: I run the provided server sample code from the README.md and when testing it against https://www.h2check.org, it throws the following error: No support for HTTP/2 was found.

Server code:

var fs = require('fs');
var path = require('path');
var http2 = require('..');

var options = {
  key: fs.readFileSync(__dirname+'/localhost.key'),
  cert: fs.readFileSync(__dirname+'/localhost.crt')
};

require('http2').createServer(options, function(request, response) {
  response.end('Hello world!');
}).listen(3000);

I checked for the following conditions as well:

  1. I tried with valid certificates to ensure those weren't causing the check to fail.
  2. I tried it both locally and on an actual server (whose domain matches that of the SSL Certificate)
  3. I tried it directly against the 443 port.

But neither of the above returned a positive check. Can someone confirm they see the same validation on their end? If not, and you spot a problem in my setup, could you please point it out?

@dezinezync dezinezync changed the title Question: H2Check.com fails Question: H2Check.org fails Jul 18, 2015
@nwgh
Copy link
Collaborator

nwgh commented Aug 13, 2015

There's a lot of things that could be going wrong here - do you have a tcpdump of the tests, or at least an error message more helpful than "No support for HTTP/2 was found"?

@dezinezync
Copy link
Author

@nwgh Hi Nicholas, thanks for taking the time to answer my question. I recorded a session log from Chrome (using the HTTP/2 and SPDY indicator extension @ v0.7.1).

2701: HTTP2_SESSION
api.example.com:443 (DIRECT)
Start Time: 2015-08-15 11:38:45.317

t= 88966 [st=     0] +HTTP2_SESSION  [dt=180572]
                      --> host = "api.example.com:443"
                      --> proxy = "DIRECT"
t= 88966 [st=     0]    HTTP2_SESSION_INITIALIZED
                        --> protocol = "h2"
                        --> source_dependency = 2700 (SOCKET)
t= 88966 [st=     0]    HTTP2_SESSION_SEND_SETTINGS
                        --> settings = ["[id:3 flags:0 value:1000]","[id:4 flags:0 value:10485760]"]
t= 88966 [st=     0]    HTTP2_STREAM_UPDATE_RECV_WINDOW
                        --> delta = 10420225
                        --> window_size = 10485760
t= 88966 [st=     0]    HTTP2_SESSION_SENT_WINDOW_UPDATE_FRAME
                        --> delta = 10420225
                        --> stream_id = 0
t= 88966 [st=     0]    HTTP2_SESSION_SEND_HEADERS
                        --> fin = true
                        --> :authority: api.example.com
                            :method: GET
                            :path: /posts?userID=1
                            :scheme: https
                            accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
                            accept-encoding: gzip, deflate, sdch
                            accept-language: en-US,en;q=0.8
                            upgrade-insecure-requests: 1
                            user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36
                        --> priority = 0
                        --> stream_id = 1
                        --> unidirectional = false
t= 89335 [st=   369]    HTTP2_SESSION_RECV_SETTINGS
                        --> clear_persisted = false
                        --> host = "api.example.com:443"
t= 89335 [st=   369]    HTTP2_SESSION_RECV_SETTING
                        --> flags = 0
                        --> id = 3
                        --> value = 128
t= 89335 [st=   369]    HTTP2_SESSION_UPDATE_STREAMS_SEND_WINDOW_SIZE
                        --> delta_window_size = 2147418112
t= 89335 [st=   369]    HTTP2_SESSION_RECV_SETTING
                        --> flags = 0
                        --> id = 4
                        --> value = 2147483647
t= 89335 [st=   369]    HTTP2_SESSION_RECV_SETTING
                        --> flags = 0
                        --> id = 5
                        --> value = 16777215
t= 89335 [st=   369]    HTTP2_SESSION_RECEIVED_WINDOW_UPDATE_FRAME
                        --> delta = 2147418112
                        --> stream_id = 0
t= 89336 [st=   370]    HTTP2_SESSION_UPDATE_SEND_WINDOW
                        --> delta = 2147418112
                        --> window_size = 2147483647
t= 89425 [st=   459]    HTTP2_SESSION_RECV_HEADERS
                        --> fin = false
                        --> :status: 200
                            content-length: 5817
                            content-type: application/json; charset=utf-8
                            date: Sat, 15 Aug 2015 06:08:47 GMT
                            etag: W/"RsgiYbgb6DR9bX4vtEDiFg=="
                            server: nginx/1.9.3
                            x-powered-by: Express
                        --> stream_id = 1
t= 89425 [st=   459]    HTTP2_SESSION_RECV_DATA
                        --> fin = false
                        --> size = 5817
                        --> stream_id = 1
t= 89425 [st=   459]    HTTP2_SESSION_UPDATE_RECV_WINDOW
                        --> delta = -5817
                        --> window_size = 10479943
t= 89425 [st=   459]    HTTP2_SESSION_RECV_DATA
                        --> fin = true
                        --> size = 0
                        --> stream_id = 1
t= 89425 [st=   459]    HTTP2_STREAM_UPDATE_RECV_WINDOW
                        --> delta = 5817
                        --> window_size = 10485760
t=269538 [st=180572]    HTTP2_SESSION_CLOSE
                        --> description = "result is < 0."
                        --> net_error = -101 (ERR_CONNECTION_RESET)
t=269538 [st=180572]    HTTP2_SESSION_POOL_REMOVE_SESSION
                        --> source_dependency = 2701 (HTTP2_SESSION)
t=269538 [st=180572] -HTTP2_SESSION

Note: I had to mask the actual API's domain as I can't expose it

I can see that it's using the HTTP/2 protocol properly, as expected. I've tested the same on iOS 9, and it works as expected. I'm simply curious as to why the check in the aforementioned website fails.

@timmckenzie
Copy link

Which version of node.js or io.js are you using?

@dezinezync
Copy link
Author

NodeJs: Latest stable 0.12.7

@timmckenzie
Copy link

I suspect that h2check.org checks that the server can use ALPN. Node.js 0.12.X cannot use ALPN. @dezinezync you should run the server with io.js and test h2check.org again.

The node bug about ALPN support nodejs/node-v0.x-archive#5945

@dezinezync
Copy link
Author

I'm aware of that issue, however I did not think the website would use that for running a check. Nonetheless, your reasoning sounds plausible. I'll see if I can get in touch with the author/s of h2check.org and get us a definite answer. I'll also try your suggestion for running it with io.js.

Thank you for your time, Tim.

@nwgh
Copy link
Collaborator

nwgh commented Jan 8, 2016

After multiple attempts, h2check.org does not respond (connection refused on both ports 80 and 443). Closing this until more info comes around.

@nwgh nwgh closed this as completed Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants