Applicable to:
- Plesk for Linux
Symptoms
-
A Subscription or Domain cannot be migrated to a destination Plesk server, while an error that is similar to the following is displayed:
PLESK_ERROR: Restore domain object 'example.com'
Execution of /opt/psa/admin/plib/api-cli/domain.php --update example.com -guid 2f0a7ad4-7003-4a81-8f2d-faaefaa6ad77 -creation-date 2016-11-09 -description '' -hosting true -hst_type phys -do-not-apply-skeleton -ip '203.0.113.2' -www-root httpdocs -login user -passwd '' -passwd_type sym -ignore-nonexistent-options failed with return code 1.
Stderr is
An error occurred during domain update: An error occurred during changing of hosting settings: The user john.doe already exists. -
The same error appears in attempt to create a Subscription manually from the command line:
# plesk bin subscription -c example.com -owner admin -service-plan "Default Domain" -ip 203.0.113.2 -login john.doe -passwd ""
An error occurred during domain creation: An error occurred during changing of hosting settings: The user john.doe already exists.
Cause
The user john.doe doesn't exist in the psa database:
# plesk db "select * from sys_users where login = 'john.doe'"
Empty output
At the same time, it is already present in as a Linux system user:
# less /etc/passwd | grep john.doe
john.doe:x:10006:1004::/var/www/vhosts/example.com:/bin/false
Resolution
-
Connect to the server via SSH (destination server in case of migration)
-
Delete the Linux system user
john.doefrom the Linux OS by executing the following command:# userdel john.doe
-
Move the vhosts directory of the affected domain elsewhere:
# mv /var/www/vhosts/example.com ~/
-
Create the domain once again
OR
In case of migration, remove the Subscription tied to the domain from the destination Plesk server and migrate it once again.
Comments
Please sign in to leave a comment.