Symptoms
- Plesk Obsidian running on a Linux-based operating system
- During a Plesk to Plesk migration, the Plesk migrator extension shows an error that is similar to the following:
Unable to create subscription 'one.example.com'.
Command execution failed on the local server with non-zero exit code.
command: /opt/psa/bin/subscription --create one.example.com -hosting true -hst_type phys -login jdoe -passwd '' -ip 203.0.113.2 -do-not-apply-skeleton -notify false -service_plan Unlimited -force -guid d8789f58-15dd-4339-b6f3-db1b0b2cea37 -creation-date 2020-02-13 -mail_service true -ignore-nonexistent-options
exit code: 1
stdout:
stderr: [2023-03-08 11:11:16.750] 2517065:64085f42d5e62 ERR [panel] Unable to load object of type PhDomain with id=66: Unable to update domain data: DB query failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'd8789f58-15dd-4339-b6f3-db1b0b2cea37' for key 'guid', query was: UPDATE `domains` SET `id` = ?, `cr_date` = ?, `name` = ?, `displayName` = ?, `dns_zone_id` = ?, `status` = ?, `htype` = ?, `real_size` = ?, `cl_id` = ?, `cert_rep_id` = ?, `limits_id` = ?, `params_id` = ?, `guid` = ?, `overuse` = ?, `vendor_id` = ?, `webspace_id` = ?, `parentDomainId` = ?, `webspace_status` = ?, `permissions_id` = ?, `external_id` = ?, `adminDescription` = ?, `resellerDescription` = ?, `description` = ?, `gl_filter` = ?, `icpStatus` = ?, `icpPermit` = ?, `monthlyTraffic` = ? WHERE (id = 66) - The guid of the domain that is being migrated (d8789f58-15dd-4339-b6f3-db1b0b2cea37 in this example) is already used by another domain on the destination server:
Source Plesk server:plesk db -Ne "SELECT guid, count(guid),displayName FROM domains GROUP BY guid HAVING COUNT(guid)" | grep d8789f58-15dd-4339-b6f3-db1b0b2cea37
d8789f58-15dd-4339-b6f3-db1b0b2cea37 1 one.example.comTarget (destination) Plesk server:
plesk db -Ne "SELECT guid, count(guid),displayName FROM domains GROUP BY guid HAVING COUNT(guid)" | grep d8789f58-15dd-4339-b6f3-db1b0b2cea37
d8789f58-15dd-4339-b6f3-db1b0b2cea37 1 two.example.com
Cause
The domain or subdomain that you are attempting to move from the source server to the destination server has a guid configured on the side of the source server that matches a guid that already exists on the destination server (it is most likely already used by a different domain). Two matching GUIDs should not exist within the Plesk database of a single Plesk server, due to which the Plesk migration cannot proceed.
Note: GUID stands for Globally Unique Identifier
Resolution
1. Log into your target server via SSH
2. Execute the following command in order to create a secret key for the necessary XML API session:
Note: The IP address 203.0.133.2 should be replace…