有没有大哥帮我看看这是咋回事
我用的是 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");
一会可以一会不行
运行 php start.php status 看下是不是有进程退出。
还有 php start.php stop,停止服务,然后ps auxf 看下是不是还有gatewayWorker启动着
root 12862 0.0 0.3 299944 12020 ? S 06:30 0:00 WorkerMan: master process start_file=/www/wwwroot/greentp/think
root 4424 0.0 0.4 302272 16260 ? S 09:25 0:00 _ WorkerMan: worker process chat websocket://0.0.0.0:20005
root 2656 0.0 0.3 300208 13452 ? S Nov17 0:00 WorkerMan: master process start_file=/www/wwwroot/greentp/think
root 30830 0.0 0.3 300208 15180 ? S 08:44 0:00 _ WorkerMan: worker process chat websocket://0.0.0.0:20005
非常感谢老哥 我杀了进程就好了 谢谢 ,!!!!!