- Plesk Onyx for Linux
- Plesk 11.x for Windows
- Plesk 12.0 for Windows
- Plesk 12.0 for Linux
- Plesk 12.5 for Windows
Creation of new subscription fails with message:
Error: External exception. SQLSTATE: Integrity constraint violation: 1062 Duplicate entry '4842-domain' for key 'object_id_and_type'
Create database dump using article #213904125 .
Login to Plesk database using article #213412709 .
From error message find domain id (in this example it is 4842).
Make sure that there is no such domain in Plesk database:
mysql> select * from domains where id=4842;
Empty set (0.00 sec)
Remove entry from
mysql> delete from Subscriptions where object_id=4842;
Query OK, 1 row affected (0.03 sec)
- Create new subscription.
In case there is more than one incorrect entries in database:
mysql> select count(*) from Subscriptions where object_id NOT IN (select id from domains);
| count(*) |
| 196 |
1 row in set (0.00 sec)
Remove all such entries using the following query:
mysql> delete from Subscriptions where object_id NOT IN (select id from domains);
Query OK, 196 row affected (0.03 sec)