Symptoms
-
The creation of a domain fails with the error:
IP addresses for mail service of domain are not set
Cause
Database inconsistency, one or more entries are missing in the table psa.IpAddressesCollections
.
Resolution
Note: in case the issue occurs on Plesk Multi Server, the solution must be applied on the service node with the affected subscription.
-
Connect to the server using SSH.
-
Find
ipCollectionId
of missing entry:mysql> select id from psa.IpCollections where id not in (select ipCollectionId from psa.IpAddressesCollections);
+----+
| id |
+----+
| 15 |
+----+
1 row in set (0.00 sec) -
Find ID of an appropriate IP address:
mysql> select id, ip_address from IP_Addresses;
+----+-------------+
| id | ip_address |
+----+-------------+
| 1 | 203.0.113.2 |
| 2 | 192.0.2.2 |
+----+-------------+
2 rows in set (0.00 sec) -
Add the missing record with preferred IP address ID, e.g. '1' and the ID '15' from step 4 as follows:
mysql> insert into psa.IpAddressesCollections values(15,1);
Query OK, 1 row affected (0.00 sec)Note: In case multiple records are shown in step 4 query, use the following script to add all missing records in the
psa.IpAddressesCollections
table with IP id of '1':# plesk db -Ne "select id from psa.IpCollections where id not in (select ipCollectionId from psa.IpAddressesCollections)" | while read i; do plesk db "insert into IpAddressesCollections values ('$i','1')"; done