고쳐 쓰다
을(를) 제거하고 다시 설치한 후 systemd-resolved
문제가 저절로 해결된 것 같습니다. 이유를 이해하지 못하지만 두 번째 /etc/resolv.conf
설치 후에는 수정되지 않았지만 패키지를 처음 설치할 때는 수정되었다는 것을 알았습니다 .systemd-resolved
질문:
홈어시스턴트 감독 설치 프로그램 지침을 따르려고 합니다.여기내 Orange Pi Zero에서 데비안을 실행합니다. 이는 네트워크 부팅 이미지에서 설정됩니다. 이 systemd-resolved
패키지를 설치한 후 시스템은 더 이상 웹사이트 주소를 조회할 수 없습니다. 패키지를 제거하면 문제가 해결될 수 있습니다. 오류는 다음과 같습니다.
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-manager
systemd-resolved는 어떻게든 설정을 수동으로 설정하지만 올바른 IP 주소를 유지하는 것 같습니다 . 이 문제를 해결하려면 nmtui
터미널(네트워크 관리자 터미널 UI)에서 실행하고 네트워크 설정을 다시 자동(dhcp)으로 설정할 수 있습니다.
Home Assistant Supervisor를 설치하고 올바르게 실행된 후 Home Assistant Supervisor가 설정을 관리했습니다.