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 the subscription is created contains a reference to a non-existent IP address.
Resolution
-
Create databases backup according to How to backup/restore a Plesk database dump? article.
-
Access Plesk database.
-
Verify whether IP address with ID reported in the error message is missing:
MYSQL_LIN: mysql> select * from psa.IP_Addresses where id=XX;
0 rows in set (0.00 sec) -
There are two options:
If the IP address with ID from an error message is missing from IP_Addresses:-
Find and remove all references to this IP address from ip_pool table:
MYSQL_LIN: mysql> select * from ip_pool where 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 the main IP on a server in IP_Addresses table and update tables IP_Addresses, ip_pool, and IpAddressesCollections by replacing ID of the main IP address to XX:
MYSQL_LIN: mysql> select id, ip_address, main from IP_Addresses where main='true';
+----+-------------+-------+
| id | ip_address | main |
+----+-------------+-------+
| XX | 203.0.112.2 | true |
+----+-------------+-------+
mysql> update IP_Addresses set id=XX where id=YY;
mysql> update ip_pool set ip_address_id=XX where ip_address_id=YY;
mysql> update IpAddressesCollections set ipAddressId=XX where ipAddressId=YY;
If IP address with ID from an error message is present in IP_Addresses and this is the only IP address:-
MYSQL_LIN: mysql> select id, ip_address from psa.IP_Addresses;
+----+-----------------+
| id | ip_address |
+----+-----------------+
| XX | 203.0.112.2 |
+----+-----------------+
1 row in set (0.00 sec) -
Verify whether ID of IP address from error message is present in IpAddressesCollections
MYSQL_LIN: 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) -
Set proper ID in IpAddressesCollections.ipAddressId to ID of existing IP address:
MYSQL_LIN: mysql> UPDATE psa.IpAddressesCollections set ipAddressId='YY' where ipAddressId='XX';
-
-
Recreate configuration files for mail and web services:
-
For Linux:
# /usr/local/psa/admin/bin/mchk
# /usr/local/psa/admin/bin/httpdmng --reconfigure-all -
For Windows:
C:\> plesk repair web
-
Comments
0 comments
Please sign in to leave a comment.