0

I have the following networking problem in Ubuntu server:

When I try to restart the service networking I have the following error:

# systemctl restart networking
Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.

And when checking the status:

# systemctl status networking
* 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 Mon 2019-08-05 11:49:42 CEST; 4 days ago
     Docs: man:interfaces(5)
  Process: 1789 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 1773 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
 Main PID: 1789 (code=exited, status=1/FAILURE)

The log say:

# journalctl -xe
Aug 09 14:12:38 XXXXXXXXXXXXXXXXXXXXXXXXX systemd[1]: Stopped Raise network interfaces.
-- Subject: Unit networking.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit networking.service has finished shutting down.
Aug 09 14:12:38 XXXXXXXXXXXXXXXXXXXXXXXXX systemd[1]: Starting Raise network interfaces...
-- Subject: Unit networking.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit networking.service has begun starting up.
Aug 09 14:12:38 XXXXXXXXXXXXXXXXXXXXXXXXXX ifup[4487]: RTNETLINK answers: File exists
Aug 09 14:12:38 XXXXXXXXXXXXXXXXXXXXXXXXXX ifup[4487]: Failed to bring up ens160.
Aug 09 14:12:38 XXXXXXXXXXXXXXXXXXXXXXXXXX systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Aug 09 14:12:38 XXXXXXXXXXXXXXXXXXXXXXXXXX systemd[1]: Failed to start Raise network interfaces.
-- Subject: Unit networking.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit networking.service has failed.
-- 
-- The result is failed.

This is my network configuration:

# ip a | grep ens
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 172.20.252.15/24 brd 172.20.252.255 scope global ens160
3: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 192.168.254.51/24 brd 192.168.254.255 scope global ens192

The file:

# cat /var/run/network/ifstate.ens192 
ens192

It's OK, but the file /var/run/network/ifstate.ens160 is empty, so:

# cat /var/run/network/ifstate
lo=lo
ens192=ens192

Therefore the commands ifup and ifdown ens160 won't work, that's normal because of the empty ifstate.ens160 file.

Of course, if I add manually ens160 inside of the /var/run/network/ifstate.ens160, then I can restart properly the networking service, but this happens every time I restart the server, so this is not a solution.

Also, if I execute manually:

ip addr flush dev ens160

then ifup and ifdown will work and networking service will work too, but after reboot the original situation remains.

I've seen similar issues in SE, like this one but neither of the answers seems to solve my problem.

Which is the cause of this issue and how can I fix that definitely?

EDIT:

NetworkManager service is also running, but it is not managing the involved network interfaces:

cat /etc/NetworkManager/NetworkManager.conf 
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false

Even if I stop the NetworkManager service, the networking service won't reboot.

0

You must log in to answer this question.

Browse other questions tagged .