我正在尝试安装OpenIMSCore并按照此链接中的步骤操作,尝试重新启动网络时出现以下错误,
root@ubuntu16:~/.test/OpenIMSCore# /etc/init.d/networking restart
[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.
failed!
root@ubuntu16:~/.test/OpenIMSCore# systemctl status networking.service
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: failed (Result: exit-code) since Sat 2018-08-04 01:17:51 IST; 19s ago
Docs: man:interfaces(5)
Process: 27064 ExecStop=/sbin/ifdown -a --read-environment --exclude=lo (code=exited, status=1/FAILURE)
Process: 27167 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 27164 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=ex
Main PID: 27167 (code=exited, status=1/FAILURE)
Aug 04 01:17:51 ubuntu16 systemd[1]: Starting Raise network interfaces...
Aug 04 01:17:51 ubuntu16 sh[27164]: /etc/network/interfaces:4: option with empty value
Aug 04 01:17:51 ubuntu16 sh[27164]: ifquery: couldn't read interfaces file "/etc/network/interfaces"
Aug 04 01:17:51 ubuntu16 ifup[27167]: /etc/network/interfaces:4: option with empty value
Aug 04 01:17:51 ubuntu16 ifup[27167]: /sbin/ifup: couldn't read interfaces file "/etc/network/interfaces"
Aug 04 01:17:51 ubuntu16 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Aug 04 01:17:51 ubuntu16 systemd[1]: Failed to start Raise network interfaces.
Aug 04 01:17:51 ubuntu16 systemd[1]: networking.service: Unit entered failed state.
Aug 04 01:17:51 ubuntu16 systemd[1]: networking.service: Failed with result 'exit-code'.
调试后我发现问题出在 /etc/network/interfaces 文件上,当添加以下参数(从 DEVICE、HWADDR 到 PEERDNS)并启动网络时,我收到上述错误。
有没有人在修改接口文件时遇到过同样的问题(我的 /etc/hosts 文件和 /etc/resolv.conf 文件与上面链接中提供的类似)。
对此的任何参考也将有很大帮助!
提前致谢。