小程序使用gateway握手失败,返回502

0

小程序使用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


图片


我是配置了443端口转发到6501端口访问的,会是这个配置的问题吗?


图片

已邀请:

walkor

赞同来自: JasonKit

nginx代理了ssl,gateway就不用开ssl了,开了两层ssl会出问题。

jjfly

赞同来自:

您好 问题解决了吗?我nginx代理了ssl,gateway没有代理也不行 求指导

楊zzzzzz

赞同来自:

我的一直是502 您方便把您的nginx配置贴一下吗

赵磊 - 90后

赞同来自:

在哪儿配置?第一次写小程序

要回复问题请先登录注册