Plex Transcode (ffmpeg?) / DVR tuning unable to resolve local network hosts

Server Version#: 1.23.5.4841
Player Version#: 4.57.4
Tuner Make/Model: 2x SD HDHomeRun Primes
Guide/Lineup name: Comcast Grand Rapids Digital
Using XMLTV?: Yes, via EPG123
Channel number/Name: (any)

Until a week or so ago, I was able to use my Plex DVR via HDHomeRun Primes fine.

Now, I’m unable to tune to any channels. When I click Play in the “Live TV & DVR” Guide, or when I schedule any program, nothing records.

Looking at the error logs, I see a lot of “Unable to resolve” problems with the hostname of the HDHRP tuners. e.g.:

Jul 20, 2021 09:04:17.232 [0x7f0ffbde6b38] DEBUG - Activity: Ended activity 09ef4945-1b2c-496d-9aab-ebf06b34a8a7.
Jul 20, 2021 09:04:17.232 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] Grabber: HDHomerun starting a media grab on device device://tv.plex.grabbers.hdhomerun/13110F7C (Silicondust HDHomeRun PRIME, supported) tuner 2.
Jul 20, 2021 09:04:17.232 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] Grabber: Creating custom segmented recorder for grab for channel 3
Jul 20, 2021 09:04:17.232 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] HTTP requesting GET http://hdhrp2/lineup.json
Jul 20, 2021 09:04:17.232 [0x7f0ffd729b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] HTTP requesting GET http://hdhrp2/discover.json
Jul 20, 2021 09:04:17.235 [0x7f0ffbde6b38] DEBUG - Subscription: There are 2 active grabs at the end.
Jul 20, 2021 09:04:17.236 [0x7f0ffbde6b38] DEBUG - Subscription: Waiting for media grab to start.
Jul 20, 2021 09:04:18.206 [0x7f0ffbf39b38] DEBUG - Request: [127.0.0.1:55766 (Loopback)] GET /identity (14 live) Signed-in / Accept => */* / Host => localhost:32400 / User-Agent => curl/7.68.0
--
Jul 20, 2021 09:04:19.193 [0x7f0ffd8e7b38] VERBOSE - WebSocket: processed 1 frame(s)
Jul 20, 2021 09:04:22.138 [0x7f0ffd8c4b38] VERBOSE - WebSocket: processed 1 frame(s)
Jul 20, 2021 09:04:22.234 [0x7f0ffcde3b38] ERROR - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] Error issuing curl_easy_perform(handle): 6
Jul 20, 2021 09:04:22.234 [0x7f0ffcde3b38] WARN - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] HTTP error requesting GET http://hdhrp2/lineup.json (6, Couldn't resolve host name) (Could not resolve host: hdhrp2)
Jul 20, 2021 09:04:22.234 [0x7f0ffcde3b38] ERROR - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] Grabber: Couldn't find channel 3 URL for device device://tv.plex.grabbers.hdhomerun/13110F7C.
Jul 20, 2021 09:04:22.234 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] DVR:Segmenter: Creating a new recorder for http://hdhrp2:5004/auto/v3.
Jul 20, 2021 09:04:22.234 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] Setting timer to stop grab of 'Live TV - Session 8cd8hgbdptqvum3nu8rxqlwc' on channel 3 in 295 seconds.
Jul 20, 2021 09:04:22.234 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] Grabber: Waiting for a tuner on device://tv.plex.grabbers.hdhomerun/13110F7C (3 available) for at most 300 seconds.
Jul 20, 2021 09:04:22.234 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] Grabber: Allocated a tuner on device://tv.plex.grabbers.hdhomerun/13110F7C (2 left)
--
Jul 20, 2021 09:04:22.235 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Jul 20, 2021 09:04:22.235 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] TPU: hardware transcoding: final decoder: , final encoder:
Jul 20, 2021 09:04:22.236 [0x7f0ffcde3b38] VERBOSE - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] Sufficient disk space: 0B source file, 983.3GB capacity, 838.12GB available on "/transcode/Transcode/Sessions"
Jul 20, 2021 09:04:22.236 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/fa235d6-3858-linux-x86_64/' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Plex Transcoder' '-noaccurate_seek' '-ignore_unknown' '-scan_all_pmts' '-1' '-rw_timeout' '30000000' '-reconnect' '1' '-reconnect_streamed' '1' '-reconnect_delay_max' '30' '-fflags' '+discardcorruptts+fillwallclockdts' '-probesize' '20000000' '-i' 'http://hdhrp2:5004/auto/v3' '-map' '0:V?' '-codec:V' 'copy' '-map' '0:a?' '-codec:a' 'copy' '-map' '0:s?' '-codec:s' 'copy' '-break_non_keyframes' '1' '-segment_format' 'mpegts' '-f' 'ssegment' '-individual_header_trailer' '0' '-segment_time' '1' '-segment_start_number' '0' '-segment_time_delta' '0.25' '-segment_list' 'http://127.0.0.1:32400/video/:/transcode/session/3c111c56-f59e-466b-b365-9863a4963319/ced1ffd3-a47f-4fd6-abf9-4113e87839c9/manifest?X-Plex-Http-Pipeline=infinite' '-segment_list_type' 'csv' '-segment_list_size' '5' '-segment_list_separate_stream_times' '1' '-segment_list_unfinished' '1' '-max_delay' '5000000' '-map_metadata' '-1' '-map_chapters' '-1' 'media-%05d.ts' '-y' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-xioerror' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/3c111c56-f59e-466b-b365-9863a4963319/ced1ffd3-a47f-4fd6-abf9-4113e87839c9/progress'
Jul 20, 2021 09:04:22.236 [0x7f0ffcde3b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc/JobRunner] Jobs: Starting child process with pid 1219
Jul 20, 2021 09:04:22.241 [0x7f0ffd729b38] ERROR - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] Error issuing curl_easy_perform(handle): 28
Jul 20, 2021 09:04:22.241 [0x7f0ffd729b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] HTTP simulating 408 after curl timeout
--
Jul 20, 2021 09:04:23.252 [0x7f0ffd8e7b38] DEBUG - Completed: [127.0.0.1:55820] 200 GET /identity (15 live) 0ms 398 bytes (pipelined: 1)
Jul 20, 2021 09:04:23.253 [0x7f0ffd8c4b38] VERBOSE - Didn't receive a request from 127.0.0.1:55820: End of file
Jul 20, 2021 09:04:24.272 [0x7f0ffd8c4b38] VERBOSE - WebSocket: processed 1 frame(s)
Jul 20, 2021 09:04:25.242 [0x7f0ffca22b38] DEBUG - [Grabber/3-8cd8hgbdptqvum3nu8rxqlwc] HTTP requesting GET http://hdhrp2/discover.json
Jul 20, 2021 09:04:27.254 [0x7f0ffbf39b38] ERROR - [Transcoder] [tcp @ 0x7f42b3521e80] Failed to resolve hostname hdhrp2: Try again
Jul 20, 2021 09:04:27.254 [0x7f0ffbf0eb38] ERROR - [Transcoder] http://hdhrp2:5004/auto/v3: I/O error
Jul 20, 2021 09:04:27.254 [0x7f0ffd8c4b38] VERBOSE - Didn't receive a request from 127.0.0.1:55808: End of file
Jul 20, 2021 09:04:27.254 [0x7f0fff992b38] VERBOSE - JobManager: child process with handle 1219 exited
Jul 20, 2021 09:04:27.254 [0x7f0fff992b38] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 1219 is 1 (failure)
--
Jul 20, 2021 09:04:27.325 [0x7f0ffd8c4b38] DEBUG - Completed: [192.168.0.12:63363] 200 GET /tv.plex.providers.epg.xmltv:14/tags?type=310 (13 live) TLS GZIP 5ms 9747 bytes (pipelined: 7)
Jul 20, 2021 09:04:27.482 [0x7f0ffbe41b38] VERBOSE - It took 0.0 sec to serialize a list with 1373 elements.
Jul 20, 2021 09:04:27.522 [0x7f0ffd8c4b38] DEBUG - Completed: [192.168.0.12:54286] 200 GET /tv.plex.providers.epg.xmltv:14/grid?type=1%2C4&sort=beginsAt&endsAt%3E=1626786000&beginsAt%3C=1626798600 (13 live) TLS GZIP 203ms 263025 bytes (pipelined: 8)
Jul 20, 2021 09:04:28.234 [0x7f0ffcef9b38] DEBUG - DVR:Segmenter: Stopping idle session: http://hdhrp2:5004/auto/v3.
Jul 20, 2021 09:04:28.303 [0x7f0ffc2d2b38] DEBUG - Request: [127.0.0.1:55846 (Loopback)] GET /identity (14 live) Signed-in / Accept => */* / Host => localhost:32400 / User-Agent => curl/7.68.0
Jul 20, 2021 09:04:28.303 [0x7f0ffc2d2b38] VERBOSE - It took 0.0 sec to serialize a list with 0 elements.
Jul 20, 2021 09:04:28.303 [0x7f0ffd8c4b38] DEBUG - Completed: [127.0.0.1:55846] 200 GET /identity (14 live) 0ms 398 bytes (pipelined: 1)

I have two primes, with host names hdhrp1 and hdhrp2.

On the host machine (Photon OS host in ESXi), I’m able to resolve both names via my local DNS server at 192.168.0.1 via systemd-resolved:

> ping hdhrp2
PING hdhrp2 (192.168.0.161) 56(84) bytes of data.
64 bytes from hdhrp2 (192.168.0.161): icmp_seq=1 ttl=64 time=0.175 ms

Within the plex-server docker container, I’m able to resolve/ping those hosts fine too:

> dig hdhrp2

; <<>> DiG 9.16.1-Ubuntu <<>> hdhrp2
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58286
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;hdhrp2.                                IN      A

;; ANSWER SECTION:
hdhrp2.                 0       IN      A       192.168.0.161

However, in the same container when I run the Plex Transcoder executable directly (which looks like it’s just ffmpeg?) , it shows that it cannot resolve the same host.

'/usr/lib/plexmediaserver/Plex Transcoder' '-i' 'http://hdhrp2:5004/auto/v4'
ffmpeg version fa235d6-3858 Copyright (c) 2000-2019 the FFmpeg developers
  built with Plex clang version 11.0.1 (https://plex.tv e0c29d5827bc4eaaa2ceb882cbeed224b0960173)
...
[tcp @ 0x7f2dc281df00] Failed to resolve hostname hdhrp2: Try again
http://hdhrp2:5004/auto/v4: I/O error

I just saw a new Plex released a few days ago, and there’s a note around DNS lookups failing:

(Network) DNS lookups could fail on some Linux systems that rely solely on systemd-resolved (#12791)

However, this update does not seem to fix my issue. I’ve tried a few versions back (1.23.3 and 1.23.4), but those versions didn’t work either.

I’m not sure if these two Alpine Linux ffprobe issues are related, but it sounds like it could posssibly be a problem with build/linking when using Alpine linux as a base:

A README notes:

A limitation of statically linking glibc is the loss of DNS resolution. Installing
             nscd through your package manager will fix this or you can use
             "ffmpeg -i http://<ip address here>/" instead of "ffmpeg -i http://example.com/"

Now I can probably just change these tuners to their static IP addresses, but I’d honestly prefer to use the hostnames…

Any other things I can try?

Note if I update the /etc/hosts in the container to resolve the hosts, the tuners connect/work fine with Plex Transcoder (ffmpeg).

I tried removing one of the tuners and re-adding it by IP address, but it insists on using its hostname instead. So I’m not sure if there’s a way to “force” using these devices by IP address.