Wednesday, December 05, 2007

Plesk 8.2; Debian 4; Broken packages

Tried to install Plesk 8.2 onto a fresh Debian 4 install and got this irritating message from the installer that was downloaded from the Plesk website:
N) Next page; P) Go back; Q) Cancel installing;
A) Select all; D) Deselect all;
To select or deselect a component, enter its number;
Type a number or a character of desired action [N]:
Exchanging information with licensing server.
Checking whether the package dependencies are resolved.
E: Broken packages
ERROR: Unable to install packages because of package dependency problems.
Not all packages were installed.
Please, contact product technical support.
I checked out the log in /tmp/ and didn't really get that much more help apart from chat about circular unmet dependancies.

Thankfully found a helpful post that suggested adding a line to the /etc/apt/sources.list:
deb http://autoinstall.plesk.com/debian/PSA_8.2.0 etch all
And then doing an
apt-get update
apt-get upgrade
apt-get install psa
Then going back to the autoinstaller and adding everything else... worked like a dream.

Spamassassin conf

I'd previously blogged about the use of DCC, Pyzor and Razor and suggested puting the LoadModule directive in /etc/spamassassin/local.cf

Well, on review of /var/log/messages I found that SpamGuardian (Plesk) creates a link from /var/qmail/mailnames/user_prefs to the local.cf SA file. Because it uses this every time spamd runs, it doesn't like the administrative directives and creates a whole host of logged errors.

The LoadModule directives should be put in v310pre.cf and v312pre.cf instead. Check that everything still works with a spamassassin --lint and by checking in the logs.

qmail attack

I was the recipient of an attack just yesterday. 22000+ emails popped into the qmail queue and severely impacted on functionality.
ps -ax | grep qmail
tail -f /var/log/messages
tail -f /var/log/syslog
I tried to use the Plesk GUI to look at the mail queue and remove the mails - but it just timed out. So, I downloaded qmhandle and used it to remove the queued messages.

Missing table psa.exp_event

Well, after the update of Plesk by the previous method, all was not well.
During the upgrade, dpkg failed to complete the install and eventually, after removing and the re-installing the psa debs, I was back up and running.

Well, I thought I was! Whenever I tried to do anything I'd get the following message:
MySQL query failed: Table 'psa.exp_event' doesn't exist
0: /opt/psa/admin/plib/common_func.php3:211
db_query(string 'INSERT INTO exp_event (source, event_type, event_time, obj_class, obj_id, host, user, flushed) VALUES ("plesk", "created", NOW(), "mailname", "*******@*****", "xx.xxx.xxx.xxx", "admin", "false")')
1: /opt/psa/admin/plib/api-rpc/loger.php:306
Log2Expand->Log2Expand(object of type ActionLog)
2: /opt/psa/admin/plib/class.ActionLog.php:534
ActionLog->submit()
3: /opt/psa/admin/plib/mail/MailName.php:1008
Mailname->update()
4: /opt/psa/admin/htdocs/domains/mail/mail_name_preferences.php:92
Clearly, I needed to add the table psa.exp_event.
Log into the mysql table by:
sudo -s
mysql -uadmin -p`cat /etc/psa/.psa.shadow`
Choose to use the psa table
USE psa
I found two suggestions for the table schema, but neither worked: 1, 2. Finally, I found this, and after creating the table, all was fixed:
DROP TABLE IF EXISTS `exp_event`;
CREATE TABLE `exp_event` (
`id` bigint(10) unsigned NOT NULL auto_increment,
`source` enum('pa','plesk') default NULL,
`event_type` enum('started','stopped','created','updated', 'deleted', 'status_changed', 'terminated', 'flushed', 'installed', 'uninstalled', 'siteapp_added', 'siteapp_removed', 'expired', 'exceeded') NOT NULL default 'started',
`event_time` datetime NOT NULL default '0000-00-00 00:00:00',
`obj_class` enum('license', 'service', 'ip_address', 'admin_info', 'siteapp', 'session_preferences', 'client', 'client_limits', 'client_status', 'client_prefs', 'client_perms', 'client_ip_pool', 'client_limit_traffic', 'client_limit_size', 'domain', 'domain_limits', 'domain_user', 'domain_limit_traffic', 'domain_limit_size', 'domain_status', 'phosting', 'fhosting', 'db_server', 'subdomain', 'mailname', 'webuser', 'maillist', 'dns_zone', 'mailname_antivirus', 'mailname_spamfilter', 'mailname_mailgroup', 'mailname_autoresponder', 'mailname_attachment', 'dashboard_preset', 'dashboard_preset_type', 'dashboard_preset_name') NOT NULL default 'license',
`obj_id` varchar(255) character set utf8 NOT NULL default '',
`host` varchar(255) character set utf8 NOT NULL default '',
`user` varchar(255) character set ascii NOT NULL default '',
`flushed` enum('true','false') NOT NULL default 'false',
PRIMARY KEY (`id`)
);
\q

Sunday, December 02, 2007

Error: There is no release with ID PLESK_8_0_1.

I tried to run an update for my Plesk installation and was met with this error:
Error: There is no release with ID PLESK_8_0_1.

A quick google and I found this: http://kb.swsoft.com/en/2115

A quick read of the instruction on the download page told me that I didn't need a new licence to install 8.1 on an 8.0.x machine "Plesk 8.1 for Linux/Unix does not require a new product license for users upgrading from Plesk 8.0.x versions.". So, I downloaded with latest 8.1 installer with:
wget http://download1.swsoft.com/Plesk/Plesk8.1/Debian3.1/psa_installer_v3.1.2_build070419.14_os_Debian_3.1_i386
I needed to make it executable and run it, follow the instructions and I was up and running again
chmod +x installer_file_name
./installer_file_name