Magento2: Catalog rule indexing failed. See details in exception log.

Created on 23 Jan 2018  路  4Comments  路  Source: magento/magento2

I get this error from indexer "Catalog rule indexing failed. See details in exception log." , when i run the indexer from the command line.

So far I haven't found any related occurances like this, when reading the exception log, I read the following:

_main.CRITICAL: SQLSTATE[42S01]: Base table or view already exists: 1050 Table './database/xxx_catalogrule_product_price_outdated' already exists. I confirmed that before the index runs this table/view does not exist. Already tried to reset the index, but same result._

Magento 2.2.2
PHP 7.0
Apache 2.4

Format is not valid

Most helpful comment

Hi jorgepires,

Thanks for taking the time.

I reinstalled Magento even the whole server LAMP multiple times. It starts well but only after a couple of days the indexing would start to fail...

With these two corrupted files I was unable to backup database. I could run a total server restore to get back to previous good state, but after a couple of days the issue would return with 14,000+ errors in system log, while I was doing nothing to the site.

As a business owner I got so frustrated with M2 that I wanted to switch to another ecommerce solution. For my previous Drupal 7 site, once you have everything set up, things don't get messed up at all. That's solid and dependable. Apparently M2 is not in the party yet.

All 4 comments

I had the same indexing failed issue.

Magento 2.2.2
Apache 2.4.18
PHP 7.0.22
A theme bought on themeforest

Fresh installation of Magento, manually added no more than 30 products and the indexing began to experience errors:
"Catalog rule indexing failed. See details in exception log.", in which reads:
main.CRITICAL: Catalog rule indexing failed. See details in exception log. {"exception":"[object] (Magento\Framework\Exception\LocalizedException(code: 0): Catalog rule indexing failed. See details in exception log. at /var/.../vendor/magento/module-catalog-rule/Model/Indexer/IndexBuilder.php:286)"} []

What's weird here is that I never created any catalog rules. Tried reset indexers and reindex and the error persisted.

Please kindly check if this is a bug.

I was able to fix this and I am adding here the fix, I believe this happened due to some previous reindex that went wrong or was interrupted, here are the steps I did to fix it:

  1. Stop cron jobs
  2. Backup database
  3. Drop database
  4. Create new database and import data
  5. Clean cache and rebuild index

This has for some reason solved the problem, on the rebuild of indexes, no errors.

Hi jorgepires,

Thanks for taking the time.

I reinstalled Magento even the whole server LAMP multiple times. It starts well but only after a couple of days the indexing would start to fail...

With these two corrupted files I was unable to backup database. I could run a total server restore to get back to previous good state, but after a couple of days the issue would return with 14,000+ errors in system log, while I was doing nothing to the site.

As a business owner I got so frustrated with M2 that I wanted to switch to another ecommerce solution. For my previous Drupal 7 site, once you have everything set up, things don't get messed up at all. That's solid and dependable. Apparently M2 is not in the party yet.

@jorgepires Closing this now as it looks like you have solved the issue.

Was this page helpful?
0 / 5 - 0 ratings