davidk_hyperic
Contributor
Contributor

Trouble upgrading server 4.1.0 -> 4.1.1

This sums it up:

[admin@<...> ~/hyperic-hq-installer]$ ./setup.sh
Initializing Hyperic HQ 4.1.1 Installation...
Loading taskdefs...
Taskdefs loaded
Choose which software to install:
1: Hyperic HQ Server
2: Hyperic HQ Agent
You may enter multiple choices, separated by commas.
1
HQ server installation path [default '/home/hyperic']:

Choices:
1: Oracle 10g/11g
2: PostgreSQL
3: MySQL 5.x
What backend database should the HQ server use? [default '1']:
3
Enter the JDBC connection URL for the MySQL 5.x database [default 'jdbc:mysql://localhost:3306/HQ']:

Enter the username to use to connect to the database:
<...>
Enter the password to use to connect to the database:
(again):
Choices:
1: Upgrade the HQ server database
2: Overwrite the HQ server database (ERASE all existing data)
3: Exit the installer
An HQ server database already exists at the JDBC connection URL.
What should be done with this database? [default '3']:
1
Loading install configuration...
Install configuration loaded.
Preparing to install...
Validating server install configuration...
Checking server webapp port...
Checking server secure webapp port...
Checking server JRMP port...
Checking server JNP port...
Checking database permissions...
Validating server DB configuration...
Installing the server...
Unpacking server to: /home/hyperic/server-4.1.1...
Creating server configuration files...
Copying binaries and libraries to server installation...
Copying server configuration file...
Copying server control file...
Copying server binaries...
Copying server libs...
Setting up server database...
Upgrading database...
--------------------------------------------------------------------------------
An ERROR occurred, the installation cannot continue.
FATAL EXCEPTION at /home/admin/hyperic-hq-installer/installer-4.1.1/data/setup.xml:401: : The following error occurred while executing this line:
/home/admin/hyperic-hq-installer/installer-4.1.1/data/setup.xml:407: The following error occurred while executing this line:
/home/admin/hyperic-hq-installer/installer-4.1.1/data/setup.xml:531: The following error occurred while executing this line:
/home/admin/hyperic-hq-installer/installer-4.1.1/data/setup-db-MySQL.xml:21: The following error occurred while executing this line:
/home/admin/hyperic-hq-installer/installer-4.1.1/data/setup-db-common.xml:95: The following error occurred while executing this line:
/home/admin/hyperic-hq-installer/installer-4.1.1/data/db-upgrade.xml:28: DBUpgrader: Error running SchemaSpec: 3.138: Error running SchemaSpecTask: org.hyperic.tools.ant.dbupgrade.SST_DirectSQL: Error executing statement desc=[null] SQL=[
alter table EAM_CPROP drop foreign key FKE5D04798CCF47F9F
] java.sql.SQLException: Error on rename of './HQ/EAM_CPROP' to './HQ/#sql2-3e78-1f' (errno: 152)
0 Kudos
5 Replies
ebailey
Enthusiast
Enthusiast

we actually had this same error - be interested to know what it means
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi guys,

could you please replace the file db-upgrade.xml in your hyperic-hq-installer/installer-4.1.1/data directory with the attached one and run the upgrade again ?
I hope that the database is not screwed due to the update failure.

Cheers,
Mirko
hypermike
Contributor
Contributor

Ok I replaced the db-upgrade.xml with the one you said to get in another forum question.
I then did another upgrade from 4.1.0 to 4.1.1 and got similar errors . SEE BELOW"

Loading install configuration...
Install configuration loaded.
Preparing to install...
Validating server install configuration...
Checking server webapp port...
Checking server secure webapp port...
Checking server JRMP port...
Checking server JNP port...
Checking database permissions...
Validating server DB configuration...
Upgrading the server...
Unpacking server to: /opt/hyperic/hq/server-4.1.1...
Creating server configuration files...
Copying binaries and libraries to server installation...
Copying server configuration file...
Copying server control file...
Copying server binaries...
Copying server libs...
Setting up server database...
Upgrading database...
--------------------------------------------------------------------------------
An ERROR occurred, the installation cannot continue.
FATAL EXCEPTION at /tmp/hyperic-hq-installer/installer-4.1.1/data/setup.xml:402: : The following error occurred while executing this line:
/tmp/hyperic-hq-installer/installer-4.1.1/data/setup.xml:416: The following error occurred while executing this line:
/tmp/hyperic-hq-installer/installer-4.1.1/data/setup.xml:531: The following error occurred while executing this line:
/tmp/hyperic-hq-installer/installer-4.1.1/data/setup-db-MySQL.xml:21: The following error occurred while executing this line:
/tmp/hyperic-hq-installer/installer-4.1.1/data/setup-db-common.xml:95: The following error occurred while executing this line:
/tmp/hyperic-hq-installer/installer-4.1.1/data/db-upgrade.xml:28: DBUpgrader: Database schema is in an inconsistent state: version=3.137 *** UPGRADE IN PROGRESS: migrating to version 3.138
--------------------------------------------------------------------------------
Deleting temporary JRE
0 Kudos
edan_hyperic
Enthusiast
Enthusiast

FWIW, I had the exact same error when upgrading from 3.2.6 to 4.1.1. I used the db-upgrade.xml provided by excowboy and after restoring the my original database (drop database hqdb; create database hqdb; reload data), the upgrade proceeded flawlessly.

The upgrade wouldn't proceed without restore as it detected it was mid-upgrade. Then I restored without dropping the tables created by the upgrade so the upgrade failed because it couldn't create the Table 'EAM_RESOURCE_EDGE' ... But I'm very happy for the replacement db-upgrade.xml as everything went fine once I cleaned up 🙂

Thanks excowboy 😉
0 Kudos
davidk_hyperic
Contributor
Contributor

Hi Mirko,

I finally found a window to try it again after a full sql dump.

I am happy to report that upgrade was smooth and I now have a 4.1.1 server.

On to 4.1.0->4.1.1 agent migration.

Dankegon!

David
0 Kudos