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

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

W: In CurlDownloader.php line 370:
W:   curl error 7 while downloading
W:   -sitemap.json: Failed to connect to port 443: Connection
W:    refused

Affected versions

Adobe Commerce on cloud infrastructure, all supported versions


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.


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


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.