Domain activation fails with an error: Unable to load object of type PhDomain

Created:

2016-11-16 12:49:51 UTC

Modified:

2017-04-24 11:12:48 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Domain activation fails with an error: Unable to load object of type PhDomain

Applicable to:

  • Plesk

Symptoms

  1. Domain activation fails with an error:

    Unable to load object of type PhDomain with id=170: Turn on domain failed:
  2. In the /var/log/sw-cp-server/error_log log the following record appears:

    Unable to load object of type PhDomain with id=170: Turn on domain failed:FastCGI-stderr: PleskUtilException: '/usr/local/psa/admin/bin/tomcatmng' '--install-vhost' '--vhost-name=rdomain.tld' '--alias=domain.tld' failed with code 1
  3. When trying to activate installed java application Plesk shows the following error:

    Can't find Engine PSA (Error code 1)

Cause

Incorrect settings in the DomainServices table in the Parallels Plesk database. The domain has been migrated incorrectly (for example, migrated from a Plesk installation with Tomcat to a Plesk installation without Tomcat).

Resolution

  1. Create a backup of the psa database:

    mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` psa >   /var/lib/psa/dumps/psadump.`date +%F_%H.%M`.sql
  2. Check the domain services in the MySQL database:

    mysql> select * from DomainServices where dom_id=170;
    +-----+--------+--------+--------+---------------+----------------+
    | id | dom_id | type | status | parameters_id | ipCollectionId |
    +-----+--------+--------+--------+---------------+----------------+
    | 217 | 170 | mail | 2 | 208 | 228 |
    | 222 | 170 | tomcat | 17 | 213 | 530 |
    | 373 | 170 | web | 0 | NULL | 58 |
    +-----+--------+--------+--------+---------------+----------------+
    3 rows in set (0.01 sec)

    You can get dom_id value from error message.

  3. Get the IP addresses associated with these services from the IpAddressesCollections table:

    mysql> select * from IpAddressesCollections where ipCollectionId in (228,530,58);
    +----------------+-------------+
    | ipCollectionId | ipAddressId |
    +----------------+-------------+
    | 58 | 1 |
    | 228 | 1 |
    +----------------+-------------+
    2 rows in set (0.01 sec)
  4. In this example, the ipCollectionId value for the tomcat service has been set incorrectly. There is no record in the IpAddressesCollections table with ipCollectionId = 530 .

  5. If Tomcat is installed on the server, insert the record as below:

    mysql> insert into IpAddressesCollections values (530,1);
Have more questions? Submit a request
Please sign in to leave a comment.