Unable to manage domains with Forwarding hosting type

Created:

2016-11-16 12:46:38 UTC

Modified:

2017-04-24 12:12:06 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to manage domains with Forwarding hosting type

Applicable to:

  • Plesk 11.5 for Windows
  • Plesk 12.5 for Windows

Symptoms

Symptoms vary depending on the domain type and Plesk version. The following symptoms may occur:

  1. Error in Plesk occurs

    Internal error: Unable to find service node for web service on domain with id=10
  2. Empty /usr/local/psa/admin/conf/generated/< file_name >.include files for domains with Forwarding hosting type

  3. No new /usr/local/psa/admin/conf/generated/< file_name >.include files generated after changing properties of domains with Forwarding hosting type

Cause

The psa.IpAddressesCollections table in Plesk is corrupted.

Diagnostics

For PP versions 10.2 and above

Run the following command:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -Dpsa -e 'select * from IpAddressesCollections where ipAddressId = 0'

The output will be as follows :

    +----------------+-------------+
| ipCollectionId | ipAddressId |
+----------------+-------------+
| 11 | 0 |
| 12 | 0 |
| 13 | 0 |
| 15 | 0 |
| 18 | 0 |
| 19 | 0 |
| 20 | 0 |
+----------------+-------------+

If ipAddressId value is 0, then references between domains and IP addresses have been broken.

For Plesk versions older than 10.2

Run the following command:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -Dpsa -e 'select domains.name, forwarding.ip_address_id from forwarding, domains where forwarding.ip_address_id=0 AND forwarding.dom_id =domains.id'

The output will be as follows :

    +-------------+---------------+
| name     | ip_address_id |
+-------------+---------------+
| example.com |             0 |
+-------------+---------------+

If ip_address_id equals 0 then references between domains and IP addresses have been broken.

Resolution

For PP version 10.2 and newer:

  1. Back up the Plesk database with the below command before making any modifications:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa > psa`date +%F_%H.%M`.sql
  2. Use the following command to determine which ipAddressId should correspond to which ipCollectionId :

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -Dpsa -e "select domains.displayName as 'Domains', DomainServices.type as 'Service Type', IpAddressesCollections.ipCollectionId as 'IpAddressesCollections.ipCollectionId', IpAddressesCollections.ipAddressId as 'Current value of ipAddressId', dom_param.val as 'Have to be' from domains, DomainServices, IpAddressesCollections, dom_param where IpAddressesCollections.ipAddressId = 0 and IpAddressesCollections.ipCollectionId = DomainServices.ipCollectionId AND DomainServices.dom_id = domains.id AND dom_param.dom_id = domains.id and dom_param.param like 'ip%_addr_id'"``

Example result:

    +----------+--------------+---------------------------------------+------------------------------+------------+
| Domains  | Service Type | IpAddressesCollections.ipCollectionId | Current value of ipAddressId | Have to be |
+----------+--------------+---------------------------------------+------------------------------+------------+
| dom3.tld |         mail |                                    19 |                            0 |    3 |
| dom3.tld |          web |                                    20 |                            0 |    3 |
|  fwd.com |         mail |                                    13 |                            0 |    1 |
|  fwd.com |          web |                                    15 |                            0 |    1 |
| fwd2.com |          web |                                    18 |                            0 |    3 |
|  dom.tld |          web |                                    11 |                            0 |    1 |
| dom1.tld |         mail |                                    12 |                            0 |    1 |
+----------+--------------+---------------------------------------+------------------------------+------------+`
  1. Fix the references with commands such as the following:
    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa -e 'Update IpAddressesCollections SET ipAddressId = 3 WHERE ipCollectionId = 19'
    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa -e 'Update IpAddressesCollections SET ipAddressId = 3 WHERE ipCollectionId = 20'

For PP version older than 10.2:

  1. Back up the Parallels Plesk Panel database with the below command before making any modifications:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa > psa`date +%F_%H.%M`.sql
  2. Use the following command to determine which domain references between domains and IP addresses are broken:

    #MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa -e 'select domains.id, domains.name, forwarding.ip_address_id from forwarding, domains where forwarding.ip_address_id=0 AND forwarding.dom_id =domains.id'

Example result:

    +----+----------+---------------+
| id |     name | ip_address_id |
+----+----------+---------------+
|  5 | dom1.tst |             0 |
+----+----------+---------------+
  1. Unfortunately, there is no option to automatically find the IP addresses corresponding to the affected domain. Check your records to correctly determine them. Check the IP addresses available on server (and their real IDs) with this command:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa -e 'select id,ip_address from IP_Addresses'
    +----+------------+
    | id | ip_address |
    +----+------------+
    |  1 | 10.39.3.45 |
    +----+------------+``
  2. After that, update respectively forwarding table with commands such as:

    #  MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa -e 'Update forwarding SET ip_address_id = 1 WHERE dom_id = 5'
Have more questions? Submit a request
Please sign in to leave a comment.