Channels DVR stops responding randomly on macOS

Mac OS X users, can use this terminal command to restart Channels DVR server.
killall channels-dvr | open -a ~/Users/Library/Application\ Support/ChannelsDVR/latest/channels-dvr

additionally you can shell script it, Applescript it, or run it as an automator task or folder item script. I do the latter linked to my alexa, so I can voice the command in.

This is not recommended.

Using killall can leave databases in a corrupted state.

Also launching the dvr binary directly like that is incorrect because it won't setup logging.

Why are you needing to restart the dvr?

If you really want to restart, use:

~/Library/Application\ Support/ChannelsDVR/uninstall.sh && ~/Library/Application\ Support/ChannelsDVR/install.sh

or

launchctl remove com.getchannels.dvr && launchctl load "~/Library/LaunchAgents/com.getchannels.dvr.plist"

1 Like

Good to know, although I did notice goodbye/restart message in the logs, as kill was issued, so looks like the app dispatch is safe/same? I will be using my method, and let you know if any trouble down the road. Doubt it, as I have also for decades now, dared to pull usb drives from my mac, and though the warning, have yet to have corruption. Update: Launchctl command does not work. :confused:

Think of kill(all) as a strong suggestion to the process to shutdown, while kill -9 tells the OS to stop the process. The latter is almost guaranteed to kill a process, with the process having little or no opportunity for clean up, much like pulling the plug or a hard reset. If it doesn't kill the process, you have a system corruption problem and need a hard reset.

A universal method to restart the DVR is PUT /dvr/updater/restart. On macOS open a terminal window and use the command

curl -XPUT http://X.X.X.X:8089/dvr/updater/restart

replacing the Xs with your DVR server's actual IP address.

1 Like

I’m curious for the answer to this question too.

Thanks for the suggestions, many of which I have read before and tried but Do Not Work. Issue with the curl command is when the web server is frozen, curl commands don't work. Also good to know about launching the binary directly. I have checked and mine is still logging. I have done this over and over and so far all seems well. I will let you all know if imminent doom happens. Sometimes I guess it seems you must know the dark side of the force to get things to work. :slight_smile:

If that is what is happening, then I think you have some other issues going on.

And to follow up on Aman's suggestion about using launchctl, you can also try:

launchctl stop com.getchannels.dvr
launchctl start com.getchannels.dvr

(Why Apple does not provide a restart subcommand to launchctl is beyond me, but oh well. If you are running the DVR as a user, then issue the commands from that user; if you installed the DVR as a system service, then run it as root or use system/com.getchannels.dvr.)

racameron, thanks for that! Awesome! Looks like that stopped the service, and restarted again. The version Aman posted certainly did not work. Only thing not tested, is if this will work when Channels DVR is frozen. I will continue with my method, and let you know of any doom/gloom; so far I know it's been working well, with logging and so far no corruption. I will also try launchctl stop and start to see if that works when Channels DVR server freezes again. Stay tuned! :smiley:

You really need to track down the issue causing your server to become unresponsive. This isn't actually a Channels issue, but rather something else with your system. Either a different runaway process, or a hardware issue like a failing drive or RAM.

1 Like

I learned this term recently which seems apropos:

That is actually contrary to the situation. The OP is asking how to restart Channels, but based upon the the additional data given the root issue is actually what is causing Channels to hang.

So rather than asking "How do I restart Channels?", the OP should instead be asking "Why is Channels hanging?" The former was the purview of this forum, and answered in myriad ways; the latter is something else entirely, and completely out-of-scope.

(The XY Problem assumes that the actual problem ("Y") is the same regardless of the situation; in this case the OP's perceived "Y" seemingly differs from the actual "Y".)

1 Like

Interesting. Is there a cool term for this one too?

Interesting discussion and all good points here indeed. Ideally racameron would be correct. In actuality though, I don't care to ever have the root of the problem solved, or I would have asked.

If you are knowingly choosing to ignore greater issues that compromise your systems for smaller and immediate solutions, then you are opening yourself to larger issues down the road.

While I cannot tell you what to do, I can tell you that you are wrong. Also, whatever you choose to do is your choice, but I refuse to give you further aid. Good luck plugging holes in the dyke.

2 Likes

You are so right ... if my DVR crashed enough that I need a job to restart it I would definitely try and get to the root of the problem instead of ignoring it ,,, but it is clear the OP is not interested on fixing it.

Correct I don’t care to find the root of the issue. Additionally I never asked for help. #fact. :slight_smile:

If true, then you are a lost cause. I know I will no longer expend effort to help you in any way, and others will likely agree. I'm sorry I put forth any effort to help you, because you are unwilling to even help yourself.

Next question. How do I make the smoke that often billows out of my PC smell a little better?