MDVA-29389: Advanced Reporting related cron job fails

The MDVA-29389 patch fixes the issue where with Advanced Reporting where the analytics_collect_data cronjob says: “Port must be configured within host parameter (like localhost:3306)”. This patch is available when the Quality Patches Tool (QPT) 1.0.7 is installed. The patch ID is MDVA-29389. The issue was fixed in Adobe Commerce 2.4.2.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.3.4.

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.3.0 - 2.4.1.
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.


Steps to reproduce:

  1. In your Adobe Commerce instance, enable Advanced Reporting.

  2. Run the following query to insert analytics/general/token value in the DB:

    code language-sql
    INSERT INTO core_config_data VALUES(NULL,'default',0,'analytics/general/token','ABCDE',now());
  3. Open your env.php and add port to the host parameter in DB configuration in the following format: 'host' => 'hostname:port',

  4. Clear cache.

  5. Execute the analytics_collect_data cron job.

Expected results:

The analytics_collect_data job runs successfully when using default or non-default port to connect to MySQL in env.php.

Actual results:

The analytics_collect_data job throws an error “Port must be configured within host parameter (like localhost:3306)” when using a non-default port to connect to MySQL in env.php.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.