[LayaAir2]ios native连腾讯云的负载均衡无法成功,web和android正常
直接导出ios工程就可以复现到。
正常点击连接按钮,会发送hello消息到服务器,服务器回复hello回来。
ios连接失败时log如下:
new JSWebSocket::this={public}x deletgate={public}x
WebSocket::init m_host: apps-gz-vpc2.uufuns.com, m_port: 443, m_path: /echodemo/
[2024/10/08 20:02:28:3500] NOTICE: Initial logging level 7
[2024/10/08 20:02:28:3504] NOTICE: Libwebsockets version: 2.3.0 layabox_mac@localhost-
[2024/10/08 20:02:28:3504] NOTICE: IPV6 compiled in and enabled
[2024/10/08 20:02:28:3504] NOTICE: libev support not compiled in
[2024/10/08 20:02:28:3504] NOTICE: libuv support not compiled in
[2024/10/08 20:02:28:3505] NOTICE: Threads: 1 each 2560 fds
[2024/10/08 20:02:28:3505] NOTICE: mem: platform fd map: 20480 bytes
[2024/10/08 20:02:28:3509] NOTICE: Compiled with OpenSSL support
[2024/10/08 20:02:28:3509] NOTICE: Doing SSL library init
[2024/10/08 20:02:28:3538] NOTICE: mem: per-conn: 584 bytes + protocol rx buf
find ca file in [/private/var/containers/Bundle/Application/772158C6-851D-42E6-B1CA-78EFB38B8F10/layabox.app/ca/cacert.pem]
[2024/10/08 20:02:28:3588] NOTICE: Creating Vhost 'default' port -1, 1 protocols, IPv6 on
[2024/10/08 20:02:28:3753] NOTICE: lws_client_connect_2: 0x1270b2a80: address apps-gz-vpc2.uufuns.com
[2024/10/08 20:02:28:3804] NOTICE: Connect failed errno=65
JSWebSocketDelegate::onError( code={public}d )this={public}x ws={public}x
JSWebSocketDelegate::onError123( code={public}d )this={public}x ws={public}x
[2024/10/08 20:02:28:3806] NOTICE: lws_context_destroy: ctx 0x12706aa00
[2024/10/08 20:02:28:3806] NOTICE: lws_vhost_destroy1
JSWebSocketDelegate::onClose()this={public}x ws={public}x
[2024/10/08 20:02:28:3807] NOTICE: lws_context_destroy2: ctx 0x12706aa00
[2024/10/08 20:02:28:3807] NOTICE: lws_vhost_destroy2: 0x12707e800
[2024/10/08 20:02:28:3825] NOTICE: lws_vhost_destroy2: Freeing vhost 0x12707e800
JSWebSocket::close this=30c8700 deletgate=7a3120
JSWebSocket::close this=30c8700 deletgate=7a3120
connect error:"error"
JSWebSocket::onSocketCloseCallJSFunction this=30c8700
正常点击连接按钮,会发送hello消息到服务器,服务器回复hello回来。
ios连接失败时log如下:
new JSWebSocket::this={public}x deletgate={public}x
WebSocket::init m_host: apps-gz-vpc2.uufuns.com, m_port: 443, m_path: /echodemo/
[2024/10/08 20:02:28:3500] NOTICE: Initial logging level 7
[2024/10/08 20:02:28:3504] NOTICE: Libwebsockets version: 2.3.0 layabox_mac@localhost-
[2024/10/08 20:02:28:3504] NOTICE: IPV6 compiled in and enabled
[2024/10/08 20:02:28:3504] NOTICE: libev support not compiled in
[2024/10/08 20:02:28:3504] NOTICE: libuv support not compiled in
[2024/10/08 20:02:28:3505] NOTICE: Threads: 1 each 2560 fds
[2024/10/08 20:02:28:3505] NOTICE: mem: platform fd map: 20480 bytes
[2024/10/08 20:02:28:3509] NOTICE: Compiled with OpenSSL support
[2024/10/08 20:02:28:3509] NOTICE: Doing SSL library init
[2024/10/08 20:02:28:3538] NOTICE: mem: per-conn: 584 bytes + protocol rx buf
find ca file in [/private/var/containers/Bundle/Application/772158C6-851D-42E6-B1CA-78EFB38B8F10/layabox.app/ca/cacert.pem]
[2024/10/08 20:02:28:3588] NOTICE: Creating Vhost 'default' port -1, 1 protocols, IPv6 on
[2024/10/08 20:02:28:3753] NOTICE: lws_client_connect_2: 0x1270b2a80: address apps-gz-vpc2.uufuns.com
[2024/10/08 20:02:28:3804] NOTICE: Connect failed errno=65
JSWebSocketDelegate::onError( code={public}d )this={public}x ws={public}x
JSWebSocketDelegate::onError123( code={public}d )this={public}x ws={public}x
[2024/10/08 20:02:28:3806] NOTICE: lws_context_destroy: ctx 0x12706aa00
[2024/10/08 20:02:28:3806] NOTICE: lws_vhost_destroy1
JSWebSocketDelegate::onClose()this={public}x ws={public}x
[2024/10/08 20:02:28:3807] NOTICE: lws_context_destroy2: ctx 0x12706aa00
[2024/10/08 20:02:28:3807] NOTICE: lws_vhost_destroy2: 0x12707e800
[2024/10/08 20:02:28:3825] NOTICE: lws_vhost_destroy2: Freeing vhost 0x12707e800
JSWebSocket::close this=30c8700 deletgate=7a3120
JSWebSocket::close this=30c8700 deletgate=7a3120
connect error:"error"
JSWebSocket::onSocketCloseCallJSFunction this=30c8700
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
devyding
赞同来自:
用单纯ipv4的域名测试是正常的。看libwebsocket的changelog,是4.0.0加入了对这种dns的支持,咱们库可以更新一下吗?
用的 Laya 2.x