Streamedian / html5_rtsp_player

Play RTSP stream from IP camera in browser in this HTML5 player without plugins
Apache License 2.0
2.61k stars 598 forks source link

asio async_write error [transport:ws] [ctrl] close. code: 1006 unknown reason #133

Open MartinKayJr opened 5 years ago

MartinKayJr commented 5 years ago

Chinese: 这是一起streamedian长时间稳定性测试车祸事件。

我大致说明一下我的环境: liucheng

我的计划是在浏览器中播放12小时的监控,试图测试streamedian是否稳定,以便我继续购买收费的许可证。

但在我离开公司后,第二天来到电脑前,这个监控他竟然在我离开30分钟后发生了车祸事件,我于是查看了F12控制台,并没有什么有效的错误信息,于是请了运维在服务器中发现了一些错误信息,但我并不是很明白。

1

2

English:

This is a streamedian long-term stability test car accident event.

I will outline my environment: liucheng

My plan is to play 12 hours of monitoring in the browser, trying to test whether the streamedian is stable so that I can continue to purchase the paid license.

But after I left the company, I came to the computer the next day. This monitoring happened to me after 30 minutes of leaving the car accident. I checked the F12 console and there was no valid error message, so I asked for it. Dimensions found some error messages in the server, but I don't quite understand.

1

2

MakdDevelop commented 5 years ago

Hi. Did you restart the proxy to restore work after error happens?

MartinKayJr commented 5 years ago

Chinese: 谢谢你回复。是的,在刷新页面后再次发起视频请求是可以的,但我的上级说明这是不稳定,我在多次测试后都无法找到问题所在。不过可以确定的是每次Linux日志都有提到 end of file和通道被破坏

English: Thank you for your reply. Yes, it is okay to start the video request again after refreshing the page, but my superiors explained that this is unstable. I can't find the problem after many tests. However, it is certain that every time the Linux log mentions end of file and the channel is destroyed.

MakdDevelop commented 5 years ago

Looks like the camera connection losing. Some issue present with restore connection feature. See disconnect processing in the websocket.js

MartinKayJr commented 5 years ago

抱歉,我并不明白你的意思,能更详细的说明一下吗?麻烦您了!

MartinKayJr commented 5 years ago

Sorry, I don't understand what you mean. Can you explain it in more detail?I am very sorry to bother you!

victorgrenke commented 5 years ago

there is no reconnect mechanizm in the current player. try to use v1.8.4 from https://streamedian.com

MartinKayJr commented 5 years ago

The streamedian version I am using is 1.8.4.

Below is a more detailed error log I got from the linux server:

Aug 28 13:58:11 localhost websock_rtsp_proxy: rtsp send: Broken pipe Aug 28 13:58:11 localhost websock_rtsp_proxy: [2019-08-28 13:58:11] [disconnect] Disconnect close local:[1011,Remote write error] remote:[1006] Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-41 2072269082: connection closed Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnecting rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnected rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: destroy plugin Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnecting rtsp remote Aug 28 13:58:11 localhost websock_rtsp_proxy: [disconnecting rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnected rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: 2019-08-28 13:58:11] [disconnect] Disconnect close local:[1011,Remote write error] remote:[1006]localhost-41 2072269082: backend destroyed Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-41 2072269082: disconnecting data socket Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-41 2072269082: session destroyed Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-41 2072269082: control diconnected Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-41 2072269082: disconnected data socket Aug 28 13:58:11 localhost websock_rtsp_proxy: GET_PARAMETER rtsp://192.168.0.17:9100/monitor/17?token=25&trackID=0trackID=0 RTSP/1.0 Aug 28 13:58:11 localhost websock_rtsp_proxy: Session: 81965132682;timeout=60 Aug 28 13:58:11 localhost websock_rtsp_proxy: CSeq: 446 Aug 28 13:58:11 localhost websock_rtsp_proxy: User-Agent: SFRtsp 0.3 Aug 28 13:58:11 localhost websock_rtsp_proxy: rtsp send: Broken pipe Aug 28 13:58:11 localhost websock_rtsp_proxy: [2019-08-28 13:58:11] [disconnect] Disconnect close local:[1011,Remote write error] remote:[1006] Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-42 1942498112: disconnecting data socket Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnecting rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: [2019-08-28 13:58:11] [disconnect] Disconnect close local:[1011,Remote write error] remote:[1006] Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-42 1942498112: connection closed Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnected rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: destroy plugin Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnecting rtsp remote Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnecting rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnected rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-42 1942498112: backend destroyed Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-42 1942498112: session destroyed Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-42 1942498112: disconnected data socket Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-42 1942498112: control diconnected Aug 28 13:58:11 localhost websock_rtsp_proxy: GET_PARAMETER rtsp://192.168.0.17:9100/monitor/16?token=26&trackID=0trackID=0 RTSP/1.0 Aug 28 13:58:11 localhost websock_rtsp_proxy: Session: 81965234217;timeout=60 Aug 28 13:58:11 localhost websock_rtsp_proxy: CSeq: 446 Aug 28 13:58:11 localhost websock_rtsp_proxy: User-Agent: SFRtsp 0.3 Aug 28 13:58:11 localhost websock_rtsp_proxy: rtsp send: Broken pipe Aug 28 13:58:11 localhost websock_rtsp_proxy: [2019-08-28 13:58:11] [disconnect] Disconnect close local:[1011,Remote write error] remote:[1006] Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-43 304348751: connection closed Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnecting rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: [disconnected rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: 2019-08-28 13:58:11] [disconnect] Disconnect close local:[1011,Remote write error] remote:[1006] Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-43 304348751: disconnecting data socket Aug 28 13:58:11 localhost websock_rtsp_proxy: destroy plugin Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnecting rtsp remote Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnecting rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: disconnected rtsp Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-43 304348751: backend destroyed Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-43 304348751: session destroyed Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-43 304348751: control diconnected Aug 28 13:58:11 localhost websock_rtsp_proxy: localhost-43 304348751: disconnected data socket Aug 28 14:00:01 localhost systemd: Created slice User Slice of root. Aug 28 14:00:01 localhost systemd: Starting User Slice of root. Aug 28 14:00:01 localhost systemd: Started Session 168 of user root. Aug 28 14:00:01 localhost systemd: Starting Session 168 of user root. Aug 28 14:00:01 localhost systemd: Removed slice User Slice of root. Aug 28 14:00:01 localhost systemd: Stopping User Slice of root. Aug 28 14:01:01 localhost systemd: Created slice User Slice of root. Aug 28 14:01:01 localhost systemd: Starting User Slice of root. Aug 28 14:01:01 localhost systemd: Started Session 169 of user root. Aug 28 14:01:01 localhost systemd: Starting Session 169 of user root. Aug 28 14:01:01 localhost systemd: Removed slice User Slice of root. Aug 28 14:01:01 localhost systemd: Stopping User Slice of root. Aug 28 14:03:23 localhost websock_rtsp_proxy: [2019-08-28 14:03:23] [error] Handshake ended with HTTP error: 426 Aug 28 14:03:23 localhost websock_rtsp_proxy: [2019-08-28 14:03:23] [fail] WebSocket Connection [::ffff:23.254.165.208]:46330 v0 "python-requests/2.6.0 CPython/2.6.6 Linux/2.6.32-754.18.2.el6.x86_64" /ws/v1/cluster/apps/new-application 426 websocketpp:28 Upgrade required Aug 28 14:03:41 localhost sshd[4329]: rexec line 68: Deprecated option RSAAuthentication Aug 28 14:03:41 localhost systemd: Created slice User Slice of root. Aug 28 14:03:41 localhost systemd: Starting User Slice of root. Aug 28 14:03:41 localhost systemd-logind: New session 170 of user root. Aug 28 14:03:41 localhost systemd: Started Session 170 of user root. Aug 28 14:03:41 localhost systemd: Starting Session 170 of user root. Aug 28 14:03:41 localhost dbus[770]: [system] Activating service name='org.freedesktop.problems' (using servicehelper) Aug 28 14:03:41 localhost dbus-daemon: dbus[770]: [system] Activating service name='org.freedesktop.problems' (using servicehelper) Aug 28 14:03:41 localhost dbus[770]: [system] Successfully activated service 'org.freedesktop.problems' Aug 28 14:03:41 localhost dbus-daemon: dbus[770]: [system] Successfully activated service 'org.freedesktop.problems'

victorgrenke commented 5 years ago

try the version 1.8.5 , it support the reconnection to rtsp source https://streamedian.com/cabinet/downloads/player/1.8.5

MartinKayJr commented 5 years ago

@victorgrenke This version has a much worse stability than the 1.8.4 version, and hangs on average in 2 minutes.

I am using the Dahua DSS platform. The RTSP link accessed is obtained by the OPTIONS and DESCRIBE 302 redirect response. This link is a token, and a new option access is made to him in 3 seconds to continue playing.

After I modified the streamedian, I got the rtsp link of the token after receiving the 302 request and redirected it. After two minutes, the window for entering the account password will pop up because the token is invalid. This is the same in 1.8.4. The method does not appear.

rankaifeng commented 5 years ago

你好 你的那个rtsp能播放吗?