Deployment failure due to incorrect Valkey port configuration in Adobe Commerce
A deployment failure occurs in Adobe Commerce on Cloud infrastructure when the Valkey Stale Cache configuration uses an incorrect port in the .magento.env.yaml file. To resolve the issue, update Valkey ports and redeploy successfully.
Description description
Environment
- Product: Adobe Commerce on Cloud infrastructure
- Version: 2.4.8
- Deployment environment: Integration
Issue/Symptoms
- Deployment fails when applying Stale Cache configuration in .magento.env.yaml.
- Deployment logs display the following error: Plain Text1Connection to Redis standalone tcp://localhost:6370 failed after 1 failures. Last Error : (111) Connection refused.
- Adobe Commerce fails to connect to the configured Valkey cache backend.
- Valkey connection settings reference an incorrect port in the configuration.
- Deployment validation fails during cache backend configuration.
Resolution resolution
Follow the steps below to resolve the issue:
-
Before you push the Stale Cache configuration in
.magento.env.yaml, run the following command to obtain the details of the Valkey relationship:code language-none magento-cloud relationships ... port: <port_number> -
Note the port value returned for the existing Valkey service.
-
Locate all references to the Valkey port in the
.magento.env.yamlfile and update each occurrence of port 6370 to the correct port value identified in the previous step. -
Review the
backend_optionssection and update any reference to port 26370 to the correct Valkey port, if present. -
Save the updated
.magento.env.yamlfile and commit the changes. -
Redeploy the Adobe Commerce application using the corrected configuration.
-
Verify that the deployment completes successfully and confirm that no Valkey connection errors appear in the deployment logs.
Note: Verify that all configuration files referencing Valkey, including .magento.app.yaml and services.yaml, use the same port configuration.