unofficial Docker Container for Record Engine

Downloads & Instructions
Post Reply
demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: unofficial Docker Container for Record Engine

Post by demonrik »

Posted over in parent forum viewtopic.php?t=77403 that beta link is broken.
This highlights an issue with the scripts. Should recognize a 0 file size and only update if the download is valid.
Will work on a fix.
For now do not restart if you use beta engines, or set the betaEngine in the config to 0 and it will use the stable (older) version which is downloading.
If you are using stable versions only anyway.. nothing to do, but will make sure fix above applies here too.

Jsherman
Posts: 180
Joined: Mon Jul 20, 2015 1:59 am

Re: unofficial Docker Container for Record Engine

Post by Jsherman »

demonrik wrote: Sun Oct 23, 2022 7:36 am Posted over in parent forum viewtopic.php?t=77403 that beta link is broken.
This highlights an issue with the scripts. Should recognize a 0 file size and only update if the download is valid.
Will work on a fix.
For now do not restart if you use beta engines, or set the betaEngine in the config to 0 and it will use the stable (older) version which is downloading.
If you are using stable versions only anyway.. nothing to do, but will make sure fix above applies here too.
I noticed this last night as well as restarting removed the DVR. I had to turn off beta status to 0, download the stable of 0822 to get it up and running. Earlier today I switched it back to 1, restarted the docker and it took the newest beta version, 1022.

Thank you for keeping on top of this!

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: unofficial Docker Container for Record Engine

Post by demonrik »

New version 0.2.3 now posted to latest
You may need to force update if using UnRAID ;)

This checks now if there is actually returned by the URLs from SD servers.
If nothing is returned it will skip it.
Also have overhauled the version comparison - so now will not update if the existing one is newer.
This has 1 downside...
e.g. if you do update to a beta.. but then want to switch back to the stable, it might see the beta newer than the stable and thus not update.
Simple fix to this
  • Stop the container
    delete the hdhomerun_record that is in your /dvrdata volume
    restart the container.

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: unofficial Docker Container for Record Engine

Post by demonrik »

New version 0.2.4 now posted to latest
You may need to force update

Fixed issue where for first time installers there is no current version of the record engine and it caused the version checks to error and not install the engine
Fixed issue where the beta URL download provides the stable driver, so version doesn't have a 'beta' string and thus the beta number (e.g. 20220101beta3) wasn't present could cause an error
Also added an output in the header of the log to tell me which micro-architecture is being run on

paradoxgrowth
Posts: 32
Joined: Sun Jun 23, 2019 6:34 am

Re: unofficial Docker Container for Record Engine

Post by paradoxgrowth »

demonrik wrote: Fri Nov 11, 2022 8:50 am New version 0.2.4 now posted to latest
You may need to force update

Fixed issue where for first time installers there is no current version of the record engine and it caused the version checks to error and not install the engine
Fixed issue where the beta URL download provides the stable driver, so version doesn't have a 'beta' string and thus the beta number (e.g. 20220101beta3) wasn't present could cause an error
Also added an output in the header of the log to tell me which micro-architecture is being run on
Hi demonrik,

Thanks so much for the update! Looks like after installing the container there are no errors (log below). However I still can't reach the UI. I tried to assign it a few different ports, and different modes (i.e. bridged, NAT and Host) but I still can't pull it up. The log file below is when it was put in host mode (as your instructions say) nothing comes up using the assigned port on the host or my QNAP server's address (i.e. 192.168.0.1:59080). Any ideas what I am doing wrong? Thanks for your help!


************************************************

Starting DVR Container
VERSION: 0.2.4 [x86_64]

************************************************

INFO: DVR data folder exists already
INFO: DVR Data folder is linked
INFO: DVR Folder linked to correct folder /dvrdata
INFO: DVR recordings folder exists already
INFO: DVR recordings folder is linked
INFO: DVR recordings Folder linked to correct folder /dvrrec
INFO: PHP WWW Server config file is missing, pulling from defaults...
INFO: Attempting requested User mapping
INFO: From root:root to 1006:100
INFO: Creating Group dvr with GID [100]
INFO: Success
INFO: Creating User dvr with UID [1006]
INFO: Success
INFO: Updating Nginx User
INFO: user with UID [1006] exists, checking GID...
INFO: group with GID [100] exists, updating NGinx config
INFO: Updating PHP User
INFO: user with UID [1006] exists, updating php config
INFO: group with GID [100] exists, updating php config
INFO: Attempting to Fixing Permissions
INFO: Updating the NGINX Port for UI to 59080
2022-11-12 15:26:22,043 INFO Set uid to user 0 succeeded
2022-11-12 15:26:22,047 INFO supervisord started with pid 38
2022-11-12 15:26:23,049 INFO spawned: 'dvr' with pid 39
2022-11-12 15:26:23,050 INFO spawned: 'nginx' with pid 40
2022-11-12 15:26:23,052 INFO spawned: 'php-fpm' with pid 41
**********************
hdhomerun.sh
DVRMgr: ** Validating the Config File is available and set up correctly
DVRMgr: Config File exists and is writable - is record path and port correct
DVRMgr: ** Installing the HDHomeRunDVR Record Engine
[12-Nov-2022 15:26:23] NOTICE: fpm is running, pid 41
[12-Nov-2022 15:26:23] NOTICE: ready to handle connections
DVRMgr: ** Current Engine Version is 20221031
DVRMgr: Downloading latest Stable release
DVRMgr: Got Engine 20221031
DVRMgr: Downloading latest Beta release
DVRMgr: Got Engine 20221031 [0]
DVRMgr: Beta version downloaded - check if [20221031] newer than [20221031]
DVRMgr: Beta version is not newer than existing engine - not updating
DVRMgr: Engine Updated to... 20221031
DVRMgr: ** Starting the DVR Engine
DVRMgr: ** Checking for PUID
DVRMgr: ** PUID user exists - adjusting permissions to dvrdata & dvrrec
DVRMgr: ** Executing DVR engine with PUID info...
2022-11-12 15:26:24,962 INFO success: dvr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-11-12 15:26:24,962 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-11-12 15:26:24,962 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: unofficial Docker Container for Record Engine

Post by demonrik »

paradoxgrowth wrote: Sat Nov 12, 2022 8:47 am Thanks so much for the update! Looks like after installing the container there are no errors (log below). However I still can't reach the UI. I tried to assign it a few different ports, and different modes (i.e. bridged, NAT and Host) but I still can't pull it up. The log file below is when it was put in host mode (as your instructions say) nothing comes up using the assigned port on the host or my QNAP server's address (i.e. 192.168.0.1:59080). Any ideas what I am doing wrong? Thanks for your help!
definitely needs to be host
Didn't qnap start forcing use of their firewall? Make sure you open the ports for the UI and Engine (59080 and 59090)

Jsherman
Posts: 180
Joined: Mon Jul 20, 2015 1:59 am

Re: unofficial Docker Container for Record Engine

Post by Jsherman »

demonrik wrote: Fri Nov 11, 2022 8:50 am New version 0.2.4 now posted to latest
You may need to force update

Fixed issue where for first time installers there is no current version of the record engine and it caused the version checks to error and not install the engine
Fixed issue where the beta URL download provides the stable driver, so version doesn't have a 'beta' string and thus the beta number (e.g. 20220101beta3) wasn't present could cause an error
Also added an output in the header of the log to tell me which micro-architecture is being run on
If you are are curious what others are seeing, I personally had to force it by deleting the docker and re-adding it on my UnRaid build. I am now up to date.

Thank you for all of your continued work on this!

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: unofficial Docker Container for Record Engine

Post by demonrik »

Jsherman wrote: Tue Dec 13, 2022 9:07 am
demonrik wrote: Fri Nov 11, 2022 8:50 am New version 0.2.4 now posted to latest
You may need to force update

Fixed issue where for first time installers there is no current version of the record engine and it caused the version checks to error and not install the engine
Fixed issue where the beta URL download provides the stable driver, so version doesn't have a 'beta' string and thus the beta number (e.g. 20220101beta3) wasn't present could cause an error
Also added an output in the header of the log to tell me which micro-architecture is being run on
If you are are curious what others are seeing, I personally had to force it by deleting the docker and re-adding it on my UnRaid build. I am now up to date.

Thank you for all of your continued work on this!
For future - just stop the container, and delete the record engine from dvrdata binding then start the container and all should be good.

Jsherman
Posts: 180
Joined: Mon Jul 20, 2015 1:59 am

Re: unofficial Docker Container for Record Engine

Post by Jsherman »

[/quote]
For future - just stop the container, and delete the record engine from dvrdata binding then start the container and all should be good.
[/quote]

If I recall correctly, I tried this and it still wasn't updating until I removed it and re-added it. Mind you it was not a huge deal as it took another 30 seconds.

MadBit
Posts: 6
Joined: Mon Dec 24, 2018 4:20 am

Re: unofficial Docker Container for Record Engine

Post by MadBit »

Has anyone noticed an issue with newer versions of the record engine? I had to restart my OpenMediaVault server and thus the docker for my HDHomeRun. My DVR engine doesn't start anymore and I get the errors below.

Code: Select all

DVRMgr: ** Validating the Config File is available and set up correctly
DVRMgr: Config File exists and is writable - is record path and port correct
DVRMgr: ** Installing the HDHomeRunDVR Record Engine
Bad system call (core dumped)
DVRMgr: ** Current Engine Version is 
DVRMgr: Downloading latest Stable release
Bad system call (core dumped)
DVRMgr: Got Engine 
DVRMgr: Downloading latest Beta release
Bad system call (core dumped)
DVRMgr: Got Engine  [0]
DVRMgr: Beta version downloaded - check if [] newer than []
DVRMgr: Beta version downloaded is newer date than existing engine - updating...
rm: can't remove '/HDHomeRunDVR/data/hdhomerun_record_beta': No such file or directory
Bad system call (core dumped)
2023-03-21 00:01:35,651 INFO success: dvr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
DVRMgr: Engine Updated to... 
DVRMgr: ** Starting the DVR Engine
DVRMgr: ** Checking for PUID
DVRMgr: ** PUID user exists - adjusting permissions to dvrdata & dvrrec
DVRMgr: ** Executing DVR engine with PUID info...
Bad system call
2023-03-21 00:01:35,734 INFO exited: dvr (exit status 159; not expected)

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: unofficial Docker Container for Record Engine

Post by demonrik »

MadBit wrote: Mon Mar 20, 2023 6:01 pm Has anyone noticed an issue with newer versions of the record engine?
No issues here.
I had to restart my OpenMediaVault server and thus the docker for my HDHomeRun. My DVR engine doesn't start anymore and I get the errors below.

Code: Select all

DVRMgr: ** Validating the Config File is available and set up correctly
DVRMgr: Config File exists and is writable - is record path and port correct
DVRMgr: ** Installing the HDHomeRunDVR Record Engine
Bad system call (core dumped)
DVRMgr: ** Current Engine Version is 
DVRMgr: Downloading latest Stable release
Bad system call (core dumped)
DVRMgr: Got Engine 
DVRMgr: Downloading latest Beta release
Bad system call (core dumped)
DVRMgr: Got Engine  [0]
DVRMgr: Beta version downloaded - check if [] newer than []
DVRMgr: Beta version downloaded is newer date than existing engine - updating...
rm: can't remove '/HDHomeRunDVR/data/hdhomerun_record_beta': No such file or directory
Bad system call (core dumped)
2023-03-21 00:01:35,651 INFO success: dvr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
DVRMgr: Engine Updated to... 
DVRMgr: ** Starting the DVR Engine
DVRMgr: ** Checking for PUID
DVRMgr: ** PUID user exists - adjusting permissions to dvrdata & dvrrec
DVRMgr: ** Executing DVR engine with PUID info...
Bad system call
2023-03-21 00:01:35,734 INFO exited: dvr (exit status 159; not expected)
Those are errors in the container itself, nothing to do with the record engine.
Everywhere where it says bad system call is where the binaries within the container are trying to make kernel calls to your underlying kernel. But something is off between the ABI (binary interface between kernel and user space apps) versions.
You say you had to restart your server? Any particular reason?
What kernel or openmediavault versions are you using on the server?

MadBit
Posts: 6
Joined: Mon Dec 24, 2018 4:20 am

Re: unofficial Docker Container for Record Engine

Post by MadBit »

I had to restart the server because I applied updates to openmediavault which required a restart. Once the server restarted I checked my containers (Portainer 2.17.1) and everything seemed fine, all containers started. I started HDHomerun on my firestick and only the tuner was found, no record engine.

I went and checked the dvrdata folder and no hdhomerun_record engine was found. Checking the logs:
ash: /HDHomeRunDVR/data/hdhomerun_record: not found

I stopped the container, manually pulled the engine, copied it to the dvrdata folder, adjusted permissions, then started but then got the "bad system call" error.

Completely deleting the container and pulling it again from scratch results in the same. First run no new engine is pulled. I can see it download and then delete from the dvrdata folder.

Connecting to the UI everything looks ok except it shows "Record Engine Version: Unable to discover DVR version"

All my previous record engine logs appear, but nothing after 3/19 (day I restarted the server).

My bad for assuming the newer engine off the bat.

Hostname
omvault
Version
6.3.4-1 (Shaitan)
Processor
BCM2835
Kernel
Linux 6.1.19-v8+

side note: all my other containers are operational (Plex, Beets etc.) this has me scratching my head.

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: unofficial Docker Container for Record Engine

Post by demonrik »

MadBit wrote: Tue Mar 21, 2023 5:42 pm I had to restart the server because I applied updates to openmediavault which required a restart. Once the server restarted I checked my containers (Portainer 2.17.1) and everything seemed fine, all containers started. I started HDHomerun on my firestick and only the tuner was found, no record engine.
....
side note: all my other containers are operational (Plex, Beets etc.) this has me scratching my head.
Reading a few posts around OMV and it appears in latest update there was some unexpected issues around apparmor

It may not be the cause.

But does look like you are experiencing an issue with the container being unable to make changes to the filesystem, hence all the bad system call errors. And since it's a bad system call and not just a write error it would appear to be some privilege related issue like seccomp or apparmor

MadBit
Posts: 6
Joined: Mon Dec 24, 2018 4:20 am

Re: unofficial Docker Container for Record Engine

Post by MadBit »

I appreciate the help, but I'm about ready to give up. I tried all the downgrade options. Removed the container and remapped the dvrdata to a folder on the root filesystem share and I get the same error but only on this container.

This weekend I'll try to do a rebuild on another SD card and see if that does anything.

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: unofficial Docker Container for Record Engine

Post by demonrik »

MadBit wrote: Thu Mar 23, 2023 9:40 am I appreciate the help, but I'm about ready to give up. I tried all the downgrade options. Removed the container and remapped the dvrdata to a folder on the root filesystem share and I get the same error but only on this container.

This weekend I'll try to do a rebuild on another SD card and see if that does anything.
The problem is with OMV
I would suggest raising the problem over on their forum since the problem is with their solution
Script used on starting the container is located here https://github.com/demonrik/HDHR-DVR-do ... homerun.sh
Basically every time the script attempts to execute from or write to the filesystems provided the kernel in the system (i.e. on the base system) is causing a 'bad system call' to be invoked which is causing the binary in the container to crash and core dump.. so nothing is happening.
I mostly see this when seccomp or apparmor is running in the host kernel.

Post Reply