我正在尝试在 Raspberry PI 3 上的 CentOS 服务器上重新启动网络
systemctl 重新启动网络
但是,我得到了这个
由于控制进程退出并出现错误代码,network.service 作业失败。有关详细信息,请参阅“systemctl status network.service”和“journalctl -xe”。
[root@rpiserver ~]# systemctl status network.service
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 Sun 2017-07-02 21:08:50 UTC; 2min 46s ago
Docs: man:systemd-sysv-generator(8)
Process: 1002 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=6)
Jul 02 21:08:50 rpiserver systemd[1]: Starting LSB: Bring up/down networking...
Jul 02 21:08:50 rpiserver systemd[1]: network.service: control process exit...=6
Jul 02 21:08:50 rpiserver systemd[1]: Failed to start LSB: Bring up/down ne...g.
Jul 02 21:08:50 rpiserver systemd[1]: Unit network.service entered failed state.
Jul 02 21:08:50 rpiserver systemd[1]: network.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
这是我的 ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.200
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
答案1
重置 eth0 网卡中的当前配置
ip addr flush eth0
然后再试一次
systemctl restart networking
对于以后的帖子,请使用以下命令显示所有日志
提示:有些行被省略,使用 -l 完整显示。
systemctl status networking -l