SYMPTOMS
When try to remove domain through Plesk Control Panel, the following error is generated.DomainUser::getAccount failed: Unable to create Account object: Account: unable to select: no such row in the table
0: /usr/local/psa/admin/plib/class.PhDomain.php:424
PhDomain->reset(integer '0', boolean true, boolean false)
1: /usr/local/psa/admin/plib/class.BsDomain.php:313
BsDomain->reset(integer '0')
2: /usr/local/psa/admin/plib/class.BsDomain.php:307
BsDomain->delete(integer '0')
3: /usr/local/psa/admin/plib/class.BsDomain.php:540
mdeleteDomains(array)
4: /usr/local/psa/admin/plib/class.Manager.php:352
Manager->removeDomains(array)
5: /usr/local/psa/admin/htdocs/domains/removeDomains.php3:50
CAUSE
The error means that configurations of account that is appropriate to domain administrator and card are missing in Plesk database, use the following commands to verify this:mysql> select dlu.* from dom_level_usrs dlu, domains d where dlu.dom_id=d.id and d.name='DOMAIN-NAME';
+--------+------------+-------+---------+---------+
| dom_id | account_id | state | card_id | perm_id |
+--------+------------+-------+---------+---------+
| 29 | 106 | true | 5 | 18 |
+--------+------------+-------+---------+---------+
1 row in set (0.00 sec)
mysql> select * from accounts where id=106;
Empty set (0.00 sec)
mysql> select * from Cards where id=5;
Empty set (0.00 sec)
mysql> RESOLUTION
You should update table psa.dom_level_usrs manually to remove the discrepancy:mysql> update dom_level_usrs set account_id=NULL where dom_id=29;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> update dom_level_usrs set card_id=NULL where dom_id=29;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> Keywords: no such row in the table; domain removal