Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] failed to raise networking.service

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

[SOLVED] failed to raise networking.service

#1 Post by jalisco »

Hi all,

I get this error on bootup, and also when I type "systemctl status networking.service" from the CL.

Code: Select all

drexl@debianWorkstation:~$ systemctl status networking.service
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2018-09-29 09:03:23 CEST; 5min ago
     Docs: man:interfaces(5)
  Process: 862 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 688 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=
 Main PID: 862 (code=exited, status=1/FAILURE)

Networking, however, works perfectly fine.

What does this error mean? How can I get rid of it showing up every single bootup??
Last edited by jalisco on 2018-10-04 18:21, edited 1 time in total.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: failed to raise networking.service

#2 Post by L_V »

And more globally, what say this:

Code: Select all

systemctl status {systemd-networkd,systemd-resolved,networking,NetworkManager} | egrep -v 'Docs|http'
grep -v '^#' /etc/network/interfaces
ip a

User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

Re: failed to raise networking.service

#3 Post by jalisco »

Thanks for quick reply.

From the first command, I got the following info:

Code: Select all

drexl@debianWorkstation:~$ systemctl status {systemd-networkd,systemd-resolved,networking,NetworkManager} | egrep -v 'Docs|http'
● systemd-networkd.service - Network Service
   Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

● systemd-resolved.service - Network Name Resolution
   Loaded: loaded (/lib/systemd/system/systemd-resolved.service; disabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-resolved.service.d
           └─resolvconf.conf
   Active: inactive (dead)

● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2018-09-29 09:59:47 CEST; 1min 7s ago
  Process: 744 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 723 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
 Main PID: 744 (code=exited, status=1/FAILURE)

● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-09-29 09:59:47 CEST; 1min 6s ago
 Main PID: 841 (NetworkManager)
    Tasks: 4 (limit: 4915)
   CGroup: /system.slice/NetworkManager.service
           ├─ 841 /usr/sbin/NetworkManager --no-daemon
           └─1101 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /var/run/dhclient-enp7s0.pid -lf /var/lib/NetworkManager/dhclient-85c46160-c250-45d5-85fa-61060a7257d0-enp7s0.lease -cf /var/lib/NetworkManager/dhclient-enp7s0.conf enp7s0
From the second two commands, I get the following:

Code: Select all

drexl@debianWorkstation:~$ grep -v '^#' /etc/network/interfaces

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
drexl@debianWorkstation:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 2c:fd:a1:5e:0b:4c brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.7/24 brd 192.168.1.255 scope global dynamic enp7s0
       valid_lft 604613sec preferred_lft 604613sec
    inet6 fe80::2efd:a1ff:fe5e:b4c/64 scope link 
       valid_lft forever preferred_lft forever

User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

Re: failed to raise networking.service

#4 Post by jalisco »

Thanks for the commands! I should be able to figure it out, maybe =) Will give it a go.

On a side note, how does one learn all these wonderful commands?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: failed to raise networking.service

#5 Post by p.H »

What is the output of :

Code: Select all

cat /etc/network/interfaces.d/*
ifup -a -v

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: failed to raise networking.service

#6 Post by L_V »

+

Code: Select all

apt-cache policy ifupdown
If you don't need/use ifupdown can you try to remove it and check again ?
https://bugs.debian.org/cgi-bin/bugrepo ... bug=894759

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: failed to raise networking.service

#7 Post by debiman »

jalisco wrote:Networking, however, works perfectly fine.
try this:

Code: Select all

systemctl disable networking
systemctl stop networking
the error should be gone now.
if, even after a reboot, everything still works, i simply wouldn't worry about it anymore.
if not, undo it:

Code: Select all

systemctl enable networking
systemctl start networking

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: failed to raise networking.service

#8 Post by p.H »

Disabling networking.service or removing ifupdown would only hide the problem.
Also, before doing so, make sure that another service will take over configuring the loopback interface.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: failed to raise networking.service

#9 Post by Head_on_a_Stick »

p.H wrote:Disabling networking.service or removing ifupdown would only hide the problem.
...which would appear to be exactly what the OP wants ;)
p.H wrote:Also, before doing so, make sure that another service will take over configuring the loopback interface.
That would only be neccessary if the OP was not using systemd as PID1:

https://unix.stackexchange.com/question ... t-ifupdown

I can confirm that my Debian stable system will configure the loopback interface correctly even if networking.service is enabled with the loopback lines commented out in /etc/network/interfaces

@OP: you should have mentioned that you are running testing/unstable.
deadbang

User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

Re: failed to raise networking.service

#10 Post by jalisco »

Using stable version 9, 64 bit.

kernel version 4.9.0-8-amd64.

checking journalctl -xe after a reboot, showed this interesting output.

Code: Select all

drexl@debianWorkstation:~$ sudo journalctl -xe
[sudo] password for drexl: 
-- Subject: Unit networking.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit networking.service has begun starting up.
Sep 29 19:38:47 debianWorkstation dhclient[2321]: Internet Systems Consortium DHCP Client 4.3.5
Sep 29 19:38:47 debianWorkstation ifup[2295]: Internet Systems Consortium DHCP Client 4.3.5
Sep 29 19:38:47 debianWorkstation ifup[2295]: Copyright 2004-2016 Internet Systems Consortium.
Sep 29 19:38:47 debianWorkstation ifup[2295]: All rights reserved.
Sep 29 19:38:47 debianWorkstation ifup[2295]: For info, please visit https://www.isc.org/software/dhcp/
Sep 29 19:38:47 debianWorkstation dhclient[2321]: Copyright 2004-2016 Internet Systems Consortium.
Sep 29 19:38:47 debianWorkstation dhclient[2321]: All rights reserved.
Sep 29 19:38:47 debianWorkstation dhclient[2321]: For info, please visit https://www.isc.org/software/dhcp/
Sep 29 19:38:47 debianWorkstation dhclient[2321]: 
Sep 29 19:38:47 debianWorkstation ifup[2295]: Cannot find device "eth0"
Sep 29 19:38:47 debianWorkstation dhclient[2321]: Failed to get interface index: No such device
Sep 29 19:38:47 debianWorkstation ifup[2295]: Failed to get interface index: No such device
Sep 29 19:38:47 debianWorkstation ifup[2295]: If you think you have received this message due to a bug rather
Sep 29 19:38:47 debianWorkstation ifup[2295]: than a configuration issue please read the section on submitting
Sep 29 19:38:47 debianWorkstation ifup[2295]: bugs on either our web page at www.isc.org or in the README file
Sep 29 19:38:47 debianWorkstation ifup[2295]: before submitting a bug.  These pages explain the proper
Sep 29 19:38:47 debianWorkstation ifup[2295]: process and the information we find helpful for debugging..
Sep 29 19:38:47 debianWorkstation ifup[2295]: exiting.
Sep 29 19:38:47 debianWorkstation dhclient[2321]: 
Sep 29 19:38:47 debianWorkstation dhclient[2321]: If you think you have received this message due to a bug rather
Sep 29 19:38:47 debianWorkstation dhclient[2321]: than a configuration issue please read the section on submitting
Sep 29 19:38:47 debianWorkstation dhclient[2321]: bugs on either our web page at www.isc.org or in the README file
Sep 29 19:38:47 debianWorkstation dhclient[2321]: before submitting a bug.  These pages explain the proper
Sep 29 19:38:47 debianWorkstation dhclient[2321]: process and the information we find helpful for debugging..
Sep 29 19:38:47 debianWorkstation dhclient[2321]: 
Sep 29 19:38:47 debianWorkstation dhclient[2321]: exiting.
Sep 29 19:38:47 debianWorkstation ifup[2295]: ifup: failed to bring up eth0
Sep 29 19:38:47 debianWorkstation systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Sep 29 19:38:47 debianWorkstation systemd[1]: Failed to start Raise network interfaces.
-- Subject: Unit networking.service has failed

User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

Re: failed to raise networking.service

#11 Post by jalisco »

Thanks all,

I think as L_V mentioned, it's a bug with ifupdown, when it has nothing to do, it kicks back an error, even though everything is fine.

It was unclear how to repair it, but I will just ignore it for now, and wait for it to get fixed in a wave of updates.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: failed to raise networking.service

#12 Post by Head_on_a_Stick »

jalisco wrote:

Code: Select all

Sep 29 19:38:47 debianWorkstation ifup[2295]: ifup: failed to bring up eth0
The interface name is wrong in /etc/network/interfaces, replace it with the correct nomenclature:

Code: Select all

# sed -i 's/eth0/enp7s0/' /etc/network/interfaces
See also https://www.freedesktop.org/wiki/Softwa ... faceNames/ & https://www.debian.org/releases/stable/ ... face-names

EDIT: if you do this then I think the interface will cease to be controlled by NetworkManager so disabling the .service might be best.
deadbang

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: failed to raise networking.service

#13 Post by p.H »

jalisco wrote:I think as L_V mentioned, it's a bug with ifupdown, when it has nothing to do, it kicks back an error, even though everything is fine.
The messages about eth0 you reported have nothing to do with the bug report pointed to by L_V. ifup does not invent non-existing interfaces and tries to configure them with DHCP.

If eth0 is not present in /etc/network/interfaces, it is likely that it is present in a file in the /etc/network/interfaces.d/ directory. You must find and delete this file.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: failed to raise networking.service

#14 Post by L_V »

@jalisco
The previous "apt-cache policy" command I asked you to report will not break your system at all, but will just give the current status of ifupdown package in your system, then no worry, you can do it.
To clarify among some confusion around a minor bug, there are at least three ways to manage network connection:

1 - ifupdown
2 - NetworkManager
3 - systemd-networkd

You currently use NetworkManager, your /etc/network/interfaces file is OK, and don't need ifupdown.
Then, if you want to get rid of these errors, just remove ifupdown package, at least to verify, and reinstall it if you want/need it, what you did not mention.

User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

Re: failed to raise networking.service

#15 Post by jalisco »

Thanks L_V, removing the ifupdown seemed to work.

So far, everything seems fine. No more error message.

EDIT: After a few days, every seems fine with rogue network messages. They are gone, and I don't seem to be experiencing any other errors or dependency issues.
Last edited by jalisco on 2018-10-04 18:22, edited 1 time in total.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: failed to raise networking.service

#16 Post by L_V »

Great.
BTW, you don't need ifup/ifdown commands from ifupdown package in console mode to manage your connections (it can help without X environment)
The correct command is /bin/ip (from iproute2 package):

Code: Select all

ip link set enp7s0 up
ip link set enp7s0 down

## ip - show / manipulate routing, network devices, interfaces and tunnels
or nmcli for NetworkManager

Code: Select all

nmcli con up   id enp7s0
nmcli con down id enp7s0

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: failed to raise networking.service

#17 Post by p.H »

ip is NOT a replacement for ifup and ifdown. They operate at different levels.

Code: Select all

ip link set enp7s0 up
(just activate the interface without configuring it in any way)
does not do the same as

Code: Select all

ifup enp7s0
(create if needed, configure and activate the interface according to /etc/network/interfaces)
jalisco wrote:Thanks L_V, removing the ifupdown seemed to work.
So far, everything seems fine. No more error message.
You removed the package which installs the service having an error, and the error is gone. What a surprise.
This looks like Maslow's hammer rather than a real solution (find and fix the wrong config file) to me.

Post Reply