Plesk database issue

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
spatton
New Forum User
New Forum User
Posts: 4
Joined: Mon Feb 15, 2010 4:52 pm

Plesk database issue

Unread post by spatton »

I'm running the atomic stuff - installed via yum, but some how my database is out of sync with my plesk software. I'm at a bit of a loss here.

Any time I try to access anything in the control panel I get this:

ERROR: PleskMainDBException
MySQL query failed: Unknown column 'guid' in 'field list'

0: /usr/local/psa/admin/plib/common_func.php3:250
db_query(string 'select `id`,`name`,`displayName`,`cr_date`,`status`,`dns_zone_id`,`htype`,`cl_id`,`limits_id`,`params_id`,`cert_rep_id`,`real_size`,`guid` from domains where `id`=33')
1: /usr/local/psa/admin/plib/class.Table.php:180
Table->select()
2: /usr/local/psa/admin/plib/class.Domain.php:147
Domain->fetchAttrsFromTable_()
3: /usr/local/psa/admin/plib/class.Domain.php:97
Domain->Domain(integer '33')
4: /usr/local/psa/admin/plib/class.PhDomain.php:77
PhDomain->PhDomain(integer '33')
5: /usr/local/psa/admin/plib/common_func.php3:2930
objectMaker(string 'PhDomain', integer '33')
6: /usr/local/psa/admin/auto_prepend/auth.php3:325


I really don't know what info you will need - but

[root@fixedgearfever db]# uname -a
Linux fixedgearfever.net 2.6.9-67.0.22.ELsmp #1 SMP Wed Jul 23 17:30:51 EDT 2008 i686 i686 i386 GNU/Linux
[root@fixedgearfever db]# rpm -q psa
psa-8.6.0-cos4.build86080722.02


Any help you can spare would be great!

Scott
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Plesk database issue

Unread post by breun »

Did this just happen spontaneously or did an upgrade fail? Plesk creates daily and preupgrade dumps of the psa database in /var/lib/psa/dumps. You should be able to restore the last know good dump and match it with the corresponding version of Plesk.
Lemonbit Internet Dedicated Server Management
spatton
New Forum User
New Forum User
Posts: 4
Joined: Mon Feb 15, 2010 4:52 pm

Re: Plesk database issue

Unread post by spatton »

No - it happened during a bad yum update experience where my parnter said yes and removed most every bit of software on the server.

I'm fairly certain the DB is 8.2 or 8.4 and the software is 8.6 - but I don't see any .sql files that address the "guid" column.

I cant view any domains as it is the domain table is affected.

If somebody could send me an export of their domain table (table definition) - I might be able to fake it. There's a windows executable to fix this, but I haven't found one for linux and I dont know enough to experiment too much.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Plesk database issue

Unread post by breun »

So a lot of software packages were removed from your server. Did you put all those back? (/var/log/yum.log* could be of help with that.)

You can check the Plesk version for your database like this:

Code: Select all

mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e "SELECT * FROM psa.misc WHERE param = 'version'"
See if that matches your Plesk version rpm -q psa. Maybe also check rpm -qa | grep build | sort to see if the Plesk packages you have installed match eachothers builds.

We don't have any Plesk 8 boxes anymore, so I can't help you there. Though I wouldn't advise starting with trying to fix up a botched database manually anyway. I'd first try to match up your database with the installed version of Plesk.
Lemonbit Internet Dedicated Server Management
spatton
New Forum User
New Forum User
Posts: 4
Joined: Mon Feb 15, 2010 4:52 pm

Re: Plesk database issue

Unread post by spatton »

Your most recent command confirms my suspicion.

mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e "SELECT * FROM psa.misc WHERE param = 'version'"

+---------+------+
| param | val |
+---------+------+
| version | 0821 |
+---------+------+

rpm -q psa
psa-8.6.0-cos4.build86080722.02

Now - I had to makes some changes, so I sort of muddled through the changes (probably not my brightest move, but I got it working and fixed the problems....)

How can I run just a db upgrade from 8.21 to 8.6?

Scott
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Plesk database issue

Unread post by breun »

I think I'd reinstall Plesk 8.2.1 and try to upgrade the usual way. Maybe you can somehow extract SQL update scripts from the packages if you think that'd be more fun.
Lemonbit Internet Dedicated Server Management
spatton
New Forum User
New Forum User
Posts: 4
Joined: Mon Feb 15, 2010 4:52 pm

Re: Plesk database issue

Unread post by spatton »

Is the re-install going to drop the existing database?
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: Plesk database issue

Unread post by breun »

AFAIK no. But backing things up is generally a good idea. :)
Lemonbit Internet Dedicated Server Management
Post Reply