Problem
When upgrading Terraform Enterprise (TFE) or running the replicatedctl preflight run command, you may encounter an i/o timeout error for registry.replicated.com or index.docker.io.
✗ ERROR: Get "https://registry.replicated.com/v2/": dial tcp 162.159.138.43:443: i/o timeout- Can access registry registry.replicated.com ✗ ERROR: Get "https://index.docker.io/v2/": dial tcp 18.233.136.226:443: i/o timeout- Can access registry index.docker.io
Prerequisites
- SSH access to the Terraform Enterprise instance.
- An outbound proxy is configured for the environment.
Cause
There is a known issue in older versions of Replicated, the third-party application used to deploy and manage Terraform Enterprise. The installation script may not automatically apply the proxy server address from the http-proxy flag to the HTTPS proxy setting, causing connection failures during preflight checks.
Solutions
There are two solutions to resolve this issue. Upgrading Replicated is the recommended approach.
Solution 1: Upgrade Replicated (Recommended)
This issue was fixed in Replicated version 2.54.0. Upgrading Replicated to the latest version should resolve the problem permanently.
- Follow the guide on Upgrading Replicated to update your instance.
Solution 2: Manually Configure the Proxy
If you cannot upgrade Replicated immediately, you can manually set the proxy configuration for HTTPS communication.
- Connect to your Terraform Enterprise instance via SSH.
- Use a text editor such as
vimornanoto open/etc/default/replicatedor/etc/sysconfig/replicated, depending on your operating system. -
Append the value for the
REPLICATED_OPTSvariable with the HTTPS proxy setting. Replace<http-proxy-here>with your proxy address.## Example REPLICATED_OPTS="... -e HTTPS_PROXY=<http-proxy-here>"
-
Reload the systemd manager configuration to apply the changes.
# systemctl daemon-reload
-
Restart the Replicated services.
# systemctl restart replicated
-
Verify that the Replicated and Retraced services have restarted successfully. Run the following command until the status for both shows as
ready.$ watch replicatedctl system status
-
Confirm that the environment variable was set correctly inside the Replicated container.
# docker exec -it -u 0 replicated env
- After confirming the variable is set, attempt the upgrade or run the preflight check command again.
Outcome
After applying one of the solutions, the preflight checks that previously failed due to timeout errors should now pass successfully.
Additional Information
This issue is confirmed to exist in Replicated version 2.53.7 and is resolved in Replicated version 2.54.0 and newer.