Hello,

I've been struggling with getting my migration forward, with the following error being my main problem:

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: http://migrate.com/batch?id=379&op=do StatusText: Service unavailable (with message) ResponseText: MigrateException: There is already an active process on Article in MigrationBase->beginProcess() (line 713 of /var/www/html/md7_migrate/sites/default/modules/migrate/includes/base.inc).MigrateException: There is already an active process on Article in MigrationBase->beginProcess() (line 713 of /var/www/html/md7_migrate/sites/default/modules/migrate/includes/base.inc).

Can't find anything by googling it, previously it somehow disappeared for a while and I was able to do a few imports, but just as randomly it made a comeback, I haven't discovered any kind of logic in what got it fixed and made it go wrong again. I've been using the Migrate UI, resetting and rollbacking as much as I can, and still it's always the same thing. It comes even with having only one migration at once, with a limit of 1 item, after resetting all my migrations.

Probably related, whenever I try to do a migration, get that error and refresh the Migrate page, it says "Importing" as the status of it. This goes away by resetting, but the same cursed error message comes anyway.

I'm happy to answer any further questions about this issue, and will appreciate any help greatly.

Comments

mnordstrom’s picture

One more related thing that doesn't work as expected:
1. Getting the previous error
2. Refreshing the Migrate page, seeing the error-giving process which is stuck in the status "Importing"
3. Trying to "Stop" it
4. The status just changes to "Stopping", and gets stuck on that instead. It won't go back to "Idle" unless doing a reset for it.

mnordstrom’s picture

More related erroneous behavior:

When the error comes, it says "Please continue to the error page", which is a link to the basic Migrate page (admin/content/migrate). There I can see, that there is a blue link "1" below "Messages", relating to the erroneous migration.

When I click on the link, it gives an empty view "No messages". This number or nonexistent messages hasn't so far increased when reproducing the error, nor decreased to zero when resetting.

The server settings also got troubleshooted, so that the "migrate.com" domain was added to its host file in addition to my local hosts file, and all processes were killed from there just in case, but nothing changed.

djg_tram’s picture

I'm in the middle of doing a migration right now and I keep getting the same error. However, I found a workaround. Not a terribly comfortable one, but it might help in both performing the migration for somebody else and in tracking down the cause.

When it stops, go into the database (phpmyAdmin or similar is required), navigate to the {migrate_status} table, and in the row of machine_name = PhpbbPost,* revert the status field to zero. Then the migration will be able to go on (until the next error, that is).

*Edit: or the one corresponding to the migration step you get the errors on.

mnordstrom’s picture

Thanks for the help, but didn't do the trick for me. :( I can't get the migration even started, and the statuses in the database correlate to what I see on the Migration UI page. Before I start, it's 0 and idle, when I start, it gives that error and goes to 1. Basically resetting it from the database seems to be the same as resetting it from the UI... but the problem persists.

I also tried to uninstall and reinstall the module, no help. Had some erroneous-looking tables there from my older tests (e.g. "migrate_map_" and "migrate_message_"), which disappeared, but everything else is the same.

djg_tram’s picture

Well, I was quick to say the PhpbbPost row, that's the one I had the trouble in, but of course, if you have it stuck on some other step, clear that status of that row.

mnordstrom’s picture

Yes, of course, that's what I did. :) All the rows in that table have status as 0, but still I get that error immediately before any importing happens. So it has to be something else than what your problem was.

djg_tram’s picture

I see. In my case, everything went smooth until the fourth step (I'm working with the brand new phbb3drupal module, using Migrate as engine).

mikeryan’s picture

Category: bug » support
Status: Active » Fixed

Please refer to the bottom of the migration dashboard page:

Reset - Sometimes a migration process may fail to stop cleanly, and be left stuck in an Importing or Rolling Back status. Choose Reset to clear the status and permit other operations to proceed.

If your migrations crash in the middle, leaving them in the Importing state, try running them in drush with the -d flag and see if you get a helpful error.

mnordstrom’s picture

Thanks for the tip, I didn't have that second paragraph of yours at all. It worked immediately through Drush, with no errors!

However, there is some bug in the UI, since it still doesn't work too well from there. First of all, the error message changed here in between without ANY obvious reason or change in the code. Now it is like follows (same error comes when rollbacking):
An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://migrate.com/batch?id=462&op=do StatusText: OK ResponseText: 0{"status":true,"percentage":"100","message":"Processed 1 (1 created, 0 updated, 0 failed, 0 ignored) in 0.2 sec (301\/min) - done with 'Article'\u003cbr \/\u003e"}

When I go to the Migrate page after this error, it gives a nice green Drupal message:
Processed 1 (1 created, 0 updated, 0 failed, 0 ignored) in 0.2 sec (301/min) - done with 'Article'

The end result between using Drush and UI is now the same: Unlike earlier today, I get my test node imported with an error or not, even though I changed nothing in between. Will return to you if I get more helpful error reports later in the process... always so wonderful when stuff happens on itself.

A big thank you in any case! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nijicp’s picture

Status: Closed (fixed) » Active

Hi..

I am experiencing the same issue while trying to migrate the users from D6 to D7. mnordstrom, please help me in fixing the issue. I have never used Drush module. Can you please elaborate the method you approached to fix it?

Any help on fixing this issue will be greatly appreciated...
Thanks in advance..

rocket777’s picture

My migrations were working fine and then yesterday I started getting this same error in the UI.
I did as suggested in #8 'Reset' but that did not work. I also deregistered the migrations disabled and reenabled the modules and emptied the relevant tables and I still had the Ajax error in the UI.
The migrations were successful, but the error prevented the UI from opening the page /admin/content/migrate (dashboard page).

Also as suggested in #8 I ran the following drush command and had no errors.
drush mi [migration] -d --feedback="10 items"

mikeryan’s picture

Status: Active » Closed (fixed)

Resetting status - any new issues should be reported separately, with details (i.e., specific error messages).

khuramhb’s picture

#8 works perfectly for me. Resetting status was the trick, command -- Drush mrs Migration-Name worked for that. Thanks a lot!

ibit’s picture

Confirm #8
Reset working fine.