Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
- Plesk shows the following error in starting the migration, where 203.0.113.2 is the IP-Address of the target server:
PLESK_ERROR: Failed to connect to target Plesk server by Plesk API: Plesk error [1006]: Access to API is disabled for 203.0.113.2
-
It is possible to telnet to the destination server on 8443 port locally and remotely. For example:
# telnet 203.0.113.3 8443
Trying 203.0.113.3...
Connected to 203.0.113.3.
Escape character is '^]'. - There are the following record in Migration debug log file:
- Logfile location on Windows:
%plesk_dir%var\modules\panel-migrator\sessions/<date_of_session>/debug.log
-
Logfile location on Linux:
/usr/local/psa/var/modules/panel-migrator/sessions/<date_of_session>/debug.log
- Logfile location on Windows:
-
CONFIG_TEXT: +|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client|||API request to https://203.0.113.2:8443/enterprise/control/agent.php
+|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client|||Request XML:
=|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client|||<?xml version="1.0" encoding="utf-8"?>
=|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client|||<packet version="1.5.2.1">
=|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client||| <server>
=|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client||| <get>
=|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client||| <stat/>
=|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client||| </get>
=|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client||| </server>
=|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client|||</packet>
=|2018-05-22_13:07:19,862|D|MT|core.utils.common.http_xml_client|||
+|2018-05-22_13:07:20,003|D|MT|core.utils.common.http_xml_client|||Response:
=|2018-05-22_13:07:20,003|D|MT|core.utils.common.http_xml_client|||<packet version="1.5.2.1">
=|2018-05-22_13:07:20,003|D|MT|core.utils.common.http_xml_client||| <system>
=|2018-05-22_13:07:20,003|D|MT|core.utils.common.http_xml_client||| <status>error</status>
=|2018-05-22_13:07:20,003|D|MT|core.utils.common.http_xml_client||| <errcode>1006</errcode>
=|2018-05-22_13:07:20,003|D|MT|core.utils.common.http_xml_client||| <errtext>Access to API is disabled for 203.0.113.2</errtext>
=|2018-05-22_13:07:20,003|D|MT|core.utils.common.http_xml_client||| </system> </packet> -
Plesk IP access policy is configured at Plesk > Tools & Settings > Restrict Administrative Access on the target server.
CONFIG_TEXT: Access to API is disabled for 203.0.113.2
Cause
The target server is not accessible by Plesk API locally.
Resolution
From Plesk:
- Go to Tools & Settings > Restrict Administrative Access (under “Security”) > Settings > select Denied from the networks that are not listed > Add Network > add IP address of the target server.
From SSH:
-
Connect to the target via SSH;
-
Access to Plesk database:
# plesk db
-
Add IP address of the target server to the list of allowed IP addresses:
mysql> insert into cp_access (type, netaddr, netmask) values ('deny' , '203.0.113.2', '255.255.255.255');
- where
203.0.113.2
- IP address of the target server.
- where
Comments
0 comments
Please sign in to leave a comment.