Symptoms
-
When trying to log into Plesk or when trying to open a domain in dashboard, Plesk shows the following error:
external error: Unable to find service node for web service on domain with id=111
-
The command "plesk repair db" reports the following error message:
# plesk repair db -n
Inconsistency in the table 'domains' for the column id: No rows in the table 'DomainServices' with type = 'web', dom_id = 111 ........ [ERROR]
Cause
Inconsistency in the Plesk database.
Resolution
Note: Steps below are the same for both Linux and Windows.
-
Create a dump of the Plesk database.
-
Connect to the Plesk database with the command (On Windows Server use a command prompt):
# plesk db
-
Find the domain's "ip_address_id" using dom_id value from the error message (for example dom_id = 111):
mysql> select dom_id,param,val from dom_param where param='ip_addr_id' and dom_id=111;
+--------+------------+------+
| dom_id | param | val |
+--------+------------+------+
| 111 | ip_addr_id | 1 |
+--------+------------+------+ -
Find the "id" with the type "mail" in DomainServices:
mysql> select * from DomainServices where dom_id=111;
+------+--------+------+--------+---------------+----------------+
| id | dom_id | type | status | parameters_id | ipCollectionId |
+------+--------+------+--------+---------------+----------------+
| 25 | 111 | mail | 0 | 639 | 25 |
+------+--------+------+--------+---------------+----------------+ -
Find "id" of the IP address assigned to the domain:
mysql> select * from IpAddressesCollections where ipCollectionId=25;
+----------------+-------------+
| ipCollectionId | ipAddressId |
+----------------+-------------+
| 25 | 1 |
+----------------+-------------+ -
Find the next free value for the "id" field in the DomainServices table:
mysql> select max(id)+1 from DomainServices;
+-----------+
| max(id)+1 |
+-----------+
| 1447 |
+-----------+ -
Create the missing records using id from step 7 (in this example id=1447) and ipCollectionId as 1 + the value from step 6 (in this example ipCollectionId=26 [25+1]):
-
In the DomainServices table:
mysql> insert into DomainServices (id, dom_id, type, status, parameters_id, ipCollectionId) values ('1447', '111', 'web', '0', '0', '26');
-
In the IpAddressesCollections table:
mysql> insert into IpAddressesCollections (ipCollectionId, ipAddressId) values ('26', '1');
-
In the IpCollections table:
mysql> insert into IpCollections (id) values ('26');
-