Unable to access subscription: "Error: There is no IP address x.x.x.x in the pool"

Refers to:

  • Plesk

Created:

2016-11-16 12:39:18 UTC

Modified:

2016-12-21 18:53:44 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to access subscription: "Error: There is no IP address x.x.x.x in the pool"

Symptoms

Unable to access subscription with the following error displayed in the interface and in usr/local/psa/admin/logs/panel.log :

Error: There is no IP address x.x.x.x in the pool

alttext

Cause

Database inconsistency.

Resolution

To identify every customer affected by the problem, log into the Plesk database and run the following SQL query:

`mysql> select distinct c.id, c.pname from clients c, domains d where d.cl_id = c.id and c.pool_id = 0;
+----+---------------------+
| id | pname               |
+----+---------------------+
|  2 | customer1           |
|  3 | customer2           |
|  4 | customer3           |
|  5 | customer4           |
+----+---------------------+
4 rows in set (0.00 sec)`

To fix the problem, follow these steps (parts of the SQL queries highlighted in red should be replaced with values from the result of the previous SQL query):

1) For each customer, find out which IP addresses should be present in the customer's IP pool:

`mysql> select distinct ip.id, ip.ip_address from domains d, clients c, dom_param dp, IP_Addresses ip where ip.id = dp.val and dp.param = 'ip_addr_id' and dp.dom_id = d.id and d.cl_id = c.id and c.id = 2;
+----+------------+
| id | ip_address |
+----+------------+
|  1 | 10.39.4.39 |
+----+------------+
1 row in set (0.00 sec)`

2) Determine whether this IP address should be added to the IP pool as shared or dedicated:

mysql> select type from ip_pool where id = (select pool_id from clients where type = 'admin') and ip_address_id = 1;
+--------+
| type   |
+--------+
| shared |
+--------+
1 row in set (0.00 sec)

3) If this is the first IP being added to the customer's IP pool, find out the next available ID for the new IP pool:

mysql> select max(id) + 1 from ip_pool;
+-------------+
| max(id) + 1 |
+-------------+
|          13 |
+-------------+
1 row in set (0.00 sec)

Otherwise, use the existing IP pool ID of the customer:

mysql> select pool_id from clients where id = 2;

+---------+
| pool_id |
+---------+
|       9 |
+---------+
1 row in set (0.00 sec)

4) Add the IP address into the IP pool and, if the IP pool did not exist prior to this step, assign a pool to the customer:

 mysql> insert into ip_pool (id, ip_address_id, type) values (13, 1, 'shared');
Query OK, 1 row affected (0.05 sec)
 
mysql> update clients set pool_id = 13 where id = 2;
Query OK, 1 row affected (0.03 sec)
Rows matched: 1  Changed: 1  Warnings: 0`
Have more questions? Submit a request
Please sign in to leave a comment.