ubertheme / module-ubdatamigration

This is a module for Magento 2. This allow migrate data from Magento 1.x to Magento 2.x
https://www.ubertheme.com/magento-extensions-2-x/magento-2-data-migration-pro?utm_source=github&utm_medium=repo&utm_campaign=magento_migration_ce
48 stars 38 forks source link

step 7 error to migrate sales #12

Closed antuz88 closed 8 years ago

antuz88 commented 8 years ago

Hi, i have migrate 1 to 6 step fine. On step 7 (sales migration) i received the message on the browser: "the connection is canceled" after 5/10min.

How can i solve it?

Thanks

Sam-PUMP commented 8 years ago

Same exact thing for me. Any luck solving?

quynhvv commented 8 years ago

Hi guys, I think issue come from your server config. Let's follow this https://github.com/ubertheme/magento2_data_migration/issues/9

Hope this help.

Sam-PUMP commented 8 years ago

If that was true it would not have done everything in step 7 the first time before I reset.

I think it is something else. Like a dependant table or something. Can you please take a look ?

quynhvv commented 8 years ago

@Sam-PUMP I need a closer look to detect the root of issue as you said. Can you share me a dump of your Magento 1 database?

Sam-PUMP commented 8 years ago

Here is something I found in the exception log that may be a hint? [2016-01-24 17:43:28] main.CRITICAL: exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (m2fresh.sales_bestsellers_aggregated_daily, CONSTRAINT SALES_BESTSELLERS_AGGRED_DAILY_PRD_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY (product_id) REFERENCES catalog_product_entity (`entity_)' in /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228 Stack trace:

0 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)

1 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)

2 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)

3 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)

4 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO`sa...', Array)

5 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(444): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `sa...', Array)

6 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(499): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('INSERT INTO`sa...', Array)

7 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/module-sales/Model/ResourceModel/Report/Bestsellers.php(162): Magento\Framework\DB\Adapter\Pdo\Mysql->query('INSERT INTO `sa...')

8 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/module-backend/Controller/Adminhtml/Dashboard/RefreshStatistics.php(35): Magento\Sales\Model\ResourceModel\Report\Bestsellers->aggregate()

9 /var/www/www.pumpunderwear.com/web/m2/magento2/var/generation/Magento/Backend/Controller/Adminhtml/Dashboard/RefreshStatistics/Interceptor.php(25): Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics->execute()

10 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/App/Action/Action.php(102): Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor->execute()

11 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

12 [internal function]: Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))

13 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)

14 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor->___callParent('dispatch', Array)

15 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor), Array, 'adminAuthentica...')

16 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

17 [internal function]: Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

18 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)

19 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor), Array, 'designLoader')

20 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/App/Action/Plugin/Design.php(39): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

21 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

22 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)

23 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor), Array, 'adminMassaction...')

24 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

25 [internal function]: Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

26 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)

27 /var/www/www.pumpunderwear.com/web/m2/magento2/var/generation/Magento/Backend/Controller/Adminhtml/Dashboard/RefreshStatistics/Interceptor.php(53): Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor->___callPlugins('dispatch', Array, Array)

28 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/App/FrontController.php(55): Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

29 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

30 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)

31 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

32 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')

33 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

34 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

35 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)

36 /var/www/www.pumpunderwear.com/web/m2/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)

37 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

38 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()

39 /var/www/www.pumpunderwear.com/web/m2/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))

40 {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 (m2fresh.sales_bestsellers_aggregated_daily, CONSTRAINT SALES_BESTSELLERS_AGGRED_DAILY_PRD_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY (product_id) REFERENCES catalog_product_entity (entity_), query was: INSERT INTOsales_bestsellers_aggregated_daily(period,store_id,product_id,product_name,product_price,qty_ordered) SELECT STRAIGHT_JOIN DATE(source_table.created_at) ASperiod,source_table.store_id,order_item.product_id, MIN(order_item.name) ASproduct_name, MIN(order_item.base_price) * MIN(source_table.base_to_global_rate) ASproduct_price, SUM(order_item.qty_ordered) ASqty_orderedFROMsales_orderASsource_table INNER JOINsales_order_itemASorder_itemON order_item.order_id = source_table.entity_id WHERE (source_table.state != 'canceled') AND (order_item.product_type NOT IN('bundle', 'grouped', 'configurable')) GROUP BY DATE(source_table.created_at), source_table.store_id, order_item.product_idON DUPLICATE KEY UPDATEperiod= VALUES(period),store_id= VALUES(store_id),product_id= VALUES(product_id),product_name= VALUES(product_name),product_price= VALUES(product_price),qty_ordered= VALUES(qty_ordered`)' in /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235 Stack trace:

0 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)

1 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)

2 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)

3 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO`sa...', Array)

4 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(444): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `sa...', Array)

5 /var/www/www.pumpunderwear.com/web/m2/magento2/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(499): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('INSERT INTO`sa...', Array)

On Jan 25, 2016, at 8:40 PM, Quynh Vu Van notifications@github.com wrote:

@Sam-PUMP https://github.com/Sam-PUMP I need a closer look to detect the root of issue as you said. Can you share me a dump of your Magento 1 database?

quynhvv commented 8 years ago

@Sam-PUMP , Do you re-index the data in Magento 1 successfully? Did you try reset the Step 7 and restart data migration on this step?

Sam-PUMP commented 8 years ago

Yes I indexed successfullly. I did try to reset step 7 manually and via the backend, but when I re-try it no longer gets anything past sales order, only the FIRST time did it download everything in step 7, and now I have tried over 20 times and it never goes past sales order.

On Jan 25, 2016, at 9:34 PM, Quynh Vu Van notifications@github.com wrote:

@Sam-PUMP https://github.com/Sam-PUMP , Do you re-index the data in Magento 1 successfully? Did you try reset the Step 7 and restart data migration on this step?

— Reply to this email directly or view it on GitHub https://github.com/ubertheme/module-ubdatamigration/issues/12#issuecomment-174783772.

quynhvv commented 8 years ago

@Sam-PUMP

Yes I indexed successfullly.

Can you share me the screenshot to specify that? Can you share me a backup of your Magento1 database?

quynhvv commented 8 years ago

@Sam-PUMP I have downloaded your database file.. You should set the link download is private access or you should remove it from dropbox now.

Regards, quynhvv

tdgroot commented 8 years ago

Got the same problem, can't place order. I first created this issue on magento2 repo but apparently it seems like it is a problem within this module..

Some information good to know:

The method Magento\SalesSequence\Model\Sequence->getNextValue() crashes. It looks like this:

public function getNextValue()
{
    $this->connection->insert($this->meta->getSequenceTable(), []);
    $this->lastIncrementId = $this->connection->lastInsertId($this->meta->getSequenceTable());
    return $this->getCurrentValue();
}

$this->meta->getSequenceTable() returns NULL, causing the adapter to do the following:

INSERT INTO `` () VALUES ()

This obviously doesn't work, thus the whole order creation crashes.

What could possibly cause $this->meta->getSequenceTable() to return NULL?

quynhvv commented 8 years ago

@Desmaster Thanks for working around this tool. As data migration itself is a complex task as it relates to different factors including the server condition etc., we do provide migration custom service. Just add a note here, in case you might want to use our service. https://www.ubertheme.com/magento-custom-services/

mitsprajapati commented 8 years ago

Hi quynhvv,

I am also facing same issue like mentioned above , can you please give some idea how to fix it. Order not going through and gives same error as above mentioned by Desmaster

Thanks, Mitesh

quynhvv commented 8 years ago

Hi mitsprajapati, Thank you working around with this tool. For technical question please submit here: http://ubertheme.com/questions/ In case you want to use our service, let's submit here: https://www.ubertheme.com/magento-custom-services/ Regards, Mall.