Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
-
The following error is shown when starting the migration in Plesk, where 203.0.113.2 is the target server IP Address:
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 connect via
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%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
-
-
CONFIG_TEXT: D|MT|core.utils.common.http_xml_client|||API request to https://203.0.113.2:8443/enterprise/control/agent.php
D|MT|core.utils.common.http_xml_client|||Request XML:
D|MT|core.utils.common.http_xml_client|||<?xml version="1.0" encoding="utf-8"?>
D|MT|core.utils.common.http_xml_client|||<packet version="1.5.2.1">
D|MT|core.utils.common.http_xml_client||| <server>
D|MT|core.utils.common.http_xml_client||| <get>
D|MT|core.utils.common.http_xml_client||| <stat/>
D|MT|core.utils.common.http_xml_client||| </get>
D|MT|core.utils.common.http_xml_client||| </server>
D|MT|core.utils.common.http_xml_client|||</packet>
D|MT|core.utils.common.http_xml_client|||
D|MT|core.utils.common.http_xml_client|||Response:
D|MT|core.utils.common.http_xml_client|||<packet version="1.5.2.1">
D|MT|core.utils.common.http_xml_client||| <system>
D|MT|core.utils.common.http_xml_client||| <status>error</status>
D|MT|core.utils.common.http_xml_client||| <errcode>1006</errcode>
D|MT|core.utils.common.http_xml_client||| <errtext>Access to API is disabled for 203.0.113.2</errtext>
D|MT|core.utils.common.http_xml_client||| </system> </packet> -
Plesk IP access policy is configured on the target server: in the menu Tools & Settings > IP Access Restriction Management > Settings, the option Access to Plesk with administrator's privileges is set to Denied from the networks that are not listed.
Request to show more clear message with the instruction is created: https://jira.plesk.ru/browse/PMT-4573
Cause
Plesk API is unable to access the target server locally because the server's own IP address is not present in the list of allowed IP addresses.
Resolution
-
Go to Tools & Settings > IP Access Restriction Management.
-
Allow the target server IP address: click Add Network and enter the IP address.
-
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:
MYSQL_LIN: insert into cp_access (type, netaddr, netmask) values ('deny' , '203.0.113.2', '255.255.255.255');
Comments
0 comments
Please sign in to leave a comment.