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-4988 that is planned to be fixed in future product updates.
Resolution
For Plesk on Linux
Note: In this case, previous import sessions will be lost for the domain.
-
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 |
+----+ -
Remove everything from the session folder of the domain. Use ID found on step 2:
-
On Linux:
# rm -f /usr/local/psa/var/modules/site-import/sessions/mail-migration-89
-
on Windows Server
%plesk_dir%varmodulessite-importsessionsmail-migration-89
-
-
In Plesk, go to Domains > example.com > Mail Importing.
-
Cancel previous import sessions that have their status stuck at "In progress" (if there are any).
-
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
On some systems, the utility
python2
is used instead ofpython
. In this case, run:# ls *.json | while read i; do echo $i; python2 -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) -
Use any JSON syntax parser tool (for example, JSONLint JSON Validator) to fix the corrupted JSON file.
-
In Plesk, go to Domains > example.com > Mail Importing.
-
Cancel previous import sessions that have their status stuck at "In progress".
-
Connect to the Plesk server via RDP.
-
Start PowerShell prompt.
-
Find the ID of the domain to which mail content…