Skip to content

patch rtsp watchdog#338

Open
freeznk9 wants to merge 2 commits into
samtap:xf-datafrom
freeznk9:freeznk9-patch-rtsp-watchdog
Open

patch rtsp watchdog#338
freeznk9 wants to merge 2 commits into
samtap:xf-datafrom
freeznk9:freeznk9-patch-rtsp-watchdog

Conversation

@freeznk9

@freeznk9 freeznk9 commented Apr 6, 2018

Copy link
Copy Markdown

when RTSP Server "snx_rtsp_server" was hang, watchdog will start rtsp server.

freeznk9 added 2 commits April 6, 2018 22:30
added RTSP Server Watchdog
Added RTSP Server Watchdog
@carmenchui

Copy link
Copy Markdown

Thank you for this. I was having issues where my cameras' RTSP servers would hang and I'd have to always restart the RTSP server manually. Now I can just leave it alone and the stream will still stay up.

@effendieffendi

Copy link
Copy Markdown

Hi, sorry but I'm completely green in linux. Can you explain how to do it step by step? thx

@Bechrissed

Copy link
Copy Markdown

Nice feature, why doesn't this get merged? Is the project abandoned?

while :
do
sleep 10
if pgrep -x "snx_rtsp_server" > /dev/null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will have the 'problem' that it will start the RTSP server even if you manually stopped it.

Sorry for resurfacing this, but I implemented the exact same script before checking the open pull requests, and I had that issue.

Maybe you could check the existence of the /var/run/rtsp-server.pid file and check the enclosed PID?

@mirjef

mirjef commented Oct 1, 2019

Copy link
Copy Markdown

when RTSP Server "snx_rtsp_server" was hang, watchdog will start rtsp server.

I can't get this to work, please advise.
What I have done:
I have uploaded both files (30-rtsp-watchdog and fang-rtsp-watchdog.sh) to the named directories on my hacked Xiaofang S1. I SSH-ed into the cam and gave the .sh file 766 permissions with the chmod command. After reboot an extra line '30-rtsp-watchdog' appears in 'manage scripts'. So far so good.
The problem is the button Start does not work and the status remains red[NOK].

What am i doing wrong?

@gokuu

gokuu commented Oct 1, 2019

Copy link
Copy Markdown

Have you tried running both fang-rtsp-watchdog.sh and 30-rtsp-watchdog manually, and see if it raises an error?

@mirjef

mirjef commented Oct 2, 2019

Copy link
Copy Markdown

Have you tried running both fang-rtsp-watchdog.sh and 30-rtsp-watchdog manually, and see if it raises an error?

Thx for reply!!
I just tried this. I get the error:
-sh: /media/mmcblk0p2/data/etc/scripts/30-rtsp-watchdog: not found
same for the .sh file.

FTP shows the files are in the right directories. I checked the permissions on both files and they are:
-rwxrw-rw-

I can't figure out what the problem is

@gokuu

gokuu commented Oct 2, 2019 via email

Copy link
Copy Markdown

@mirjef

mirjef commented Oct 2, 2019

Copy link
Copy Markdown

tried adding 'set x' as first command. Same result:
-sh: 30-rtsp-watchdog: not found

when I try ls command, the file 30-rtsp-watchdog is listed in this directory
Any ideas?

@gokuu

gokuu commented Oct 2, 2019 via email

Copy link
Copy Markdown

@mirjef

mirjef commented Oct 2, 2019

Copy link
Copy Markdown

@gokuu Thanx for your help!! I finally found my (stupid) mistake. I used the wrong text editor which added control characters to line endings, causing the errors. Fixed it and it seems to be working fine now. Thanx again!!

@gokuu

gokuu commented Oct 2, 2019 via email

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants