Archlinux-keyring failed service in systemctl is back again!

It looks that i closed my archlinux keyring issue topic to soon…

Now i have this issue on my Laptop and also on my PC… the last stable also showed this problem on my Laptop instead only the PC.

systemctl --failed
  UNIT                               LOAD   ACTIVE SUB    DESCRIPTION                               
● archlinux-keyring-wkd-sync.service loaded failed failed Refresh existing keys of archlinux-keyring

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
1 loaded units listed.

When i do systemctl restart archlinux-keyring-wkd-sync.service

and

systemctl status archlinux-keyring-wkd-sync.service

× archlinux-keyring-wkd-sync.service - Refresh existing keys of archlinux-keyring
     Loaded: loaded (/usr/lib/systemd/system/archlinux-keyring-wkd-sync.service; static)
     Active: failed (Result: exit-code) since Sat 2022-11-19 23:27:33 CET; 2min 38s ago
   Duration: 18.432s
TriggeredBy: ● archlinux-keyring-wkd-sync.timer
    Process: 10517 ExecStart=/usr/bin//archlinux-keyring-wkd-sync (code=exited, status=1/FAILURE)
   Main PID: 10517 (code=exited, status=1/FAILURE)
        CPU: 1.411s

Nov 19 23:27:33 koboldx-z170 archlinux-keyring-wkd-sync[10721]:       3E80CA1A8B89F69CBA57D98A76A5EF9054449A5C
Nov 19 23:27:33 koboldx-z170 archlinux-keyring-wkd-sync[10721]: uid           [marginal] Pierre Schmitz <pierre@archlinux.org>
Nov 19 23:27:33 koboldx-z170 archlinux-keyring-wkd-sync[10721]: uid           [marginal] Pierre Schmitz <pierre@archlinux.de>
Nov 19 23:27:33 koboldx-z170 archlinux-keyring-wkd-sync[10721]: sub   ed25519 2022-10-31 [A] [expires: 2037-10-27]
Nov 19 23:27:33 koboldx-z170 archlinux-keyring-wkd-sync[10721]: sub   cv25519 2022-10-31 [E] [expires: 2037-10-27]
Nov 19 23:27:33 koboldx-z170 archlinux-keyring-wkd-sync[10517]: Skipping key 3E80CA1A8B89F69CBA57D98A76A5EF9054449A5C with UID pierre@archlinux.de...
Nov 19 23:27:33 koboldx-z170 archlinux-keyring-wkd-sync[10517]: Skipping key 69E6471E3AE065297529832E6BA0F5A2037F4F41 with UID demize@master-key.archlinux.org...
Nov 19 23:27:33 koboldx-z170 systemd[1]: archlinux-keyring-wkd-sync.service: Main process exited, code=exited, status=1/FAILURE
Nov 19 23:27:33 koboldx-z170 systemd[1]: archlinux-keyring-wkd-sync.service: Failed with result 'exit-code'.
Nov 19 23:27:33 koboldx-z170 systemd[1]: archlinux-keyring-wkd-sync.service: Consumed 1.411s CPU time.

It works on arch. No idea why it exits with error on manjaro. (same archlinux-keyring 20221110-1)

$ grep "\(andrew\|keenerd\)" manjaro-wkd2.output

Skipping key 601F20F1D1BBBF4A78CF5B6DF6B1610B3ECDBC9F with UID andrew@crerar.io...
Skipping key 48C3B1F30DDD0FE67E516D16396E3E25BAB142C1 with UID keenerd@archlinux.org...
Skipping key 48C3B1F30DDD0FE67E516D16396E3E25BAB142C1 with UID keenerd@gmail.com...
Skipping key B8151B117037781095514CA7BBDFFC92306B1121 with UID andrew@archlinux.org...
Skipping key 601F20F1D1BBBF4A78CF5B6DF6B1610B3ECDBC9F with UID andrew@crerar.io...
uid           [marginal] Andrew Crerar <andrew@crerar.io>
Refreshing key 48C3B1F30DDD0FE67E516D16396E3E25BAB142C1 with UID keenerd@archlinux.org...
gpg: error retrieving 'keenerd@archlinux.org' via WKD: No data
Skipping key 48C3B1F30DDD0FE67E516D16396E3E25BAB142C1 with UID keenerd@gmail.com...
Refreshing key B8151B117037781095514CA7BBDFFC92306B1121 with UID andrew@archlinux.org...
gpg: error retrieving 'andrew@archlinux.org' via WKD: No data
$ grep "\(andrew\|keenerd\)" arch-wkd.output

Skipping key 601F20F1D1BBBF4A78CF5B6DF6B1610B3ECDBC9F with UID andrew@crerar.io...
Skipping key 48C3B1F30DDD0FE67E516D16396E3E25BAB142C1 with UID keenerd@gmail.com...
Skipping key 601F20F1D1BBBF4A78CF5B6DF6B1610B3ECDBC9F with UID andrew@crerar.io...
uid           [marginal] Andrew Crerar <andrew@crerar.io>
Skipping key 48C3B1F30DDD0FE67E516D16396E3E25BAB142C1 with UID keenerd@gmail.com...

Perhaps different wkd server?

Anyway, it doesn’t matter. It finishes doing what it’s supposed to do. It just exits with error at the end.

In my last Topic you posted this command:

sudo sed -i \
         -e '40i error=0' \
         -e '$a \\nexit ${error}' \
         -e 's/\("${gpg_locate_external\[@\]}" "${fpr_email\[1\]}"\)/\1 || let ++error/' \
         /usr/bin/archlinux-keyring-wkd-sync

Does this command fixed that error? What it changed exactly?

From my very poor understanding of sed and whatever language that script is written in, I’d think that it doesn’t not fix the underlying issue but returns success.

No, forget that. It does the same as a patch in new archlinux-keyring (linked below). I wrote it because I thought there wouldn’t be a new stable update for a while (and for fun, to remind myself how to do something in sed, for the nth time). :stuck_out_tongue:

Now failed service isn’t the same as before. Before, refreshing stopped when an error was encountered. Now it goes to the end and then returns error. So job done.

It’s just a sed command that does this:

1 Like

I just noticed this:

  • systemctl status archlinux-keyring-wkd-sync|xclip
× archlinux-keyring-wkd-sync.service - Refresh existing keys of archlinux-keyring
     Loaded: loaded (/usr/lib/systemd/system/archlinux-keyring-wkd-sync.service; static)
     Active: failed (Result: exit-code) since Sun 2022-11-27 15:51:57 +03; 1min 29s ago
   Duration: 9min 19.594s
TriggeredBy: ● archlinux-keyring-wkd-sync.timer
    Process: 119010 ExecStart=/usr/bin//archlinux-keyring-wkd-sync (code=exited, status=3)
   Main PID: 119010 (code=exited, status=3)
         IP: 1.7M in, 354.5K out
        CPU: 3min 25.307s

Nov 27 15:51:57 manjaro archlinux-keyring-wkd-sync[119641]: pub   rsa2048 2011-04-10 [SC]
Nov 27 15:51:57 manjaro archlinux-keyring-wkd-sync[119641]:       4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC
Nov 27 15:51:57 manjaro archlinux-keyring-wkd-sync[119641]: uid           [  full  ] Pierre Schmitz <pierre@archlinux.de>
Nov 27 15:51:57 manjaro archlinux-keyring-wkd-sync[119641]: uid           [  full  ] Pierre Schmitz <pierre@archlinux.org>
Nov 27 15:51:57 manjaro archlinux-keyring-wkd-sync[119641]: sub   rsa2048 2011-04-10 [E]
Nov 27 15:51:57 manjaro archlinux-keyring-wkd-sync[119010]: Skipping key 3E80CA1A8B89F69CBA57D98A76A5EF9054449A5C with UID pierre@archlinux.de...
Nov 27 15:51:57 manjaro archlinux-keyring-wkd-sync[119010]: Skipping key 69E6471E3AE065297529832E6BA0F5A2037F4F41 with UID demize@master-key.archlinux.org...
Nov 27 15:51:57 manjaro systemd[1]: archlinux-keyring-wkd-sync.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Nov 27 15:51:57 manjaro systemd[1]: archlinux-keyring-wkd-sync.service: Failed with result 'exit-code'.
Nov 27 15:51:57 manjaro systemd[1]: archlinux-keyring-wkd-sync.service: Consumed 3min 25.307s CPU time, received 1.7M IP traffic, sent 354.5K IP traffic.
  • pamac info archlinux-keyring|xclip
Name                  : archlinux-keyring
Version               : 20221110-1
Description           : Arch Linux PGP keyring
URL                   : https://gitlab.archlinux.org/archlinux/archlinux-keyring
Licenses              : GPL3
Repository            : core
Installed Size        : 1.7 MB
Groups                : base-devel
Depends On            : pacman
Optional Dependencies : --
Required By           : base
Optional For          : --
Provides              : --
Replaces              : --
Conflicts With        : --
Packager              : Christian Hesse <eworm@archlinux.org>
Build Date            : Thu 10 Nov 2022 11:18:21 PM +03
Install Date          : Mon 14 Nov 2022 01:30:36 PM +03
Install Reason        : Installed as a dependency for another package
Validated By          : Signature
Backup files          : --

Is it something to worry about, especially because of this:

It only errors on Manjaro. :stuck_out_tongue:

If it bothers you so much, you can delete those ‘WKD: no data’ keys. (service still throws exit code 1 though)

Run script manually

 archlinux-keyring-wkd-sync 1>/dev/null

And you probably get error for 2 keys: andrew and keenerd.

NOTE: I had exit code 2 though, so maybe you are getting some other errors.

Get keys with

gpg --homedir $(pacman-conf GPGDir) --no-permission-warning --list-keys --list-options show-only-fpr-mbox | grep -E "(andrew|keenerd)"

and remove them with

pacman-keys --delete 1234ABCD...

and reinstall archlinux-keyring and test again. I get no error when running it manually at least, and exit code 1 via service.

This .service will probably be deleted in the future anyway, as far as I know, so I wouldn’t bother.

1 Like

Ok then ill just ignore it and let it be uninstalled with any updates that might be in future :+1:
(I remove orphans)

pamac info archlinux-keyring
Required By : base