小程序使用wss协议访问gatewayworker,出现以下报错
WebSocket connection to 'wss://bafanghui.xinnar.net/wss' failed: Error during WebSocket handshake: Unexpected response code: 502
监听返回的报错信息如下:错误内容我没看懂.
PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request in /data/release/bafanghui_chatroom/vendor/workerman/workerman/Connection/TcpConnection.php on line 567
Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request in /data/release/bafanghui_chatroom/vendor/workerman/workerman/Connection/TcpConnection.php on line 567
SSL Handshake fail.
Buffer:54502f312e310d0a557067726164653a20776562736f636b65740d0a436f6e6e656374696f6e3a20757067726164650d0a486f73743a206266685f776562736f636b65740d0a507261676d613a206e6f2d63616368650d0a43616368652d436f6e74726f6c3a206e6f2d63616368650d0a4f726967696e3a20687474703a2f2f626166616e676875692e6465760d0a5365632d576562536f636b65742d56657273696f6e3a2031330d0a557365722d4167656e743a204d6f7a696c6c612f352e30202857696e646f7773204e542031302e303b20574f57363429204170706c655765624b69742f3533372e333620284b48544d4c2c206c696b65204765636b6f29204368726f6d652f36302e302e333131322e37205361666172692f3533372e33360d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174652c2062720d0a4163636570742d4c616e67756167653a207a682d434e2c7a683b713d302e380d0a5365632d576562536f636b65742d4b65793a2072466f6f4156333871347a463850436f4d55387962773d3d0d0a5365632d576562536f636b65742d457874656e73696f6e733a207065726d6573736167652d6465666c6174653b20636c69656e745f6d61785f77696e646f775f626974730d0a0d0a
[attach]911[/attach]
我是配置了443端口转发到6501端口访问的,会是这个配置的问题吗?
[attach]912[/attach]
nginx代理了ssl,gateway就不用开ssl了,开了两层ssl会出问题。
真的是这样,成功了,谢谢大佬!
您好 问题解决了吗?我nginx代理了ssl,gateway没有代理也不行 求指导
我把gateway的取消了,然后就可以了,你是不是nginx代理设置的不对?
你报的错误和我的一样吗?
我的一直是502 您方便把您的nginx配置贴一下吗
upstream bfh_websocket {
ip_hash; #分布式部署时可启用
}
server {
listen 443;
}
谢谢 原来是我小程序里写错了 ⊙﹏⊙‖∣ 配置差不多
我的配置和你的差不多,但为什么链接的时候报502
在哪儿配置?第一次写小程序