Symptoms
-
On attempt to start a new import session at Domains > example.com > Mail Importing, the page gets back to the import screen and does not show any session or status.
-
Previous import sessions are missing at Domains > example.com > Mail Importing.
-
The following error is shown in
/usr/local/psa/var/modules/site-import/sessions/mail-migration-XX/debug_XXX.log
:|D|MT|core.workflow.runner.by_subscription||| File "/opt/plesk/python/2.7/lib64/python2.7/json/decoder.py", line 369, in decode
|D|MT|core.workflow.runner.by_subscription||| raise ValueError(errmsg("Extra data", s, end, len(s)))
|D|MT|core.safe|||ValueError: Extra data: line 52 column 2 - line 52 column 3 (char 1748 - 1749)
|E|MT|core.safe|||Failed to write final import status to a file
Cause
Site Import cannot read or write to one of the JSON files because it has improper format.
This issue is a Plesk Migrator bug with ID PMT-3956 that is planned to be fixed in future product updates.
Resolution
-
Connect to the Plesk server via SSH.
-
Find the ID of the domain to which mail content is being migrated:
# plesk db “select id from domains where name=’example.com'”
+—-+
| id |
+—-+
| 89 |
+—-+ -
Go to the migration session directory of this domain. Use ID found on step 2:
# cd /usr/local/psa/var/modules/site-import/sessions/mail-migration-89
-
Run the following script to find corrupted JSON files inside the direcotry:
# ls *.json | while read i; do echo $i; python -mjson.tool $i > /dev/null ; done
-
Look through the output to find the corrupted JSON file:
mail_migration_status.json
Extra data: line 52 column 2 - line 52 column 3 (char 1748 - 1749) -
Apply one of the following steps:
-
Use any JSON syntax parser tool (for example, JSONLint – The JSON Validator) to fix the corrupted JSON file.
-
Remove everything from the session folder mentioned in step 3. In this case, previous import sessions will be lost.
-
-
In Plesk, go to Domains > example.com > Mail Importing.
-
Cancel previous import sessions that have their status stuck at “In progress”.