Deployment error: error 7 while downloading … port 443: Connection refused

Last update: 2023-10-02
  • Topics:
  • Cache
    View more on this topic
  • Deploy
    View more on this topic
  • Created for:
  • Developer

This article provides a fix for the issue when deployment fails with the following error message:

W: In CurlDownloader.php line 370:
W:
W:   curl error 7 while downloading https://repo.packagist.org/p2/magento/module
W:   -sitemap.json: Failed to connect to repo.packagist.org port 443: Connection
W:    refused

Affected versions

Adobe Commerce on cloud infrastructure, all supported versions

Issue

Deployment fails with a curl error 7 message.

Steps to reproduce:

Trigger a deployment.

Expected behavior:

Deployment is successful.

Actual behavior:

Deployment fails, and the following error: curl error 7 while downloading … port 443: Connection refused appears in the deploy log.

Cause

This might be due to the cache connection being lost to the repo.

Solution

Ask a Super User on the project to run this command:

magento-cloud project:clear-build-cache -p <project ID>

To check who on the project is a Super User, refer to View a user’s project role in the Commerce on Cloud Infrastructure Guide.

On this page