My networking service has failed to restart, first after some configuration, then after a reboot. I'd like to know why and how to resolve the issue.

As I'm fairly new to Linux, especially when it comes to complex configuration, I'll try to explain what I did to get so stuck. I have a virtual machine running Debian 9. On it, I installed Nginx in an attempt to run Gunicorn and Flask for a Python web app. I managed to set up a simple server and install SSL Certificates. Even Gunicorn worked on a subdomain. But the certificates, which were automatically installed and configured by Certbot, didn't include this subdomain. So I deleted the certificate, configured the server back to allow for another certificate install, this time a certonly one - I figured I'd gotten the configuration right. The certificate was installed, but approximately at that time my server stopped responding completely, as if it's blocking all traffic.

Trying a number of configurations ranging from my full subdomain conf to a minimalist default configuration, all of them pass nginx -t and restart fine, ufw allows all the correct ports, namely 80, 443 and 2222, which I use for ssh. However, curl my_machine.net refuses connections and nmap displays only the ssh port.

Below is the log of journalctl -xe, should that provide any information. Where could I begin debugging? I'm pretty sure it was either Nginx, Certbot or some other event not triggered by me (at least intentionally) that started this. systemctl --all shows no other services have failed, though some have their condition failed, which seems like a normal situation.

-- Unit networking.service has begun starting up.
Jul 08 18:33:13 my_machine.net ifup[989]: RTNETLINK answers: File exists
Jul 08 18:33:13 my_machine.net ifup[989]: ifup: failed to bring up eth0
Jul 08 18:33:13 my_machine.net systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Jul 08 18:33:13 my_machine.net systemd[1]: Failed to start Raise network interfaces.
-- Subject: Unit networking.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- Unit networking.service has failed.
-- The result is failed.
Jul 08 18:33:13 my_machine.net systemd[1]: networking.service: Unit entered failed state.
Jul 08 18:33:13 my_machine.net systemd[1]: networking.service: Failed with result 'exit-code'.
Jul 08 18:33:13 my_machine.net sudo[982]: pam_unix(sudo:session): session closed for user root
Jul 08 18:33:21 my_machine.net kernel: [UFW BLOCK] IN=eth0 OUT= MAC=long_address SRC=short_address
Jul 08 18:33:26 my_machine.net sudo[1007]:    my_user : TTY=pts/0 ; PWD=/home/my_user ; USER=root ; COMMAND=/bin/journalctl -
Jul 08 18:33:26 my_machine.net sudo[1007]: pam_unix(sudo:session): session opened for user root by my_user(uid=0)


  • After a dhclient -r and another reboot, a different error is shown: RTNETLINK answers: Permission denied.
  • /etc/sysctl.conf displays net.ipv6.conf.all.disable_ipv6 = 1, but before editing such a file I'd like to make sure what exact effect this has on the system
  • I do have general internet connection, apparent from ssh and curling outwards, e.g. google.com
  • For what it's worth, ping my_machine.net works, but I guess that ought to
  • The output of ip route is: default via xx.xx.xx.1 dev eth0 onlink xx.xx.xx.0/24 via xx.xx.xx.1 dev eth0

Yeah, so. I did a reinstall and reconfiguration. All was well until I started adding subdomains again. A similar problem of not listening presented itself. This time networking was ok though.

It turns out symbolic linking sites from sites-available to sites-enabled with ln -s requires full, absolute paths. I was using relative ones. So no sites were included. While not a fix to the dhclient/ifup problem, it did resolve the issue for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.