Symptoms
A subscription fails to migrate in Plesk Migrator with an error
Migration for that subscription is considered completely failed. No further actions are performed for it. Exception message: Migration tools tried to perform operation in 3 attempts: Unable to create subscription 'example.com'. Subscription already exists on target server: most probably it was created at the previous attempt, but migration tools are not sure if it was created correctly.
The following is logged to
/usr/local/psa/var/modules/panel-migrator/sessions/<SESSION ID>/debug.logAn error occurred during domain creation: An error occurred during changing of hosting settings: System user update is failed: The user johndoe already exists.
Cause
A system user with the same login already exists in the system.
Resolution
Confirm the user does not belong to any other subscription, and delete it.
Connect to the server over SSH
Run this command to see if the user is linked to any other subscription
# plesk db "SELECT login,home FROM sys_users WHERE login = 'johndoe'"
If the command above has no output, delete the user from the system
# deluser johndoe
If the command has output like below, rename the user from the appropriate subscription on either the source or target server
+---------+-----------------------------+
| login | home |
+---------+-----------------------------+
| johndoe | /var/www/vhosts/example.com |
+---------+-----------------------------+