admin管理员组

文章数量:1618709

目录

问题:

解决方法1

解决方法2

1、检查状态

2、重新连接服务

3、重启服务 

4、确认状态 


问题:

DNS 服务出错导致,无法连接远程服务器 

# apt-get update
Err:1 http://apt.postgresql/pub/repos/apt focal-pgdg-testing InRelease
  Temporary failure resolving 'apt.postgresql'
Err:2 https://ftp.postgresql/pub/pgadmin/pgadmin4/apt/focal pgadmin4 InRelease
  Temporary failure resolving 'ftp.postgresql'
Err:3 http://it.archive.ubuntu/ubuntu focal InRelease
  Temporary failure resolving 'it.archive.ubuntu'
Err:4 http://nightly.odoo/12.0/nightly/deb ./ InRelease
  Temporary failure resolving 'nightly.odoo'
Err:5 http://apt.postgresql/pub/repos/apt focal-pgdg InRelease
  Temporary failure resolving 'apt.postgresql'
Err:6 http://it.archive.ubuntu/ubuntu focal-updates InRelease
  Temporary failure resolving 'it.archive.ubuntu'
Err:7 http://security.ubuntu/ubuntu focal-security InRelease
  Temporary failure resolving 'security.ubuntu'
Err:8 http://it.archive.ubuntu/ubuntu focal-backports InRelease
  Temporary failure resolving 'it.archive.ubuntu'
Reading package lists... Done
W: Failed to fetch http://it.archive.ubuntu/ubuntu/dists/focal/InRelease  Temporary failure resolving 'it.archive.ubuntu'
W: Failed to fetch http://it.archive.ubuntu/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'it.archive.ubuntu'
W: Failed to fetch http://it.archive.ubuntu/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'it.archive.ubuntu'
W: Failed to fetch http://security.ubuntu/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'security.ubuntu'
W: Failed to fetch http://nightly.odoo/12.0/nightly/deb/./InRelease  Temporary failure resolving 'nightly.odoo'
W: Failed to fetch https://ftp.postgresql/pub/pgadmin/pgadmin4/apt/focal/dists/pgadmin4/InRelease  Temporary failure resolving 'ftp.postgresql'
W: Failed to fetch http://apt.postgresql/pub/repos/apt/dists/focal-pgdg-testing/InRelease  Temporary failure resolving 'apt.postgresql'
W: Failed to fetch http://apt.postgresql/pub/repos/apt/dists/focal-pgdg/InRelease  Temporary failure resolving 'apt.postgresql'
W: Some index files failed to download. They have been ignored, or old ones used instead.

解决方法1

resolvconf -u

 手动更新DNS 服务,但是重启后需要重新执行这个命令。

解决方法2

1、检查状态

systemd-resolve --status
# systemd-resolve --status
Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found.

2、重新连接服务

sudo ln -sf /lib/systemd/system/systemd-resolved.service /etc/systemd/system/dbus-org.freedesktop.resolve1.service

3、重启服务 

sudo systemctl restart systemd-resolved.service

4、确认状态 

~# systemd-resolve --status
Global
       LLMNR setting: no
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
  Current DNS Server: 8.8.8.8
         DNS Servers: 8.8.8.8
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa

 

 

 

本文标签: 网址dnsUbuntufailedfailure