Red5 Pro: Unexpected response code: 400 & WebSocketException - Handshake failed

社会主义新天地 提交于 2019-12-10 10:32:16

问题


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).


回答1:


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



来源:https://stackoverflow.com/questions/41202595/red5-pro-unexpected-response-code-400-websocketexception-handshake-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!