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

 

 

 

"A start job is running for Raise network interfaces" SOLVED

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
jaimet
Posts: 12
Joined: 2019-07-19 08:38

"A start job is running for Raise network interfaces" SOLVED

#1 Post by jaimet »

Hi all.

I've just installed a fresh Buster (debian 10) on a dell studio 1555 (using the netinst non-free CD image) and the install went perfectly. I've edited /etc/network/interfaces to add a stanza for my "Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express)" nic (pci id: 168c:002a), thus:

Code: Select all

auto wlp4s0
iface wlp4s0 inet dhcp
  wpa-ssid myssid
  wpa-psk mypsk
To make sure that I have got it right, I then:

Code: Select all

ifup wlp4s0 ; ping -c 1 8.8.8.8 ; ifdown wlp4s0
twenty times, and because this line completes quickly (approx 5-6 seconds) every time, I am happy. :D

I then reboot. During the boot, I see "A start job is running for Raise network interfaces" and a counter which counts up for between approx 90 and 120 seconds, after which the boot completes.

How can I debug this delay/pause? (I don't understand how raising the network interface can take so long if the ifup completes so quickly).

Thank you!

#####

Edited 1st October: it turns out that my "boot delay" / "slow boot" / "boot pause" problem was just another instance of the "Boottime Entropy Starvation" issue. (I'm guessing that wpa-supplicant couldn't connect as it was blocking on requesting random data from the kernel, which in turn was blocking on the entropy generator).

I installed the havege daemon ("sudo apt install haveged") and the problem has disappeared! :D :D :D

More info:
https://www.debian.org/releases/stable/ ... starvation
https://daniel-lange.com/archives/152-hello-buster.html
Last edited by jaimet on 2019-10-01 07:17, edited 3 times in total.

User avatar
ruwolf
Posts: 623
Joined: 2008-02-18 05:04
Location: Banovce nad Bebravou
Has thanked: 35 times
Been thanked: 26 times

Re: "A start job is running for Raise network interfaces"

#2 Post by ruwolf »

Try to change the first line

Code: Select all

auto wlp4s0
to

Code: Select all

allow-hotplug wlp4s0
I am not sure, that it will help you (but it cannot harm).

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: "A start job is running for Raise network interfaces"

#3 Post by Deb-fan »

Probably better just to use some type of networking software to do it for you. Long way from a gnu/nix wifi networking guru but my personal preference has long been using ceni, handy bunch of scripts, ncurses interface that supports easy scanning for available Hotspots and am told now available in stock Buster repos, I've long been snagging it from Siduction gnu/Linux repos for Debian stable or other branches. Ie: Sid.

Off the top guess, having a conflict among services/packages trying to manage your network interfaces they may need to be masked w systemctl, ie: systemd-networkd or if Network-manager (Gnome) thing installed and running. Remember long ago setting it up similar to what you're doing, directly editing /etc/network/interfaces and having somewhat similar issues. Don't recall the specifics, wasnt a start job, was a stop job and nowhere near as drastic as what you're experiencing but was hanging for 20-30secs at shutdown. Installed and using ceni, happy with using it.
Most powerful FREE tech-support tool on the planet * HERE. *

jaimet
Posts: 12
Joined: 2019-07-19 08:38

Re: "A start job is running for Raise network interfaces"

#4 Post by jaimet »

ruwolf wrote:Try to change the first line

Code: Select all

auto wlp4s0
to

Code: Select all

allow-hotplug wlp4s0
I am not sure, that it will help you (but it cannot harm).
An interesting suggestion. I had thought the same thing before I posted my initial question, and I then found https://lists.debian.org/debian-user/20 ... 00911.html.

I tried it anyway, with the following result:

auto: the boot hangs (pauses) while the counter counts up, thereby delaying the completion of the boot process/the appearance of the login screen.

allow-hotplug: the boot completes quickly (the login screen appears quickly) but if I log-in and immediately test the networking connection, it hasn't yet connected. At some point in the next minute, the networking connection is made.

This makes me think that "allow-hotplug" makes raising the network interface happen in parallel/asynchronously, whereas "auto" makes raising the network interface happen synchronously (i.e. as a blocking process).

Thank you for the suggestion anyway!

jaimet
Posts: 12
Joined: 2019-07-19 08:38

Re: "A start job is running for Raise network interfaces"

#5 Post by jaimet »

Deb-fan wrote:Off the top guess, having a conflict among services/packages trying to manage your network interfaces they may need to be masked w systemctl, ie: systemd-networkd or if Network-manager (Gnome) thing installed and running.
That's a very good point. The weird thing is that this is a fresh box with just the minimum set of packages installed, so there's no systemd-networkd, no Network-manager (no X even!) - I have ifupdown installed and that's it.

Thank you for the pointer re ceni, but I personally prefer to keep the number of packages installed to a complete minimum, so I'll just accept the boot delay. At some point, I'll find the time to learn how to debug the boot procedure. Thanks again.

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: "A start job is running for Raise network interfaces"

#6 Post by Head_on_a_Stick »

jaimet wrote:The weird thing is that this is a fresh box with just the minimum set of packages installed, so there's no systemd-networkd, no Network-manager (no X even!) - I have ifupdown installed and that's it.
You do have systemd-networkd installed, it is part of the systemd package so you could try that and see if it brings your network up any quicker.

To debug ifupdown try

Code: Select all

journalctl -u networking
I prefer to use a custom unit file for systemd to bring the network up with wpa_supplicant & ip(8), it's quicker than either ifupdown or systemd-networkd and it only leaves wpa_upplicant running after it's finished.

Code: Select all

# /etc/systemd/system/network-wireless@.service
[Unit]
Description=Wireless Network Service (%i)
Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
RemainAfterExit=yes

ExecStart=/sbin/wpa_supplicant -B -i%I -c/etc/wpa_supplicant/wpa_supplicant-%I.conf
ExecStart=/sbin/ip a add ${address}/${subnet} dev %I
ExecStart=/sbin/ip r add default via ${gateway}

ExecStop=/sbin/ip l set %I down
ExecStop=/sbin/ip a flush %I

[Install]
Alias=multi-user.target.wants/network-wireless@%i.service
Replace ${address}, ${subnet} & ${gateway} with values appropriate for your network (or use /sbin/dhclient to assign the addresses instead of /sbin/ip) and create a wpa_supplicant configuration file with

Code: Select all

# wpa_passphrase $ssid $password > /etc/wpa_supplicant/wpa_supplicant-${interface}.conf
Replace $ssid with the name of the access point, replace $password with the actual password and replace ${interface} with the name of the interface (or just use wpa_supplicant.conf in the unit file if you want it to apply to all interfaces). If you're paranoid then you could edit the configuration file and remove the commented-out plaintext password (I do).

Once it is all set up then enable the service with

Code: Select all

# systemctl enable network-wireless@${interface}
It's pretty quick:

Code: Select all

           331ms network-wireless@wifi.service
Both ifupdown & systemd-networkd take several seconds on that hardware.
deadbang

jaimet
Posts: 12
Joined: 2019-07-19 08:38

Re: "A start job is running for Raise network interfaces"

#7 Post by jaimet »

Head_on_a_Stick wrote:You do have systemd-networkd installed, it is part of the systemd package so you could try that and see if it brings your network up any quicker.
You're right. I've just checked, and systemd-networkd.service is installed but disabled at the moment.
Head_on_a_Stick wrote:To debug ifupdown try

Code: Select all

journalctl -u networking
Ok, I did that, but all it shows is:

Code: Select all

-- Reboot --
Aug 03 06:48:45 studio systemd[1]: Starting Raise network interfaces...
Aug 03 06:48:45 studio wpa_supplicant[422]: Successfully initialized wpa_supplicant
Aug 03 06:49:45 studio dhclient[435]: Internet Systems Consortium DHCP Client 4.4.1
Aug 03 06:49:45 studio ifup[388]: Internet Systems Consortium DHCP Client 4.4.1
Aug 03 06:49:45 studio ifup[388]: Copyright 2004-2018 Internet Systems Consortium.
Note the 1-minute delay between the second and third lines.
Head_on_a_Stick wrote: I prefer to use a custom unit file for systemd to bring the network up with wpa_supplicant & ip(8),
...
It's pretty quick:

Code: Select all

           331ms network-wireless@wifi.service
Both ifupdown & systemd-networkd take several seconds on that hardware.
Nice solution, and thank you for taking the time to explain it all. For the time being, however, I'm going to assume that the 60-second delay is a bug, and I'm going to see if I can dig deeper to find out where it's going wrong. Over to the debian mailing lists, I think. Thanks again.

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: "A start job is running for Raise network interfaces"

#8 Post by Head_on_a_Stick »

jaimet wrote:Note the 1-minute delay between the second and third lines
Do you still experience the delay if you assign static addresses?
deadbang

jaimet
Posts: 12
Joined: 2019-07-19 08:38

Re: "A start job is running for Raise network interfaces"

#9 Post by jaimet »

Head_on_a_Stick wrote:Do you still experience the delay if you assign static addresses?
Yes. I edited my /etc/network/interfaces, changing:

Code: Select all

iface wlp4s0 inet dhcp
to:

Code: Select all

iface wlp4s0 inet static
  address 192.168.0.6/24
  gateway 192.168.0.1
and then rebooted, but I still get the same delay.

I've noticed that during the boot process, the following error message appears:

Code: Select all

kernel: IPv6: ADDRCONF(NETDEV_UP): wlp4s0: link is not ready
This, combined with the fact that my (openwrt) router has ipv6 completely disabled, made me wonder whether or not this delay is caused by ipv6 autoconfiguration (I assume that there is some kind of ipv6 autoconfiguration, since my /etc/network/interfaces contains no reference whatsoever to ipv6, but the result of running "ip addr" shows that my wireless network adapter does have an ipv6 address allocated). I've tried to disable this ipv6 autoconfiguration, but despite googling for several hours, I have not yet been able to modify /etc/network/interfaces in such a way that "ip addr" shows no ipv6 addresses allocated to my wireless network adapter. As you can probably tell, I am clutching at straws now!

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: "A start job is running for Raise network interfaces"

#10 Post by arzgi »

Timeout, default 5 min :oops:, is in

Code: Select all

/etc/systemd/system/network-online.target.wants/networking.service
I changed it to 20 secs.

To disable ipv6, as root

Code: Select all

echo net.ipv6.conf.all.disable_ipv6 = 1 > /etc/sysctl.d/10-disable-ipv6.conf
and reboot.

My computers are behind nat, no use to ipv6, that's why I allways disable it. I'm not sure if it speeds up raising network.

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: "A start job is running for Raise network interfaces"

#11 Post by Head_on_a_Stick »

jaimet wrote:I've tried to disable this ipv6 autoconfiguration, but despite googling for several hours, I have not yet been able to modify /etc/network/interfaces in such a way that "ip addr" shows no ipv6 addresses allocated to my wireless network adapter.
The ip command should always show the IPv6 link-local address, perhaps that's what you're seeing there.

You can disable the IPv6 stack with the ipv6.disable=1 kernel command line parameter.
deadbang

jaimet
Posts: 12
Joined: 2019-07-19 08:38

Re: "A start job is running for Raise network interfaces"

#12 Post by jaimet »

Head_on_a_Stick wrote:You can disable the IPv6 stack with the ipv6.disable=1 kernel command line parameter.
Done. (I added "ipv6.disable=1" to the end of the "GRUB_CMDLINE_LINUX_DEFAULT" line in /etc/default/grub and then ran "sudo update-grub" to update "/boot/grub/grub.cfg"). After rebooting, "ip addr" shows no inet6 lines at all.

Same problem however. Here's an excerpt from the journal:

Code: Select all

Aug 20 16:05:23 studio systemd[1]: Started WPA supplicant.
Aug 20 16:05:23 studio avahi-daemon[354]: socket() failed: Address family not supported by protocol
Aug 20 16:05:23 studio avahi-daemon[354]: Network interface enumeration completed.
Aug 20 16:05:23 studio avahi-daemon[354]: Server startup complete. Host name is studio.local. Local service cookie is <edited out>.
Aug 20 16:05:23 studio systemd[1]: Started Load/Save Screen Backlight Brightness of backlight:acpi_video0.
Aug 20 16:05:23 studio systemd[1]: Started Helper to synchronize boot up for ifupdown.
Aug 20 16:05:23 studio systemd[1]: Starting Raise network interfaces...
Aug 20 16:05:23 studio wpa_supplicant[420]: Successfully initialized wpa_supplicant
Aug 20 16:05:27 studio systemd[1]: systemd-rfkill.service: Succeeded.
Aug 20 16:06:36 studio kernel: random: crng init done
Aug 20 16:06:36 studio kernel: random: 7 urandom warning(s) missed due to ratelimiting
Aug 20 16:06:37 studio avahi-daemon[354]: Joining mDNS multicast group on interface wlp4s0.IPv4 with address 192.168.0.6.
Aug 20 16:06:37 studio avahi-daemon[354]: New relevant interface wlp4s0.IPv4 for mDNS.
Aug 20 16:06:37 studio avahi-daemon[354]: Registering new address record for 192.168.0.6 on wlp4s0.IPv4.
Aug 20 16:06:38 studio kernel: wlp4s0: authenticate with <edited out>
I'm now completely out of ideas. Bug report time?

jaimet
Posts: 12
Joined: 2019-07-19 08:38

Re: "A start job is running for Raise network interfaces"

#13 Post by jaimet »

arzgi wrote:Timeout, default 5 min :oops:, is in

Code: Select all

/etc/systemd/system/network-online.target.wants/networking.service
I changed it to 20 secs.
Question: did you change the timeout because you have the same problem as myself? With the timeout at 5 mins, approx how long does your boot "pause" at the "A start job is running for Raise network interfaces" stage?

jaimet
Posts: 12
Joined: 2019-07-19 08:38

Re: "A start job is running for Raise network interfaces"

#14 Post by jaimet »

Does this mean anything to anyone?:

Code: Select all

$ systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @1min 19.019s
└─multi-user.target @1min 19.016s
  └─ssh.service @1min 18.973s +41ms
    └─network.target @1min 18.967s
      └─networking.service @2.640s +1min 16.326s
        └─ifupdown-pre.service @325ms +2.312s
          └─systemd-udev-trigger.service @190ms +133ms
            └─systemd-udevd-control.socket @189ms
              └─system.slice @182ms
                └─-.slice @182ms
Also, it appears that I am not alone...
https://serverfault.com/questions/97263 ... or-network

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: "A start job is running for Raise network interfaces"

#15 Post by arzgi »

jaimet wrote:
arzgi wrote:Timeout, default 5 min :oops:, is in

Code: Select all

/etc/systemd/system/network-online.target.wants/networking.service
I changed it to 20 secs.
Question: did you change the timeout because you have the same problem as myself? With the timeout at 5 mins, approx how long does your boot "pause" at the "A start job is running for Raise network interfaces" stage?
Partly yes, I had slow connection to network at boot. View http://forums.debian.net/viewtopic.php?f=5&t=142712

Now there is no delay at all.

jaimet
Posts: 12
Joined: 2019-07-19 08:38

Re: "A start job is running for Raise network interfaces" SO

#16 Post by jaimet »

It turns out that my "boot delay" / "slow boot" / "boot pause" problem was just another instance of the "Boottime Entropy Starvation" issue. (I'm guessing that wpa-supplicant couldn't connect as it was blocking on requesting random data from the kernel, which in turn was blocking on the entropy generator).

I installed the havege daemon ("sudo apt install haveged") and the problem has disappeared! :D :D :D

More info:
https://www.debian.org/releases/stable/ ... starvation
https://daniel-lange.com/archives/152-hello-buster.html

ab1jx
Posts: 111
Joined: 2016-01-23 21:28
Location: Heath, MA, USA
Has thanked: 2 times
Contact:

Re: "A start job is running for Raise network interfaces" SO

#17 Post by ab1jx »

In Raspbian this is an option in raspi-config, which is just a Bash script calling Whiptail.

Code: Select all

do_boot_wait() {
  DEFAULT=--defaultno
  if [ $(get_boot_wait) -eq 0 ]; then
    DEFAULT=
  fi
  if [ "$INTERACTIVE" = True ]; then
    whiptail --yesno "Would you like boot to wait until a network connection is established?" $DEFAULT 20 60 2
    RET=$?
  else
    RET=$1
  fi
  if [ $RET -eq 0 ]; then
    mkdir -p /etc/systemd/system/dhcpcd.service.d/
    cat > /etc/systemd/system/dhcpcd.service.d/wait.conf << EOF
[Service]
ExecStart=
ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w
EOF
    STATUS=enabled
  elif [ $RET -eq 1 ]; then
    rm -f /etc/systemd/system/dhcpcd.service.d/wait.conf
    STATUS=disabled
  else
    return $RET
  fi
  if [ "$INTERACTIVE" = True ]; then
    whiptail --msgbox "Waiting for network on boot is $STATUS" 20 60 1
  fi
}

Post Reply