"A start job is running for Raise network interfaces"

Kernels & Hardware, configuring network, installing services

"A start job is running for Raise network interfaces"

Postby jaimet » 2019-07-19 09:50

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!
jaimet
 
Posts: 4
Joined: 2019-07-19 08:38

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

Postby ruwolf » 2019-07-19 17:30

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).
User avatar
ruwolf
 
Posts: 357
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

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

Postby Deb-fan » 2019-07-20 06:21

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.
Deb-fan
 
Posts: 246
Joined: 2012-08-14 12:27

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

Postby jaimet » 2019-07-20 07:19

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: 4
Joined: 2019-07-19 08:38

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

Postby jaimet » 2019-07-20 07:31

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.
jaimet
 
Posts: 4
Joined: 2019-07-19 08:38

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

Postby Head_on_a_Stick » 2019-07-20 10:20

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.
User avatar
Head_on_a_Stick
 
Posts: 10321
Joined: 2014-06-01 17:46
Location: /dev/chair

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

Postby jaimet » 2019-08-03 15:55

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.
jaimet
 
Posts: 4
Joined: 2019-07-19 08:38

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

Postby Head_on_a_Stick » 2019-08-03 17:14

jaimet wrote:Note the 1-minute delay between the second and third lines

Do you still experience the delay if you assign static addresses?
User avatar
Head_on_a_Stick
 
Posts: 10321
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: ruwolf and 7 guests

fashionable