On debian stretch "gpg --search" fails since gnupg2.1. All keyserver options are
disabled in gpg.conf.
$ gpg --version
gpg (GnuPG) 2.1.18
libgcrypt 1.7.6-beta
$ dirmngr --version
dirmngr (GnuPG) 2.1.18
$ gpg --search collective@riseup.net
gpg: error searching keyserver: Connection closed in DNS
gpg: keyserver search failed: Connection closed in DNS
$ gpg -vvv --debug-level guru --search collective@riseup.net
gpg: using character set 'utf-8'
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/kardan/.gnupg
gpg: DBG: chan_3 <- # Config: /home/kardan/.gnupg/dirmngr.conf
gpg: DBG: chan_3 <- OK Dirmngr 2.1.18 at your service
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_3 -> GETINFO version
gpg: DBG: chan_3 <- D 2.1.18
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KS_SEARCH -- collective@riseup.net
gpg: DBG: chan_3 <- ERR 167772876 Connection closed in DNS <Dirmngr>
gpg: error searching keyserver: Connection closed in DNS
gpg: keyserver search failed: Connection closed in DNS
gpg: DBG: chan_3 -> BYE
gpg: DBG: [not enabled in the source] stop
gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
outmix=0 getlvl1=0/0 getlvl2=0/0
gpg: secmem usage: 0/65536 bytes in 0 blocks
ii gnupg 2.1.18-3 i386
ii dirmngr 2.1.18-3 i386