Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Migration\Exception] - Integrity Check failed 1.9.2.2 -> CE 2.0.0 #19

Closed
quynhvv opened this issue Dec 11, 2015 · 40 comments
Closed

[Migration\Exception] - Integrity Check failed 1.9.2.2 -> CE 2.0.0 #19

quynhvv opened this issue Dec 11, 2015 · 40 comments

Comments

@quynhvv
Copy link

quynhvv commented Dec 11, 2015

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.

@Vincenkt
Copy link

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

@quynhvv
Copy link
Author

quynhvv commented Dec 11, 2015

@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

@yaronish
Copy link

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

@quynhvv
Copy link
Author

quynhvv commented Dec 11, 2015

@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.

@yaronish
Copy link

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

@quynhvv
Copy link
Author

quynhvv commented Dec 11, 2015

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

But it still get this errors:

issue2

Please help!
Thanks.

@yaronish
Copy link

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

@quynhvv
Copy link
Author

quynhvv commented Dec 11, 2015

@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.

@yaronish
Copy link

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

@quynhvv
Copy link
Author

quynhvv commented Dec 11, 2015

@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.

@zin-mi
Copy link

zin-mi commented Dec 17, 2015

@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.

@yaronish
Copy link

@zivendesign
Did you check your migration log file?

@zin-mi
Copy link

zin-mi commented Dec 17, 2015

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

@zin-mi
Copy link

zin-mi commented Dec 17, 2015

Here in the my log:

[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: EAV Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Map Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Log Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started

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

@yaronish
Copy link

@zivendesign

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

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

@zin-mi
Copy link

zin-mi commented Dec 17, 2015

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

[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: EAV Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Map Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Log Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
[2015-12-17 09:29:15][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started

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

@victor-v-rad
Copy link
Collaborator

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

@yaronish
Copy link

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;
    }

@zin-mi
Copy link

zin-mi commented Dec 17, 2015

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

@yaronish
Copy link

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

@zin-mi
Copy link

zin-mi commented Dec 17, 2015

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

@victor-v-rad
Copy link
Collaborator

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

@zin-mi
Copy link

zin-mi commented Dec 17, 2015

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

@yaronish
Copy link

@zivendesign

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

@zin-mi
Copy link

zin-mi commented Dec 17, 2015

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

@yaronish
Copy link

@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.

@bh-ref
Copy link

bh-ref commented Dec 17, 2015

@yaronish I had the same problem, see #15 (comment) 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

@bh-ref
Copy link

bh-ref commented Dec 17, 2015

@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.

@zin-mi
Copy link

zin-mi commented Dec 18, 2015

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

@victor-v-rad
Copy link
Collaborator

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

@victor-v-rad
Copy link
Collaborator

@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.

@zin-mi
Copy link

zin-mi commented Dec 22, 2015

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

@victor-v-rad
Copy link
Collaborator

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

@mreichh
Copy link

mreichh commented Dec 29, 2015

fix works like a charme. Thanks for that!

@bh-ref
Copy link

bh-ref commented Dec 30, 2015

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

@ilol
Copy link

ilol commented Jan 6, 2016

Great, @quynhvv would you close the issue?

@lalitmalav
Copy link

lalitmalav commented Aug 24, 2016

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

untitled

@pt-p3
Copy link

pt-p3 commented Feb 16, 2017

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

@raminfobeans
Copy link

add

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

@routbiplab
Copy link

routbiplab commented Jan 2, 2018

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

[2018-01-02 14:01:00][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started

[Migration\Exception]
Integrity Check failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests