Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
- Unable to remove a subscription with the following error in Plesk:
PLESK_ERROR: ERROR: Call to a member function removeUser() on a non-object (Abstract.php:988)
-
The record that is related to the subscription is missing in the
ServiceInstances
table.MYSQL_LIN: select id, name from domains where name='example.com';
+-----+----------------------+
| id | name |
+-----+----------------------+
| 138 | example.com |
+-----+----------------------+
1 row in set (0.00 sec)MYSQL_LIN: select id, object_id from Subscriptions where object_id=138 and object_type='domain';
+-----+-----------+
| id | object_id |
+-----+-----------+
| 236 | 138 |
+-----+-----------+
1 row in set (0.00 sec)MYSQL_LIN: select * from ServiceInstances where servicePackageId=236;
Empty set (0.00 sec)
Cause
Database inconsistency.
Resolution
-
Create a backup of the Plesk system database
- Log in the server using SSH/RDP;
Note: If direct SSH/RDP access to the server is not possible, contact server administrator for further assistance.
- Access the Plesk psa database
-
Find the missing record using the subscription name:
MYSQL_LIN: select id, name from domains where name='example.com';
+-----+----------------------+
| id | name |
+-----+----------------------+
| 138 | example.com |
+-----+----------------------+
1 row in set (0.00 sec)MYSQL_LIN: select id, object_id from Subscriptions where object_id=138 and object_type='domain';
+-----+-----------+
| id | object_id |
+-----+-----------+
| 236 | 138 |
+-----+-----------+
1 row in set (0.00 sec)Note: if the second MySQL query returns empty result check this article.
MYSQL_LIN: select * from ServiceInstances where servicePackageId=236;
Empty set (0.00 sec) -
Generate UUID:
-
on Windows servers (use PowerShell):
PS $uuid = [guid]::NewGuid(); $uuid
bb4b3444-b9b9-4900-862b-d4419c3fb844 -
on Linux servers run the commands below in SSH:
# UUID=$(cat /proc/sys/kernel/random/uuid); echo $UUID
bb4b3444-b9b9-4900-862b-d4419c3fb844
-
-
Make sure that there are no records with such UUID in the
ServiceInstances
table:MYSQL_LIN: select * from ServiceInstances where reference='bb4b3444-b9b9-4900-862b-d4419c3fb844';
Empty set (0.01 sec) -
Insert the missing record to the
ServiceInstances
table:MYSQL_LIN: insert into ServiceInstances(serviceInstallationId, servicePackageId, reference, status, enabled) values(2, 236, 'fd678c14-6ce8-11e4-b116-123b93f75cba', 1, 1);
Query OK, 1 row affected (0.01 sec) -
Remove the subscription again.
Comments
0 comments
Please sign in to leave a comment.