首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
视频直播项目
yu1. 在提交问答前请尽可能回答以下问题: **github 项目地址**: https://github.com/swoole-plus/webrtc 2. 请详细描述问题的产生过程,贴出相关的代码,最好能提供一份可稳定重现的简单脚本代码。 ```php $server = new Swoole\Coroutine\Http\Server('0.0.0.0', 9509, true); $server->set( [ 'ssl_key_file' =>'/etc/nginx/ssl/sihuocy.cn.key', 'ssl_cert_file' =>'/etc/nginx/ssl/sihuocy.cn.crt', ] ); ``` 设置的key以及crt为腾讯云申请的免费证书,然后页面连接报错 3. 期望的结果是什么? https://webrtc.dingjw.com/room.php?cid=2 4. 实际运行的结果是什么? WebSocket {url: "wss://192.168.135.131:9509/", readyState: 0, bufferedAmount: 0, onopen: null, onerror: null, …} room.php?cid=1:94 WebSocket connection to 'wss://192.168.135.131:9509/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED 5. 你的版本? 贴出 `php --ri swoole` 所打印的内容 swoole Swoole => enabled Author => Swoole Team <team@swoole.com> Version => 4.4.16 Built => Apr 21 2020 22:50:51 coroutine => enabled epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled openssl => OpenSSL 1.0.2k-fips 26 Jan 2017 pcre => enabled zlib => 1.2.7 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On 6. 你使用的机器系统环境是什么(包括内核、PHP、gcc编译器版本信息)?可以使用`uname -a`, `php -v`, `gcc -v` 命令打印 Linux 192.168.135.131 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux PHP 7.4.3 (cli) (built: Feb 29 2020 05:33:23) ( ZTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
发布于4年前 · 3 次浏览 · 来自
提问
sihuo2020
yu1. 在提交问答前请尽可能回答以下问题: **github 项目地址**: https://github.com/swoole-plus/webrtc 2. 请详细描述问题的产生过程,贴出相关的代码,最好能提供一份可稳定重现的简单脚本代码。 ```php $server = new Swoole\Coroutine\Http\Server('0.0.0.0', 9509, true); $server->set( [ 'ssl_key_file' =>'/etc/nginx/ssl/sihuocy.cn.key', 'ssl_cert_file' =>'/etc/nginx/ssl/sihuocy.cn.crt', ] ); ``` 设置的key以及crt为腾讯云申请的免费证书,然后页面连接报错 3. 期望的结果是什么? https://webrtc.dingjw.com/room.php?cid=2 4. 实际运行的结果是什么? WebSocket {url: "wss://192.168.135.131:9509/", readyState: 0, bufferedAmount: 0, onopen: null, onerror: null, …} room.php?cid=1:94 WebSocket connection to 'wss://192.168.135.131:9509/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED 5. 你的版本? 贴出 `php --ri swoole` 所打印的内容 swoole Swoole => enabled Author => Swoole Team <team@swoole.com> Version => 4.4.16 Built => Apr 21 2020 22:50:51 coroutine => enabled epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled openssl => OpenSSL 1.0.2k-fips 26 Jan 2017 pcre => enabled zlib => 1.2.7 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled async_redis => enabled Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On 6. 你使用的机器系统环境是什么(包括内核、PHP、gcc编译器版本信息)?可以使用`uname -a`, `php -v`, `gcc -v` 命令打印 Linux 192.168.135.131 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux PHP 7.4.3 (cli) (built: Feb 29 2020 05:33:23) ( ZTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2020-04-23
Lucifers
![](/storage/article-column/fxiyLYOFbEpMlKAq8wRc7xdqq99v1GDhB2NWPcW8.png) 试试设置下这个 我设置了这个没问题了
赞
1
回复
2020-04-23
鲸落
我测试是正常的,浏览器是不是用的https协议
赞
0
回复
2020-04-23
sihuo2020
回复
鲸落
是的, 配置了https, 也是使用了免费证书 然后配置wss的时候,在连接的时候报错
赞
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一直是同一个。没用使用到多进程啊。