Data-migration-tool: [Migration\Exception] - Integrity Check failed 1.9.2.2 -> CE 2.0.0

Created on 11 Dec 2015  路  40Comments  路  Source: magento/data-migration-tool

Hi guys,

I have following the guide to use this tool at
http://devdocs.magento.com/guides/v2.0/migration/migration-migrate.html

I have finished the "Migrate settings" step

  • Command was run:

php -f /home/qvv/www/_shared/mage2/ce-200-dev/bin/magento migrate:settings -r /home/qvv/www/_shared/mage2/ce-200-dev/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.2/config.xml

But the tool get errors at "Migrate data" step as the screenshots:

  • Command was run:

php -f /home/qvv/www/_shared/mage2/ce-200-dev/bin/magento migrate:data /home/qvv/www/_shared/mage2/ce-200-dev/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.2/config.xml

migrate data error
and
error more

Only websites, stores and some configs data was migrated to Magento 2 and no more.

and i can't finished the data migration on this step

Any ideas to solve that issues?

Thanks.

All 40 comments

Hi quynhvv,
To solve this issue, please add tables and fields are missing to tag in map file.

@Vincenkt:
What is the map file name, i have to add the missing documents and fields?
I have tried one add to the file vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.2/map.xml the missing Document: customer_eav_attribute. Fields: is_used_for_customer_segment
and re-run the migrate command to test but it still get that errors.
Any ideas for me?
Thanks

@quynhvv
By default map file for EAV Step is vendor/magento/data-migration-tool/etc/ce-to-ce/map-eav.xml.dist

@yaronish:
Thanks for your reply, i see that file and i have the vendor/magento/data-migration-tool/etc/ce-to-ce/map-eav.xml

But, i don't know how to edit this file to solve my above issues.
I don't see any detail guide from Magento for this case.
Can you show me how to edit this?

Thanks.

In case you do not need migrate this column just add next to map-eav.xml file under map/source/field_rules:

            <ignore>
                <field>customer_eav_attribute.is_used_for_customer_segment</field>
            </ignore>

Also additional information about how to configure Data Migration Tool you can find here:
http://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html
and here:
http://devdocs.magento.com/guides/v2.0/migration/migration-tool-internal-spec.html

@yaronish:
In my case, i have this config:
issue2

But it still get this errors:

issue2

Please help!
Thanks.

From documentation I've specified (http://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html):
map-eav.xml.dist - Map file that is used in EAV Step.
map.xml.dist - Mapping file required for the map step.

You have fixed EAV Step already.
Problems that still exists are connected to Map Step and you have to work with vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.2/map.xml

@yaronish:
Yes, i see, thanks for your reply.
But i don't know why we have to do this manual step by step in along time when Magento was released for each version of Magetno1 :-s

Thanks.

You have not default M1 installation. I can suppose you are using Sample Data for M1 and it changes your M1 database.

@yaronish:
Please not that, i am using the Data Sample Edition downloaded from Magento.com ;)
and install it for Magento 1.9.2.2

Thanks.

@yaronish:
I have complete all step but still have exception with the message like this
http://prntscr.com/9f6stf
Please tell me how to resolve it?
Thanks.

@zivendesign
Did you check your migration log file?

@yaronish:
Please let me know which the file and the place?
Thanks

Here in the my log:

Everything fine but still have the Issue like the image http://prntscr.com/9f6stf

@zivendesign

Put next code inside this method before existing code: \Migration\Step\SalesIncrement\Integrity::checkForErrors

        var_dump($this->missingDocumentFields);
        var_dump($this->missingDocuments);

@yaronish:
here: http://prntscr.com/9f73wr
But still like

Everything fine but still have the Issue like the image http://prntscr.com/9f6stf

Try to run the migration with -vvv option like this:
php bin/magento migrate:data /var/www/magento2/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.1/config.xml -vvv
it should show the trace of the error

Code after return statement is always ignored.
Please do in next way:

    protected function checkForErrors()
    {
        var_dump($this->missingDocumentFields);
        var_dump($this->missingDocuments);

        $checkMissingDocuments = $this->checkMissingDocuments();
        $checkMissingDocumentFields = $this->checkMissingDocumentFields();
        return $checkMissingDocuments && $checkMissingDocumentFields;
    }

@yaronish:
It's show http://prntscr.com/9f74yt but the product still not yet to MAgento 2

@zivendesign
On the last screenshot settings migration is shown but original question is about data migration.

Here my show error: http://prntscr.com/9f76ti

The latest screenshot does not show information after the error "Integrity Check failed". It should show trace information

Here the code like @yaronish suggest: http://prntscr.com/9f7a4n and when i'm run the command like you suggest: php bin/magento migrate:data /var/www/magento2/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.1/config.xml -vvv and it show up http://prntscr.com/9f7aj2

so please tell me next stepp @victor-v-rad

@zivendesign

why on screenshot is migrate:settings? please run migrate:data instead.

Sorry @yaronish misstake here the issue: http://prntscr.com/9f7cld

@zivendesign
What I see - there is not problems with SalesIncrement step but looks like one of previous steps has it.
I see that Map Step has warnings but warnings do not stop migration.
So I want ask you run next command again and show screen for whole migration log.

php bin/magento migrate:data /var/www/magento2/vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.1/config.xml -vvv

Thanks.

@yaronish I had the same problem, see https://github.com/magento/data-migration-tool-ce/issues/15#issuecomment-165035059 and the posts below.

I do not know your exact problem, but if you make these changes it may work: https://github.com/magento/data-migration-tool-ce/pull/25/files

@yaronish If you want to find out, which step is causing the problem, the following code should work:

Locate the file vendor/magento/data-migration-tool/src/Migration/Mode/Data.php, go to method runIntegrity (Line 83) and edit it to the following:

protected function runIntegrity(StepList $steps)
    {
        $result = true;
        foreach ($steps->getSteps() as $stepName => $step) {
            if (!empty($step['integrity'])) {
                $currentStepResult = $this->runStage($step['integrity'], $stepName, 'integrity check');

                if (!$currentStepResult)
                    echo('There was an error in Step ' . $stepName);

                $result = $currentStepResult && $result;
            }
        }
        if (!$result) {
            throw new Exception('Integrity Check failed');
        }
    }

Now it should output which step generated the error.

@yaronish:
I'm made like you suggest and still see this: http://prntscr.com/9fjdhh
Please help me.
Thanks.

Ok. It seems deeper debugging required here. My skype: rad_victor. Let's chat there.

@bh-ref
@zivendesign

I would also propose to make a dump of your mysql db schema (without data) of Magento 1 and Magento 2 and send it to me. So I could run the migration and see where is the problem.

Hi @victor-v-rad,
Here the data from me please help me and tell me how to resolve the issue.

https://www.dropbox.com/s/smdg1nn6ywf9yaw/mag1.zip?dl=0

Thanks

Hi @zivendesign
This fix
https://github.com/magento/data-migration-tool-ce/pull/25/files
should resolve your issue

fix works like a charme. Thanks for that!

@mreichh you're welcome :) I hop the fix / pull request will soon be accepted, it seems like it affects quite a lot migrations

Great, @quynhvv would you close the issue?

Has resolved this issue ?? ....i am facing this issue Please Help !! also I have tried all thing which was discussed above.....

untitled

Hi,

I have also the same error, after running the migration: data command, it stuck at the salesIncrement attached the screenshot, I have EE 1.13.Magento 2.1.3

I have followed the above steps but error still exist, Any solution really appreciate

Thanks

add


customer_eav_attribute.is_used_for_customer_segment


in vendor/magento/data-migration-tool/etc/ce-to-ce/map-eav.xml.dist

I am facing the same issue during data migrate from 1.9.3.2 to 2.1.9

[Migration\Exception]
Integrity Check failed

Was this page helpful?
0 / 5 - 0 ratings