ERR_SPDY_PROTOCOL_ERROR when using DNS & HTTP Proxy: "Server reset stream"

I have just setup a discourse instance for test. When setting Cloudflare to bypass that site, it works perfectly fine. But whenever I enable CDN (DNS and HTTP proxy), my site went unusable. Chrome is only showing a blank page to me. And in developer console, all assets are unable to load because of this error:

Failed to load resource: net::ERR_SPDY_PROTOCOL_ERROR

I opened chrome://net-internals, reload the page, and went through the log of Chrome loading one of the asset, I found this error (the full log is at the bottom of this post):

HTTP2_STREAM_ERROR
                    --> description = "Server reset stream."
                    --> net_error = "ERR_SPDY_PROTOCOL_ERROR"

I have no idea how to fix this. And it seems to be a problem with Cloudflare with HTTP2. Please advice.


P.S. Here is the full log of Chrome loading the asset:

t=710 [st=  0] +REQUEST_ALIVE  [dt=110]
                --> priority = "MEDIUM"
                --> url = "https://discourse.foobar.com/assets/locales/zh_TW-some-hash.js"
t=710 [st=  0]    NETWORK_DELEGATE_BEFORE_URL_REQUEST  [dt=0]
t=710 [st=  0]   +URL_REQUEST_START_JOB  [dt=27]
                  --> load_flags = 16384 (MAYBE_USER_GESTURE)
                  --> method = "GET"
                  --> url = "https://discourse.foobar.com/assets/locales/zh_TW-some-hash.js"
t=710 [st=  0]      NETWORK_DELEGATE_BEFORE_START_TRANSACTION  [dt=0]
t=710 [st=  0]      HTTP_CACHE_GET_BACKEND  [dt=0]
t=710 [st=  0]      HTTP_CACHE_OPEN_ENTRY  [dt=0]
                    --> net_error = -2 (ERR_FAILED)
t=710 [st=  0]      HTTP_CACHE_CREATE_ENTRY  [dt=0]
t=710 [st=  0]      HTTP_CACHE_ADD_TO_ENTRY  [dt=0]
t=710 [st=  0]     +HTTP_STREAM_REQUEST  [dt=2]
t=710 [st=  0]        HTTP_STREAM_JOB_CONTROLLER_BOUND
                      --> source_dependency = 458 (HTTP_STREAM_JOB_CONTROLLER)
t=712 [st=  2]        HTTP_STREAM_REQUEST_BOUND_TO_JOB
                      --> source_dependency = 459 (HTTP_STREAM_JOB)
t=712 [st=  2]     -HTTP_STREAM_REQUEST
t=712 [st=  2]     +HTTP_TRANSACTION_SEND_REQUEST  [dt=1]
t=712 [st=  2]        HTTP_TRANSACTION_HTTP2_SEND_REQUEST_HEADERS
                      --> :authority: discourse.foobar.com
                          :method: GET
                          :path: /assets/locales/zh_TW-some-hash.js
                          :scheme: https
                          accept: */*
                          accept-encoding: gzip, deflate, br
                          accept-language: zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7
                          cookie: __cfduid=some-cookie; destination_url=https%3A%2F%2Fdiscourse.foobar.com%2F
                          referer: https://discourse.foobar.com/login
                          user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36
t=713 [st=  3]     -HTTP_TRANSACTION_SEND_REQUEST
t=713 [st=  3]     +HTTP_TRANSACTION_READ_HEADERS  [dt=24]
t=737 [st= 27]        HTTP_TRANSACTION_READ_RESPONSE_HEADERS
                      --> HTTP/1.1 200
                          status: 200
                          date: Wed, 24 Oct 2018 03:59:34 GMT
                          content-type: application/javascript
                          last-modified: Tue, 23 Oct 2018 09:43:44 GMT
                          vary: Accept-Encoding
                          expires: Thu, 24 Oct 2019 03:59:34 GMT
                          cache-control: max-age=31536000
                          cache-control: public,immutable
                          expect-ct: max-age=604800, report-uri="https://report-uri.Cloudflare.com/cdn-cgi/beacon/expect-ct"
                          server: Cloudflare
                          cf-ray: 46e98811ac9a333d-HKG
                          content-encoding: br
t=737 [st= 27]     -HTTP_TRANSACTION_READ_HEADERS
t=737 [st= 27]      HTTP_CACHE_WRITE_INFO  [dt=0]
t=737 [st= 27]      HTTP_CACHE_WRITE_DATA  [dt=0]
t=737 [st= 27]      HTTP_CACHE_WRITE_INFO  [dt=0]
t=737 [st= 27]      NETWORK_DELEGATE_HEADERS_RECEIVED  [dt=0]
t=737 [st= 27]      URL_REQUEST_FILTERS_SET
                    --> filters = "BROTLI"
t=737 [st= 27]   -URL_REQUEST_START_JOB
t=737 [st= 27]    URL_REQUEST_DELEGATE_RESPONSE_STARTED  [dt=1]
t=738 [st= 28]   +HTTP_TRANSACTION_READ_BODY  [dt=2]
t=738 [st= 28]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1233
                    --> stream_id = 3
                    --> window_size = 6290223
t=738 [st= 28]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -4214
                    --> stream_id = 3
                    --> window_size = 6286009
t=740 [st= 30]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1233
                    --> stream_id = 3
                    --> window_size = 6287242
t=740 [st= 30]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 4214
                    --> stream_id = 3
                    --> window_size = 6291456
t=740 [st= 30]   -HTTP_TRANSACTION_READ_BODY
t=740 [st= 30]    URL_REQUEST_JOB_BYTES_READ
                  --> byte_count = 5447
t=740 [st= 30]    URL_REQUEST_JOB_FILTERED_BYTES_READ
                  --> byte_count = 16024
t=741 [st= 31]   +HTTP_TRANSACTION_READ_BODY  [dt=7]
t=745 [st= 35]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1360
                    --> stream_id = 3
                    --> window_size = 6290096
t=745 [st= 35]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1369
                    --> stream_id = 3
                    --> window_size = 6288727
t=745 [st= 35]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1369
                    --> stream_id = 3
                    --> window_size = 6287358
t=746 [st= 36]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1459
                    --> stream_id = 3
                    --> window_size = 6285899
t=748 [st= 38]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1360
                    --> stream_id = 3
                    --> window_size = 6287259
t=748 [st= 38]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1369
                    --> stream_id = 3
                    --> window_size = 6288628
t=748 [st= 38]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1369
                    --> stream_id = 3
                    --> window_size = 6289997
t=748 [st= 38]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1459
                    --> stream_id = 3
                    --> window_size = 6291456
t=748 [st= 38]   -HTTP_TRANSACTION_READ_BODY
t=748 [st= 38]    URL_REQUEST_JOB_BYTES_READ
                  --> byte_count = 5557
t=748 [st= 38]    URL_REQUEST_JOB_FILTERED_BYTES_READ
                  --> byte_count = 16389
t=748 [st= 38]   +HTTP_TRANSACTION_READ_BODY  [dt=16]
t=760 [st= 50]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -2729
                    --> stream_id = 3
                    --> window_size = 6288727
t=761 [st= 51]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1369
                    --> stream_id = 3
                    --> window_size = 6287358
t=762 [st= 52]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1407
                    --> stream_id = 3
                    --> window_size = 6285951
t=764 [st= 54]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 2729
                    --> stream_id = 3
                    --> window_size = 6288680
t=764 [st= 54]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1369
                    --> stream_id = 3
                    --> window_size = 6290049
t=764 [st= 54]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1407
                    --> stream_id = 3
                    --> window_size = 6291456
t=764 [st= 54]   -HTTP_TRANSACTION_READ_BODY
t=764 [st= 54]    URL_REQUEST_JOB_BYTES_READ
                  --> byte_count = 5505
t=764 [st= 54]    URL_REQUEST_JOB_FILTERED_BYTES_READ
                  --> byte_count = 16384
t=765 [st= 55]   +HTTP_TRANSACTION_READ_BODY  [dt=6]
t=768 [st= 58]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1360
                    --> stream_id = 3
                    --> window_size = 6290096
t=768 [st= 58]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1369
                    --> stream_id = 3
                    --> window_size = 6288727
t=768 [st= 58]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1935
                    --> stream_id = 3
                    --> window_size = 6286792
t=771 [st= 61]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1360
                    --> stream_id = 3
                    --> window_size = 6288152
t=771 [st= 61]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1369
                    --> stream_id = 3
                    --> window_size = 6289521
t=771 [st= 61]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1935
                    --> stream_id = 3
                    --> window_size = 6291456
t=771 [st= 61]   -HTTP_TRANSACTION_READ_BODY
t=771 [st= 61]    URL_REQUEST_JOB_BYTES_READ
                  --> byte_count = 4664
t=771 [st= 61]    URL_REQUEST_JOB_FILTERED_BYTES_READ
                  --> byte_count = 16378
t=771 [st= 61]   +HTTP_TRANSACTION_READ_BODY  [dt=9]
t=777 [st= 67]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -2729
                    --> stream_id = 3
                    --> window_size = 6288727
t=777 [st= 67]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1369
                    --> stream_id = 3
                    --> window_size = 6287358
t=777 [st= 67]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -785
                    --> stream_id = 3
                    --> window_size = 6286573
t=780 [st= 70]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 2729
                    --> stream_id = 3
                    --> window_size = 6289302
t=780 [st= 70]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1369
                    --> stream_id = 3
                    --> window_size = 6290671
t=780 [st= 70]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 785
                    --> stream_id = 3
                    --> window_size = 6291456
t=780 [st= 70]   -HTTP_TRANSACTION_READ_BODY
t=780 [st= 70]    URL_REQUEST_JOB_BYTES_READ
                  --> byte_count = 4883
t=780 [st= 70]    URL_REQUEST_JOB_FILTERED_BYTES_READ
                  --> byte_count = 16384
t=780 [st= 70]   +HTTP_TRANSACTION_READ_BODY  [dt=7]
t=784 [st= 74]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -2729
                    --> stream_id = 3
                    --> window_size = 6288727
t=784 [st= 74]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1369
                    --> stream_id = 3
                    --> window_size = 6287358
t=784 [st= 74]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -1124
                    --> stream_id = 3
                    --> window_size = 6286234
t=787 [st= 77]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 2729
                    --> stream_id = 3
                    --> window_size = 6288963
t=787 [st= 77]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1369
                    --> stream_id = 3
                    --> window_size = 6290332
t=787 [st= 77]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 1124
                    --> stream_id = 3
                    --> window_size = 6291456
t=787 [st= 77]   -HTTP_TRANSACTION_READ_BODY
t=787 [st= 77]    URL_REQUEST_JOB_BYTES_READ
                  --> byte_count = 5222
t=787 [st= 77]    URL_REQUEST_JOB_FILTERED_BYTES_READ
                  --> byte_count = 16389
t=787 [st= 77]   +HTTP_TRANSACTION_READ_BODY  [dt=6]
t=791 [st= 81]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -2729
                    --> stream_id = 3
                    --> window_size = 6288727
t=791 [st= 81]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = -2142
                    --> stream_id = 3
                    --> window_size = 6286585
t=793 [st= 83]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 2729
                    --> stream_id = 3
                    --> window_size = 6289314
t=793 [st= 83]      HTTP2_STREAM_UPDATE_RECV_WINDOW
                    --> delta = 2142
                    --> stream_id = 3
                    --> window_size = 6291456
t=793 [st= 83]   -HTTP_TRANSACTION_READ_BODY
t=794 [st= 84]    URL_REQUEST_JOB_BYTES_READ
                  --> byte_count = 4871
t=794 [st= 84]    URL_REQUEST_JOB_FILTERED_BYTES_READ
                  --> byte_count = 16385
t=794 [st= 84]   +HTTP_TRANSACTION_READ_BODY  [dt=25]
t=819 [st=109]      HTTP2_STREAM_ERROR
                    --> description = "Server reset stream."
                    --> net_error = "ERR_SPDY_PROTOCOL_ERROR"
                    --> stream_id = 3
t=819 [st=109]   -HTTP_TRANSACTION_READ_BODY
                  --> net_error = -337 (ERR_SPDY_PROTOCOL_ERROR)
t=819 [st=109]    FAILED
                  --> net_error = -337 (ERR_SPDY_PROTOCOL_ERROR)
t=820 [st=110] -REQUEST_ALIVE
                --> net_error = -337 (ERR_SPDY_PROTOCOL_ERROR)

Are you running this behind Nginx/another proxy, or just purely Discourse?

The Discourse is running behind an Nginx reverse proxy.

This topic was automatically closed after 14 days. New replies are no longer allowed.