Magento – Magento2 doesn’t reindex

magento2reindex

I added 2000 + products for magento2 , but Magento2 doesn't reindex index.

Run the reindex command bin/magento indexer:reindex
successfully. But my store's front doesn't display product.

My Magento 2 version is 2.0.7 , PHP 7.0.8 ,mysql 5.6

var/log

[2016-09-02 13:02:02] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_4c6b6eeafea885c0042386fe963c20026: Please correct the XML data and try again.  [] []
[2016-09-02 13:02:02] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_40a98983867a1770682b48d9a0ad63441: Please correct the XML data and try again.  [] []
[2016-09-02 13:02:02] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exi$
[2016-09-02 13:02:02] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist $
[2016-09-02 13:02:02] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-09-02 13:02:02] main.CRITICAL: Broken reference: the 'catalog.compare.link' tries to reorder itself towards 'top.links', but their parents are different: 'header.links$
[2016-09-02 13:02:02] main.CRITICAL: Broken reference: the 'store.settings.currency' tries to reorder itself towards 'store_language', but their parents are different: 'stor$
[2016-09-02 13:02:03] main.INFO: SELECT `e`.*, IF(at_custom_use_parent_settings.value_id > 0, at_custom_use_parent_settings.value, at_custom_use_parent_settings_default.valu$
 LEFT JOIN `catalog_category_entity_int` AS `at_custom_use_parent_settings_default` ON (`at_custom_use_parent_settings_default`.`entity_id` = `e`.`entity_id`) AND (`at_custo$
 LEFT JOIN `catalog_category_entity_int` AS `at_custom_use_parent_settings` ON (`at_custom_use_parent_settings`.`entity_id` = `e`.`entity_id`) AND (`at_custom_use_parent_set$
[2016-09-02 13:02:03] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_46f1b068ec7ccf4878f9284dd1137afd1: Please correct the XML data and try again.  [] []
[2016-09-02 13:02:03] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_3e6fe115ba31d500509103893a62701cf: Please correct the XML data and try again.  [] []
[2016-09-02 13:02:03] main.CRITICAL: Broken reference: the 'header' tries to reorder itself towards 'global.notices', but their parents are different: 'page.wrapper' and 'no$
[2016-09-02 13:02:03] main.CRITICAL: Broken reference: the 'page.breadcrumbs' tries to reorder itself towards 'notifications', but their parents are different: 'page.wrapper$
[2016-09-02 13:02:03] main.CRITICAL: Broken reference: the 'notification.messages' tries to reorder itself towards 'user', but their parents are different: 'header.inner.rig$
[2016-09-02 13:02:03] main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_36f1b068ec7ccf4878f9284dd1137afd1: Please correct the XML data and try again.  [] []
[2016-09-02 13:02:03] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_4a456e24e9e0ef145439d526f18fb8b48: Please correct the XML data and try again.  [] []
[2016-09-02 13:02:03] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_4c6690f29cb80c2b881a7311e8632bc3e: Please correct the XML data and try again.  [] []
[2016-09-02 13:02:03] main.CRITICAL: Broken reference: the 'catalog.compare.link' tries to reorder itself towards 'top.links', but their parents are different: 'header.links$
[2016-09-02 13:02:03] main.CRITICAL: Broken reference: the 'store.settings.currency' tries to reorder itself towards 'store_language', but their parents are different: 'stor$
[2016-09-02 13:02:03] main.CRITICAL: Broken reference: the 'product.info.price' tries to reorder itself towards 'product.info.review', but their parents are different: 'prod$
[2016-09-02 13:02:03] main.CRITICAL: Broken reference: the 'product.price.final' tries to reorder itself towards 'product.info.sku', but their parents are different: 'produc$
[2016-09-02 13:02:03] main.CRITICAL: Broken reference: the 'product.info.social' tries to reorder itself towards 'product.info.overview', but their parents are different: 'p$
[2016-09-02 13:02:03] main.CRITICAL: Broken reference: the 'bml.right.logo' tries to reorder itself towards 'product.info.addtocart.paypal', but their parents are different:$

debug.log

2016-09-02 13:04:02] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_customer_grid_flat_3"},"is_exception":fa$
[2016-09-02 13:04:02] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_customer_grid_flat_4"},"is_exception":fa$
[2016-09-02 13:04:02] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_customer_grid_flat_1"},"is_exception":fa$
[2016-09-02 13:04:02] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_customer_grid_flat_2"},"is_exception":fa$
[2016-09-02 13:04:02] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_customer_grid_flat_3"},"is_exception":fa$
[2016-09-02 13:04:02] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_customer_grid_flat_4"},"is_exception":fa$
[2016-09-02 13:04:32] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"tags":["catalog_category","catalog_product"],"mode":"matchingAnyTag"},$
[2016-09-02 13:04:32] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"tags":["catalog_category","catalog_product"],"mode":"matchingAnyTag"},$
[2016-09-02 13:04:32] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_catalogsearch_fulltext_scope1_1"},"is_ex$
[2016-09-02 13:04:32] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_catalogsearch_fulltext_scope1_2"},"is_ex$
[2016-09-02 13:04:32] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_catalogsearch_fulltext_scope1_3"},"is_ex$
[2016-09-02 13:04:32] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_catalogsearch_fulltext_scope1_4"},"is_ex$
[2016-09-02 13:04:32] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_catalogsearch_fulltext_scope1_1"},"is_ex$
[2016-09-02 13:04:32] main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"identifier":"DB_PDO_MYSQL_DDL_catalogsearch_fulltext_scope1_2"},"is_ex$

root@ubuntu:

    /var/www/magento2# php -d memory_limit=8192M bin/magento indexer:reindex && php bin/magento cache:clean
    Customer Grid index has been rebuilt successfully in 00:00:00
    Category Products index has been rebuilt successfully in 00:00:49
    Product Categories index has been rebuilt successfully in 00:00:56
    SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '5893-0-1' for key 'PRIMARY', query was: INSERT INTO `catalog_product_index_price_idx` SELECT catalog_product_index_price_final_idx`.`entity_id`,
catalog_product_index_price_final_idx`.`customer_group_id`, catalog_product_index_price_final_idx`.`website_id`, catalog_product_index_price_final_idx`.`tax_class_id`, catalog_product_index_price_final_idx`.`orig_price` AS `price`, catalog_product_index_price_final_idx`.`price` AS `final_price`, catalog_product_index_price_final_idx`.`min_price`, catalog_product_index_price_final_idx`.`max_price`, catalog_product_index_price_final_idx`.`tier_price` FROM catalog_product_index_price_final_idx

My database table "cron_schedule"
show message :

indexer_update_all_views
Can't create directory /var/www/magento2/var/generation/Magento/Indexer/Model/Processor/.
indexer_reindex_all_invalid
Can't create directory /var/www/magento2/var/generation/Magento/Indexer/Model/Processor/.
indexer_update_all_views
Can't create directory /var/www/magento2/var/generation/Magento/Indexer/Model/Processor/.
indexer_reindex_all_invalid
Can't create directory /var/www/magento2/var/generation/Magento/Indexer/Model/Processor/.
magento_newrelicreporting_cron
Class Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory does not exist
Can't create directory
sales_send_order_creditmemo_emails
/var/www/magento2/var/generation/Magento/Framework/Translate/ResourceInterface/.
Can't create directory
 sales_send_order_shipment_emails
/var/www/magento2/var/generation/Magento/Framework/Translate/ResourceInterface/.
Can't create directory
sales_send_order_invoice_emails
/var/www/magento2/var/generation/Magento/Framework/Translate/ResourceInterface/.
Can't create directory
sales_send_order_emails
/var/www/magento2/var/generation/Magento/Framework/Translate/ResourceInterface/.
indexer_update_all_views
Can't create directory /var/www/magento2/var/generation/Magento/Indexer/Model/Processor/.
indexer_reindex_all_invalid
Can't create directory /var/www/magento2/var/generation/Magento/Indexer/Model/Processor/.

Best Answer

In the admin got to System->Cache Management, select all cache types and refresh them. Then reload your shop page. Should be there then.

If this does not help, check your products stock. Are your products active, in stock and if you use magento´s stock management make sure you set the stock amount > 0.

PS: The log outputs you posted look fine! At least that is how they look most of the time in magento even in 100% running shops.

Related Topic