Error "Unable to create Account object: Account: unable to select: no such row in the table" occurs when I try to remove domain through Plesk Control Panel.

Article ID: 5493 
Last Review: Oct,6 2008
Author: Bezborodova Anastasiya APPLIES TO:
  • Plesk 8.1.x for Linux/Unix
  • Plesk 8.2.x for Linux/Unix
  • Plesk 8.3.x for Linux/Unix

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


Subscription for this article changesSubscription for this article changes

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
* - required fields