Articles in this section

Plesk Migration fails: Subscription already exists on target server: most probably it was created at the previous attempt

Plesk for Linux kb: technical ext: migrator

Applicable to:

  • Plesk for Linux

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.log

    An error occurred during domain creation: An error occurred during changing of hosting settings: System user update is failed: The user johndoe already exists.

  • The system user indeed exists

    # cat /etc/passwd | grep johndoe
    johndoe:x:1000:1008::/home/johndoe:/bin/bash

  • The subscription doesn't exist; psa has no left overs; no errors show up when running plesk repair db -n

  • PPPM-14647 has been filed to improve the error reporting

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.

  1. Connect to the server over SSH

  2. 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 |
      +---------+-----------------------------+

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.