Symptoms
-
Unable to add domain to an existing webspace:
An error occurred during domain update: An error occurred during changing of hosting settings: Unable to load object of type IPAddress with id=XX: IPAddress: unable to select: no such row in the table
-
plesk repair db
returns the following error:# Plesk repair db -n
...
Checking the consistency of the Plesk database
The following domains are assigned to already removed IP addresses.
Reassign the domains to existing IP addresses:
example.com ........................................... [ERROR]Error messages: 1; Warnings: 0; Errors resolved: 0
exit status 1
Cause
The issue is caused by a database inconsistency: IP pool of the customer for whom the Domain is created contains a reference to a non-existent IP address.
Resolution
-
Connect to the server via SSH.
-
Find all affected domains:
# plesk db "select d.name from domains d, dom_param dp where dp.val not in (select id from IP_Addresses) and dp.param='ip_addr_id' and d.id=dp.dom_id"
+-------------------------------------------+
| name
+-------------------------------------------+
| example.com
+-------------------------------------------+ -
Navigate to Domains > example.com > Web Hosting Access and set the correct IP address in IPv4 address field;
-
Repeat step 4 for all domains listed on step 2.