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:

  1. 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>
    
  2. Note the port value returned for the existing Valkey service.

  3. Locate all references to the Valkey port in the .magento.env.yaml file and update each occurrence of port 6370 to the correct port value identified in the previous step.

  4. Review the backend_options section and update any reference to port 26370 to the correct Valkey port, if present.

  5. Save the updated .magento.env.yaml file and commit the changes.

  6. Redeploy the Adobe Commerce application using the corrected configuration.

  7. 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.

recommendation-more-help
experience-cloud-kcs-help-kbarticles