首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
关于websocket的ssl问题
再https下 用wss连接swoole的webscoket服务器 握手失败 服务端报错 {{{ [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=18|from_id=2|type=11 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=19|from_id=2|type=1 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/network/Server.c:131@swServer_master_onAccept][Master] Accept new connection. maxfd=22|reactor_id=2|conn=23 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=18|from_id=2|type=11 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=19|from_id=2|type=1 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/network/Server.c:131@swServer_master_onAccept][Master] Accept new connection. maxfd=23|reactor_id=2|conn=24 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/factory/FactoryProcess.c:245@swFactoryProcess_finish][Worker] send: sendn=12|type=4|content=(null) [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/network/ReactorThread.c:289@swReactorThread_close]Close Event.fd=23|from=1 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/factory/FactoryProcess.c:245@swFactoryProcess_finish][Worker] send: sendn=12|type=4|content=(null) [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/network/ReactorThread.c:289@swReactorThread_close]Close Event.fd=24|from=0 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/network/ReactorThread.c:355@swReactorThread_close]set_maxfd=23|close_fd=24 }}} web端报错 {{{ WebSocket connection to 'wss://{}' failed: Error in connection establishment: net::ERR_TIMED_OUT }}} 确定是在https发起的连接 下 确定swoole编译加入了open-ssl 确认连接的wss 证书配置 {{{ 'ssl_cert_file' => WEBPATH . '/ssl_key/server.crt', 'ssl_key_file' => WEBPATH . '/ssl_key/server.key', }}} 这书是证书签发商给我的 给的是pem 但是 那边说直接把pem改成crt就可以用 所以这个server.crt 实际是 server.pem改名的 求问 还有可能是什么问题啊
发布于7年前 · 3 次浏览 · 来自
提问
N
Nan
再https下 用wss连接swoole的webscoket服务器 握手失败 服务端报错 {{{ [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=18|from_id=2|type=11 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=19|from_id=2|type=1 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/network/Server.c:131@swServer_master_onAccept][Master] Accept new connection. maxfd=22|reactor_id=2|conn=23 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=18|from_id=2|type=11 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/reactor/ReactorPoll.c:245@swReactorPoll_wait]Event: fd=19|from_id=2|type=1 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/network/Server.c:131@swServer_master_onAccept][Master] Accept new connection. maxfd=23|reactor_id=2|conn=24 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/factory/FactoryProcess.c:245@swFactoryProcess_finish][Worker] send: sendn=12|type=4|content=(null) [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/network/ReactorThread.c:289@swReactorThread_close]Close Event.fd=23|from=1 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/factory/FactoryProcess.c:245@swFactoryProcess_finish][Worker] send: sendn=12|type=4|content=(null) [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/network/ReactorThread.c:289@swReactorThread_close]Close Event.fd=24|from=0 [/www/software/swoole/swoole-src-swoole-1.7.22-stable/src/network/ReactorThread.c:355@swReactorThread_close]set_maxfd=23|close_fd=24 }}} web端报错 {{{ WebSocket connection to 'wss://{}' failed: Error in connection establishment: net::ERR_TIMED_OUT }}} 确定是在https发起的连接 下 确定swoole编译加入了open-ssl 确认连接的wss 证书配置 {{{ 'ssl_cert_file' => WEBPATH . '/ssl_key/server.crt', 'ssl_key_file' => WEBPATH . '/ssl_key/server.key', }}} 这书是证书签发商给我的 给的是pem 但是 那边说直接把pem改成crt就可以用 所以这个server.crt 实际是 server.pem改名的 求问 还有可能是什么问题啊
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2017-05-17
贝
贝贝
`wss://{}` 这个很奇怪,完全没有IP和PORT
赞
0
回复
2018-09-02
悟
悟空CRM-小白龙
请问上述问题后来是怎么解决的呢?可否说明一下,谢谢!目前遇到了类似的问题,提示“WebSocket connection to 'wss://...' failed: WebSocket opening handshake timed out”!
赞
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一直是同一个。没用使用到多进程啊。