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.
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.Issue
Steps to reproduce:
-
In your Adobe Commerce instance, enable Advanced Reporting.
-
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());
-
Open your env.php and add port to the host parameter in DB configuration in the following format:
'host' => 'hostname:port',
-
Clear cache.
-
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:
- Adobe Commerce or Magento Open Source on-premises: Software Update Guide > Apply Patches in our developer documentation.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in our developer documentation.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in our support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in our support knowledge base.
For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.