Unable to activate client: Unable to load object of type PhDomain. Domain does not exist.

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Windows
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows

Created:

2016-11-16 12:53:17 UTC

Modified:

2016-12-21 19:27:37 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to activate client: Unable to load object of type PhDomain. Domain does not exist.

Symptoms

Client activation fails with error:

    Error: Unable to load object of type PhDomain with id=87: Domain does not exist.

Execution of the following command also shows an error:

    # /usr/local/psa/bin/server_pref -u -crontab-secure-shell "/bin/sh"
Unable to load object of type PhDomain with id=87: Domain does not exist

The following error occurs during domain removing:

    "Permission denied."

Cause

Database inconsistency.

Resolution

  1. Create a backup of the psa database:

    **For Linux:**

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin psa > /var/lib/psa/dumps/psadump.`date +%F_%H.%M`.sql

    **For Windows**

    %plesk_dir%\\MySQL\\bin\\mysqldump.exe -P8306 -uadmin -p psa > C:\\psadump.sql
  2. Check if there is domain having id 87 :

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

    mysql> select * from DomainServices where dom_id=87;
    +-----+--------+------+--------+---------------+----------------+
    | id | dom_id | type | status | parameters_id | ipCollectionId |
    +-----+--------+------+--------+---------------+----------------+
    | 22 | 87 | web | 0 | 0 | 222 |
    +-----+--------+------+--------+---------------+----------------+
    1 row in set (0.00 sec)
  3. As domain is absent, delete orphaned records in DomainServices and hosting tables:

    mysql> delete from DomainServices where dom_id=87;
    Query OK, 1 row affected (0.03 sec)

    mysql> delete from hosting where dom_id=87;
    Query OK, 1 row affected (0.03 sec)

    mysql> select * from IpAddressesCollections where ipCollectionId=222;
    +----------------+-------------+
    | ipCollectionId | ipAddressId |
    +----------------+-------------+
    | 222 | 1 |
    +----------------+-------------+
    1 row in set (0.00 sec)

    mysql> delete from ipAddressesCollections where ipcollectionid=222;
    Query OK, 1 row affected (0.06 sec)
  4. Make sure that there is no additional domains in subscription with dom_id = 87 :

    mysql> select id,name,cl_id,parentdomainid from domains where parentdomainid=87;
  5. Check if there are orphaned records in psa database:

    mysql> select hosting.dom_id,hosting.www_root,domains.name from hosting left join domains on hosting.dom_id=domains.id where domains.name is NULL;
  6. Remove these records.

Have more questions? Submit a request
Please sign in to leave a comment.