Symptoms
-
The following error message is shown on the home page of Plesk:
PLESK_ERROR: 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.
-
The following error is found in migration log
/usr/local/psa/var/modules/panel-migrator/sessions/<datetime>/debug.log
:=|2021-05-20_17:28:55,208|D|ST1|core.runners.base|example.com||stderr: Unable to load object of type SysUser with id=2: SysUser: unable to select: No such row in the table
...
=|...|D|ST1|core.safe|example.com||MultipleAttemptsMigrationError: Migration tools tried to perform operation in 3 attempts: 'username'
+|...|E|ST1|core.safe|example.com||Failed to perform an action on subscription 'example.com': Failed to deploy subscription 'example.com'
=|...|E|ST1|core.safe|example.com||Migration for that subscription is considered completely failed. No further actions are performed for it. Exception message: Migration tools tried to perform operation in 3 attempts: 'username' -
On the 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_users
.
Resolution
-
Connect to the server via SSH.
-
Create a backup of
psa
database:# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin psa > /root/psa_backup.sql
-
Run
plesk repair db
to fix the database inconsistency:# plesk repair db -y
OR
Proceed with the
below steps
-
List all web users from the table
web_users
that are under the domainexample.com
:MYSQL_LIN: 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 |
+—-+——–+————-+ -
List all web users from the table
sys_users
that are under the domainexample.com
:MYSQL_LIN: 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=’example.com’);
+—-+———–+
| id | login |
+—-+———–+
| 30 | web_user1 |
| 31 | web_user2 |
+—-+———–+
2 rows in set (0.00 sec…