Unable to change hosting type for domain: Unable to load object of type SysUser with id

Created:

2016-11-16 13:02:58 UTC

Modified:

2017-08-16 17:15:31 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to change hosting type for domain: Unable to load object of type SysUser with id

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux

Symptoms

Unable to change hosting type for domain example.com , the following error is shown:

Error: Unable to load object of type SysUser with id=66: SysUser: unable to select: no such row in the table.

There is no system user for this domain in OS:

# grep 'example.com' /etc/passwd

Document root for this domain does not exist:

# ls -al /var/www/vhosts/example.com/
ls: cannot access /var/www/vhosts/example.com/: No such file or directory

Or: unable to restore subscription from backup with the same error.

Cause

Database inconsistency.

Resolution

  1. Backup Plesk database:

    # plesk db dump psa > /root/plesk_support_psa.sql
  2. Make sure that there is no system user with ID from error message exist in Plesk databese:

    mysql> select * from sys_users where id=66;
    Empty set (0.00 sec)
  3. Find domain ID and make sure that hosting type for domain is set to none :

    mysql> select id, name, htype from domains where name like '%example.com%';
    +----+-------------+-------+
    | id | name | htype |
    +----+-------------+-------+
    | 76 | example.com | none |
    +----+-------------+-------+
    1 row in set (0.00 sec)
  4. Find inconsistent record in hosting table:

    mysql> select dom_id, sys_user_id, www_root from hosting where sys_user_id=66;
    +--------+-------------+--------------------------------------+
    | dom_id | sys_user_id | www_root |
    +--------+-------------+--------------------------------------+
    | 76 | 66 | /var/www/vhosts/example.com/httpdocs |
    +--------+-------------+--------------------------------------+
    1 row in set (0.00 sec)
  5. Remove inconsistent record:

    mysql> delete from hosting where dom_id=76;
  6. Set necessary hosting type for domain through Plesk.

Have more questions? Submit a request
Please sign in to leave a comment.