Lost my network after upgrade Debian from Wheezy to Jessie

Hi. I’ve upgraded my linode from wheezy to jessie. Then reboot and then I see that my site is down. I tried to ping my instance, 100.0% packet was lost.

Then I connected to instance by LISH and saw ifconfig: https://www.evernote.com/l/AF5dHgLEOWNL … EBZmw7Aa98">https://www.evernote.com/l/AF5dHgLEOWNLf6H6acPfDHbtjEBZmw7Aa98. You see I have docker and vpn. I disable it for cleaner result, so cleaner ifconfig is:

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:948 (948.0 B)  TX bytes:948 (948.0 B)

So I tried to configure eth0 manually:

sudo ifconfig eth0 inet 178.79.X.X
8021q: adding VLAN 0 to HW filter on device eth0

sudo ifconfig eth0 up

sudo ifconfig eth0
eth0      Link encap:Ethernet  HWaddr f2:3c:91:69:e5:58
          inet addr:178.79.X.X  Bcast:178.79.255.255  Mask:255.255.0.0
          inet6 addr: fe80::f03c:91ff:XXXX:XXXX/64 Scope:Link
          inet6 addr: 2a01:7e00::f03c:91ff:XXXX:XXXX/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:344 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:26430 (25.8 KiB)  TX bytes:508 (508.0 B)

sudo route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.15.0.0       *               255.255.255.0   U     0      0        0 tun0
172.17.0.0      *               255.255.0.0     U     0      0        0 docker0
178.79.0.0      *               255.255.0.0     U     0      0        0 eth0

sudo route add default gateway 178.79.157.1

And then my server became pingable from outside. There is my /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

It’s the same than before update. Why my server stopped getting network settings automatically on startup after upgrade?

12 Replies

I think you may be missing the:

auto eth0

above

iface eth0 inet dhcp

@kangaby:

I think you may be missing the:

auto eth0

above

iface eth0 inet dhcp

Unfortunately, it doesn’t help. When I reboot my instance with connected LISH console, I saw following error on system boot:

systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
systemd[1]: Found ordering cycle on basic.target/start
systemd[1]: Found dependency on sysinit.target/start
systemd[1]: Found dependency on networking.service/start
systemd[1]: Found dependency on iptables.service/start
systemd[1]: Found dependency on basic.target/start
systemd[1]: Breaking ordering cycle by deleting job networking.service/start
systemd[1]: Job networking.service/start deleted to break ordering cycle starting with basic.target/start
[ SKIP ] Ordering cycle found, skipping LSB: Raise network interfaces.

So networking just is not started. When I do

sudo systemctl start networking

network appears of course. So I just have to fix this problem.

So, the cycle is:

systemctl show -p After basic.target | grep sysinit.target
After=... sysinit.target ...

systemctl show -p After sysinit.target | grep networking.service
After=... networking.service ...

systemctl show -p After networking.service | grep iptables.service
After=... iptables.service ...

systemctl show -p After iptables.service | grep basic.target
After=... basic.target ...

Which unit is wrong?

Did you ever solve this? I'm having the exact same issue. Contacted Linode and they couldn't figure it out after several suggestions they gave up

No, I didn’t. But as I found in Stretch there are different dependencies:

systemctl show -p After basic.target | grep sysinit.target
After=sysinit.target ...

systemctl show -p After sysinit.target | grep networking.service
# nothing

systemctl show -p After networking.service | grep iptables.service
# nothing

systemctl show -p After iptables.service | grep basic.target
# nothing

Today I’m going to install jessie into virtual machine and inspect this problem.

Found this:

> Arch Linux

An upstream change to persistent device naming in systemd has resulted in broken connectivity for any Linode running Arch Linux on a KVM host. The latest version of systemd (226-1+) uses “Predictable Network Interface Names,” which prevent the network interface on our platform from being brought online at boot.

You can disable the use of Predictable Network Interface Names with the command below.

1

ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

If you have already upgraded and lost connectivity to your Linode, you will need to use the LISH Console to regain access to your Linode to run this command. Once you’ve done so, reboot your system.

from: https://www.linode.com/docs/platform/kvm-reference at the bottom. Called Linode they said that fixes the issue 90% of the time. For me it didn't, nor did setting static IP in interfaces… so I took your commands (which also worked until reboot), put them in a script, and added that to root crontab on reboot as a workaround.

PcComputerGuy, which commands you put in a script? If you have the same problem as me, following command will enough:

sudo systemctl start networking

So on fresh Jessie I installed from debian.org the units are following:

systemctl show -p After basic.target | grep sysinit.target
After=sysinit.target ...

systemctl show -p After sysinit.target | grep networking.service
After=... networking.service ...

systemctl show -p After networking.service | grep iptables.service
# nothing!

systemctl show -p After iptables.service | grep basic.target
# nothing!

Script setStaticIPonBoot.sh

sudo ifconfig eth0 inet XXX.XXX.XXX.XXX

sudo route add default gateway xxx.xxx.xxx.xxx

sudo ifconfig eth0 up

Script added to root crontab on boot.

PcComputerGuy, if your network is configured properly but doesn’t start on startup, systemctl start networking will be enough. If no, you have a problem with network configuration, not systemd.

So, the problem is in file /etc/init.d/iptables:

### BEGIN INIT INFO
# Provides:          iptables
# Required-Start:    mountkernfs $local_fs
# Required-Stop:     mountkernfs $local_fs
# X-Start-Before:    networking
# X-Stop-After:      networking
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Iptables
# Description:       Debian init script for iptables
### END INIT INFO

Look at this:

# X-Start-Before:    networking
# X-Stop-After:      networking

I remove these strings and reboot. It solve the problem.

That was much easier to fix than the suggestions above.

Log to your Linode Manager and set Auto-Configure Networking to "yes" in the Filesystem/Boot Helpers section for your Linode. See this article https://www.linode.com/docs/platform/network-helper/

Reboot

Not sure when/why it got turned off on my instance

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct