Unable to manage subscription or install Let's Encrypt SSL: Failed to updated ip. Can't set to addon domain ip different from webspace ip

Created:

2016-11-16 12:51:58 UTC

Modified:

2017-08-09 13:54:23 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to manage subscription or install Let's Encrypt SSL: Failed to updated ip. Can't set to addon domain ip different from webspace ip

Symptoms

Unable to manage subscription settings in Subscriptions > example.com > Websites & Domains > example.com > Hosting Settings or install Let's Encrypt SSL:

Failed to updated ip. Can't set to addon domain ip different from webspace ip

There are subdomains and/or additional domains on the subscription.

Cause

psa database inconsistency. There are different IP addresses set on additional domains, domain and subdomain within subscription.

Resolution

  1. Back up psa database

  2. Log in to psa database and perform the following query:

    mysql> MYSQL_WIN: SELECT d.id, d.webspace_id, d.cl_id, d.name AS domain, IP_Addresses.ip_address FROM domains d, dom_param, IP_Addresses WHERE d.id=dom_param.dom_id AND dom_param.val=IP_Addresses.id AND dom_param.param='ip_addr_id' AND d.name LIKE '%example.com%';
    +----+-------------+-------+--------------------+----------------+
    | id | webspace_id | cl_id | domain | ip_address |
    +----+-------------+-------+-------------------------------------+
    | 31 | 0 | 3 | example.com | 198.51.100.1 |
    | 32 | 31 | 3 | test1.example.com | 198.51.100.2 |
    | 33 | 31 | 3 | photo.example.com | 198.51.100.2 |
    | 34 | 31 | 3 | blog.example.com | 198.51.100.2 |
    | 35 | 31 | 3 | words.example.com | 198.51.100.2 |
    +----+-------------+-------+--------------------+----------------+
    5 rows in set (0.00 sec)

  3. In the example above, IP addresses for domain and subdomains are different, but it should be the same. Check IDs of IP addresses:

    MYSQL_WIN: mysql> SELECT * FROM IP_Addresses;
    +----+----------------+-----------------+------------+
    | id | ip_address | mask | iface |
    +----+----------------+-----------------+------------+
    | 5 | 198.51.100.1 | 255.255.255.240 | "Ethernet" |
    | 3 | 198.51.100.2 | 255.255.255.240 | "Ethernet" |
    | 4 | 198.51.100.25 | 255.255.255.240 | "Ethernet" |
    | 7 | 198.51.100.22 | 255.255.255.240 | "Ethernet" |
    +----+----------------+-----------------+------------+
    4 rows in set (0.00 sec)

    Update IP address for subdomains:

    MYSQL_WIN: mysql> UPDATE dom_param SET val=5 WHERE dom_id in(32,33,34,35) and param='ip_addr_id';

  4. Make sure that IP address is set correctly in the ipaddressescollections table as well:

    MYSQL_WIN: mysql> SELECT ipcollectionid,ipaddressid,ip_address FROM ipaddressescollections,ip_addresses WHERE ipCollectionId IN (65,66,67,68,69,70);
    +----------------+-------------+--------------+
    | ipcollectionid | ipaddressid | ip_address |
    +----------------+-------------+--------------+
    | 66 | 5 | 198.51.100.1 |
    | 67 | 7 | 198.51.100.22|
    | 68 | 7 | 198.51.100.22|
    | 69 | 7 | 198.51.100.22|
    | 70 | 5 | 198.51.100.1 |

  5. If ipAddressId is different, change it as follows:

    MYSQL_WIN: mysql> update ipaddressescollections set ipaddressid=5 where ipcollectionid in (66,67,68,69,70);

  6. Apply IP address for subscription in Subscriptions > example.com > Web Hosting Access

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