• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Plesk Extension Catalog installation error

ghazlewood

Basic Pleskian
I am trying to install the MagicSpam Extension in Plesk 12.5 but after I click Install I get the following error:

Error: Failed to install the extension: Executing /usr/local/psa/tmp/moduleWPmi6R/plib/scripts/pre-install.php failed: failed to open file /usr/local/psa/admin/conf/panel.ini API access is either disabled or restricted. Please edit /usr/local/psa/admin/conf/panel.ini and set enabled = on and / or add 127.0.0.1 to the allowedIPs list of comma separated values.

I looked in the panel.ini file mentioned and the only entry is:

[modSecurity]
enabled = false


I tried changing enabled to on as instructed but it made no difference.
 
Hi ghazlewood,

API access is either disabled or restricted.
pls. don't mix "[modSecurity]" with the ( possible ) options for your "[api]" - settings:

Standard settings are:
Code:
[api]    allowedIPs  
[api]    allowPlainHttpAccess    false
[api]    enabled    true
[api]    restrictInSimpleView    false

You might notice, that the "sample" panel.ini at "/usr/local/psa/admin/conf/panel.ini.sample" doesn't contain entries for "[api]" settings, so that you have to define them, if the standards doesn't fit your needs.
As you can see in your error - message:
Please edit /usr/local/psa/admin/conf/panel.ini and set enabled = on and / or add 127.0.0.1 to the allowedIPs list of comma separated values.
... the recommendation is to define "127.0.0.1" as "allowedIPs" as your example:
Code:
[api]    allowedIPs   127.0.0.1,XXX.XXX.XXX.XXX
[api]    allowPlainHttpAccess    false
[api]    enabled    true
[api]    restrictInSimpleView    false
... where XXX.XXX.XXX.XXX might be replaced with a whitelisted external server IP for example, in addition to localhost ( 127.0.0.1 ).​
 
Hi UFHH01,

Thanks for the detailed explanation, I don't quite follow the format you are using as it doesn't look like .ini formatting. Ah OK I've noticed you're quoting the settings from the Panel.ini Editor when the format of entries in the actual file is of course ini style! I didn't know about that extension until now, thanks!

I also found the documentation https://docs.plesk.com/en-US/12.5/a.../restricting-remote-access-via-xml-api.71930/ so this makes a little more sense now, but even with:

[api]
allowedIPs = 127.0.0.1
enabled = true

in /usr/local/psa/admin/conf/panel.ini and issuing a `service psa restart` the extension still fails to install.
 
The solution it seems was close to what I had previously but ended up adding the following to panel.ini

[api]
allowedIPs = 127.0.0.1
enabled = on

I also saw an error about reading the panel.ini file in the panel.log:

[2016-11-24 22:18:00] ERR [1] PHP Warning: fopen(/usr/local/psa/admin/conf/panel.ini): failed to open stream: Permission denied; File: /usr/local/psa/tmp/modulegQXwDs/plib/scripts/pre-install.php, Line: 549

So I changed the ownership of the panel.ini to go+r - and then after successful installation I returned it to the previous permissions (0600)

Hope this helps someone else!
 
Back
Top