首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
websocket客户端无法建立wss连接
hi,我在编译swoole时加入了--enable-openssl,也在websocket_server.php中开启了open_ssl选项,但是客户端仍然无法连接到wss,以下是日志: {{{ [/root/swoole/swoole-src-swoole-1.7.21-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=5|from_id=1|type=11 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=6|from_id=1|type=1 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/network/Server.c:131@swServer_master_onAccept][Master] Accept new connection. maxfd=8|reactor_id=1|conn=9 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/factory/FactoryProcess.c:261@swFactoryProcess_finish][Worker] send: sendn=12|type=4|content=(null) [/root/swoole/swoole-src-swoole-1.7.21-stable/src/network/ReactorThread.c:264@swReactorThread_close]Close Event.fd=9|from=0 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/network/ReactorThread.c:330@swReactorThread_close]set_maxfd=8|close_fd=9 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=5|from_id=1|type=11 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=6|from_id=1|type=1 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/network/Server.c:131@swServer_master_onAccept][Master] Accept new connection. maxfd=8|reactor_id=1|conn=9 [2015-12-12 15:45:12 #8229.0] WARN swSSL_accept: bad SSL client[101.81.16.150:55499] . [2015-12-12 15:45:12 *8233.0] WARN swServer_connection_verify: SSL not ready [2015-12-12 15:45:12 *8233.0] WARN swFactoryProcess_finish: session#4 does not exist. }}} 上面几行为使用wss连接的报错,下面warn是ws连接的错误
发布于8年前 · 5 次浏览 · 来自
提问
c
ccc
hi,我在编译swoole时加入了--enable-openssl,也在websocket_server.php中开启了open_ssl选项,但是客户端仍然无法连接到wss,以下是日志: {{{ [/root/swoole/swoole-src-swoole-1.7.21-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=5|from_id=1|type=11 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=6|from_id=1|type=1 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/network/Server.c:131@swServer_master_onAccept][Master] Accept new connection. maxfd=8|reactor_id=1|conn=9 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/factory/FactoryProcess.c:261@swFactoryProcess_finish][Worker] send: sendn=12|type=4|content=(null) [/root/swoole/swoole-src-swoole-1.7.21-stable/src/network/ReactorThread.c:264@swReactorThread_close]Close Event.fd=9|from=0 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/network/ReactorThread.c:330@swReactorThread_close]set_maxfd=8|close_fd=9 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=5|from_id=1|type=11 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=6|from_id=1|type=1 [/root/swoole/swoole-src-swoole-1.7.21-stable/src/network/Server.c:131@swServer_master_onAccept][Master] Accept new connection. maxfd=8|reactor_id=1|conn=9 [2015-12-12 15:45:12 #8229.0] WARN swSSL_accept: bad SSL client[101.81.16.150:55499] . [2015-12-12 15:45:12 *8233.0] WARN swServer_connection_verify: SSL not ready [2015-12-12 15:45:12 *8233.0] WARN swFactoryProcess_finish: session#4 does not exist. }}} 上面几行为使用wss连接的报错,下面warn是ws连接的错误
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2017-04-10
f
funnymaker
已解决。 客户端使用javascript连接。将html部署在https的环境下连接成功。 希望对其他人有所帮助。
赞
0
回复
微信公众号
热门内容
暂无回复的问答
- CodeGalaxy K3s 轻量集群节点之间如何实现负载均衡
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。