Symptoms
-
Migration to Plesk finishes with one of the following warnings and domain is created with No Hosting type (without hosting):
PLESK_ERROR: Failed deployment of domain example.com
Warning:
Execution of /usr/local/psa/admin/plib/api-cli/domain.php –create example.com -owner user -do-not-apply-skeleton -notify false -guid 056529ff-e402-463a-aa35-f82d124c4480 -creation-date 2015-03-09 -ip 10.10.10.10 -ignore-nonexistent-options failed with return code 1. Stderr is An error occurred during domain creation: mailmng-outgoing failed: ERROR:outgoing:column name is not unique -
Cannot create a Plesk object such as a domain/subscription/reseller/customer or enable mail service for a domain with the same error:
PLESK_ERROR: An error occurred during domain creation: mailmng-outgoing failed: ERROR:outgoing:column name is not unique
PLESK_ERROR: Error: mailmng-outgoing failed: ERROR:__main__:UNIQUE constraint failed: domains.name
Cause
Inconsistency in outgoing mail control database.
Resolution
-
Connect to the destination Plesk server via SSH.
- Backup database:
# cp /var/lib/plesk/mail/outgoing/data.db{,_bk}
- Remove the subscription in question from the outgoing mail control database:
# /usr/local/psa/admin/sbin/mailmng-outgoing –remove-domain –domain-name=example.com
-
In case of migration re-sync subscription or in any other case, re-create or re-enable the object that was returning the error.