You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

libwebsockets在RPI4 Ubuntu22.04执行Ping时遇CLIENT_CONNECTION_ERROR求助

关于libwebsockets在RPI4 Ubuntu 22.04上的CLIENT_CONNECTION_ERROR问题

我从未使用过libwebsockets,目前遇到瓶颈。在安装了Ubuntu 22.04的RPI4上运行代码,尝试连接同一WiFi网络下的Windows 10笔记本(二者可通过命令行互相Ping通),但代码运行时抛出CLIENT_CONNECTION_ERROR。该代码在x86_64虚拟机的Ubuntu 20.04上可正常运行,但在RPI4上无法工作。

错误日志如下:

[2022/12/18 14:52:36:0612] N: lws_create_context: LWS: 4.3.99-v4.3.0-275-gec6d5ac6, NET CLI SRV H1 H2 WS SS-JSON-POL ConMon IPv6-absent
[2022/12/18 14:52:36:0716] N: __lws_lc_tag:  ++ [wsi|0|pipe] (1)
[2022/12/18 14:52:36:0758] N: __lws_lc_tag:  ++ [vh|0|netlink] (1)
[2022/12/18 14:52:36:0781] N: __lws_lc_tag:  ++ [vh|1|default||-1] (2)
[2022/12/18 14:52:36:0845] N: lws_tls_client_create_vhost_context: doing cert filepath
[2022/12/18 14:52:36:0895] N: HttpPing: connecting to 192.168.1.4:7778
[2022/12/18 14:52:36:0905] N: __lws_lc_tag:  ++ [wsicli|0|GET/h1/default/192.168.1.4] (1)
[2022/12/18 14:52:36:0907] N: [wsicli|0|GET/h1/default/192.168.1.4]: lws_client_connect_3_connect: trying 192.168.1.4
CLIENT_CONNECTION_ERROR: Unable to connect
[2022/12/18 14:52:38:0927] N: __lws_lc_untag:  -- [wsicli|0|GET/h1/default/192.168.1.4] (0) 2.002s
[2022/12/18 14:52:38:0932] N: __lws_lc_untag:  -- [wsi|0|pipe] (0) 2.021s
[2022/12/18 14:52:38:0933] N: __lws_lc_untag:  -- [vh|0|netlink] (1) 2.017s
[2022/12/18 14:52:38:0934] N: __lws_lc_untag:  -- [vh|1|default||-1] (0) 2.015s

已尝试的解决措施:

  • 编译libwebsockets时执行命令:cmake .. -DLWS_IPV6=OFF禁用IPV6
  • 关闭Ubuntu防火墙

内容的提问来源于stack exchange,提问作者ashutosh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.07 12:30:55