Docker-node: gpg: keyserver receive failed: Address not available

Created on 12 Apr 2017  路  4Comments  路  Source: nodejs/docker-node

I am trying to generate a docker image to node 6.10 with alpine, but I get this error:

gpg: keyserver receive failed: Address not available

Does anyone knows how to solve it?

Most helpful comment

(Came here through Google after having the same error in a different container.)

In my case, the error with [ha.]pool.sks-keyservers.net was related to IPv4 vs. IPv6: GPG's dirmngr might select a v6 server from the pool and try to connect to it, even though it doesn't have v6 connectivity inside the container.
I'm not sure whether this is a bug in Docker or dirmngr, but there is at least this bug related to dirmngr and IPv6.

If one wants stay with sks-keyservers, ipv4.pool.sks-keyservers.net can be used.

All 4 comments

That looks like a possible network issue in your docker setup. We also recently updated the docker files to try more than one key server:

https://github.com/nodejs/docker-node/blob/master/6.10/Dockerfile#L18

We would get periodic failures with ha.pool.sks-keyservers.net

(Came here through Google after having the same error in a different container.)

In my case, the error with [ha.]pool.sks-keyservers.net was related to IPv4 vs. IPv6: GPG's dirmngr might select a v6 server from the pool and try to connect to it, even though it doesn't have v6 connectivity inside the container.
I'm not sure whether this is a bug in Docker or dirmngr, but there is at least this bug related to dirmngr and IPv6.

If one wants stay with sks-keyservers, ipv4.pool.sks-keyservers.net can be used.

Thank @chorrell , I fixed my Dockerfiles with your workaround 馃憤

( gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEYS" \
  || gpg --keyserver pgp.mit.edu --recv-keys "$GPG_KEYS" \
  || gpg --keyserver keyserver.pgp.com --recv-keys "$GPG_KEYS" )

Also see:

  • nodejs/docker-node#591
  • nodejs/docker-node#632
Was this page helpful?
0 / 5 - 0 ratings

Related issues

MylesBorins picture MylesBorins  路  17Comments

ORESoftware picture ORESoftware  路  20Comments

hjanuschka picture hjanuschka  路  30Comments

arcanis picture arcanis  路  26Comments

mikemaccana picture mikemaccana  路  24Comments