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

Created:

2016-11-16 13:04:55 UTC

Modified:

2017-06-04 13:02:04 UTC

1

Was this article helpful?


Have more questions?

Submit a request

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

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Windows
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Windows
  • Plesk 12.0 for Linux

Symptoms

An error occurs when accessing a subscription in Parallels Plesk Panel (Plesk), going to Subscriptions > domain.com > Open in Control Panel

Internal error: Dependent row(s) 'smb_roles.id = 1' isn't found for 'smb_users.roleId = 1'.
Message Dependent row(s) 'smb_roles.id = 1' isn't found for 'smb_users.roleId = 1'.
File Abstract.php
Line 206
Type Exception

Cause

The problem occurs because the table smb_roles is empty::

#MYSQL_PWD=`cat /etc/psa/.psa.shadow`  mysql -uadmin  psa
mysql> select * from smb_roles;
Empty set (0.00 sec)

This database inconsistency could occur during a Plesk upgrade from versions older than 10.

Resolution

Dump the Plesk database and smb_roles table:

#  MYSQL_PWD=`cat /etc/psa/.psa.shadow`  mysqldump -uadmin psa > /root/psa.`date +%Y%m%d.%H%M%S`.sql
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin psa smb_roles > /root/psa.smb_roles.`date +%Y%m%d.%H%M%S`.sql

Add the default Plesk smb roles:

mysql> INSERT INTO `smb_roles` VALUES (1,'Admin',1,1);
Query OK, 1 row affected (0.10 sec)
mysql> INSERT INTO `smb_roles` VALUES (2,'WebMaster',0,1);
Query OK, 1 row affected (0.21 sec)
mysql> INSERT INTO `smb_roles` VALUES (3,'Application User',0,1);
Query OK, 1 row affected (0.06 sec)
mysql> INSERT INTO `smb_roles` VALUES (4,'Accountant',1,1);
Query OK, 1 row affected (0.04 sec)
mysql> INSERT INTO `smb_roles` VALUES (5,'Mail User',0,1);
Query OK, 1 row affected (0.04 sec)
Have more questions? Submit a request
Please sign in to leave a comment.