Unable to create website configuration with the error: Unable to load object of type SysUser with id

Created:

2016-11-16 13:01:33 UTC

Modified:

2017-08-08 13:21:02 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Unable to create website configuration with the error: Unable to load object of type SysUser with id

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

Error message on the home page in Plesk:

New configuration files for the Apache web server were not created due to the errors in configuration templates: Template processing failed: file = /opt/psa/admin/conf/templates/default/domainVhostIpDefault.php, error = Template_Exception: Unable to load object of type SysUser with id=26: SysUser: unable to select: no such row in the table file: /opt/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: Template_Exception: Unable to load object of type SysUser with id=26: SysUser: unable to select: no such row in the table file: /opt/psa/admin/plib/Template/Processor.php line: 28 code: 0 Previous error: PleskDBException: Unable to load object of type SysUser with id=26: SysUser: unable to select: no such row in the table file: /opt/psa/admin/plib/functions.php line: 1627 code: 0. Detailed error descriptions were sent to you by email.

In Subscriptions list one subscription is marked as broken.

The utility plesk repair web returns an error:

# plesk repair web example.com
Unable to load object of type SysUser with id=26: SysUser: unable to select: no such row in the table

Cause

Database inconsistency: there is an orphaned record in the table sys_user_id .

Resolution

  1. Create a backup of psa database:

    MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin psa > /root/psa_backup.sql
  2. List all web users from the table web_users that are under the domain example.com :

    mysql> select w.id, w.dom_id, w.sys_user_id from web_users as w join domains as d where d.id=w.dom_id and d.name='example.com';
    +----+--------+-------------+
    | id | dom_id | sys_user_id |
    +----+--------+-------------+
    | 1 | 5 | 26 |
    | 2 | 5 | 30 |
    | 3 | 5 | 31 |
    +----+--------+-------------+
  3. List all web users from the table sys_users that are under the domain example.com :

    mysql> select id, login from sys_users where id in (select w.sys_user_id from web_users as w join domains as d where d.id=w.dom_id and d.name='battlefield-inside.de');
    +----+-----------+
    | id | login |
    +----+-----------+
    | 30 | web_user1 |
    | 31 | web_user2 |
    +----+-----------+
    2 rows in set (0.00 sec)
  4. Check current web users in Plesk at Domains > example.com > Web Users - there are only two of them: web_user1 and web_user2 .

  5. Remove the invalid record:

    mysql> delete from web_users where id=1;
  6. Repaired the websites example.com :

    # plesk repair web example.com

    Repairing web server configuration
    Repairing web server configuration for the domain
    example.com ........................................... [OK]

    Error messages: 0; Warnings: 0; Errors resolved: 0
Have more questions? Submit a request
Please sign in to leave a comment.