Could not open domain hosting settings: "Unable to load object of type SysUser with id"

Created:

2016-11-16 12:49:44 UTC

Modified:

2017-08-08 13:19:21 UTC

2

Was this article helpful?


Have more questions?

Submit a request

Could not open domain hosting settings: "Unable to load object of type SysUser with id"

Applicable to:

  • Plesk

Symptoms

  1. When I try to open a subscription at Top > Subscriptions > example.com > Manage hosting or when I try to open the Top > Domains > example.com > Websites & Domains tab, the following error is shown:
    Internal error: Unable to load object of type SysUser with id=370: 
    SysUser: unable to select: no such row in the table

Cause

This issue is caused by a database inconsistency - in the case above, there is no corresponding entry in the psa . sys_users table with the id=370 .

Resolution

Restore missed records from psa dumps:

For Linux :

/var/lib/psa/dumps/mysql.daily.dump.N.gz .

For Windows :

C:\\Program Files (x86)\\Parallels\\Plesk\\MySQL\\Backup\\psa-date.sql .

If it's needed records were not found in dumps, below solution can be applied.

  1. Find the domain's sys_user login and system parameters.

    For Linux

    Use the domain name ( example.com ) to search in the /etc/passwd file:

    ~# grep 'example.com' /etc/passwd
    exampleuser:x:10007:503::/var/www/vhosts/example.com:/bin/false

    For Windows

    Refer to the Security tab of the %plesk_vhosts%\\example.com folder to get system user name.

  2. Create a new record in the account table for this user:

    a. Type the "plesk db" command under the root user in the shell to log in to the Plesk database.

    b. Run the following queries:

    mysql> select @id:= (select MAX(id) + 1 FROM accounts);
    +------------------------------------------+
    | @id:= (select MAX(id) + 1 FROM accounts) |
    +------------------------------------------+
    | 15 |
    +------------------------------------------+

    mysql> insert into accounts values (@id,"plain","1qazXSW@");
  3. Insert data into the psa . sys_users table using the following values:

  4. id - User ID. Use the ID from the error (370 in our example).

  5. serviceNodeId - Always equal to "1".
  6. login - System user login, the first substring from the output in step 1: "exampleuser"
  7. mapped_to - Always equal to "NULL".
  8. home - System user home directory. Use the output from step 1: "/var/www/vhosts/example.com"
  9. shell - System shell available for user. Use the output from step 1: "/bin/false"
  10. quota - Set equal to "0"

    So the final command will be:

        mysql> insert into sys_users (id,serviceNodeId,login,account_id,mapped_to,home,shell,quota) values  (370,1,'exampleuser',@id,'','/var/www/vhosts/example.com','/bin/false',0);
  11. Change the system user password under the Websites & Domains > Web Hosting Access tab to sync passwords between the database and operating system.

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