systemd-resolved をインストールすると、DNS ルックアップが終了します。

systemd-resolved をインストールすると、DNS ルックアップが終了します。

修正する をアンインストールして再インストールした後、systemd-resolved問題が自然に解決されたようです。理由はわかりませんが、2番目の/etc/resolv.confインストール後には修正されませんでしたが、パッケージを最初にインストールしたときには修正されたことがわかりました。systemd-resolved

質問:

ホームアシスタント監督インストーラの指示に従ってください。ここ私のOrange Pi ZeroでDebianを実行します。これはネットワークブートイメージで設定されます。このsystemd-resolvedパッケージをインストールした後、システムはWebサイトのアドレスを検索できなくなります。パッケージを削除すると問題が解決する可能性があります。エラーは次のとおりです。

Temporary failure resolving 'deb.debian.org'

観察結果:

私のデバイスがArmbianイメージを使用してもこれは起こりませんでしたが、Home-AssistantはArmbianをサポートしていないので、Debianを試してみました。

URL(またはネットワーク上の.locals)に対してpingを実行することはできませんが、IPアドレスに対してpingを実行できます。

仕事と期待される仕事:

予想(事前設置作業systemd-resolved

jodie@orangePiZero:~$ wget -O homeassistant-supervised.deb https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
--2023-11-22 00:00:49--  https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
Resolving github.com (github.com)... 20.87.245.0
Connecting to github.com (github.com)|20.87.245.0|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/home-assistant/supervised-installer/releases/download/1.5.0/homeassistant-supervised.deb [following]
--2023-11-22 00:00:50--  https://github.com/home-assistant/supervised-installer/releases/download/1.5.0/homeassistant-supervised.deb
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/183216119/905cc380-f350-4a95-ac33-a2749b7858fa?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231121%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231121T220050Z&X-Amz-Expires=300&X-Amz-Signature=21a10eb8987bbe62d3a2826be9ba66ed9476dbbe6015990ad0fb53b46db6224f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=183216119&response-content-disposition=attachment%3B%20filename%3Dhomeassistant-supervised.deb&response-content-type=application%2Foctet-stream [following]
--2023-11-22 00:00:50--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/183216119/905cc380-f350-4a95-ac33-a2749b7858fa?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231121%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231121T220050Z&X-Amz-Expires=300&X-Amz-Signature=21a10eb8987bbe62d3a2826be9ba66ed9476dbbe6015990ad0fb53b46db6224f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=183216119&response-content-disposition=attachment%3B%20filename%3Dhomeassistant-supervised.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6504 (6.4K) [application/octet-stream]
Saving to: ‘homeassistant-supervised.deb’

homeassistant-supervised.d 100%[=======================================>]   6.35K  --.-KB/s    in 0.002s

2023-11-22 00:00:51 (2.50 MB/s) - ‘homeassistant-supervised.deb’ saved [6504/6504]

動作しない:

jodie@orangePiZero:~$ wget -O homeassistant-supervised.deb https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
--2023-11-22 17:11:35--  https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
Resolving github.com (github.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘github.com’

ネットワーク設定:

tp-link ホームルータがあり、デバイスの MAC アドレスに対して DHCP アドレス予約を設定しました。他のデバイスと同じサブネット上にあり、他のDNSサーバーを指定しません。それでもデバイスにSSHでアクセスできます(ほとんどはそう設定しました)。

質問:

DNSが機能するために設定を設定する必要がありますかsystemd-resolved

要求された情報:

/etc/resolv.confインストール前の内容systemd-resolved

nameserver 192.168.0.1
nameserver 0.0.0.0

最初のインストール後の内容:

# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search .

アンインストールと再インストール後の内容:

nameserver 192.168.0.1
nameserver 0.0.0.0

/etc/nsswitch.confインストール前の内容systemd-resolved

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         files systemd
group:          files systemd
shadow:         files systemd
gshadow:        files systemd

hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

最初のインストール後の内容systemd-resolved

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         files systemd
group:          files systemd
shadow:         files systemd
gshadow:        files systemd

hosts:          files resolve [!UNAVAIL=return] dns myhostname
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

アンインストールおよび再インストール後の内容systemd-resolved

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         files systemd
group:          files systemd
shadow:         files systemd
gshadow:        files systemd

hosts:          files resolve [!UNAVAIL=return] dns myhostname
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

その他の情報

これは実行結果ですresolvectl status

jodie@orangePiZero:~$ resolvectl status
Failed to get global data: Connection timed out

これは次の出力ですsystemctl status systemd-resolved

jodie@orangePiZero:~$ systemctl status systemd-resolved
● systemd-resolved.service - Network Name Resolution
     Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; preset: enabled)
     Active: active (running) since Tue 2023-11-21 23:09:21 SAST; 24min ago
       Docs: man:systemd-resolved.service(8)
             man:org.freedesktop.resolve1(5)
             https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
             https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
   Main PID: 577 (systemd-resolve)
     Status: "Processing requests..."
      Tasks: 1 (limit: 1075)
     Memory: 2.3M
        CPU: 847ms
     CGroup: /system.slice/systemd-resolved.service
             └─577 /lib/systemd/systemd-resolved

ベストアンサー1

network-managersystemd-resolvedは何とか設定を手動で設定しますが、正しいIPアドレスを維持しているようです。この問題を解決するには、nmtuiターミナル(ネットワークマネージャターミナルUI)で実行し、ネットワーク設定を再び自動(dhcp)に設定します。

Home Assistant Supervisorをインストールして正しく実行した後、Home Assistant Supervisorは設定を管理しました。

おすすめ記事