• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Odd problem yesterday - key_history table?

B

Brains

Guest
Has anyone seen this one? Yesterday my server came to a grinding halt -- couldn't get in via SSH, no HTTPD, no PSA web admin -- couldn't even get a login herald on the serial console. I could ping it, and that was all. So I punted the box, and when it came back up PSA refused to start..

Long story short, psa was complaining about the key_history table not existing, which it didn't -- only the .frm file existed. I checked a few historical backups going back a couple weeks or so, and just the .frm there as well. So I said screw it, found a copy of the create script in one of my old psa upgrade folders (glad I keep 'em around), and created the table. Blank. With no rows. psa then started fine, and everything (almost) was back to normal. On to the next issue.

I checked my email to find nearly 3000 Dr.WEB failure reports. I checked qmail's queue -- over 26,000 more reports !!! :rolleyes: So I punted those out of the queue, and went back to normal.

Now, the really odd part is NOTHING has happened on the server in the past couple days, at least that I'm aware of. No upgrades, no new domains added, etc. Anyone have an idea?

Do the plesk folks ever participate on their own forums? :rolleyes:
 
Originally posted by Brains

Long story short, psa was complaining about the key_history table not existing, which it didn't -- only the .frm file existed. I checked a few historical backups going back a couple weeks or so, and just the .frm there as well. So I said screw it, found a copy of the create script in one of my old psa upgrade folders (glad I keep 'em around), and created the table.

Can you tell me the name of the create script? I need the SQL syntax to rebuild the key_history table. Thanks.
 
You'll need an update archive extracted somewhere, and within it you should find something similar to the following:

./PSA_7.5.1/rpm_RedHat_el3/base/tmp/usr/local/psa/etc/psa_db.sql

Obviously you'll look in the paths that fit your tree and OS version.

To help make it a little easier, here's the MySQL create script

Code:
-------------------------------- KeyHistory --------------------
CREATE TABLE key_history (
        id                              INT UNSIGNED AUTO_INCREMENT PRIMARY KEY
,       plesk_key_id    VARCHAR(63)
,       name                    VARCHAR(255) BINARY
,       filename                VARCHAR(255) BINARY
,       register_date   TIMESTAMP not NULL
,       update_disabled enum('false', 'true') not null default 'false'
,       options                 VARCHAR(255) BINARY
) TYPE=INNODB;
-------------------------------- /KeyHistory --------------------
 
Back
Top