Unable to get the list of subscriptions via CLI: Unable to load object of type BsDomain with id

Created:

2017-07-06 23:12:11 UTC

Modified:

2017-08-16 17:31:47 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to get the list of subscriptions via CLI: Unable to load object of type BsDomain with id

Applicable to:

  • Plesk Onyx 17.5 for Linux

Symptoms

When trying to get a list of subscriptions using subscription CLI utility, output is interrupted with the following error:

# plesk bin subscription --list
example.com
example1.com
example2.com
..........
Unable to load object of type BsDomain with id=101: Domain does not exist.
exit status 1

Cause

Orphaned records in Plesk database.

Resolution

1. Back up Plesk database as described in the article: How to backup/restore a Plesk database dump .

2. Find the domain name by its ID from the error message:

# plesk db
mysql> select * from domains where id=101;

3. Check if the domain directory exists:

# ls -la /var/www/vhosts/example.com/httpdocs

If the directory exists, then try to repair Plesk database with plesk repair db command. More details about this utility can be found in the Administrator's Guide .

4. Open Plesk database schema in XML format on GitHub and search by keyword domains.id to find all tables where the domain ID is defined.

5. Search and remove the orphaned records against the list of tables found on the previous step, for example:

# plesk db

mysql> select * from Subscriptions where object_id=101;
mysql> delete from Subscriptions where object_id=101;
Have more questions? Submit a request
Please sign in to leave a comment.