SSSD 无法执行动态 DNS 更新:Could not resolve address for this machine, error:Timeout while contacting DNS servers
Issue
- 加入 AD 域的 RHEL 主机无法执行动态 DNS 更新。
-
SSSD 调试日志返回
Timeout while contacting DNS servers,表示 DNS 服务器无法访问:(2025-08-06 10:54:46): [be[ad.example.com]] [ad_dyndns_update_send] (0x0400): Performing update <...> (2025-08-06 10:54:46): [be[ad.example.com]] [resolv_is_unix] (0x4000): [rhel.ad.example.com] does not look like a unix domain socket (2025-08-06 10:54:46): [be[ad.example.com]] [resolv_is_address] (0x4000): [rhel.ad.example.com] does not look like an IP address (2025-08-06 10:54:46): [be[ad.example.com]] [resolv_gethostbyname_step] (0x2000): Querying DNS (2025-08-06 10:54:46): [be[ad.example.com]] [resolv_gethostbyname_dns_query] (0x0100): Trying to resolve A record of 'rhel.ad.example.com' in DNS <...> (2025-08-06 10:54:47): [be[ad.example.com]] [resolv_gethostbyname_done] (0x0040): querying hosts database failed [5]: Input/output error (2025-08-06 10:54:47): [be[ad.example.com]] [nsupdate_get_addrs_done] (0x0040): Could not resolve address for this machine, error [5]: Input/output error, resolver returned: [12]: Timeout while contacting DNS servers (2025-08-06 10:54:47): [be[ad.example.com]] [nsupdate_get_addrs_done] (0x0040): nsupdate_get_addrs_done failed: [5]: [Input/output error] (2025-08-06 10:54:47): [be[ad.example.com]] [sdap_dyndns_dns_addrs_done] (0x0040): Could not receive list of current addresses [5]: Input/output error (2025-08-06 10:54:47): [be[ad.example.com]] [ad_dyndns_sdap_update_done] (0x0040): Dynamic DNS update failed [5]: Input/output error (2025-08-06 10:54:47): [be[ad.example.com]] [sdap_id_op_destroy] (0x4000): releasing operation connection (2025-08-06 10:54:47): [be[ad.example.com]] [sdap_id_conn_data_idle] (0x4000): Marking connection as idle (2025-08-06 10:54:47): [be[ad.example.com]] [be_ptask_done] (0x0040): Task [Dyndns update]: failed with [5]: Input/output error -
需要在 DNS 服务器中设置的主机名为
rhel.ad.example.com。 -
系统主机名被设置为一个短主机名:
# hostname rhel -
完全限定域名 (FQDN) 在
sssd.conf中设置# cat /etc/sssd/sssd.conf | grep hostname ad_hostname = rhel.ad.example.com -
主机名在
/etc/hosts中设置# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.200 rhel.ad.example.com rhel -
另外,
dig显示 DNS 服务器可以被访问,主机名也可以被解析。# dig rhel.ad.example.com <...> ;; ANSWER SECTION: rhel.ad.example.com. 3600 IN A 192.168.1.200 ;; Query time: 1 msec ;; SERVER: 192.168.1.100#53(192.168.1.100) (UDP) ;; WHEN: Wed Aug 06 11:03:12 AEST 2025 ;; MSG SIZE rcvd: 66
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 10
- Active Directory (AD)
- System Security Services Daemon (SSSD)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.