Articles in this section

Unable to synchronize subscription 22 with plan 1: Unable to load object of type BsDomain with id=33: Domain does not exist

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Unable to synchronize subscription with it's service plan:

    PLESK_WARN: Warning: Unable to perform the sync

  • Errors that are similar to the following appear in /var/log/plesk/panel.log:

    CONFIG_TEXT: ERR [panel] Unable to load object of type BsDomain with id=33: Domain does not exist
    ..
    ERR [panel] Task failed: id=348, pid=8109, type=sync-service-plan-worker, error=Unable to load object of type BsDomain with id=33: Domain does not exist.
    ..
    ERR [panel] Task failed: id=346, pid=8100, type=sync-service-plan, error=[[components.tasks.sync-service-plan-worker.error]]

  • Service plan with id=1 is marked with a yellow exclamation mark:

    PLESK_WARN: Warning: Unable to sync subscriptions with the service plan

  • In the psa database, an entry for the domain ID in the Subscriptions table exists, but in the Domains table and its related tables, it does not exist. You can use the domain ID from the error message to check. For table domains it will be id, for hosting and other tables it will be dom_id and for table Subscriptions, it will be object_id:

    # plesk db
    mysql> select id, object_id,object_type from Subscriptions where object_id=33 \G;

    +----+-----------+-------------+
    | id | object_id | object_type |
    +----+-----------+-------------+
    | 22 |    33     |    domain   |
    +----+-----------+-------------+

    mysql> select * from domains where id=33;
    Empty set (0.00 sec)

    mysql> select * from hosting where dom_id=33;
    Empty set (0.00 sec)

    mysql> select * from dom_param where dom_id=33;
    Empty set (0.00 sec)

    mysql> select * from DomainServices where dom_id=33;
    Empty set (0.00 sec)

    mysql> select * from domain_aliases where dom_id=33;
    Empty set (0.00 sec)

    mysql> select * from subdomains where dom_id=33;
    Empty set (0.00 sec)

  • Executing the plesk repair db command does not manage to resolve the issue

Cause

Plesk database inconsistency. A previous deletion of a Domain or Subscription in Plesk did not finish correctly, due to which orphaned database records remained within the Plesk database and they continue to cause issues. A Subscription in Plesk cannot function if its main domain is removed.

Resolution

  1. Connect to the server via SSH
  2. Create a dump of psa database:

    # plesk db dump psa > psa`date +%F-%s`.sql

  3. Confirm what is the ID of the Subscription for which the domain object is missing:

    Note: In the example output below, the domain ID is 33, but the Subscription ID is 22:

    # plesk db
    mysql> select id, object_id,object_type from Subscriptions where object_id=33 \G;
    +----+-----------+-------------+
    | id | object_id | object_type |
    +----+-----------+-------------+
    | 22 |    33     |    domain   |
    +----+-----------+-------------+

  4. Delete the orphan database records that are tied to the Subscription for which the main domain is missing:

    # plesk db "delete from Subscriptions where id=22"

    # plesk db "delete from PlansSubscriptions where subscription_id=22"

    # plesk db "delete from SubscriptionProperties where subscription_id=22"

  5. Repair Plesk database to fix any other broken references that may have been left by the previous delete:

    # plesk repair db

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.