Symptoms
-
Plesk shows the following error when starting the migration, where 203.0.113.2 is the target's server IP Address:
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 target server on 8443 port locally and remotely. For example:
# telnet 203.0.113.2 8443
Trying 203.0.113.2...
Connected to 203.0.113.2.
Escape character is '^]'. -
The following records can be found in the migration debug log file:
-
Logfile location on Windows:
%plesk_dir%varmodulespanel-migratorsessions/<date_of_session>/debug.log
-
Logfile location on Linux:
/usr/local/psa/var/modules/panel-migrator/sessions/<date_of_session>/debug.log
-
-
+|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 on the target server: the Tools & Settings > IP Access Restriction Management > Settings > Access to Plesk with administrator's privileges option is set to Denied from the networks that are not listed.
Cause
Plesk API is unable to access the target server locally because the server's own IP address was not added to the list of allowed IP addresses.
Resolution
-
Navigate to Tools & Settings > IP Access Restriction Management
-
Allow the target server's address: click Add Network and enter the IP.
Command-line solution
-
Connect to the target server via SSH;
-
Access the Plesk database:
# plesk db
-
Add the target server's IP address to the list of allowed IP addresses:
insert into cp_access (type, netaddr, netmask) values…