Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build of fpm image fails on gpg: keyserver receive failed: Cannot assign requested address #562

Closed
sonologic opened this issue Dec 1, 2018 · 9 comments

Comments

@sonologic
Copy link

I'm trying to build a new image for nextcloud fpm 13.0.8 to upgrade my currently running 13.0.7. I've built the 13.0.7 image on this same system. The system is a raspberry pi 3b+

Somewhere along the way, the command gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A fails with gpg: keyserver receive failed: Cannot assign requested address.

Full output:

gmc@pi2:~/docker-compose/pi2/certbot $ docker --version
Docker version 18.09.0, build 4d60db4
gmc@pi2:~/docker-compose/pi2/certbot $ uname -a
Linux pi2.sonologic.net 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
gmc@pi2:~/docker-compose/pi2/certbot $ cat /etc/debian_version 
9.6
gmc@pi2:~/docker-nextcloud/13.0/fpm $ docker build -t nextcloud:fpm-13.0.8 .
Sending build context to Docker daemon  19.97kB
Step 1/11 : FROM php:7.2-fpm-stretch
 ---> 85de92f4991c
Step 2/11 : RUN set -ex;         apt-get update;     apt-get install -y --no-install-recommends         rsync         bzip2         busybox-static     ;     rm -rf /var/lib/apt/lists/*;         mkdir -p /var/spool/cron/crontabs;     echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
 ---> Using cache
 ---> f887e514a620
Step 3/11 : RUN set -ex;         savedAptMark="$(apt-mark showmanual)";         apt-get update;     apt-get install -y --no-install-recommends         libcurl4-openssl-dev         libfreetype6-dev         libicu-dev         libjpeg-dev         libldap2-dev         libmcrypt-dev         libmemcached-dev         libpng-dev         libpq-dev         libxml2-dev     ;         debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)";     docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr;     docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch";     docker-php-ext-install         exif         gd         intl         ldap         opcache         pcntl         pdo_mysql         pdo_pgsql         zip     ;         pecl install APCu-5.1.14;     pecl install memcached-3.0.4;     pecl install redis-4.2.0;         docker-php-ext-enable         apcu         memcached         redis     ;         apt-mark auto '.*' > /dev/null;     apt-mark manual $savedAptMark;     ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so         | awk '/=>/ { print $3 }'         | sort -u         | xargs -r dpkg-query -S         | cut -d: -f1         | sort -u         | xargs -rt apt-mark manual;         apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false;     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 998e0cef4171
Step 4/11 : RUN {         echo 'opcache.enable=1';         echo 'opcache.enable_cli=1';         echo 'opcache.interned_strings_buffer=8';         echo 'opcache.max_accelerated_files=10000';         echo 'opcache.memory_consumption=128';         echo 'opcache.save_comments=1';         echo 'opcache.revalidate_freq=1';     } > /usr/local/etc/php/conf.d/opcache-recommended.ini;         echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini;         echo 'memory_limit=512M' > /usr/local/etc/php/conf.d/memory-limit.ini;         mkdir /var/www/data;     chown -R www-data:root /var/www;     chmod -R g=u /var/www
 ---> Using cache
 ---> 061430a7d7f1
Step 5/11 : VOLUME /var/www/html
 ---> Using cache
 ---> 8bfcdf3deac6
Step 6/11 : ENV NEXTCLOUD_VERSION 13.0.8
 ---> Using cache
 ---> a10215ea3f77
Step 7/11 : RUN set -ex;     fetchDeps="         gnupg         dirmngr     ";     apt-get update;     apt-get install -y --no-install-recommends $fetchDeps;         curl -fsSL -o nextcloud.tar.bz2         "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2";     curl -fsSL -o nextcloud.tar.bz2.asc         "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc";     export GNUPGHOME="$(mktemp -d)";     gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A;     gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2;     tar -xjf nextcloud.tar.bz2 -C /usr/src/;     gpgconf --kill all;     rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc nextcloud.tar.bz2;     rm -rf /usr/src/nextcloud/updater;     mkdir -p /usr/src/nextcloud/data;     mkdir -p /usr/src/nextcloud/custom_apps;     chmod +x /usr/src/nextcloud/occ;         apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps;     rm -rf /var/lib/apt/lists/*
 ---> Running in c0dd33c5d832
+ fetchDeps=         gnupg         dirmngr     
+ apt-get update
Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:4 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:3 http://security-cdn.debian.org/debian-security buster/updates InRelease [38.3 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian buster InRelease [150 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [47.6 kB]
Get:7 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
Get:9 http://security-cdn.debian.org/debian-security stretch/updates/main armhf Packages [445 kB]
Get:10 http://cdn-fastly.deb.debian.org/debian stretch-updates/main armhf Packages [5108 B]
Get:11 http://cdn-fastly.deb.debian.org/debian buster/main armhf Packages [7533 kB]
Get:12 http://cdn-fastly.deb.debian.org/debian stretch/main armhf Packages [6919 kB]
Fetched 15.4 MB in 15s (966 kB/s)
Reading package lists...
+ apt-get install -y --no-install-recommends gnupg dirmngr
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  gnupg-agent libassuan0 libksba8 libnpth0 libreadline7 libsqlite3-0
  pinentry-curses readline-common
Suggested packages:
  dbus-user-session libpam-systemd pinentry-gnome3 tor parcimonie xloadimage
  scdaemon pinentry-doc readline-doc
Recommended packages:
  gnupg-l10n
The following NEW packages will be installed:
  dirmngr gnupg gnupg-agent libassuan0 libksba8 libnpth0 libreadline7
  libsqlite3-0 pinentry-curses readline-common
0 upgraded, 10 newly installed, 0 to remove and 13 not upgraded.
Need to get 3017 kB of archives.
After this operation, 4997 kB of additional disk space will be used.
Get:1 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libassuan0 armhf 2.4.3-2 [36.3 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian stretch/main armhf pinentry-curses armhf 1.0.0-2 [46.6 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libnpth0 armhf 1.3-1 [13.6 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian stretch/main armhf readline-common all 7.0-3 [70.4 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libreadline7 armhf 7.0-3 [131 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian stretch/main armhf gnupg-agent armhf 2.1.18-8~deb9u3 [512 kB]
Get:7 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libksba8 armhf 1.3.5-2 [85.9 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main armhf libsqlite3-0 armhf 3.16.2-5+deb9u1 [499 kB]
Get:9 http://cdn-fastly.deb.debian.org/debian stretch/main armhf gnupg armhf 2.1.18-8~deb9u3 [1062 kB]
Get:10 http://cdn-fastly.deb.debian.org/debian stretch/main armhf dirmngr armhf 2.1.18-8~deb9u3 [559 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 3017 kB in 2s (1131 kB/s)
Selecting previously unselected package libassuan0:armhf.
(Reading database ... 12170 files and directories currently installed.)
Preparing to unpack .../0-libassuan0_2.4.3-2_armhf.deb ...
Unpacking libassuan0:armhf (2.4.3-2) ...
Selecting previously unselected package pinentry-curses.
Preparing to unpack .../1-pinentry-curses_1.0.0-2_armhf.deb ...
Unpacking pinentry-curses (1.0.0-2) ...
Selecting previously unselected package libnpth0:armhf.
Preparing to unpack .../2-libnpth0_1.3-1_armhf.deb ...
Unpacking libnpth0:armhf (1.3-1) ...
Selecting previously unselected package readline-common.
Preparing to unpack .../3-readline-common_7.0-3_all.deb ...
Unpacking readline-common (7.0-3) ...
Selecting previously unselected package libreadline7:armhf.
Preparing to unpack .../4-libreadline7_7.0-3_armhf.deb ...
Unpacking libreadline7:armhf (7.0-3) ...
Selecting previously unselected package gnupg-agent.
Preparing to unpack .../5-gnupg-agent_2.1.18-8~deb9u3_armhf.deb ...
Unpacking gnupg-agent (2.1.18-8~deb9u3) ...
Selecting previously unselected package libksba8:armhf.
Preparing to unpack .../6-libksba8_1.3.5-2_armhf.deb ...
Unpacking libksba8:armhf (1.3.5-2) ...
Selecting previously unselected package libsqlite3-0:armhf.
Preparing to unpack .../7-libsqlite3-0_3.16.2-5+deb9u1_armhf.deb ...
Unpacking libsqlite3-0:armhf (3.16.2-5+deb9u1) ...
Selecting previously unselected package gnupg.
Preparing to unpack .../8-gnupg_2.1.18-8~deb9u3_armhf.deb ...
Unpacking gnupg (2.1.18-8~deb9u3) ...
Selecting previously unselected package dirmngr.
Preparing to unpack .../9-dirmngr_2.1.18-8~deb9u3_armhf.deb ...
Unpacking dirmngr (2.1.18-8~deb9u3) ...
Setting up libnpth0:armhf (1.3-1) ...
Setting up readline-common (7.0-3) ...
Setting up libreadline7:armhf (7.0-3) ...
Setting up libksba8:armhf (1.3.5-2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up libsqlite3-0:armhf (3.16.2-5+deb9u1) ...
Setting up libassuan0:armhf (2.4.3-2) ...
Setting up pinentry-curses (1.0.0-2) ...
Setting up gnupg-agent (2.1.18-8~deb9u3) ...
Setting up dirmngr (2.1.18-8~deb9u3) ...
Setting up gnupg (2.1.18-8~deb9u3) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
+ curl -fsSL -o nextcloud.tar.bz2 https://download.nextcloud.com/server/releases/nextcloud-13.0.8.tar.bz2
+ curl -fsSL -o nextcloud.tar.bz2.asc https://download.nextcloud.com/server/releases/nextcloud-13.0.8.tar.bz2.asc
+ mktemp -d
+ export GNUPGHOME=/tmp/tmp.RMrJjf8O45
+ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A
gpg: keybox '/tmp/tmp.RMrJjf8O45/pubring.kbx' created
gpg: keyserver receive failed: Cannot assign requested address
The command '/bin/sh -c set -ex;     fetchDeps="         gnupg         dirmngr     ";     apt-get update;     apt-get install -y --no-install-recommends $fetchDeps;         curl -fsSL -o nextcloud.tar.bz2         "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2";     curl -fsSL -o nextcloud.tar.bz2.asc         "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc";     export GNUPGHOME="$(mktemp -d)";     gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 28806A878AE423A28372792ED75899B9A724937A;     gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2;     tar -xjf nextcloud.tar.bz2 -C /usr/src/;     gpgconf --kill all;     rm -r "$GNUPGHOME" nextcloud.tar.bz2.asc nextcloud.tar.bz2;     rm -rf /usr/src/nextcloud/updater;     mkdir -p /usr/src/nextcloud/data;     mkdir -p /usr/src/nextcloud/custom_apps;     chmod +x /usr/src/nextcloud/occ;         apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps;     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 2
gmc@pi2:~/docker-nextcloud/13.0/fpm $
@sonologic
Copy link
Author

Potentially related google hits on that error:
tianon/gosu#35
jacobalberty/unifi-docker#64

@sonologic
Copy link
Author

As a work-around i've replaced the hostname (ha.pool.sks-keyservers.net) in the Dockerfile with one of the IP addresses returned by host ha.pool.sks-keyservers.net.

1 similar comment
@sonologic
Copy link
Author

As a work-around i've replaced the hostname (ha.pool.sks-keyservers.net) in the Dockerfile with one of the IP addresses returned by host ha.pool.sks-keyservers.net.

@muhlemmer
Copy link

Same thing for the version 14 image on our x86_64 machines and auto-build on docker hub.

@marcus-aa
Copy link

It is some kind of IPV6-related issue. Try ipv4.pool.sks-keyservers.net instead.

@sonologic sonologic changed the title build of fpm 13.0.8 image on raspberry pi fails on gpg: keyserver receive failed: Cannot assign requested address build of fpm image fails on gpg: keyserver receive failed: Cannot assign requested address Jan 17, 2019
@sonologic
Copy link
Author

sonologic commented Jan 17, 2019

Been happening for the 14.x now as well and the 15.x

@sonologic
Copy link
Author

ipv4.pool.sks-keyservers.net does work. ipv6 is working on this host though, but when I have some time i'll try and look into it a bit more

@onny
Copy link

onny commented Mar 12, 2019

This pull request fixed the issue for me #687

@J0WI
Copy link
Contributor

J0WI commented Mar 13, 2019

See #687 (comment) for some thoughts and workarounds.

@J0WI J0WI closed this as completed Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants