So if your DNS resolver does not tell us the IP addresses, we can't do anything about it.
Dec 14 2018
Dec 11 2018
If you specify a pool of keyservers dirmngr selects a keyserver on its won from the pool. This is so that it can use its own heuristics to detect whether a keyserver is dead and then retry another one. Now the default is a pool and your specified keyserver.ubuntu.com is also a pool (of two servers). So if your DNS resolver does not tell us the IP addresses, we can't do anything about it.
Will go into 2.1.12 to be released next week.
Nov 12 2018
I can reproduce it if I enter your or an unknown IP address.
Mmh. It still makes a bit sense to me as I think it will be faster. But of course for memory mapped files the OS might decide.
Nov 7 2018
The dirmngr may at any time open a file in that directory and thus there is no reliable way to remove the home directory when any gpg tool is running. Daemons need to be stopped before a directory can be deleted. So I think this is a non-issue and brought to the table only because we have that kludge of detecting a n unlinked directory on Unix. But even on Unix this is not possible to get rid of the home directory, for example if you want to umount it.
Nov 6 2018
Sorry, it didn't made it into 2.2.11.
Nov 5 2018
No more complaints thus time to close.
Fixed in master and 2.2.
Oct 29 2018
It actually tries several servers but we need to set a limit because we need to cope with longer timeouts. Do you suggest to toggle between v4 and v6 addresses? That is if a v6 address fails, first try the next v4 address and it that fails, another v6 address, etc.
Oct 25 2018
Oh, that is really old code dating back to dirmngr-1. There is only one user I will see whether I can replace it with the generic parser we have in http.c
Oct 24 2018
If I understand the code correctly the mapping is done to let the system optimize the memory management so that the full contents of the file are not kept in memory, or is there a different reason?
Maybe related, flush also does not work on Windows:
Oct 22 2018
iirrc, that are memory mapped files.
This was an issue we talked about.
I'm also seeing the same behaviour on a freshly installed Windows 10 1809 with Gpg4win v3.1.4. Have to kill dirmngr from task manager to be able to get into Kleopatra.
Oct 21 2018
Oct 16 2018
Oct 9 2018
I believe this would be a good improvement in user experience
Oct 8 2018
Hi, Has anyone found a reason why that happens. I run into the same behavior on my Windows 10 1803 computer. I have Gpg4win version 3.1.3 freshly installed and dirmngr hangs. Thanks and best regards, Peter
Oct 1 2018
Sep 11 2018
We assume that this has meanwhile been fixed.
Sep 7 2018
Patch 0001 applied to master.
Sep 4 2018
Aug 29 2018
@elonsatoshi: Were you able to check this with 2.2.9 which has a fix for the resolver?
Aug 21 2018
A workaround for this until the HTTP client is fixed is to just use curl instead:
I am running into the same exact issue. It seems that dirmng is incorrectly attempting to resolve the addresses for the keyservers despite having been given an HTTP proxy to connect through.
Aug 20 2018
Can I ask if there is any update on the issue that I face?
Aug 6 2018
Was anyone successful in debugging dirmngr? I'm having the same issue. The dirmngr process gets stuck, no output at all, and this causes Kleopatra to get stuck waiting for it. I can only run Kleopatra after I have killed the dirmngr process. If I understand correctly I still need this process for network-related functionality, so I would need to fix it if I want to use all functions.
Jul 18 2018
I got feedback from the user that had the problem. It's fixed with 2.2.9 which contains your commit afaik.
Jul 12 2018
it is not due to windows but due to the use of NTBTLS. I have the same problem here... and found it: We call es_fflush to let ntbtls flush its internal buffers but libgpg-error's estream module does no propagate this explicit flush to the cookie functions of ntbtls. Thus ntbtls gets stuck most of the time. I am not sure when this regression happened but it is pretty obvious.
Jul 11 2018
I have logging to a socket always enabled. That may explain why I don't see that error on Unix.
Jun 20 2018
I manually configure IPv6 only environment, and now (forthcoming 2.2.9), it works fine for me.
So, I move this state to Testing.
Applied to 2.2 branch.
As written in T2438:
I think that this is same issue of T2438: dirmngr fails repeatedly with "invalid argument", without kicking the host from its list.
For the problem in the last comment, it was fixed in T2928: stop fetching PTR records entirely.
For the original issue, it looks that EINVAL is returned by the system call of connect(2).
That's quite strange, but, it was possible for IPv6.
Good. I don't think there is any reason to select the ephemeral port in user space (by default).
So, I disabled the feature for all OSes.
Jun 19 2018
I have performed some experiments on the issue I have and the following are the results:
@gniibe Thank you very much!
I've tested the change on Windows 7 and Windows 10 and the Firewall warning is indeed gone with this.
I found dirmngr tries to bind some random port. It might be the cause.
Jun 18 2018
I will try to figure out what exactly triggers the firewall. This should really be fixed as it leads to a bad "first contact" with Gpg4win, especially as we do more locate-keys nowadays so the question pops up randomly for the user.
And 2.2 branch.
Fixed in master.
Jun 15 2018
I'll fix for the non-FQDN case.
I think that I identified the issue. This is the libdns (dirmngr/dns.c) problem when hostname is not FQDN.
If you change it to FQDN, you can see that it tries to search adding the domain name.
For issues/19, it is also reported in T3374: gpg recv-keys fail if first dns server end up with "Connection refused".
This is fixed in master now.
I'm not sure if original reporter's problem is issues/19 or not.
Fixed in master.
It is indirectly reported at the upstream: https://github.com/wahern/dns/issues/19