Error during WebSocket handshake: net::ERR_CONNECTION_RESET

0

有没有大哥帮我看看这是咋回事
我用的是 gateway
连接的时候 一下可以 一下不行的
这是nginx的配置



server
{
listen 20005;
listen 443 ssl http2;
server_name chatnew.test.com;
root /www/wwwroot/testnew;

#SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
#error_page 404/404.html;
ssl_certificate /www/server/panel/vhost/cert/chatnew.test.com/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/chatnew.test.com/privkey.pem;
ssl_protocols SSLv3 SSLv2 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000";
error_page 497 https://$host$request_uri;

#SSL-END

location /wss {
proxy_redirect off;
proxy_pass http://ip:20005; # 转发
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
}
}

这是前断连接的


var ws = new WebSocket("ws://chatnew.test.com:20005");

一会可以一会不行


截图

已邀请:

six

赞同来自:

运行 php start.php status 看下是不是有进程退出。
还有 php start.php stop,停止服务,然后ps auxf 看下是不是还有gatewayWorker启动着

要回复问题请先登录注册