[Solved] Failed to start raise network interfaces

Kernels & Hardware, configuring network, installing services

[Solved] Failed to start raise network interfaces

Postby Lamios » 2017-12-10 00:06

Hello,

when I start Debian I get an error message saying the following:
Code: Select all
[Failed] Failed to start Raise network interfaces.
See 'systemctl status networking.service' for details.


systemctl status networking.service gives me the following:
Code: Select all
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: en
   Active: failed (Result: exit-code) since Sat 2017-12-09 12:49:24 GMT; 11h ago
     Docs: man:interfaces(5)
 Main PID: 2043 (code=exited, status=1/FAILURE)
lines 1-5/5 (END)


ifconfig -a lists the following devices:
- enp0s25
- lo
- vpn0
- wlp2s0

The network had been configured automatically with DHCP during the installation...

I am still able to connect to the internet, also if I sometimes have to reboot, because I get the massage that the connection had been deactivated.

The system (Debian 9 with KDE) is newly installed and the problem existed from beginning. The results from google and forum searches did not fit to my error message (at least as far as I can asses it as a Linux beginner).

Thank you for your help!
Lamios

P.S.: I hope the post is complete for the beginning. I am not sure in the moment, which additional output is going to be needed.
Last edited by Lamios on 2017-12-11 15:48, edited 1 time in total.
Lamios
 
Posts: 9
Joined: 2017-12-09 23:26

Re: Failed to start raise network interfaces

Postby Head_on_a_Stick » 2017-12-10 00:11

Hello :)
Lamios wrote:
Code: Select all
 Main PID: 2043 (code=exited, status=1/FAILURE)
lines 1-5/5 (END)

We can check those lines with:
Code: Select all
systemctl cat networking.service

The journal contents will probably tell us more:
Code: Select all
# journalctl -u networking.service
"To be free is nothing, to become free is everything." — Hegel
User avatar
Head_on_a_Stick
 
Posts: 6980
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Failed to start raise network interfaces

Postby p.H » 2017-12-10 07:15

Also please post the contents of /etc/network/interfaces which is the configuration file of the networking service.
p.H
 
Posts: 196
Joined: 2017-09-17 07:12

Re: Failed to start raise network interfaces

Postby Lamios » 2017-12-10 11:40

Thank you for the very fast reply!

systemctl cat networking.service:
Code: Select all
# /lib/systemd/system/networking.service
[Unit]
Description=Raise network interfaces
Documentation=man:interfaces(5)
DefaultDependencies=no
Wants=network.target
After=local-fs.target network-pre.target apparmor.service systemd-sysctl.service syst
Before=network.target shutdown.target network-online.target
Conflicts=shutdown.target

[Install]
WantedBy=multi-user.target
WantedBy=network-online.target

[Service]
Type=oneshot
EnvironmentFile=-/etc/default/networking
ExecStartPre=-/bin/sh -c '[ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --re
ExecStart=/sbin/ifup -a --read-environment
ExecStop=/sbin/ifdown -a --read-environment --exclude=lo
RemainAfterExit=true
TimeoutStartSec=5min
lines 1-22/22 (END)


journalctl -u networking.service:
Code: Select all
-- Logs begin at Sun 2017-12-10 12:00:15 GMT, end at Sun 2017-12-10 12:07:46 GMT. --
Dec 10 12:00:16 PP systemd[1]: Starting Raise network interfaces...
Dec 10 12:00:16 PP ifup[334]: /etc/network/if-pre-up.d/firewall_renamed: 2: /etc/netw
Dec 10 12:00:16 PP ifup[334]: run-parts: /etc/network/if-pre-up.d/firewall_renamed ex
Dec 10 12:00:16 PP ifup[334]: ifup: pre-up script failed
Dec 10 12:00:16 PP systemd[1]: networking.service: Main process exited, code=exited,
Dec 10 12:00:16 PP systemd[1]: Failed to start Raise network interfaces.
Dec 10 12:00:16 PP systemd[1]: networking.service: Unit entered failed state.
Dec 10 12:00:16 PP systemd[1]: networking.service: Failed with result 'exit-code'.
Dec 10 12:00:17 PP systemd[1]: Starting Raise network interfaces...
Dec 10 12:00:17 PP ifup[594]: /etc/network/if-pre-up.d/firewall_renamed: 2: /etc/netw
Dec 10 12:00:17 PP ifup[594]: run-parts: /etc/network/if-pre-up.d/firewall_renamed ex
Dec 10 12:00:17 PP ifup[594]: ifup: pre-up script failed
Dec 10 12:00:17 PP systemd[1]: networking.service: Main process exited, code=exited,
Dec 10 12:00:17 PP systemd[1]: Failed to start Raise network interfaces.
Dec 10 12:00:17 PP systemd[1]: networking.service: Unit entered failed state.
Dec 10 12:00:17 PP systemd[1]: networking.service: Failed with result 'exit-code'.
lines 1-17/17 (END)


The loopback network interface contain the following:
Code: Select all
auto lo
iface lo inet loopback


I think I probably see the error in 'journalctl -u networking.service'. I tried to setup a firewall with iptables but than thought it might be easier to use a firewall tool (at least for the beginning). To prevent an interference between the firewall tool and the existing iptables rules I renamed '/etc/iptables.firewall.rules', '/etc/network/if-pre-up.d/firewall' and '/etc/network/if-pre-up.d/firewall.save' with the addition "_renamed". Is it possible that the .save had not been created by me earlier and is now causing the problem? Or is it because all these files are only renamed and not deleted?
Lamios
 
Posts: 9
Joined: 2017-12-09 23:26

Re: Failed to start raise network interfaces

Postby p.H » 2017-12-10 12:11

The lines you posted are truncated.

Scripts in /etc/network/if-*.d/ are run by run-parts. By default run-parts executes all scripts with names containing only letters, digits, underscore and hyphen [A-Za-z0-9_-]. So /etc/network/if-pre-up.d/firewall is executed, but /etc/network/if-pre-up.d/firewall.save is not because its name contains a dot, not in the allowed character list.

Renaming /etc/network/if-pre-up.d/firewall by adding _renamed does not disable its execution by run-parts because all characters of the suffix are allowed. However if an instruction in the script uses an other file such as /etc/iptables.firewall.rules and you renamed that file without updating the script, then an error may arise. Check in /etc/network/if-pre-up.d/firewall_renamed.

Also note that just renaming the script and not disabling it does not prevent interference with another firewall script.
p.H
 
Posts: 196
Joined: 2017-09-17 07:12

Re: Failed to start raise network interfaces

Postby Head_on_a_Stick » 2017-12-10 12:34

p.H wrote:The lines you posted are truncated.

Sorry, my fault! :oops:

@OP:
Code: Select all
# journalctl -u networking.service --no-pager
"To be free is nothing, to become free is everything." — Hegel
User avatar
Head_on_a_Stick
 
Posts: 6980
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Failed to start raise network interfaces

Postby Lamios » 2017-12-10 22:05

'journalctl -u networking.service --no-pager' geave me the following output:
Code: Select all
-- Logs begin at Sun 2017-12-10 22:41:52 GMT, end at Sun 2017-12-10 22:46:26 GMT. --
Dec 10 22:41:53 PP systemd[1]: Starting Raise network interfaces...
Dec 10 22:41:53 PP ifup[313]: /etc/network/if-pre-up.d/firewall_renamed: 2: /etc/network/if-pre-up.d/firewall_renamed: cannot open /etc/iptables.firewall.rules: No such file
Dec 10 22:41:53 PP ifup[313]: run-parts: /etc/network/if-pre-up.d/firewall_renamed exited with return code 2
Dec 10 22:41:53 PP ifup[313]: ifup: pre-up script failed
Dec 10 22:41:53 PP systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Dec 10 22:41:53 PP systemd[1]: Failed to start Raise network interfaces.
Dec 10 22:41:53 PP systemd[1]: networking.service: Unit entered failed state.
Dec 10 22:41:53 PP systemd[1]: networking.service: Failed with result 'exit-code'.
Dec 10 22:42:18 PP systemd[1]: Starting Raise network interfaces...
Dec 10 22:42:18 PP ifup[1530]: /etc/network/if-pre-up.d/firewall_renamed: 2: /etc/network/if-pre-up.d/firewall_renamed: cannot open /etc/iptables.firewall.rules: No such file
Dec 10 22:42:18 PP ifup[1530]: run-parts: /etc/network/if-pre-up.d/firewall_renamed exited with return code 2
Dec 10 22:42:18 PP systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Dec 10 22:42:18 PP ifup[1530]: ifup: pre-up script failed
Dec 10 22:42:18 PP systemd[1]: Failed to start Raise network interfaces.
Dec 10 22:42:18 PP systemd[1]: networking.service: Unit entered failed state.
Dec 10 22:42:18 PP systemd[1]: networking.service: Failed with result 'exit-code'.


I did not update the script in '/etc/network/if-pre-up.d/', thus that should be the reason. How can I disable the script?
In '/etc/network/if-pre-up.d/' is also file called firewall.save (or now firewall_renamed.save), which I assumed the system created it to run the firewall rules I created. Is that true or is it there for any other reason?
Lamios
 
Posts: 9
Joined: 2017-12-09 23:26

Re: Failed to start raise network interfaces

Postby p.H » 2017-12-11 12:19

Lamios wrote:How can I disable the script?

(Re)move it, or rename it with a period (".") in the new name so that run-parts ignores it.
Lamios wrote:In '/etc/network/if-pre-up.d/' is also file called firewall.save (or now firewall_renamed.save), which I assumed the system created it to run the firewall rules I created. Is that true or is it there for any other reason?

"The system" does not create such files on its own. Maybe your text editor did as a backup when you modified the original "firewall" file ?
Anyway its filename contains a period, thus is ignored by run-parts and not executed.
p.H
 
Posts: 196
Joined: 2017-09-17 07:12

Re: Failed to start raise network interfaces

Postby Lamios » 2017-12-11 14:14

Cool, works again in the correct way :)
Thank you for your help!
Lamios
 
Posts: 9
Joined: 2017-12-09 23:26

Re: Failed to start raise network interfaces

Postby Lamios » 2017-12-11 14:30

How can I mark the topic as solved? :D
Lamios
 
Posts: 9
Joined: 2017-12-09 23:26

Re: Failed to start raise network interfaces

Postby GarryRicketson » 2017-12-11 15:08

You edit the subject line on your first post
User avatar
GarryRicketson
 
Posts: 4583
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: [Solved] Failed to start raise network interfaces

Postby Lamios » 2017-12-11 15:48

Thanks.
Lamios
 
Posts: 9
Joined: 2017-12-09 23:26


Return to System configuration

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable