Red5 Pro:意外响应代码:400 &WebSocketException - 握手失败 [英] Red5 Pro: Unexpected response code: 400 & WebSocketException - Handshake failed

查看:40
本文介绍了Red5 Pro:意外响应代码:400 &WebSocketException - 握手失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地设置了

我没有修改服务器代码中的任何内容.我应该在某处手动启用 WebSocketWebRTC 吗?我在 Red5 Pro WebRTC 中没有找到任何相关信息.我不认为我的电脑有问题 - 它以前也发生在我的工作场所.有什么奇怪的 - 如果我提供密钥,我可以与 API 连接,例如我可以使用 Postman 列出流.感谢您抽出宝贵时间,提前感谢您的帮助.

附言我还在 Red5Pro 社区.真正奇怪的是,当我运行 .bat 时,它可以在 Windows 10 上运行,但当我以管理员权限运行它时就不行了.它也不适用于调试版本,也不适用于我工作中 Windows 7 上的任何版本(与此处描述的错误相同).

解决方案

这是缺少库的问题,我没有在 Windows 7 上解决它,但是在我们本地开发服务器上的 Linux 我们必须安装缺少的软件依赖项:

<块引用>

$ apt-get 安装 libva1

$ apt-get install libva-drm1

$ apt-get install libva-x11-1

$ apt-get 安装 libvdpau1

I set Red5 Pro server on developer licence locally, then I ran red5pro/streaming-android application (I ran app from Android Studio). I saw on http://localhost:5080/live/subscribe.jsp my stream from application, and when I clicked http://[my IP]/live/viewer.jsp?host=192.168.1.103&stream=Radek[Stream name in Android app] to subscribe it opens, but in log on page I saw:

[Red5ProSubscriber] Connect.Failure.

And in Chrome Developer Tools:

WebSocket connection to 'ws://[my IP]:8081/live?id=subscriber-2bb5' failed: Error during WebSocket handshake: Unexpected response code: 400

In cmd I saw:

org.red5.net.websocket.codec.WebSocketDecoder - Handshake failed org.red5.net.websocket.WebSocketException - Handshake failed, path not enabled.

Here is log from cmd:

I did not modify anything in server code. Should I manually enable WebSocket or WebRTC somewhere? I didn't find anything about it in Red5 Pro WebRTC. I don't think something is wrong with my PC - it happens before also in my workplace. What is weird - if I provide key I can connect with API, for example I can list streams with Postman. I will be grateful to you for taking the time, thank you in advance for help.

P.S. I also created a post in Red5Pro community. What is really weird, it works on Windows 10 when I run .bat, but not when I run it with administrator privileges. It also won't work for debug version, and it won't work for any version on Windows 7 in my work (the same error as described here).

解决方案

It was problem with missing libraries, I didn't solve it on Windows 7, but on our local development server on Linux we had to install missing software dependencies:

$ apt-get install libva1

$ apt-get install libva-drm1

$ apt-get install libva-x11-1

$ apt-get install libvdpau1

这篇关于Red5 Pro:意外响应代码:400 &amp;WebSocketException - 握手失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆