Report this

What is the reason for this report?

apt-get update returns error 'failure resolving repo.percona.com'

Posted on December 30, 2018

after trying to get all the updates loaded onto my droplet, update stopped working:

history
 1976  sudo apt-get update
 1977  sudo apt-get upgrade
 1978  sudo dpkg --configure -a
 1979  sudo apt-get upgrade
 1980  sudo apt-get update
 1981  apt-get -f install'
 1982  apt-get -f install
 1983  sudo dpkg --configure -a
 1984  sudo apt-get -f install
 1985  sudo apt-get update
 1986  sudo apt-get upgrade
 1987  sudo apt-get update
 1988  sudo apt-get upgrade
 1989  sudo apt autoremove
 1990  sudo reboot
 1991  sudo apt-get update

The last update returns:

Err:1 http://repo.percona.com/percona/apt xenial InRelease
  Temporary failure resolving 'repo.percona.com'
Err:2 http://repo.percona.com/apt xenial InRelease
  Temporary failure resolving 'repo.percona.com'
Err:3 http://mirrors.digitalocean.com/ubuntu xenial InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:4 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:5 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:6 https://repos.sonar.digitalocean.com/apt main InRelease
  Could not resolve host: repos.sonar.digitalocean.com
Err:7 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
  Temporary failure resolving 'ppa.launchpad.net'
Err:8 http://security.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://mirrors.digitalocean.com/ubuntu/dists/xenial-backports/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://ppa.launchpad.net/certbot/certbot/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Failed to fetch https://repos.sonar.digitalocean.com/apt/dists/main/InRelease  Could not resolve host: repos.sonar.digitalocean.com
W: Failed to fetch http://repo.percona.com/percona/apt/dists/xenial/InRelease  Temporary failure resolving 'repo.percona.com'
W: Failed to fetch http://repo.percona.com/apt/dists/xenial/InRelease  Temporary failure resolving 'repo.percona.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

My /etc/resolv.conf file:

 cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
 sudo service networking restart
Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.

systemctl status networking.service
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
   Active: failed (Result: exit-code) since Sun 2018-12-30 11:12:55 EST; 3min 43s ago
     Docs: man:interfaces(5)
  Process: 20195 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 20191 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)"
 Main PID: 20195 (code=exited, status=1/FAILURE)

Dec 30 11:12:55 kbcmhub ifup[20195]: Failed to bring up lo.
Dec 30 11:12:55 kbcmhub ifup[20195]: RTNETLINK answers: File exists
Dec 30 11:12:55 kbcmhub ifup[20195]: Failed to bring up eth0.
Dec 30 11:12:55 kbcmhub ifup[20195]: /etc/network/if-up.d/sendmail: 44: .: Can't open /usr/share/sendmail/dynamic
Dec 30 11:12:55 kbcmhub ifup[20195]: run-parts: /etc/network/if-up.d/sendmail exited with return code 2
Dec 30 11:12:55 kbcmhub ifup[20195]: /sbin/ifup: post-up script failed.
Dec 30 11:12:55 kbcmhub systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Dec 30 11:12:55 kbcmhub systemd[1]: Failed to start Raise network interfaces.
Dec 30 11:12:55 kbcmhub systemd[1]: networking.service: Unit entered failed state.
Dec 30 11:12:55 kbcmhub systemd[1]: networking.service: Failed with result 'exit-code'.

Sendmail is not working



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

It looks like that there seems to be an issue with sendmail service preventing the networking service from starting.

If you don’t need sendmail, you might consider uninstalling it to prevent it from causing more issues.

If you do need it, the error message indicates that it’s unable to open /usr/share/sendmail/dynamic, which could mean that the file doesn’t exist, or that there are incorrect permissions on the file or directory. If the file does not exist it might be best to purge sendmail, restart the networking service then install sendmail from scratch again.

There has been a similar discussion here which also suggest purging and installing sendmail from scratch:

https://www.linuxquestions.org/questions/ubuntu-63/sendmail-not-letting-me-restart-networking-service-667894/

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.