Comments (3)
Check the chrome://net-internal logs to get more details on the error. Note that the server has to run with TLS (and negotiate h2 or h2-14). Also, Chrome is very strict about security errors.. it won't negotiate h2 if there are certificate errors or if the negotiated ciphers don't match what the h2 specs mandates.
from http-2.
Thanks for the quick reply! I find this event at Events tag as you suggested:
t=95776 [st= 0] +REQUEST_ALIVE [dt=14]
t=95776 [st= 0] URL_REQUEST_DELEGATE [dt=0]
t=95776 [st= 0] URL_REQUEST_START_JOB [dt=0]
--> load_flags = 2638848 (BYPASS_DATA_REDUCTION_PROXY | MAIN_FRAME | MAYBE_USER_GESTURE | VERIFY_EV_CERT)
--> method = "GET"
--> priority = "HIGHEST"
--> url = "http://skylynx.cs.duke.edu:8080/"
t=95776 [st= 0] +URL_REQUEST_START_JOB [dt=14]
--> load_flags = 2638848 (BYPASS_DATA_REDUCTION_PROXY | MAIN_FRAME | MAYBE_USER_GESTURE | VERIFY_EV_CERT)
--> method = "GET"
--> priority = "HIGHEST"
--> url = "http://skylynx.cs.duke.edu:8080/"
t=95776 [st= 0] URL_REQUEST_DELEGATE [dt=0]
t=95777 [st= 1] HTTP_CACHE_GET_BACKEND [dt=0]
t=95777 [st= 1] HTTP_CACHE_OPEN_ENTRY [dt=0]
--> net_error = -2 (ERR_FAILED)
t=95777 [st= 1] HTTP_CACHE_CREATE_ENTRY [dt=0]
t=95777 [st= 1] HTTP_CACHE_ADD_TO_ENTRY [dt=0]
t=95777 [st= 1] URL_REQUEST_DELEGATE [dt=0]
t=95777 [st= 1] +HTTP_STREAM_REQUEST [dt=0]
t=95777 [st= 1] HTTP_STREAM_REQUEST_BOUND_TO_JOB
--> source_dependency = 293449 (HTTP_STREAM_JOB)
t=95777 [st= 1] -HTTP_STREAM_REQUEST
t=95778 [st= 2] +HTTP_TRANSACTION_SEND_REQUEST [dt=0]
t=95778 [st= 2] HTTP_TRANSACTION_SEND_REQUEST_HEADERS
--> GET / HTTP/1.1
Host: skylynx.cs.duke.edu:8080
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
Cookie: [249 bytes were stripped]
t=95778 [st= 2] -HTTP_TRANSACTION_SEND_REQUEST
t=95778 [st= 2] +HTTP_TRANSACTION_READ_HEADERS [dt=4]
t=95778 [st= 2] HTTP_STREAM_PARSER_READ_HEADERS [dt=4]
--> net_error = -324 (ERR_EMPTY_RESPONSE)
t=95782 [st= 6] HTTP_TRANSACTION_RESTART_AFTER_ERROR
--> net_error = -324 (ERR_EMPTY_RESPONSE)
t=95782 [st= 6] -HTTP_TRANSACTION_READ_HEADERS
t=95782 [st= 6] +HTTP_STREAM_REQUEST [dt=1]
t=95783 [st= 7] HTTP_STREAM_REQUEST_BOUND_TO_JOB
--> source_dependency = 293450 (HTTP_STREAM_JOB)
t=95783 [st= 7] -HTTP_STREAM_REQUEST
t=95783 [st= 7] +HTTP_TRANSACTION_SEND_REQUEST [dt=0]
t=95783 [st= 7] HTTP_TRANSACTION_SEND_REQUEST_HEADERS
--> GET / HTTP/1.1
Host: skylynx.cs.duke.edu:8080
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
Cookie: [249 bytes were stripped]
t=95783 [st= 7] -HTTP_TRANSACTION_SEND_REQUEST
t=95783 [st= 7] +HTTP_TRANSACTION_READ_HEADERS [dt=2]
t=95783 [st= 7] HTTP_STREAM_PARSER_READ_HEADERS [dt=2]
--> net_error = -324 (ERR_EMPTY_RESPONSE)
t=95785 [st= 9] HTTP_TRANSACTION_RESTART_AFTER_ERROR
--> net_error = -324 (ERR_EMPTY_RESPONSE)
t=95785 [st= 9] -HTTP_TRANSACTION_READ_HEADERS
t=95785 [st= 9] +HTTP_STREAM_REQUEST [dt=3]
t=95788 [st=12] HTTP_STREAM_REQUEST_BOUND_TO_JOB
--> source_dependency = 293451 (HTTP_STREAM_JOB)
t=95788 [st=12] -HTTP_STREAM_REQUEST
t=95788 [st=12] +HTTP_TRANSACTION_SEND_REQUEST [dt=0]
t=95788 [st=12] HTTP_TRANSACTION_SEND_REQUEST_HEADERS
--> GET / HTTP/1.1
Host: skylynx.cs.duke.edu:8080
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
Cookie: [249 bytes were stripped]
t=95788 [st=12] -HTTP_TRANSACTION_SEND_REQUEST
t=95788 [st=12] +HTTP_TRANSACTION_READ_HEADERS [dt=2]
t=95788 [st=12] HTTP_STREAM_PARSER_READ_HEADERS [dt=2]
--> net_error = -324 (ERR_EMPTY_RESPONSE)
t=95790 [st=14] -HTTP_TRANSACTION_READ_HEADERS
--> net_error = -324 (ERR_EMPTY_RESPONSE)
t=95790 [st=14] -URL_REQUEST_START_JOB
--> net_error = -324 (ERR_EMPTY_RESPONSE)
t=95790 [st=14] URL_REQUEST_DELEGATE [dt=0]
t=95790 [st=14] -REQUEST_ALIVE
--> net_error = -324 (ERR_EMPTY_RESPONSE)
The error seems be caused by failing to negotiate handshake and the server sent nothing to the browser. I start the server by simply "ruby server.rb" and the browser with "http://url:8080".
If I load the page by "https://url:8080", the log is different:
t=931004 [st= 0] +REQUEST_ALIVE [dt=32]
t=931004 [st= 0] URL_REQUEST_DELEGATE [dt=0]
t=931004 [st= 0] URL_REQUEST_START_JOB [dt=1]
--> load_flags = 2638849 (BYPASS_DATA_REDUCTION_PROXY | MAIN_FRAME | MAYBE_USER_GESTURE | VALIDATE_CACHE | VERIFY_EV_CERT)
--> method = "GET"
--> priority = "HIGHEST"
--> url = "https://skylynx.cs.duke.edu:8080/"
t=931005 [st= 1] +URL_REQUEST_START_JOB [dt=31]
--> load_flags = 2638849 (BYPASS_DATA_REDUCTION_PROXY | MAIN_FRAME | MAYBE_USER_GESTURE | VALIDATE_CACHE | VERIFY_EV_CERT)
--> method = "GET"
--> priority = "HIGHEST"
--> url = "https://skylynx.cs.duke.edu:8080/"
t=931005 [st= 1] URL_REQUEST_DELEGATE [dt=0]
t=931005 [st= 1] HTTP_CACHE_GET_BACKEND [dt=0]
t=931005 [st= 1] HTTP_CACHE_OPEN_ENTRY [dt=1]
--> net_error = -2 (ERR_FAILED)
t=931006 [st= 2] HTTP_CACHE_CREATE_ENTRY [dt=0]
t=931006 [st= 2] HTTP_CACHE_ADD_TO_ENTRY [dt=0]
t=931006 [st= 2] URL_REQUEST_DELEGATE [dt=0]
t=931006 [st= 2] +HTTP_STREAM_REQUEST [dt=4]
t=931010 [st= 6] SSL_CIPHER_FALLBACK
--> host_and_port = "skylynx.cs.duke.edu:8080"
--> net_error = -100 (ERR_CONNECTION_CLOSED)
t=931010 [st= 6] -HTTP_STREAM_REQUEST
t=931010 [st= 6] +HTTP_STREAM_REQUEST [dt=8]
t=931018 [st=14] SSL_VERSION_FALLBACK
--> TLS 1.2 ==> TLS 1.1
--> host_and_port = "skylynx.cs.duke.edu:8080"
--> net_error = -100 (ERR_CONNECTION_CLOSED)
t=931018 [st=14] -HTTP_STREAM_REQUEST
t=931018 [st=14] +HTTP_STREAM_REQUEST [dt=8]
t=931026 [st=22] SSL_VERSION_FALLBACK
--> TLS 1.1 ==> TLS 1.0
--> host_and_port = "skylynx.cs.duke.edu:8080"
--> net_error = -100 (ERR_CONNECTION_CLOSED)
t=931026 [st=22] -HTTP_STREAM_REQUEST
t=931026 [st=22] HTTP_STREAM_REQUEST [dt=10]
t=931036 [st=32] -URL_REQUEST_START_JOB
--> net_error = -100 (ERR_CONNECTION_CLOSED)
t=931036 [st=32] URL_REQUEST_DELEGATE [dt=0]
t=931036 [st=32] -REQUEST_ALIVE
--> net_error = -100 (ERR_CONNECTION_CLOSED)
But the server still reports "HTTP2::Error::HandshakeError". So any insight to start the server with other options or get more logs from Chrome? (I'm a newbie in chrome log and am sorry if I didn't get the log in a right way.)
from http-2.
- Grab the latest code from the repo (3ef03fe)
- Run
ruby server.rb -s
- Open https://localhost:8080 in Chrome; you must have the TLS certificate in your root store, if there is an exception the h2 negotiation will fail.
from http-2.
Related Issues (20)
- Sending RST_STREAM on closed Streams results in GOAWAY HOT 1
- Failing client requests HOT 30
- Connection.activate_stream RuntimeError: can't add a new key into hash during iteration HOT 13
- headers could be symbols? HOT 6
- How does one know when headers are finished? HOT 13
- Is it okay to have multiple `set-cookie` headers? HOT 2
- How to deal with idempotent requests which fail? HOT 9
- goaway when talking to Cloudflare HOT 15
- release 0.9.1 with warning fixes HOT 4
- Gem is not fully compliant with RFC7540 Chapter 8 requirements on request/response headers. HOT 2
- receiving ping while closing connection causing ProtocolError HOT 5
- This repo has no a license. HOT 4
- SETTINGS_HEADER_TABLE_SIZE validation? HOT 1
- Could we add flags to headers/data event? HOT 5
- ignoring frame size negotiation HOT 1
- Heavy CPU usage while trying to cleanup closed streams
- Decompressor comment incorrect HOT 2
- HTTP2::Client.new throws ArgumentError (wrong number of arguments (given 1, expected 0)) on Ruby 3.0 HOT 3
- Connection upgrade fails when request body is not empty HOT 1
- Increasing initial-window beyond 128K results in no window-updates HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http-2.