tl;dr: HKPS handler will die when used with non-HKPS hosts in a given pool.
I think dying is reasonable. Maybe it should return a nicer error
than 'general error' and it shouldn't take 10 seconds to figure out
the protocol error.
Using setup directions from
https://sks-keyservers.net/overview-of-pools.php I assumed that
configuring my GnuPG client to use ipv4.pool.sks-keyservers.net
would provide an appropriate response. It took me quite some time to
determine that HKPS is totally incompatible with the ipv4 (or other)
server pools.This is further confused by the fact that an older version of the
GnuPG skeleton files which includes a clause with examples that mix
HKPS and hkp servers (skel may not necessarily be updated in a
user's directory):
Sorry about that. I think the current skeleton file is clearer on
this.
As a result, I kept encountering the errors reported in
T1792
I don't see a connection to this bug.
Here's a simple demonstration of the failure case
$ gpg2 --keyserver hkps://ipv4.pool.sks-keyservers.net --search-keys
2071B08A33BD3F06
gpg: error searching keyserver: General error
gpg: keyserver search failed: General errorContrast with:
$ gpg2 --keyserver hkps://hkps.pool.sks-keyservers.net --search-keys
2071B08A33BD3F06
gpg: data source: https://mud.stack.nl:443
(1) NIIBE Yutaka (GnuPG Release Key) <gniibe@fsij.org>2048 bit RSA key 2071B08A33BD3F06, created: 2014-10-29, expires: 2020-10-30PERSISTENT FAILURE CASE:
Now, once the failure condition is encountered, further queries FAIL:$ pkill dirmngr
A nicer way to kill the dirmngr is:
gpg-connect-agent --dirmngr 'killdirmngr' /bye
$ gpg2 --keyserver hkp://pool.sks-keyservers.net --search-keys 2071B08A33BD3F06
gpg: error searching keyserver: No route to host
gpg: keyserver search failed: No route to host
This is strange, and looks like it should work. Works over here. Maybe it is
bad luck and you got a bad host from the roundrobin.
$ gpg2 --keyserver hkps://hkps.sks-keyservers.net --search-keys 2071B08A33BD3F06
gpg: no keyserver known (use option --keyserver)
gpg: keyserver search failed: No keyserver availableWHAT?! I just specified --keyserver!!!??
Relax. You forgot the '.pool' in the url.
Let's see if this can be rectified with clearing the keyserver:
$ gpg-connect-agent --dirmngr keyserver
> keyserver --clear
OK$ gpg2 --keyserver hkps://hkps.sks-keyservers.net --search-keys 2071B08A33BD3F06
gpg: no keyserver known (use option --keyserver)
gpg: keyserver search failed: No keyserver available
Likewise.
- Try this with other VALID --keyserver combinations. Bang head against wall. The ONLY command that seems to fix this persistent failure case: $ gpg2 --search-keys 2071B08A33BD3F06 Suddenly, I can use --keyserver again, after this.
I'm pretty sure you just messed up the urls.
