Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#60614 closed defect (fixed)

Travis: Create hosts file to work around DNS resolution failures

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: admin@…
Priority: Normal Milestone:
Component: server/hosting Version:
Keywords: Cc:
Port:

Description

Travis builds fail all the time with errors like this:

--->  Attempting to fetch ossp-uuid-1.6.2_11+perl5_28.darwin_17.x86_64.tbz2 from https://packages-private.macports.org/ossp-uuid
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0DEBUG: Fetching archive failed: Could not resolve host: packages-private.macports.org
--->  Attempting to fetch ossp-uuid-1.6.2_11+perl5_28.darwin_17.x86_64.tbz2 from https://packages.macports.org/ossp-uuid
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0DEBUG: Fetching archive failed: Could not resolve host: packages.macports.org
--->  Attempting to fetch uuid-1.6.2.tar.gz from ftp://ftp.ossp.org/pkg/lib/uuid/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0DEBUG: Fetching distfile failed: Could not resolve host: ftp.ossp.org
--->  Attempting to fetch uuid-1.6.2.tar.gz from http://distcache.FreeBSD.org/ports-distfiles/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0DEBUG: Fetching distfile failed: Could not resolve host: distcache.FreeBSD.org
--->  Attempting to fetch uuid-1.6.2.tar.gz from https://distfiles.macports.org/ossp-uuid
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0DEBUG: Fetching distfile failed: Could not resolve host: distfiles.macports.org
Error: Failed to fetch ossp-uuid: Could not resolve host: distfiles.macports.org

In other words, all DNS resolution suddenly fails so nothing can be downloaded.

To test the theory that this is merely a DNS problem, do we have the ability to modify /etc/hosts on the Travis build machines? If so, we could have _ci/bootstrap.sh at least add entries for packages.macports.org, packages-private.macports.org and distfiles.macports.org. That might help some builds succeed that would otherwise have failed.

Change History (4)

comment:1 in reply to:  description Changed 4 years ago by l2dy (Zero King)

Replying to ryandesign:

To test the theory that this is merely a DNS problem, do we have the ability to modify /etc/hosts on the Travis build machines? If so, we could have _ci/bootstrap.sh at least add entries for packages.macports.org, packages-private.macports.org and distfiles.macports.org. That might help some builds succeed that would otherwise have failed.

Probably yes, we have root access to the VM.

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

In ad4012140f2632b39492994aad5ab55983dc7d50/macports-ports (master):

bootstrap.sh: Cache common hosts in /etc/hosts

This may help work around the intermittent Travis CI DNS outages.

Closes: #60614

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

It appears that this didn't help, and that the Travis outages are full network outages, not just DNS outages.

https://travis-ci.org/github/macports/macports-ports/jobs/704146039:

fatal: unable to access 'https://github.com/macports/mpbb.git/': Failed to connect to github.com port 443: Operation timed out

https://travis-ci.org/github/macports/macports-ports/jobs/704146044:

curl: (7) Failed to connect to dl.bintray.com port 443: Operation timed out

comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Note: See TracTickets for help on using tickets.