I've found a bit of a hiccup in the UID/GID implementation.
Both of my NAS's (UNRAID & Synology) like to assign users a GID=100. Most shares on UNRAID have a UID=99 (nobody), and a GID=100 (users). If I try to use these values for the environment parameters (PUID=99, PGID=100), the docker will not come up. I've included the log file for your review.
Code: Select all
************************************************
Starting DVR Container
VERSION: 0.2.0
************************************************
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 99:100
ERROR: GID specified in PUID [100] already exists - please specify a valid GID - skipping
INFO: Creating User dvr with UID [99]
INFO: Success
INFO: Updating Nginx User
INFO: user with UID [99] exists, checking GID...
INFO: group with GID [100] exists, updating NGinx config
INFO: Updating PHP User
INFO: user with UID [99] exists, updating php config
INFO: group with GID [100] exists, updating php config
INFO: Attempting to Fixing Permissions
chown: unknown user/group dvr:dvr
chown: unknown user/group dvr:dvr
INFO: Updating the NGINX Port for UI to 80
2022-08-01 03:43:08,689 INFO Set uid to user 0 succeeded
2022-08-01 03:43:08,692 INFO supervisord started with pid 36
2022-08-01 03:43:09,694 INFO spawned: 'dvr' with pid 37
2022-08-01 03:43:09,695 INFO spawned: 'nginx' with pid 38
2022-08-01 03:43:09,696 INFO spawned: 'php-fpm' with pid 39
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
DVRMgr: Lets remove any existing engine - we're going to take the latest always....
DVRMgr: Checking it was deleted - if we can't remove it we can't update
DVRMgr: Downloading latest release
2022/08/01 03:43:09 [emerg] 38#38: getgrnam("dvr") failed in /etc/nginx/nginx.conf:4
nginx: [emerg] getgrnam("dvr") failed in /etc/nginx/nginx.conf:4
2022-08-01 03:43:09,705 INFO exited: nginx (exit status 1; not expected)
[01-Aug-2022 03:43:09] ERROR: [pool www] cannot get gid for group 'dvr'
[01-Aug-2022 03:43:09] ERROR: [pool www] cannot get gid for group 'dvr'
[01-Aug-2022 03:43:09] ERROR: FPM initialization failed
[01-Aug-2022 03:43:09] ERROR: FPM initialization failed
DVRMgr: Downloading latest beta
2022-08-01 03:43:10,473 INFO exited: php-fpm (exit status 78; not expected)
DVRMgr: Comparing which is newest
DVRMgr: Both versions are same - using the Release version
2022-08-01 03:43:11,082 INFO success: dvr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-08-01 03:43:11,083 INFO spawned: 'nginx' with pid 45
2022/08/01 03:43:11 [emerg] 45#45: getgrnam("dvr") failed in /etc/nginx/nginx.conf:4
nginx: [emerg] getgrnam("dvr") failed in /etc/nginx/nginx.conf:4
2022-08-01 03:43:11,087 INFO exited: nginx (exit status 1; not expected)
DVRMgr: Engine Updated to... 20220303
DVRMgr: ** Starting the DVR Engine
DVRMgr: ** Checking for PUID
DVRMgr: ** PUID user exists - adjusting permissions to dvrdata & dvrrec
chown: unknown user/group dvr:dvr
DVRMgr: ** Executing DVR engine with PUID info...
ash: /HDHomeRunDVR/data/hdhomerun_record: Permission denied
2022-08-01 03:43:11,118 INFO exited: dvr (exit status 126; not expected)
2022-08-01 03:43:12,119 INFO spawned: 'dvr' with pid 60
2022-08-01 03:43:12,121 INFO spawned: 'php-fpm' with pid 61
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
DVRMgr: Lets remove any existing engine - we're going to take the latest always....
DVRMgr: Checking it was deleted - if we can't remove it we can't update
DVRMgr: Downloading latest release
[01-Aug-2022 03:43:12] ERROR: [pool www] cannot get gid for group 'dvr'
[01-Aug-2022 03:43:12] ERROR: [pool www] cannot get gid for group 'dvr'
[01-Aug-2022 03:43:12] ERROR: FPM initialization failed
[01-Aug-2022 03:43:12] ERROR: FPM initialization failed
DVRMgr: Downloading latest beta
2022-08-01 03:43:12,628 INFO exited: php-fpm (exit status 78; not expected)
DVRMgr: Comparing which is newest
DVRMgr: Both versions are same - using the Release version
2022-08-01 03:43:13,237 INFO success: dvr entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-08-01 03:43:13,238 INFO spawned: 'nginx' with pid 67
2022/08/01 03:43:13 [emerg] 67#67: getgrnam("dvr") failed in /etc/nginx/nginx.conf:4
nginx: [emerg] getgrnam("dvr") failed in /etc/nginx/nginx.conf:4
2022-08-01 03:43:13,242 INFO exited: nginx (exit status 1; not expected)
DVRMgr: Engine Updated to... 20220303
DVRMgr: ** Starting the DVR Engine
DVRMgr: ** Checking for PUID
DVRMgr: ** PUID user exists - adjusting permissions to dvrdata & dvrrec
chown: unknown user/group dvr:dvr
DVRMgr: ** Executing DVR engine with PUID info...
ash: /HDHomeRunDVR/data/hdhomerun_record: Permission denied
2022-08-01 03:43:13,269 INFO exited: dvr (exit status 126; not expected)
2022-08-01 03:43:14,271 INFO spawned: 'dvr' with pid 82
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
DVRMgr: Lets remove any existing engine - we're going to take the latest always....
DVRMgr: Checking it was deleted - if we can't remove it we can't update
DVRMgr: Downloading latest release
DVRMgr: Downloading latest beta
2022-08-01 03:43:14,680 INFO spawned: 'php-fpm' with pid 86
[01-Aug-2022 03:43:14] ERROR: [pool www] cannot get gid for group 'dvr'
[01-Aug-2022 03:43:14] ERROR: [pool www] cannot get gid for group 'dvr'
[01-Aug-2022 03:43:14] ERROR: FPM initialization failed
[01-Aug-2022 03:43:14] ERROR: FPM initialization failed
DVRMgr: Comparing which is newest
DVRMgr: Both versions are same - using the Release version
2022-08-01 03:43:15,101 INFO exited: php-fpm (exit status 78; not expected)
DVRMgr: Engine Updated to... 20220303
DVRMgr: ** Starting the DVR Engine
DVRMgr: ** Checking for PUID
DVRMgr: ** PUID user exists - adjusting permissions to dvrdata & dvrrec
chown: unknown user/group dvr:dvr
DVRMgr: ** Executing DVR engine with PUID info...
ash: /HDHomeRunDVR/data/hdhomerun_record: Permission denied
2022-08-01 03:43:15,137 INFO exited: dvr (exit status 126; not expected)
2022-08-01 03:43:16,138 INFO gave up: dvr entered FATAL state, too many start retries too quickly
2022-08-01 03:43:17,139 INFO spawned: 'nginx' with pid 103
2022/08/01 03:43:17 [emerg] 103#103: getgrnam("dvr") failed in /etc/nginx/nginx.conf:4
nginx: [emerg] getgrnam("dvr") failed in /etc/nginx/nginx.conf:4
2022-08-01 03:43:17,143 INFO exited: nginx (exit status 1; not expected)
2022-08-01 03:43:18,144 INFO gave up: nginx entered FATAL state, too many start retries too quickly
2022-08-01 03:43:18,145 INFO spawned: 'php-fpm' with pid 104
[01-Aug-2022 03:43:18] ERROR: [pool www] cannot get gid for group 'dvr'
[01-Aug-2022 03:43:18] ERROR: [pool www] cannot get gid for group 'dvr'
[01-Aug-2022 03:43:18] ERROR: FPM initialization failed
[01-Aug-2022 03:43:18] ERROR: FPM initialization failed
I'm thinking the implementation of linux used in the docker container already has a GID equal to 100, so attempting to create the dvr GID with a value of 100 errors out, and things go downhill from there. Easy enough to work around by using a value that doesn't conflict with the existing GIDs. I don't think UNRAID pays much attention to GID for the purpose of shares, so probably not a big deal for that implementation.
Not sure if you consider this a bug or a limitation, but thought I should make you aware of the issue.
Thanks!