Page 1 of 1

Plesk API Error Messages

Posted: Thu Apr 12, 2012 12:42 pm
by magicspam
If you are getting messages similar to:
Error retrieving version from Plesk API: Error communicating with Plesk API: are the packages psa-api and psa-api-rpc installed?
This is being caused by the Plesk upgrade script removing some files from the psa-api-rpc package. Please remove the psa-api-rpc package and reinstall using the Plesk installation script in order to replace the missing files.

Otherwise if you are getting messages similar to:
Error loading server unique id
Then the MagicSpam Interface is unable to access the Plesk API, please check each item in the following list to resolve the issue.
  • Were there any recent changes or upgrades to your Plesk server made?
  • Do you have Firewall rules enabled on the server?
    • If so - is there a rule blocking access to port 8443?
    • If so - are there rules ahead of that permitting access to port 8443 for source IP 127.0.0.1?
  • Does the file /usr/local/psa/admin/htdocs/enterprise/control/agent.php exist on your server? If not, reinstall the psa-api-rpc package
  • In the Plesk Panel - under Tool & Settings >> Security >> IP Access Restriction Management - is the default preference set to Allowed, excluding the networks in the list or Denied from the networks that are not listed.
    • if set to Allowed, excluding the networks in the list - make sure there's no network entry for the localhost (127.0.0.1)
    • if set to Denied from the networks that are not listed - add a network entry for the localhost (127.0.0.1)
  • In the Plesk Panel configuration file (/usr/local/psa/admin/conf/panel.ini), has the Plesk API been disabled or has localhost (127.0.0.1) been restricted?
    • if Plesk API disabled - allow connections to the Plesk API

      Code: Select all

      [api]
      enabled = off  (REMOVE LINE)
      
    • if Plesk API restricted localhost (127.0.0.1) - allow localhost (127.0.0.1) to access the Plesk API

      Code: Select all

      [api]
      allowedIPs = ...,127.0.0.1
      
    • For more information, please refer to Restricting Remote Access via Plesk API
  • Has your configuration of Plesk Panel been modified to not use secure HTTPS OR modified to listen on a port different than the default

Re: Plesk API Error Messages

Posted: Thu Jun 14, 2012 12:17 pm
by magicspam
In addition to the above trouble shooting steps:

We have heard reports of hosting companies overriding and disabling the API access on their customers' Plesk Panel servers. Please double check and ensure that your hosting company has not done this.

-- MagicSpam Support Team --

Re: Plesk API Error Messages

Posted: Tue Aug 06, 2019 10:21 am
by magicspam
UPDATE:

To resolve this issue within Plesk Onyx, please check and confirm that the following file exist and that the permissions are correct:

Command:
ls -la /etc/magicspam/.secret_key

Output:
-rw-r--r-- 1 magicspam magicspam 37 Jun 14 16:40 /etc/magicspam/.secret_key

Next, please enter the following command and click on disable/enable MagicSpam protection from the MagicSpam admin interface panel to resolve this issue:

/usr/local/psa/bin/secret_key --create -ip-address 127.0.0.1 > /etc/magicspam/.secret_key

Thank you,