net::ERR_HTTP2_PROTOCOL_ERROR 200 来自 chrome

时间:2021-08-02 00:01:47

标签: nginx http2

大家好,我目前收到一个 net::ERR_HTTP2_PROTOCOL_ERROR 200 并且在测试我的应用程序时对导致问题的原因有点困惑。前端在 react 中完成,后端在 golang 中完成。我的应用程序在过去几周内一直成功运行,但截至昨天遇到此错误,并且一直在努力了解导致错误的原因或罪魁祸首。我的应用程序位于 nginx 后面。当我访问该页面并且无法从 chrome 上的网络选项卡加载时,我清楚地看到了这个错误,但不确定是什么导致了这个错误。

这是我的 nginx 配置:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;


    sendfile        on;

    keepalive_timeout  65;

    server {
        listen 443 http2 ssl;                                                                                                                                                                           
        listen [::]:443 http2 ssl;

        server_name myadminaccount.dev.me;
        ssl_certificate /Users/mylocal/.localcerts/full_chain.pem;
        ssl_certificate_key /Users/mylocal/.localcerts/private.key;

        location / {
            proxy_pass http://localhost:4000;
        }
    }

    include servers/*;
}

当我从 nginx 访问日志时,这是我在下面看到的:

2021/08/01 16:50:46 [crit] 266#0: *233 open() "/usr/local/var/run/nginx/proxy_temp/2/04/0000000042" failed (13: Permission denied) while reading upstream, client: 127.0.0.1, server: myadminaccount.dev.me, request: "GET /main.js HTTP/2.0", upstream: "http://127.0.0.1:4000/main.js", host: "myadminaccount.dev.me", referrer: "https://myadminaccount.dev.me/"
2021/08/01 16:50:46 [error] 266#0: *233 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: 127.0.0.1, server: myadminaccount.dev.me, request: "GET /favicon.ico HTTP/2.0", upstream: "http://[::1]:4000/favicon.ico", host: "myadminaccount.dev.me", referrer: "https://myadminaccount.dev.me/"

我在谷歌上搜索了错误并遇到了这个 post 但没有成功。欢迎提出任何建议。

0 个答案:

没有答案