Windows 11 Channels DVR Server powered off

I've been running Channels DVR on a dedicated Windows 11 mini PC for about a month now. I want to keep it running 24/7 so I have the power plan set to never sleep and I have BIOS set to power on after after power was lost. It had been running for a few weeks without issue. Yesterday I installed Windows Updates and it rebooted and this morning I noticed the power was off. Checking the Windows logs it appears it shut down at 4:18am. This was the last log message before I booted it this morning.

The system has returned from a low power state.
Sleep Time: ‎2024‎-‎06‎-‎13T09:16:55.042376100Z
Wake Time: ‎2024‎-‎06‎-‎13T09:18:06.663129200Z
Wake Source: Unknown, but possibily due to timer - channels-dvr.exe

The last time I had this issue was shortly after I first set up the PC and it had installed Windows Updates.
Does anyone have any idea what happened or know how I can guarantee this PC is always running and Channels DVR is always up?

Win 11 Home or Pro?

I have been running Channels DVR server (along with Plex and a few other softwares) on a Win 11 Pro system for over a year, never had it shut down.

I do set the option to defer updates for 5 weeks, and manually check for OS updates 1x a month though. Then reset the Defer updates.
Allowing Windows to auto update will cause random reboots, which is no good for a always on server.

I have my Windows servers to autologin and set the group policy to never restart to install updates when user is logged on. I check once in a while when Idle and will reboot to update. I also run a program called insomnia at startup that prevents windows from sleeping. These are headless servers with remote desktop enabled.

This is a Windows 11 Pro machine. I don't have mine set to autologin as I don't think it's necessary, but I like the group policy. I'll have to give that a try. I'll also check out Insomnia. Thanks for the suggestions.

One more thing to add. I'm running the system headless and remote in. When I remoted in yesterday it said it needed to reboot to install updates, which I did. The system came back up and apparently had all the updates installed, but for some reason it shut down at 4am. I don't believe this was caused by installing updates, but I wasn't able to find anything in Event Viewer to indicate why it shut down. The only thing I did notice was the lack of wake logs from channels-dvr.exe, which I do have set to run as a service and to run on startup.

I use Autologin because I run several batch jobs including auto update of Channels DVR when Idle and also Move Recordings around automatically. I also have the server setup to reboot once a week using a batch job when Channels DVR is Idle. I am running Docker Desktop that does not run as a service and requires Autologin.

:loop
title "Reboot Channels Server"
CD /d "%~dp0"
curl.exe "http://127.0.0.1:8089/dvr" | findstr  /I /C:"busy\":false"
set notbusy=%ERRORLEVEL%
if %notbusy% EQU 0 shutdown /r /f /t 2
if %notbusy% NEQ 0 timeout /T 300
CLS
goto loop

Isn't it the default behavior of Channels DVR already?

OK, now you have my attention! :laughing:

Could you share more details? Maybe start a new thread for this topic? I think this could benefit a few people. :wink:

That's cool too!

Not for beta Prerelease updates ... You have to force them.

You're right. I actually realized this right before you replied. :laughing:

Storage Paths
C:\ChannelsDVR 
\\MYCLOUDPR4100\MyShares\Imports\ChannelsDVR 
S:\ChannelsDVR2 

Just a sample of using Robocopy ...

goto start
:loop
timeout 300
:start
CD /d "%~dp0"
curl http://127.0.0.1:8089/dvr | findstr  /I /C:"busy\":false"
set notbusy=%ERRORLEVEL%
if %notbusy% NEQ 0 goto loop
ROBOCOPY "W:\DVR\TV\Walker, Texas Ranger" "S:\ChannelsDVR2\TV\Walker, Texas Ranger" /move /COPY:DT /minage:1 /e /R:2 /W:2
ROBOCOPY "W:\DVR\Movies" "\\MYCLOUDPR4100\MyShares\Imports\ChannelsDVR\Movies" /move /COPY:DT /minage:0 /e /R:2 /W:2
MD "W:\DVR\Movies"
goto loop
exit

Honestly this is a problem with running a server on a desktop OS. Especially Windows with all of the updates and general issues. You might be better served by setting up a Linux server and running docker., Then you can have other containers supporting Channels with minimal effort. I know docker is available on Windows (as all of the Windows lovers were about to pounce on me...) but it uses WSL which is basically a hypervisor. So you are running nested virtualization basically...

I'm thinking of doing a tutorial on how to install Linux server as it relates to Channels. Maybe I can de-mystify it for some and show how easy it is and reliable. I just ran some updates on my Channels server the other day but before that my last reboot was 10 months ago. Rock solid and 90% less overhead than Windows...

1 Like

I have 30 years of experience using Windows, and since my Beelink Mini S12 came preinstalled with Windows 11 Pro I naturally just went that direction. I last tinkered with Linux over 20 years ago when it was the new kid on the block and haven't been back since. If there was a tutorial on how to convert it to a dedicated Linux machine to run Channels, as a "Windows" guy I would find that extremely useful. While I enjoy the ease and comfort of using Windows, with regards to my Channels machine my desire is more toward reliability and uptime.

I would love to see a tutorials as well. That would be super useful!

LOL Ok challenge accepted :wink:

2 Likes

You might want to incorporate some things from this thread.

Besides just installing Channels DVR, there are many things that non-linux users will need to know if they're going to be their own sysadmin :grinning:

1 Like

A Whole lot of things.

I have been using a Beelink with Windows 11 Pro as my Channels server for about two and half years. I don't think it has been down for more than a couple of hours total. Only need to reboot due to updates maybe every two months. The Channels developers have been doing a great job with the windows server. I thought about using Linux, and probably would, if I was more familiar with Linux or wanted to learn a new OS. Windows has been easy for me and very reliable, but others may have a different experience.

1 Like

Interesting. I'm still trying to figure out why mine shut down. There was nothing in any of the Event logs and as far as I can tell I have everything set correctly to keep it running. Other than setting the power mode to never sleep, is there anything else you touched to keep it running?
FYI, my symptoms were I noticed the blue power light wasn't on, so I pressed the power button. Looking at the logs, logging just stopped a little after 4am and the next log message was about an unexpected shutdown logged when I powered it back on.

Is your PC setup to auto power on after a power loss in the BIOS ? .. This has turned into a Linux VS Windows once again ... But can you check the Bios for that setting ? just to make sure it is still set ?

These are my server settings ....

2 Likes

Yep, that's exactly how I have it set up, and I have BIOS set to auto power up on a power loss.