Applicable to:
- Plesk for Linux
Symptoms
plesk repair db utility shows the warning:
# plesk repair db -n
...
Checking the consistency of the Plesk database
The IP address collection with the ID 123 is being used by 280
different domain services, which may lead to Plesk issues ......... [WARNING]
Error messages: 0; Warnings: 1; Errors resolved: 0
Cause
Inconsistency in the Plesk database: records in DomainServices table were not properly updated.
Resolution
- Connect to your Plesk server via SSH.
-
For safety reasons, create a backup of the Plesk database:
# plesk db dump psa > /root/psa.sql
-
In the command below, replace
123with the value from the warning message. Then run the command to collect IDs of all domains which share the sameipCollectionId:# plesk db -Ne "SELECT ds.id FROM domains d JOIN DomainServices ds ON ds.dom_id = d.id WHERE ds.ipCollectionId = 123" > ipCollectionId.txt
-
List all IP addresses registered in Plesk and their IDs:
# plesk db "select id,ip_address from IP_Addresses"
-
In the command below, replace
Xwith IP address ID from step 4 and run it. The command will update the records inDomainServicesand create the new records inIpCollectionsandIpAddressesCollectionswith the proper values:# cat ipCollectionId.txt | while read i; do
plesk db "INSERT INTO IpCollections VALUES (NULL);
SET @new_col = LAST_INSERT_ID();
INSERT INTO IpAddressesCollections (ipCollectionId, ipAddressId) VALUES (@new_col, X);
UPDATE DomainServices SET ipCollectionId = @new_col WHERE id = $i" ; done -
Rerun
plesk repair dbutility to confirm that the warnings have been resolved:# plesk repair db -n
Comments
Please sign in to leave a comment.