Lost my network after upgrade Debian from Wheezy to Jessie
Then I connected to instance by LISH and saw ifconfig:
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
@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.
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?
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.
> 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:
sudo systemctl start networking
debian.org
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!
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.
systemctl start networking
will be enough. If no, you have a problem with network configuration, not systemd.
### 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