Archive for the ‘Plesk’ category

httpd – unable to access logs (plesk)

February 1st, 2012

For some reason, with plesk, sometimes when trying to start httpd you will find the error message “unable to access logs” in the error_log.

A work around is to add the following line to the top of 2 files (/etc/init.d/httpd and /usr/sbin/apachectl).

ulimit -n 2048
if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

PLESK – IMAP connection closed by remote host

January 25th, 2012

Had an odd issue where several computers, all macs, where located behind a router with a common IP. One of the systems could connect to the imap server, but none of the others could. After checking all the settings, and finding they where the same we proceeded to test from outside their network. All attempts to telnet worked.

After a bit of research i found the following:

  1. Mac Mail is like thunderbird, 1 imap connection uses several connections per machine.
  2. By Default, on plesk courier-imap max connections per IP is set to 4
  3. Looks like 1 mac mail client uses 4 or more connections

So to resolve the issue the following had to be done:

Edit the /etc/courier-imap/imapd file and modify the following values

MAXPERIP to 50)

Next, to enable multiple systems and connections at the same time, and not just from a single IP i also increased (in the same file)

MAXDAEMONS to 300

This would enable up to 300 concurrent connections to imap, with up to 50 from a single IP source. (you can use any values you wish for both)

Once complete i then restarted imap

/etc/init.d/courier-imap stop
/etc/init.d/courier-imap start
if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

Plesk – suexec error in logs/error_logs

July 22nd, 2011

when you look at the error log:

/var/www/vhosts/DOMAINNAME.COM/statistics/logs/error_log

You find (or something similar)

[error] [client XX.XX.XX.XX] Premature end of script headers: search.cgi, referer: http://www.DOMAINNAME.COM/
[error] [client XX.XX.XX.XX] suexec policy violation: see suexec log for more details
[error] [client XX.XX.XX.XX] Premature end of script headers: lc.cgi
[error] [client XX.XX.XX.XX] suexec policy violation: see suexec log for more details
[error] [client XX.XX.XX.XX] Premature end of script headers: lc.cgi
[error] [client XX.XX.XX.XX] suexec policy violation: see suexec log for more details
[error] [client XX.XX.XX.XX] Premature end of script headers: lc.cgi

If you see this, look in /usr/sbin/ for suexec, if it already exists move it.

mv /usr/sbin/suexec /usr/sbin/suexec.backup.XXX

and then do the following

~# cp /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec
~# chown root:apache /usr/sbin/suexec
~# chmod 4510 /usr/sbin/suexec

Note: you may have to search for psa-suexec, ie “locate psa-suexec

Now restart apache and test

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

Plesk – Upgrade to 10.X DATABASE ERROR!!! Previous product version is 10. etc…

July 21st, 2011

After upgrading plesk you are getting an error similar to this:

Trying to start service mysqld… done
Trying to establish test connection… connected
done
Trying to find psa database… version is 010110
DATABASE ERROR!!!
Previous product version is 10.9.0, but previous database
version is 010110. In most of cases it is result of
previous upgrade try failure. Please, restore previous version
from backup, and try again or contact technical support.

ERROR while trying to check database version
Check the error reason(see log file: /tmp/pp10.9.0-bootstrapper.110721.01.58.log), fix and try again

This is caused by a bad upgrade to plesk.

The first thing to do is to restore the psa DB to its pre-upgrade values. You will find the backups (made my plesk) in the following area:

/var/lib/psa/dumps/mysql.preupgrade.XXXXXXXXetc…

To restore it do:

# gunzip /var/lib/psa/dumps/mysql.preupgrade.dump.gz
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e”DROP DATABASE psa;”
mysql -f -uadmin -p`cat /etc/psa/.psa.shadow` < /var/lib/psa/dumps/mysql.preupgrade.dump

Once restored, run

/usr/local/psa/bootstrapper/pp10.XX.0-bootstrapper/bootstrapper.sh repair

where XX is the newest version available.

Once complete re-run the plesk autoinstaller/upgrade.

Note: you might need to run the bootstrapper.sh repair tool after the upgrade once more.

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

Plesk – Cron jobs not working for a domain

June 21st, 2011

When creating a cron job for a domain it is important to make sure that the user you select to run the cron as, also has shell access to the server (SSH).

If the user only has FTP access the cron’s will not work.

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz