卸载网络管理器后,Networking.service 需要 5 分钟

卸载网络管理器后,Networking.service 需要 5 分钟

我尝试过解决方案在这里无效,使用sudo systemctl edit networking.service并添加 TimeoutStartSec=10sec。但networking.service 仍然超过 5 分钟。我检查了启动后的变化,networking.service 文件中仍然有超时。既然我使用了,sudo systemd-analyze blame我可以完全删除吗?networking.serviceifup

sudo systemctl status networking.service给出:

● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/networking.service.d
           └─override.conf
   Active: failed (Result: timeout) since Tue 2017-07-18 19:16:48 MDT; 30min ago
     Docs: man:interfaces(5)
 Main PID: 912 (code=killed, signal=TERM)

Jul 18 19:16:48 musty systemd[1]: networking.service: Start operation timed out. Terminating.
Jul 18 19:16:48 musty systemd[1]: networking.service: Main process exited, code=killed, status=15/TERM
Jul 18 19:16:48 musty systemd[1]: Failed to start Raise network interfaces.
Jul 18 19:16:48 musty systemd[1]: networking.service: Unit entered failed state.
Jul 18 19:16:48 musty systemd[1]: networking.service: Failed with result 'timeout'.
Jul 18 19:16:59 musty systemd[1]: [/etc/systemd/system/networking.service.d/override.conf:1] Assignment 
Jul 18 19:17:51 musty systemd[1]: [/etc/systemd/system/networking.service.d/override.conf:1] Assignment 
Jul 18 19:28:11 musty systemd[1]: [/etc/systemd/system/networking.service.d/override.conf:1] Assignment 
Jul 18 19:29:08 musty systemd[1]: [/etc/systemd/system/networking.service.d/override.conf:1] Assignment 
Jul 18 19:35:57 musty systemd[1]: [/etc/systemd/system/networking.service.d/override.conf:1] Assignment 

答案1

这解决了问题。

打开/etc/init.d/networking并设置CONFIGURE_INTERFACES=no

答案2

另请检查https://unix.stackexchange.com/questions/390307/startup-debian-9-error-failed-to-start-raise-network-interfaces

编辑/etc/network/interfaces如下:(删除其他所有内容..)

auto lo
iface lo inet loopback

保存并重启

相关内容