![服务器重启后,network.service 失败或处于非活动状态 CENTOS 7](https://linux22.com/image/774976/%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%87%8D%E5%90%AF%E5%90%8E%EF%BC%8Cnetwork.service%20%E5%A4%B1%E8%B4%A5%E6%88%96%E5%A4%84%E4%BA%8E%E9%9D%9E%E6%B4%BB%E5%8A%A8%E7%8A%B6%E6%80%81%20CENTOS%207.png)
这种情况似乎经常发生(在这个网站上),我尝试了其他补救措施,但都无济于事。我将列出问题,然后介绍我尝试过的方法。
几天前我重新启动了服务器,当它重新启动时,SLURM 不起作用,network.service 也不起作用。systemctl reset-failed
修复了slurmd error
,但只将 network.service 从 更改failed
为inactive
,这两者都没有用。
systemctl status network.service
这是我刚刚重新启动服务器后得到的结果:
$ systemctl status network
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2022-02-11 11:18:25 PST; 1min 37s ago
Docs: man:systemd-sysv-generator(8)
Process: 2234 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
Tasks: 1
Memory: 2.4M
CGroup: /system.slice/network.service
└─2582 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-5d899a3b-67e6-4888-9c5b-06f30b255ff5-enp2s0f1.lease -pf /var/run/dhclient-enp2s0f1.pid -H c110370 enp2s0f1
尝试后systemctl reset-failed
变成:
(base) [dummy_name]$ sudo systemctl reset-failed
(base) [dummy_name]$ systemctl status network
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: inactive (dead) since Fri 2022-02-11 11:18:25 PST; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 2234 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
Tasks: 1
Memory: 2.4M
CGroup: /system.slice/network.service
└─2582 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-5d899a3b-67e6-4888-9c5b-06f30b255ff5-enp2s0f1.lease -pf /var/run/dhclient-enp2s0f1.pid -H c110370 enp2s0f1
我尝试过停止和禁用NetworkManager
,但无济于事。我错过了什么(我不是 IT 人员)
错误信息2234 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
可能是关键,但谷歌搜索它只会带来常见的 network.service 怀疑说reset-failed
或禁用NetworkManager
。
根据评论请求
(base) [dumm_name ~]$ ifconfig
enp2s0f0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether d4:5d:64:be:32:c2 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xfd620000-fd63ffff
enp2s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.100.10.33 netmask 255.255.255.0 broadcast 10.100.10.255
inet6 fe80::d65d:64ff:febe:32c3 prefixlen 64 scopeid 0x20<link>
ether d4:5d:64:be:32:c3 txqueuelen 1000 (Ethernet)
RX packets 70355 bytes 6270680 (5.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2412 bytes 176319 (172.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xfd600000-fd61ffff
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 52637 bytes 2650010 (2.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 52637 bytes 2650010 (2.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0