最近进行了 apt 升级后,重新启动后我没有网络。内核已更新,从 grub 菜单中使用旧内核重新启动会得到相同的结果。 iproute2 也升级了,我怀疑这可能是罪魁祸首,但我不知道如何修复它。
Journalctl -xeu Networking.service 的输出:
Apr 09:11:51 debian systemd[1]: Starting Raise network interfaces...
░░ Subject: A start job for unit networking.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit networking.service has begun execution.
░░
░░ The job identifier is 121.
Apr 23 09:11:51 debian ifup[914]: Error: Device for nexthop is not up.
Apr 23 09:11:51 debian ifup[904]: run-parts: /etc/network/if-up.d/avahi-autoipd exited with return code 2
Apr 23 09:11:51 debian ifup[834]: ifup: failed to bring up enp3s0
Apr 23 09:11:51 debian systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStart= process belonging to unit networking.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Apr 23 09:11:51 debian systemd[1]: networking.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit networking.service has entered the 'failed' state with result 'exit-code'.
Apr 23 09:11:51 debian systemd[1]: Failed to start Raise network interfaces.
░░ Subject: A start job for unit networking.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit networking.service has finished with a failure.
░░
░░ The job identifier is 121 and the job result is failed.
/etc/networking/interfaces 的内容(升级前工作):
#The loopback network interface
auto lo
iface lo inet loopback
#The primary network interface
auto enp3s0
iface enp3s0 inet static
address 10.0.0.9
netmask 255.255.255.0
gateway 10.0.0.2
答案1
事实证明,我调用了一个自定义脚本ip
,/usr/local/bin
在升级后导致了问题。
它已经存在了几个月并且从未引起过问题,我猜对它的调用之前使用的是完整路径,但现在不是。
不管怎样,在我删除这个自定义ip
脚本/usr/local/bin
并重新启动后,现在一切都正常了。