2012-03-31 27 views
1

我有問題通過管理面板重新索引magento 1.6中的數據。我只是收到一條消息,說Magento 1.6 - 無法初始化索引器進程

Cannot initialize the indexer process 

和產品不顯示在前端的類別,這顯然是該網站的一個大問題。

我已經嘗試運行通過shell的過程,但它引發以下錯誤:

Category Products index process unknown error: 
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`strailco_firstclass`.`catalog_category_product_index`, CONSTRAINT `FK_CAT_CTGR_PRD_IDX_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity)' in /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Statement/Pdo.php:228 
Stack trace: 
#0 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) 
#1 /home/strailco/1stclassholidays.com/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) 
#2 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array) 
#3 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) 
#4 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array) 
#5 /home/strailco/1stclassholidays.com/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array) 
#6 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(176): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...') 
#7 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Helper/Mysql4.php(48): Mage_Index_Model_Resource_Abstract->insertFromSelect(Object(Varien_Db_Select), 'catalog_categor...', Array, false) 
#8 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(147): Mage_Index_Model_Resource_Helper_Mysql4->insertData(Object(Mage_Catalog_Model_Resource_Category_Indexer_Product), Object(Varien_Db_Select), 'catalog_categor...', Array, false) 
#9 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(111): Mage_Index_Model_Resource_Abstract->insertFromTable('catalog_categor...', 'catalog_categor...', false) 
#10 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php(929): Mage_Index_Model_Resource_Abstract->syncData() 
#11 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(132): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll() 
#12 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Process.php(166): Mage_Index_Model_Indexer_Abstract->reindexAll() 
#13 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Process.php(194): Mage_Index_Model_Process->reindexAll() 
#14 /home/strailco/1stclassholidays.com/html/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything() 
#15 /home/strailco/1stclassholidays.com/html/shell/indexer.php(198): Mage_Shell_Compiler->run() 
#16 {main} 

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`strailco_firstclass`.`catalog_category_product_index`, CONSTRAINT `FK_CAT_CTGR_PRD_IDX_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity)' in /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Statement/Pdo.php:234 
Stack trace: 
#0 /home/strailco/1stclassholidays.com/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) 
#1 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array) 
#2 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) 
#3 /home/strailco/1stclassholidays.com/html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array) 
#4 /home/strailco/1stclassholidays.com/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array) 
#5 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(176): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...') 
#6 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Helper/Mysql4.php(48): Mage_Index_Model_Resource_Abstract->insertFromSelect(Object(Varien_Db_Select), 'catalog_categor...', Array, false) 
#7 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(147): Mage_Index_Model_Resource_Helper_Mysql4->insertData(Object(Mage_Catalog_Model_Resource_Category_Indexer_Product), Object(Varien_Db_Select), 'catalog_categor...', Array, false) 
#8 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Resource/Abstract.php(111): Mage_Index_Model_Resource_Abstract->insertFromTable('catalog_categor...', 'catalog_categor...', false) 
#9 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php(929): Mage_Index_Model_Resource_Abstract->syncData() 
#10 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(132): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll() 
#11 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Process.php(166): Mage_Index_Model_Indexer_Abstract->reindexAll() 
#12 /home/strailco/1stclassholidays.com/html/app/code/core/Mage/Index/Model/Process.php(194): Mage_Index_Model_Process->reindexAll() 
#13 /home/strailco/1stclassholidays.com/html/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything() 
#14 /home/strailco/1stclassholidays.com/html/shell/indexer.php(198): Mage_Shell_Compiler->run() 
#15 {main} 

我試圖刪除沒有成功鎖定文件。

沒有人有螞蟻知道是什麼的問題可能是因爲我被卡住,需要儘快解決

許多在此先感謝

回答

0

我會先進入magento/var/locks並刪除「index_process_1.lock」1-9,然後嘗試再次重新索引。

相關問題