Closed Bug 1542027 Opened 8 months ago Closed 8 months ago

Cannot build pontoon

Categories

(Webtools :: Pontoon, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pt, Assigned: pt, Mentored)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36

Steps to reproduce:

git clone https://github.com/mozilla/pontoon.git
cd pontoon
make build

Actual results:

Step 3/6 : RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
---> Running in 9deab20eb9b8
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: keyserver receive failed: Cannot assign requested address
ERROR: Service 'base' failed to build: The command '/bin/sh -c gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4' returned a non-zero code: 2
make: *** [Makefile:33: build] Error 1

Expected results:

Build pontoon.

Hi pt!
I get this error from time. From what I can find on the internet, there are multiple reasons why may cause your builds to fail:

The solution that is recurring in all PRs is just to try multiple keyservers with different flavors (e.g. with only ipv4 or or exposed on port 80)

Could apply the patch from below and tell me if it helps you?

diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base
index 913ddc10..6fa1fd81 100644
--- a/docker/Dockerfile.base
+++ b/docker/Dockerfile.base
@@ -6,7 +6,10 @@ RUN apt-get update && apt-get -y --no-install-recommends install \
     curl \
     git
 
-RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD
+RUN gpg --keyserver ipv4.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \
+    gpg --keyserver p80.pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \
+    gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \
+    gpg --keyserver pgp.mit.edu --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4

Flags: needinfo?(pt)
Status: UNCONFIRMED → NEW
Ever confirmed: true

Thanks for the patch Jarek! I've applied and run make build. This time the process completed without errors.

I've opened a pull request at https://github.com/mozilla/pontoon/pull/1263

Flags: needinfo?(pt)
Assignee: nobody → pt
Mentor: poke
Status: NEW → RESOLVED
Closed: 8 months ago
Priority: -- → P2
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.