On 13 Jul 2011, at 16:25, Mike Suter wrote:

(posted to Opsview forum but am not seeing any traffic there)

I'm trying to virtualize an Opsview instance (master server only, no slaves), from a physical server (32-bit CentOS 5.5 + Opsview 3.91) to a virtual guest (64-bit CentOS 5.6 + Opsview 3.11.3) running under KVM.

Got everything installed and migrated the data (did the export/import migration procedure in the wiki in case the 32-bit to 64-bit move affected things). Everything went pretty smoothly until I ran upgradedb.pl - it gave this error:


[nagios@monitor ~]$ /usr/local/nagios/installer/upgradedb.pl
Fri Jul 8 12:15:29 2011: Starting for opsview
Opsview database already up to date
Fri Jul 8 12:15:29 2011: Finished for opsview
Upgrading Nagios part of Runtime database
Fri Jul 8 12:15:29 2011: Starting for runtime-nagios
Upgrading Opsview part of Runtime database
Fri Jul 8 12:15:29 2011: Starting for runtime-opsview
Fri Jul 8 12:15:29 2011: DB at version 3.9.0
Adding opsview_contacts table
DBD::mysql::db do failed: Table 'opsview_contacts' already exists [for Statement "
CREATE TABLE opsview_contacts (
id INT,
contact_object_id INT,
name varchar(128) NOT NULL,
PRIMARY KEY (id),
INDEX (contact_object_id, id)
) ENGINE=InnoDB
"] at /usr/local/nagios/installer/upgradedb_runtime.pl line 735.
Fri Jul 8 12:15:29 2011: Finished for runtime-opsview
Fri Jul 8 12:15:29 2011: Finished for runtime-nagios
upgrade failed at /usr/local/nagios/installer/upgradedb.pl line 35.

I commented that create table portion of the code, and it went on to error on a subsequent create table - commented that, and it again went to another similar error on a different table.

When I eventually commented all the code portions that were attempting to create duplicate tables, I got Opsview running in the VM, but the config info was incomplete - all hosts, groups, etc would appear in the config area, but the host groups overview for example was empty. Regenerating the config didn't change this.

Any help or suggestions would be greatly appreciated!

The errors you are seeing would imply a you restored the old opsview database over a newer version of the database where the tables already exist, rather than restore to am empty database.  When the upgrade scripts tries to create the tables they are already there.

I would suggest you drop the database on the db server, restore it again and then run the upgrade script.

  Duncs

-- 
Duncan Ferguson
Senior Developer/Support Engineer





Global Headquarters: Unit 69 Suttons Business Park | Reading | Berkshire | RG6 1AZ | UK

UK:      +44 (0) 845 057 7887
USA:     +1 866 879 9184
Fax:       +44 (0) 1189 074 071
Skype:  duncan_j_ferguson
Web:     www.opsview.com

This e-mail is confidential, intended only for the named recipient(s) above and may contain information that is privileged and confidential. If you receive this message in error, or are not the named recipient(s), please notify the sender at the phone number above, do not copy this message, do not disclose its contents to anyone, and delete this e-mail message from your computer. Although we routinely screens for viruses, addressees should scan this e-mail and any attachments for viruses. Opsera makes no representation or warranty as to the absence of viruses in this e-mail or any attachments.

_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to