• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Issue Db_Table_Exception Admin-User

adminrights

New Pleskian
Server operating system version
latest
Plesk version and microupdate number
latest
Hi Board,

after updating some stuff over SSH my Linux-Server with Plesk running perfect - but i got no chance to login into Plesk.
It tells me:

500 Db_Table_Exception​

Dependent row(s) 'smb_roles.id = 1' isn't found for 'smb_users.roleId = 1'.

TypeDb_Table_Exception
MessageDependent row(s) 'smb_roles.id = 1' isn't found for 'smb_users.roleId = 1'.
FileAbstract.php
Line308

So i`m pretty bloody in mySQL and SSH.
How can i fix it?
 
Have you tried to fix this database inconsistency with

# plesk repair db -y

?
 
Yes. No change.


Checking the Plesk database using the native database server tools .. [OK]

Checking the structure of the Plesk database ........................ [OK]

Checking the consistency of the Plesk database

Inconsistency in the table 'smb_users' for the column roleId: No
rows in the table 'smb_roles' with id = 1 ......................... [ERROR]

Error messages: 1; Warnings: 0; Errors resolved: 0
 
It seems there is no id with the value "1" in the smb_roles table of the psa database.

Ideally, this table should look the following way:

Code:
mysql> select * from smb_roles;
+----+------------------+-----------+---------+
| id | name             | isBuiltIn | ownerId |
+----+------------------+-----------+---------+
|  1 | Admin            |         1 |       1 |
|  2 | WebMaster        |         0 |       1 |
|  3 | Application User |         0 |       1 |
|  4 | Accountant       |         1 |       1 |
+----+------------------+-----------+---------+

To fix the issue, perform the following steps:

- Enter Plesk system database with the command:

# plesk db

- Check the content of the table with the command:

mysql> select * from smb_roles;

- In case of tables are missing, add them with corresponding queries:

mysql> INSERT INTO `smb_roles` VALUES (1,'Admin',1,1);
mysql> INSERT INTO `smb_roles` VALUES (2,'WebMaster',0,1);
mysql> INSERT INTO `smb_roles` VALUES (3,'Application User',0,1);
mysql> INSERT INTO `smb_roles` VALUES (4,'Accountant',1,1);

- Try to access Plesk again.
 
It says:
mysql> select * from smb_roles;
Empty set (0.00 sec)

mysql> INSERT INTO `smb_roles` VALUES (1,'Admin',1,1);
ERROR 1136 (21S01): Column count doesn't match value count at row 1
 
The @IgorG 's idea works for me, with a little change:
1. (If you read this in the feature) "DESCRIBE smb_roles;" to show the table structure; This will give you information about what is optional or with default value and what it doesn't.
2. For me, at this moment (plesk update every time) work this:
INSERT INTO smb_roles(name) VALUES('Admin');
INSERT INTO smb_roles(name) VALUES('WebMaster');
INSERT INTO smb_roles(name) VALUES('Application User');
INSERT INTO smb_roles(name) VALUES('Accountant');
That works beacause id is autoincrement... May be you will need to fix other thinks
 
@yprevot If you need to run these commands after each Plesk update, something is very basically wrong with the installation. A Plesk upgrade should not and normally does not corrupt the database. I suggest to let support staff investigate and fix this on your server.
 
Back
Top