Posts Tagged ‘Parallels Plesk’

Parallels Plesk hanging on login

Friday, June 27th, 2014

I recently came across a strange problem when setting up a new Windows Server running Parallels Plesk 12.

Everything was working fine to being with, and then suddenly Parallels Plesk started behaving strangely. I would select some items in a list and press remove and they would be greyed out as if the AJAX had fired in the background, but they wouldn’t be removed from the list until refreshing the page.

Wondering if this was some kind of browser problem as I was using Apple’s Safari, I fired up Mozilla’s Firefox but was somewhat surprised that I couldn’t get past the login screen.

The login page loads, but once I’d entered the username and password and pressed “Log In”, the page would just hang, loading indefinitely until it eventually times out.

The CPU and memory usage on the server were fine. The services were all running correctly. What’s going on?

After a quick look in “C:\Program Files (x86)\Parallels\Plesk\admin\logs\php_error”, it was pretty obvious that the recently installed Parallels Panel Mobile Center extension wasn’t working properly, as there were lots of errors about being unable to access files in “C:\Program Files (x86)\Parallels\Plesk\var\modules\plesk-mobile”.

Deleting the “C:\Program Files (x86)\Parallels\Plesk\var\modules\plesk-mobile” folder at least allowed me to log back in to the Parallels Plesk control panel, however the Parallels Panel Mobile Center extension couldn’t be removed.

After a bit of digging, it seems that the permissions on “C:\Program Files (x86)\Parallels\Plesk\var\modules\” aren’t set correctly out of the box and the “psaadm” user needed to be given write access to this folder in order to create or remove the files and folders for extensions when they are installed/uninstalled.

Once the permissions had been corrected, I was able to remove and then reinstall the Parallels Panel Mobile Center extension successfully.

Not able to unsuspend a domain in Parallels Plesk

Saturday, May 25th, 2013

If you are seeing the following unhelpful message when trying to unsuspend a domain in Parallels Plesk running on Windows Server:

Warning: The domain is still suspended for the following reason: This user account and user’s domain were suspended

Then you will need to use the command line domain.exe tool to manually unsuspend the domain:

“C:\Program Files (x86)\Parallels\Plesk\admin\bin\domain.exe” –on

I’ve not seen the same behaviour on a Linux based Parallels Plesk server, but that’s not to say that it doesn’t also suffer from the same problem.

Scheduled backups failing in Plesk 9.5

Saturday, October 27th, 2012

If you are using MySQL 5.5 with Parallels Plesk 9.5 then you might have noticed that scheduled backups using the built in backup utility have stopped working.

Backups manually initiated through the Parallels Plesk control panel interface run normally, but they don’t run automatically on the configured schedule. This is thanks to some compatibility issues between the Parallels “backupmng” tool and MySQL 5.5.

A quick fix for this is to adjust the “backup_day” column of the “BackupsScheduled” table in the “psa” database to change the type from “int(10) unsigned” to “int(11)” with the following SQL statement:

ALTER TABLE BackupsScheduled MODIFY COLUMN backup_day INTEGER;

Once this query has been run, you should be able to set up the scheduled backups as normal through the Parallels Plesk interface and they will run without problems or requiring manual intervention.

Blank login page with Parallels Plesk

Thursday, October 18th, 2012

A recent micro-update from Parallels seems to have broken the login page on some Parallels Plesk servers. In my case, it was a Plesk 9.5.4 server running on Linux.

If you look in the Plesk web server (“sw-cp-server”) error log at “/var/log/sw-cp-server/error_log” then you should see entries such as:

(mod_fastcgi.c.2582) FastCGI-stderr: PHP Fatal error: Call to undefined function get_failure_redirect_url() in /usr/local/psa/admin/auto_prepend/auth.php3 on line 175

The simple fix for me was to re-install the Plesk micro-updates using the autoinstaller command:

/usr/local/psa/admin/sbin/autoinstaller –reinstall-patch

Once this has finished, your Parallels Plesk login page should be working as normal again!

Parallels Plesk Atmail and Error: Password file could not be found

Monday, May 21st, 2012

When logging into the Atmail webmail interface used by Parallels Plesk, you might receive the following error:

Error: Password file could not be found

If you take a look in the log files for the Atmail vhost (/var/log/atmail/error_log) then you should see something along the lines of:

PHP Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/etc/psa-webmail/atmail/.atmail.shadow) is not within the allowed path(s): (/var/www/atmail:/var/log/atmail:/etc/psa:/tmp:/var/tmp) in /var/www/atmail/libs/Atmail/Config.php on line 6

Basically the /etc/psa-webmail/atmail/ folder isn’t on the list of directories that PHP has been told to allow and access to (the open_basedir restriction) and so when Atmail tries to open it’s shadow password file from /etc/psa-webmail/atmail/.atmail.shadow then PHP blocks the request.

The restriction itself comes from the four “php_admin_value open_basedir” lines in the /etc/httpd/conf.d/zzz_atmail_vhost.conf Apache config file, which is in turn generated from the /etc/psa-webmail/atmail/atmail_vhost.conf template.

To fix this, simply open up the /etc/psa-webmail/atmail/atmail_vhost.conf template and change the four lines that look like:

php_admin_value open_basedir “/var/www/atmail:/var/log/atmail:/etc/psa:/tmp:/var/tmp”

to be:

php_admin_value open_basedir “/var/www/atmail:/var/log/atmail:/etc/psa:/tmp:/var/tmp:/etc/psa-webmail/atmail”

Once that’s done, all you need to do is regenerate the Atmail webmail config file from the template and reload the Apache configuration with the following commands:

/usr/local/psa/admin/bin/webmailmng –disable –name=atmail
/usr/local/psa/admin/bin/webmailmng –enable –name=atmail
/sbin/service httpd reload

Missing Parallels Plesk for Linux updates

Saturday, February 11th, 2012

If you’re using Parallels Plesk 9.x with Postfix as the MTA, there appears to be a bug which can stop Plesk from displaying important updates that are available, including the micro-updates which provide important bug fixes and security updates.

If you are using the Updates section of the Plesk web interface, then no error message is displayed, so it just looks like there are no updates available. However, you can also check for updates using the Parallels autoinstaller utility from the command line:

/usr/local/psa/admin/sbin/autoinstaller –check-updates

After downloading all of the .inf3 files from Parallels, this will give you a badly translated error message:

Unable to process patch config: PSA_9.5.4/plesk-patches-9.5.4-cos5-x86_64.inf3: Failed to parse the patch file at (line 34 column 13)
Group named ‘qmail’ is not exists on this system.

Despite the qmail MTA not being installed because the Postifx MTA is being used, the Plesk autoinstaller utility (which is also used by the web interface) seems to be checking for a “qmail” group. The fix for this is incredibly simple – just create an empty ‘qmail” group:

/usr/sbin/groupadd qmail

Now if you refresh the Updates section in the Plesk web interface or re-run the Parallels autoinstaller from the command line then you should now see the available updates, which you can install in the normal manner.

Regenerate statistics in Parallels Plesk for Linux

Monday, February 6th, 2012

Every night Parallels Plesk for Linux servers run a cron job to process various log files and generate statistics. This includes generating the HTML for the AWStats or Webalizer log analysis packages used for the Plesk “web statistics” features as well as updating the disk usage and bandwidth usage for each domain.

Sometimes you need to re-run this task, such as if it failed or if you need to process a particular domain name again. One common reason for this is to correct the disk and/or bandwidth usage figures for a domain.

You can either regenerate the statistics for all domain names (the equivalent of the daily cron job) using:

/usr/local/psa/admin/sbin/statistics –calculate-all

Or you can re-generate the statistics for a single domain name (“example.com” in this case) using:

/usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=example.com

There is a similar tool in Parallels Plesk for Windows under C:\Program Files (x86)\Parallels\Plesk\admin\bin\statistics.exe, however this requires different arguments.

Unable to send attachments in Horde

Thursday, September 29th, 2011

I recently came across a bizzare issue in the version of Horde webmail shipped with Parallels Plesk 9.5.2 where it would allow you to attach files to an e-mail you are composing, but when you send the e-mail the attachment never arrives. Sending the same attachment via the Atmail webmail client or a traditional SMTP client wasn’t a problem and the mail server logs didn’t indicate that the attachment was getting stripped, so it was eveidently never getting attached to the e-mail in the first place.

For some reason Parallels Plesk doesn’t specify a seperate ErrorLog for the Horde webmail.domain.com vhost in /etc/httpd/conf.d/zzz_horde_vhost.conf so all of the logs from Horde end up in the main Apachce HTTPD error log at /var/log/httpd/error_log.

In the logs there should be PHP errors where Horde is unable to load one of it’s shared libraries that is used for processing attachments:

PHP Fatal error: Can’t load Horde/Serialize.php, open_basedir restriction. in /usr/share/psa-horde/lib/Horde/SessionObjects.php on line 134,

The easiest way to fix this is to change the relative path to the file (Horde/Serialize.php) to an asbolute path, so take a copy of /usr/share/psa-horde/lib/Horde/SessionObjects.php as a backup then open the file up and
look for two lines that say:

require_once ‘Horde/Serialize.php’;

And edit these two lines to have the full path:

require_once ‘/usr/share/psa-horde/lib/Horde/Serialize.php’;

Now all you have to do is save the file and test that Horde has started working as expected. Remember that future updates to Horde from Parallels will overwrite this file and you will have to re-apply your change.

Parallels Plesk and Atomic Secured Linux

Monday, June 27th, 2011

If you are experiencing HTTP 500 Internal Server Error messages from the license management part of the Parallels Plesk control panel when running on Atomic Secured Linux, then you are probably running into some buggy anti-reverse engineering code that Parallels have built into the Plesk software.

It seems that Parallels are using ptrace to determine if someone has attached a debugger to Plesk in order to reverse engineer it. The problem is that AtomiCorp have implemented GRSecurity ptrace protection in the Atomic Secured Linux kernel in order to prevent malicious software such as TTY sniffers and Parallels Plesk is incorrectly interpreting it’s inability to ptrace as suspicious debugging behaviour.

Until Parallels fix this behaviour in Plesk (and there is no sign that they will, given that it has been a known issue for many months), then the only thing that you can to is disable the GRSecurity ptrace feature in the Atomic Secured Linux kernel. This can be done whilst the system is running using sysctl:

sysctl -w kernel.grsecurity.harden_ptrace=0

In order to make this change permanent so that it doesn’t disappear every time you reboot your server, you will need to edit /etc/sysctl.conf and add the following line:

kernel.grsecurity.harden_ptrace = 0

Now restart the Parallels Plesk service and enjoy your error free license management 🙂

Parallels Plesk 9 and SSL certificates signed by an intermediate Certificate Authority (CA)

Wednesday, February 9th, 2011

Parallels Plesk 9 doesn’t seem to like installing certificates signed by an intermediate Certificate Authority (which is becoming more and more common and will be all certificates in the next year or two) through the SSL certificates part of the Plesk interface available to both administrators and end users.

A work around to this seems to be to install the CA bundle (both the root CA and the intermediate CA certificates) together and then install your certificate separately, otherwise you will just receive an error saying that the certificate was not signed by the certificate authority.