Plex media server 1.23.0.4438 unable to access server content (could not resolve host plex.tv)

On the new PMS version, curl, for whatever reason, is trying to find the DNS server in the Global DNS configuration. The systemd resolved service marks the server currently in use with “Current DNS Server” (see below), which is correctly set but it still complained about having no DNS server available.

# resolvectl status
Global
           Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
    resolv.conf mode: foreign
Fallback DNS Servers: 1.1.1.1 9.9.9.10 8.8.8.8 2606:4700:4700::1111 2620:fe::10 2001:4860:4860::8888

Link 3 (enp0s25)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 1.1.1.1
       DNS Servers: 1.1.1.1 208.67.222.222

Using Curl just directly on my system still worked just fine and used the proper DNS, unsure as to why on the new version of Plex, curl fails.

# curl plex.tv
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

However dig did not work, which triggered me (i.e. dig had no DNS available).

# dig plex.tv

; <<>> DiG 9.16.15 <<>> plex.tv
;; global options: +cmd
;; connection timed out; no servers could be reached

After adding a DNS nameserver to my resolv config, it worked. Still unclear why this is necessary and I don’t like this “fix” as this shouldn’t be necessary.

I still would like to know what the new version of PMS does different, that might trigger this.

# dig plex.tv

; <<>> DiG 9.16.15 <<>> plex.tv
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52122
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;plex.tv.                       IN      A

;; ANSWER SECTION:
plex.tv.                33      IN      A       108.128.10.254
plex.tv.                33      IN      A       99.81.164.127
plex.tv.                33      IN      A       99.81.153.144

;; Query time: 16 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri May 07 12:55:50 CEST 2021
;; MSG SIZE  rcvd: 84