Page MenuHome GnuPG

gpg "No name" error
Closed, DuplicatePublic

Description

What is the "no name" error trying to tell me?

$ gpg --debug-level guru --keyserver hkp://keys.gnupg.net --search-keys CEB167EFB5722BD6
gpg: enabled debug flags: packet mpi crypto filter iobuf memory cache memstat trust hashing ipc clock lookup extprog
gpg: DBG: [not enabled in the source] start
gpg: DBG: chan_3 <- # Home: /home/walz/.gnupg
gpg: DBG: chan_3 <- # Config: /home/walz/.gnupg/dirmngr.conf
gpg: DBG: chan_3 <- OK Dirmngr 2.2.4 at your service
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_3 -> GETINFO version
gpg: DBG: chan_3 <- D 2.2.4
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KEYSERVER --clear hkp://keys.gnupg.net
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KS_SEARCH -- CEB167EFB5722BD6
gpg: DBG: chan_3 <- ERR 167772380 No name <Dirmngr>
gpg: error searching keyserver: No name
gpg: keyserver search failed: No name
gpg: DBG: chan_3 -> BYE
gpg: DBG: [not enabled in the source] stop
gpg: keydb: handles=0 locks=0 parse=0 get=0
gpg:        build=0 update=0 insert=0 delete=0
gpg:        reset=0 found=0 not=0 cache=0 not=0
gpg: kid_not_found_cache: count=0 peak=0 flushes=0
gpg: sig_cache: total=0 cached=0 good=0 bad=0
gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
              outmix=0 getlvl1=0/0 getlvl2=0/0
gpg: rndjent stat: collector=0x0000000000000000 calls=0 bytes=0
gpg: secmem usage: 0/32768 bytes in 0 blocks

on archlinux with
gpg (GnuPG) 2.2.4
libgcrypt 1.8.2
dirmngr (GnuPG) 2.2.4

downstream issue https://bbs.archlinux.org/viewtopic.php?id=233362, https://bugs.archlinux.org/task/57012

Event Timeline

walz created this object in space S1 Public.
walz updated the task description. (Show Details)

That is likely "host not found" or "domain not found". Maybe a problem with your resolver. Please add

log-file /foo/bar/dirmngr.log
verbose
debug ipc,dns

to ~/.gnupg/dirmngr.conf and restart dirmngr ("gpgconf --kill dirmngr"). I would also suggest to remove your --keyserver and use the default which is actually what keys.gnupg.net points to.

$ gpg --debug-level guru --search-keys CEB167EFB5722BD6
$ cat dirmngr.log
2018-01-08 20:06:37 dirmngr[1085.0] permanently loaded certificates: 141
2018-01-08 20:06:37 dirmngr[1085.0]     runtime cached certificates: 0
2018-01-08 20:06:37 dirmngr[1085.0]            trusted certificates: 141 (140,0,0,1)
2018-01-08 20:06:37 dirmngr[1085.6] handler for fd 6 started
2018-01-08 20:06:37 dirmngr[1085.6] DBG: chan_6 -> # Home: /home/walz/.gnupg
2018-01-08 20:06:37 dirmngr[1085.6] DBG: chan_6 -> # Config: /home/walz/.gnupg/dirmngr.conf
2018-01-08 20:06:37 dirmngr[1085.6] DBG: chan_6 -> OK Dirmngr 2.2.4 at your service
2018-01-08 20:06:37 dirmngr[1085.6] connection from process 1084 (1000:100)
2018-01-08 20:06:37 dirmngr[1085.6] DBG: chan_6 <- GETINFO version
2018-01-08 20:06:37 dirmngr[1085.6] DBG: chan_6 -> D 2.2.4
2018-01-08 20:06:37 dirmngr[1085.6] DBG: chan_6 -> OK
2018-01-08 20:06:37 dirmngr[1085.6] DBG: chan_6 <- KS_SEARCH -- CEB167EFB5722BD6
2018-01-08 20:06:37 dirmngr[1085.6] DBG: dns: libdns initialized
2018-01-08 20:06:37 dirmngr[1085.6] DBG: dns: getsrv(_pgpkey-https._tcp.hkps.pool.sks-keyservers.net) -> 0 records
2018-01-08 20:06:37 dirmngr[1085.6] DBG: dns: resolve_dns_name(hkps.pool.sks-keyservers.net): No name
2018-01-08 20:06:37 dirmngr[1085.6] resolving 'hkps.pool.sks-keyservers.net' failed: No name
2018-01-08 20:06:37 dirmngr[1085.6] number of system provided CAs: 156
2018-01-08 20:06:37 dirmngr[1085.6] DBG: dns: resolve_dns_name(hkps.pool.sks-keyservers.net): No name
2018-01-08 20:06:37 dirmngr[1085.6] resolving 'hkps.pool.sks-keyservers.net' failed: No name
2018-01-08 20:06:37 dirmngr[1085.6] can't connect to 'hkps.pool.sks-keyservers.net': host not found
2018-01-08 20:06:37 dirmngr[1085.6] error connecting to 'https://hkps.pool.sks-keyservers.net:443': No name
2018-01-08 20:06:37 dirmngr[1085.6] command 'KS_SEARCH' failed: No name
2018-01-08 20:06:37 dirmngr[1085.6] DBG: chan_6 -> ERR 167772380 No name <Dirmngr>
2018-01-08 20:06:37 dirmngr[1085.6] DBG: chan_6 <- BYE
2018-01-08 20:06:37 dirmngr[1085.6] DBG: chan_6 -> OK closing connection
2018-01-08 20:06:37 dirmngr[1085.6] handler for fd 6 terminated

and just to test

$ wget hkps.pool.sks-keyservers.net
--2018-01-08 20:10:28--  http://hkps.pool.sks-keyservers.net/
Resolving clientproxy.abc.net... 10.4.55.30
Connecting to clientproxy.abc.net|10.4.55.30|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 1684 (1.6K) [text/html]
Saving to: ‘index.html’
index.html                 100%[=====================================>]   1.64K  --.-KB/s    in 0s      
2018-01-08 20:10:28 (202 MB/s) - ‘index.html’ saved [1684/1684]

What is the output of

gpg-connect-agent --dirmngr 'getinfo dnsinfo' /bye

and what is the content of your /etc/nsswitch.conf and /etc/resolv.conf ? Is there anything special in your /etc/hosts? Are you using any kind of non mainstream DNS resolver on your system or network?

$ gpg-connect-agent --dirmngr 'getinfo dnsinfo' /bye
OK - Libdns stub resolver

/etc/hosts is empty
/etc/nsswitch.conf is the default
/etc/resolv.conf contains the corporate DNS

$ cat /etc/resolv.conf
# Generated by resolvconf
...

Are you using any kind of non mainstream DNS resolver on your system or network?

Quite possible. This is the first time in that I have issues with pacman -> gpg though.

werner triaged this task as Normal priority.Apr 17 2018, 8:21 PM

This must be an issue of SRV record retrieval.
Merging.