Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#52780 - [pacman-key] --refresh-keys fails with: ==> ERROR: A specified local key could not be updated...

Attached to Project: Community Packages
Opened by Christian Rebischke (Shibumi) - Monday, 30 January 2017, 22:02 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 01 February 2017, 15:20 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Hello,
My pacman-key is failing since a month or something. Everytime when I try to refresh the keys via pacman-key --refresh-keys I get the following error:

gpg: refreshing 88 keys from hkp://pool.sks-keyservers.net
gpg: keyserver refresh failed: No keyserver available
==> ERROR: A specified local key could not be updated from a keyserver.


I get this error also with other keyservers like pgp.mit.edu.

I have attached a `strace pacman-key --refresh-keys`. It's maybe helpful.
Any idea how I can solve this issue?
This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 01 February 2017, 15:20 GMT
Reason for closing:  Not a bug
Comment by Christian Rebischke (Shibumi) - Monday, 30 January 2017, 22:03 GMT
Current pacman-key version is: 5.0.1
Comment by Christian Rebischke (Shibumi) - Monday, 30 January 2017, 22:15 GMT
I tried the following to fix this problem:

rm -R /etc/pacman.d/gnupg/
rm -R /root/.gnupg/
gpg --refresh-keys
pacman-key --init && pacman-key --populate archlinux
pacman-key --refresh-keys

this works, except pacman-key --refresh-keys.. I still get the same error there.
Comment by Doug Newgard (Scimmia) - Tuesday, 31 January 2017, 15:58 GMT
What version of gnupg? Was dirmngr (with pacman homedir) restarted after the latest update? Changes to nsswitch.conf?
Comment by Christian Rebischke (Shibumi) - Tuesday, 31 January 2017, 20:17 GMT
gnupg version: 2.1.18

my /etc/nsswitch.conf
-----------------------
# Begin /etc/nsswitch.conf

passwd: files
group: files
shadow: files

publickey: files

hosts: files mymachines resolve myhostname
networks: files

protocols: files
services: files
ethers: files
rpc: files

netgroup: files

# End /etc/nsswitch.conf
-------------------------


How can I check for a running dirmgr? I can't find with `systemctl list-units -a ` nor with `systemctl list-unitfiles -a`.
Comment by Doug Newgard (Scimmia) - Wednesday, 01 February 2017, 01:38 GMT
Looks like you haven't been merging pacnew files.

dirmngr is run by gnupg the first time you run it if it's not already running.
Comment by Christian Rebischke (Shibumi) - Wednesday, 01 February 2017, 12:47 GMT
Mhh seems like you are right. I didn't merged nsswitch.conf and nsswitch.conf.pacnew.. let me merge them and see what will happen.
Comment by Christian Rebischke (Shibumi) - Wednesday, 01 February 2017, 14:51 GMT
Here is my new nsswitch.conf:
--------
# Begin /etc/nsswitch.conf

passwd: compat mymachines systemd
group: compat mymachines systemd
shadow: compat

publickey: files

hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
networks: files

protocols: files
services: files
ethers: files
rpc: files

netgroup: files

# End /etc/nsswitch.conf
-------------

pacman-key --refresh-keys does work now but at the end I get:
[..]
gpg: key E6B456CAF15447D5: "Federico Cinelli <cinelli@aur.archlinux.org>" 11 new signatures
gpg: Total number processed: 68
gpg: new user IDs: 1
gpg: new signatures: 1599
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 6 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 6 signed: 69 trust: 0-, 0q, 0n, 6m, 0f, 0u
gpg: depth: 2 valid: 69 signed: 8 trust: 69-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2017-09-07
[..]
gpg: keyserver refresh failed: No keyserver available
==> ERROR: A specified local key could not be updated from a keyserver.

Loading...