Hi, I was able to track it down to this line of code: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=common/http.c;h=c2cac169d222ad5f41d1a8e224dd4bbaa2d7912b;hb=311816f6cf9d411dba060603e3c5d01c72824645#l2264 Here getaddrinfo() returns -3 (EAI_AGAIN) in the VM, but not on the host machine. One can get there like so:
$ cat ~/dirmngr-input-alias KEYSERVER --clear hkp://keys.gnupg.net KS_GET 409B6B1796C275462A1703113804BB82D39DC0E3 BYE $ gdb dirmngr/dirmngr (gdb) break connect_server (gdb) r < ~/dirmngr-input-alias (gdb) u 2264 (gdb) n (gdb) print $eax $1 = -3 Here's a test program that doesn't work in VM, but works on the host machine: #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <string.h> int main(void) { int r; struct addrinfo hints, *res; memset(&hints, 0, sizeof (hints)); hints.ai_socktype = SOCK_STREAM; r = getaddrinfo("keys.gnupg.net", "11371", &hints, &res); // r = getaddrinfo("pool.sks-keyservers.net", "11371", &hints, &res); if (r) { printf("r: %hhi\n", r); // EAI_AGAIN printf("r: %s\n", gai_strerror(r)); } return 0; } $ gcc 1.c $ ./a.out r: -3 r: Temporary failure in name resolution VM: $ `ldd a.out | grep libc | awk '{ print $3 }'` GNU C Library (Ubuntu GLIBC 2.21-0ubuntu4) stable release version 2.21, by Roland McGrath et al. Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 4.9.2. Available extensions: crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B libc ABIs: UNIQUE IFUNC For bug reporting instructions, please see: <https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>. host machine: $ `ldd a.out | grep libc | awk '{ print $3 }'` GNU C Library (GNU libc) stable release version 2.22, by Roland McGrath et al. Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 5.2.0. Available extensions: crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B libc ABIs: UNIQUE IFUNC For bug reporting instructions, please see: <https://bugs.archlinux.org/>. Can you confirm if it works with libc-2.22/libc-2.21 for you? Regards, Yuri
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users