DNS lookups occasionally fail

Occasionally DNS lookups in our macOS builds fail with what seems like a DNS/networking problem, e.g. https://travis-ci.org/oracle/opengrok/jobs/465135951 failed with:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: (default-cli) on project opengrok-top: Unable to execute SonarQube: Fail to get bootstrap index from server: Unknown host sonarcloud.io: nodename nor servname provided, or not known -> [Help 1]

Or, the builds fail with name resolution error when PyPi is trying to download some Python packages, e.g. https://travis-ci.org/oracle/opengrok/jobs/462705468 failed with:

error: Download error for https://files.pythonhosted.org/packages/ff/17/5cbb026005115301a8fb2f9b0e3e8d32313142fe8b617070e7baad20554f/requests-2.20.1-py2.py3-none-any.whl#sha256=65b3a120e4329e33c9889db89c80976c5272f56ea92d3e74da8a463992e3ff54: [Errno 8] nodename nor servname provided, or not known

This is particularly annoying when creating a release after all the previous builds’ checks were successful.