I did a fresh Drupal(v7.39) installation on Nginx server. Everything seem fine until the WordPress Migration process with "Migrate", "WordPress Migrate", and "Migrate Extras" modules. The error message I got is
An AJAX HTTP error occurred. HTTP Result Code: 502 Debugging information follows. Path: /batch?id=83&op=do StatusText: Bad Gateway ResponseText: 502 Bad Gateway 502 Bad Gateway nginx.

Even I got an error, all the content did migrate correctly except the url alias. The URL was set for "Set path aliases to their original WordPress values" during the process, but they came out like node/101, node/103....

What may causing the error and how can I fix this?

  • This question has 2 parts - 1, why does your site have a 502 after migration and 2, why did the aliases not work. You should move the second part about aliases to the issue queue of the WordPress Migrate module as it is a bug/support request that is best addressed in that venue.
    – greggles
    Oct 22 '15 at 15:14

A 502 Bad Gateway error can mean a lot of things, however, if you had the site working OK and then it stopped after changing things in the database, then it basically points to a problem with the way PHP is interpreting things in the database.

  • You'll need to look at your PHP configuration to find where the PHP error log is on the server and then look into that error log to understand what the problem is.
  • There is a chance that the error is being recorded into Drupal's watchdog, usually available at admin/reports/dblog - if you can't view that inside the website you could use drush with the drush ws command to see items in watchdog, or just use SELECT * FROM watchdog ORDER BY wid DESC LIMIT 20; at a sql client to see the contents of the watchdog table.

The 502 error indicates there is a problem, but doesn't indicate the specific problem. If you post more details from your PHP error log it will be easier to help you fix it.

  • thanks for the respond. The PHP configuration and PHP error log you mention, are they on server end or Drupal?
    – CocoSkin
    Oct 21 '15 at 14:57
  • The server. Although yes, looking in the watchdog database table would be good.
    – greggles
    Oct 22 '15 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.