You are not logged in.

#1 2019-10-24 03:59:51

patrickthebold
Member
Registered: 2008-12-15
Posts: 55

[SOLVED] iwd fails to start via systemd

iwd.service had been starting fine for me previously, and perhaps a recent update broke it. I'm at a loss for where to look for more detail.

Viewing the status of the unit:

$ systemctl status iwd
● iwd.service - Wireless service
   Loaded: loaded (/etc/systemd/system/iwd.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/iwd.service.d
           └─override.conf
   Active: failed (Result: exit-code) since Tue 2019-10-22 10:51:08 EDT; 1 day 12h ago
  Process: 936 ExecStart=/usr/lib/iwd/iwd (code=exited, status=1/FAILURE)
 Main PID: 936 (code=exited, status=1/FAILURE)

Oct 22 10:51:08 patrick-pc systemd[1]: iwd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 22 10:51:08 patrick-pc systemd[1]: iwd.service: Scheduled restart job, restart counter is at 5.
Oct 22 10:51:08 patrick-pc systemd[1]: Stopped Wireless service.
Oct 22 10:51:08 patrick-pc systemd[1]: iwd.service: Start request repeated too quickly.
Oct 22 10:51:08 patrick-pc systemd[1]: iwd.service: Failed with result 'exit-code'.
Oct 22 10:51:08 patrick-pc systemd[1]: Failed to start Wireless service.

Running the executable directly is fine however:

$ sudo c
[sudo] password for patrick: 
Wireless daemon version 0.22
Loaded configuration from /etc/iwd/main.conf
netconfig: Network configuration with the IP addresses is disabled.
Wiphy phy0 will only use the default interface
Wiphy: 0, Name: phy0
        Permanent Address: d8:fb:5e:c8:7a:fe
        Bands: 2.4 GHz 5 GHz
        Ciphers: CCMP TKIP BIP
        Supported iftypes: ad-hoc station ap p2p-client p2p-go p2p-device
No control_port_over_nl80211 setting, defaulting to True
hardware_rekey not supported

So persumably systemd is doing something more than just running /usr/lib/iwd/iwd but the error message isn't that helpful, to me. Pointers on where to look for more info would be appreciated.

Last edited by patrickthebold (2019-10-30 01:12:34)

Offline

#2 2019-10-24 12:06:59

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: [SOLVED] iwd fails to start via systemd

What's the drop in override that you've configured?

  Drop-In: /etc/systemd/system/iwd.service.d
           └─override.conf

Last edited by CarbonChauvinist (2019-10-24 21:15:16)


"the wind-blown way, wanna win? don't play"

Offline

#3 2019-10-25 00:17:52

patrickthebold
Member
Registered: 2008-12-15
Posts: 55

Re: [SOLVED] iwd fails to start via systemd

The override is:

[Unit]
BindsTo=sys-subsystem-net-devices-wlp2s0.device
After=sys-subsystem-net-devices-wlp2s0.device
Restart=false

I forget the exact details it had something to do with both systemd and iwd trying to manage the device names, so the device name was wrong at boot or something of that nature. (It had been working with that fine for a few months.)

Perhaps more importantly, if it's removed the same error is reported:

$ systemctl status iwd
● iwd.service - Wireless service
   Loaded: loaded (/etc/systemd/system/iwd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2019-10-24 20:16:11 EDT; 7s ago
  Process: 12033 ExecStart=/usr/lib/iwd/iwd (code=exited, status=1/FAILURE)
 Main PID: 12033 (code=exited, status=1/FAILURE)

Oct 24 20:16:11 patrick-pc systemd[1]: iwd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 24 20:16:11 patrick-pc systemd[1]: iwd.service: Scheduled restart job, restart counter is at 5.
Oct 24 20:16:11 patrick-pc systemd[1]: Stopped Wireless service.
Oct 24 20:16:11 patrick-pc systemd[1]: iwd.service: Start request repeated too quickly.
Oct 24 20:16:11 patrick-pc systemd[1]: iwd.service: Failed with result 'exit-code'.
Oct 24 20:16:11 patrick-pc systemd[1]: Failed to start Wireless service.

Offline

#4 2019-10-25 01:39:01

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: [SOLVED] iwd fails to start via systemd

There was an update today, any change?

What's the output of

systemctl list-unit-files --state enabled

"the wind-blown way, wanna win? don't play"

Offline

#5 2019-10-27 00:11:20

patrickthebold
Member
Registered: 2008-12-15
Posts: 55

Re: [SOLVED] iwd fails to start via systemd

With the update I now get an error: Still looking into what to do about it:

$ sudo systemctl status iwd
● iwd.service - Wireless service
   Loaded: loaded (/etc/systemd/system/iwd.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/iwd.service.d
           └─override.conf
   Active: inactive (dead) since Sat 2019-10-26 20:08:05 EDT; 12s ago
  Process: 1178 ExecStart=/usr/lib/iwd/iwd (code=exited, status=0/SUCCESS)
 Main PID: 1178 (code=exited, status=0/SUCCESS)

Oct 26 20:08:05 patrick-pc systemd[1]: Starting Wireless service...
Oct 26 20:08:05 patrick-pc iwd[1178]: Wireless daemon version 0.23
Oct 26 20:08:05 patrick-pc iwd[1178]: Loaded configuration from /etc/iwd/main.conf
Oct 26 20:08:05 patrick-pc systemd[1]: Started Wireless service.
Oct 26 20:08:05 patrick-pc iwd[1178]: Module rfkill failed to start: -2
Oct 26 20:08:05 patrick-pc iwd[1178]: D-Bus disconnected, quitting...
Oct 26 20:08:05 patrick-pc systemd[1]: iwd.service: Succeeded.

The output requested is:

$ systemctl list-unit-files --state enabled
UNIT FILE                             STATE  
org.cups.cupsd.path                   enabled
autovt@.service                       enabled
avahi-daemon.service                  enabled
bluetooth.service                     enabled
dbus-org.bluez.service                enabled
dbus-org.freedesktop.Avahi.service    enabled
dbus-org.freedesktop.resolve1.service enabled
getty@.service                        enabled
iwd.service                           enabled
mpd.service                           enabled
ntpd.service                          enabled
org.cups.cupsd.service                enabled
systemd-networkd.service              enabled
systemd-resolved.service              enabled
avahi-daemon.socket                   enabled
mpd.socket                            enabled
org.cups.cupsd.socket                 enabled
systemd-networkd.socket               enabled
remote-fs.target                      enabled

19 unit files listed.

Offline

#6 2019-10-28 14:02:16

glitsj16
Member
Registered: 2015-04-26
Posts: 118

Re: [SOLVED] iwd fails to start via systemd

@patrickthebold I used to have a similar override, but for a while now I changed that too only include 'Before=NetworkManager.service' in the [Unit] section. Combined with 'use_default_interface=true' in /etc/iwd/main.conf IWD has been very stable while keeping systemd-udevd's persistent naming scheme. Have you tried this yet?

Offline

#7 2019-10-28 23:41:23

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: [SOLVED] iwd fails to start via systemd

I agree with the gist of @glitsj16's post.

IWD has been a package that's been quite... fluid ... to say the least - and that includes the .service unit files. I would try and start from the beginning and make sure that you have the most current service file running. You shouldn't need an override anymore, potentially. And also make sure that you're 'systemctl daemon-reload'ing if/when changing the unit files or overriding etc.

Here's my current unit file which is the default supplied with the package, no modifications:

$ systemctl cat iwd.service
# /usr/lib/systemd/system/iwd.service
[Unit]
Description=Wireless service
Before=network.target
Wants=network.target

[Service]
Type=dbus
BusName=net.connman.iwd
ExecStart=/usr/lib/iwd/iwd
NotifyAccess=main
LimitNPROC=1
Restart=on-failure
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW
PrivateTmp=true
NoNewPrivileges=true
DevicePolicy=closed
DeviceAllow=/dev/rfkill rw
ProtectHome=yes
ProtectSystem=strict
ProtectControlGroups=yes
ProtectKernelModules=yes
ConfigurationDirectory=iwd
StateDirectory=iwd
StateDirectoryMode=0700

[Install]
WantedBy=multi-user.target

Based on your last post with the following error:

Oct 26 20:08:05 patrick-pc iwd[1178]: Module rfkill failed to start: -2

I'd also check into either an issue with that module not being loaded or the DeviceAllow=/dev/rfill rw missing from your service file.

Also this might get more attention in the IWD thread itself.


"the wind-blown way, wanna win? don't play"

Offline

#8 2019-10-30 01:04:52

patrickthebold
Member
Registered: 2008-12-15
Posts: 55

Re: [SOLVED] iwd fails to start via systemd

Thanks, going back to the defaults seems to have mostly worked. (I needed to add back in my old override.conf to get it to work at boot time.)

$ sudo cp /usr/lib/systemd/system/iwd.service /etc/systemd/system/

Was what I did. This is probably a more basic question, but why is there a service file at /usr/lib/systemd/system/iwd.service and one under /etc/systemd/system/? I'm not even sure how the one under etc got there. It wasn't shown as owned by any package, and reinstalling iwd doesn't modify it. I'd expect package updates to actually update the service files (or maybe add a .pacnew file). Why did I end up with an old service file being used?

Last edited by patrickthebold (2019-10-30 01:08:54)

Offline

#9 2019-10-30 01:31:07

loqs
Member
Registered: 2014-03-06
Posts: 17,463

Re: [SOLVED] iwd fails to start via systemd

Did you not create  /etc/systemd/system/iwd.service at some point in the past?
As a note it makes no sense to have both a custom unit file /etc/systemd/system/iwd.service then override it with /etc/systemd/system/iwd.service.d/override.conf

Offline

#10 2019-10-30 02:34:06

patrickthebold
Member
Registered: 2008-12-15
Posts: 55

Re: [SOLVED] iwd fails to start via systemd

ahhh I must have made that at some point and also didn't realize that was where the custom files go. I've remove that now, thanks.

Offline

Board footer

Powered by FluxBB