Unable to restore or manage subscription: Unable to load object of type IPAddress with id=xx

Created:

2016-11-16 13:18:35 UTC

Modified:

2017-08-08 13:22:48 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to restore or manage subscription: Unable to load object of type IPAddress with id=xx

Applicable to:

  • Plesk

Symptoms

Error while trying to create, migrate or restore the subscription:

    Unexpected Plesk API Error: Unable to load object of type IPAddress with id=XX: IPAddress: unable to select: no such row in the table

Cause

The issue is caused by a database inconsistency: IP pool of customer for whom subscription is created contains reference to non-existent IP address.

Resolution

  1. Create databases backup according to [KB881]How to backup/restore a Plesk database dump?

  2. Verify whether IP address with ID reported in the error message is missing:

    mysql> select * from psa.IP_Addresses where id=XX;
    0 rows in set (0.00 sec)
  3. Find and remove all references to this IP address from ip_pool table:

    mysql> select * from ip_pool where psa.ip_address_id=XX;
    +----+---------------+-----------+
    | id | ip_address_id | type |
    +----+---------------+-----------+
    | 1 | XX | exclusive |
    +----+---------------+-----------+

    mysql> delete from ip_pool where ip_address_id=XX;

    or

    Locate id of a main IP on a server in IP_Addresses table and update tables IP_Addresses, ip_pool and IpAddressesCollections by replacing id of a main IP address to XX:

    mysql> select id, ip_address, main from IP_Addresses where main='true';
    +----+-------------+-------+
    | id | ip_address | main |
    +----+-------------+-------+
    | Y | 10.10.10.10 | true |
    +----+-------------+-------+
    mysql> update IP_Addresses set id=X where id=Y;
    mysql> update ip_pool set ip_address_id=X where ip_address_id=Y;
    mysql> update IpAddressesCollections set ipAddressId=X where ipAddressId=Y;

    If IP address with ID from an error message is present in IP_Addresses and this is the only IP address:

    mysql> select id, ip_address from psa.IP_Addresses;

    +----+-----------------+
    | id | ip_address |
    +----+-----------------+
    | YY | 123.123.123.123 |
    +----+-----------------+
    1 row in set (0.00 sec)
  4. Verify whether ID of IP address from error message is present in IpAddressesCollections

    mysql> select * from psa.IpAddressesCollections where ipAddressId=XX;

    +----------------+-------------+
    | ipCollectionId | ipAddressId |
    +----------------+-------------+
    | 1 | XX |
    | 2 | XX |
    | 3 | XX |
    | 4 | XX |
    +----------------+-------------+
    4 rows in set (0.00 sec)
  5. Set proper ID in IpAddressesCollections.ipAddressId to ID of existing IP address:

    mysql> Begin;
    mysql> UPDATE psa.IpAddressesCollections set ipAddressId='YY' where ipAddressId='XX';
    mysql> Commit;
Have more questions? Submit a request
Please sign in to leave a comment.