Optic_hyperic
Contributor
Contributor

Migrate to external PostgreSQL?

Jump to solution
I have a substantial external PostgreSQL 8.2.3 environment I'd like to migrate Hyperic to from the internal 8.1.2 database. Some quick testing has shown that our 8.2.3 environment is orders of magnitude faster than the built-in - especially on certain functions. However, simply changing the JDBC strings and applying some edits to server.xml seems to not be doing the trick - HQ complains that it cannot open the connection. I verified that the data between the two, including users, copied cleanly. What exact steps do I need to take to get this to work, starting from scratch?
0 Kudos
1 Solution

Accepted Solutions
ama_hyperic
Hot Shot
Hot Shot
The embedded postgres DB is binary prebuilt for the lowest common denominator.

Starting from scratch, it'd be good to skim through these two sections in the wiki:

http://support.hyperic.com/confluence/display/DOCSHQ30/Database+Preparation
http://support.hyperic.com/confluence/display/DOCSHQ30/Full+Installation+Guide

You'll want to read the PostgreSQL Preparation part in the DB prep guide and the section on the -full option for the install in the Full install guide.

In Short you'll need to change some configurations on your external postgres DB and then run the installer with the -full option and setup the external DB for HQ there.

I would also re-verify your data afterwards.

View solution in original post

0 Kudos
4 Replies
ama_hyperic
Hot Shot
Hot Shot
The embedded postgres DB is binary prebuilt for the lowest common denominator.

Starting from scratch, it'd be good to skim through these two sections in the wiki:

http://support.hyperic.com/confluence/display/DOCSHQ30/Database+Preparation
http://support.hyperic.com/confluence/display/DOCSHQ30/Full+Installation+Guide

You'll want to read the PostgreSQL Preparation part in the DB prep guide and the section on the -full option for the install in the Full install guide.

In Short you'll need to change some configurations on your external postgres DB and then run the installer with the -full option and setup the external DB for HQ there.

I would also re-verify your data afterwards.
0 Kudos
Optic_hyperic
Contributor
Contributor
--------------------------------------------------------------------------------
An ERROR occurred, the installation cannot continue.
FATAL EXCEPTION at /export/home/hyperic/hyperic-hq-installer/installer-3.1.0/data/setup.xml:142: : The following error occurred while executing this line:
/export/home/hyperic/hyperic-hq-installer/installer-3.1.0/data/setup-interactive.xml:15: org.hyperic.util.NestedRuntimeException$NestedEx: Error checking for existing database: Backend start-up failed: FATAL: database "HQ" does not exist.

(pgadmin@[tdpg03]:5432) 13:40:46 [template1]
# \l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
hq | hqadmin | SQL_ASCII
hyperichq | hqadmin | SQL_ASCII
postgres | postgres | SQL_ASCII
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(5 rows)


Whoops?
0 Kudos
JohnMarkOrg
Hot Shot
Hot Shot
Note upper vs. lower case.

I've run into that problem before, too.

And by the way, 3.1.1 is out now - you might want to grab that one
because of better performance.

-John Mark


Optic wrote:
> --------------------------------------------------------------------------------
> An ERROR occurred, the installation cannot continue.
> FATAL EXCEPTION at /export/home/hyperic/hyperic-hq-installer/installer-3.1.0/data/setup.xml:142: : The following error occurred while executing this line:
> /export/home/hyperic/hyperic-hq-installer/installer-3.1.0/data/setup-interactive.xml:15: org.hyperic.util.NestedRuntimeException$NestedEx: Error checking for existing database: Backend start-up failed: FATAL: database "HQ" does not exist.
>
> (pgadmin@[tdpg03]:5432) 13:40:46 [template1]
> # \l
> List of databases
> Name | Owner | Encoding
> -----------+----------+-----------
> hq | hqadmin | SQL_ASCII
> hyperichq | hqadmin | SQL_ASCII
> postgres | postgres | SQL_ASCII
> template0 | postgres | SQL_ASCII
> template1 | postgres | SQL_ASCII
> (5 rows)
>
>
> Whoops?



Optic_hyperic
Contributor
Contributor
Ah, yeah. My Monday is never ending. I completely forgot jdbc's case sensitive. Dunce cap firmly on head now.

Oh wow, except for one little thing.. it's STILL starting the internal database. No joke.

manticore:hyperic> server/bin/hq-server.sh start
Starting HQ server...
Removing stale pid file /opt/local/hyperic/server-3.1.1/logs/hq-server.pid
Initializing HQ server configuration...
Checking jboss jndi port...
Checking jboss mbean port...
Removing stale pid file /opt/local/hyperic/server-3.1.1/hqdb/data/postmaster.pid
Starting HQ built-in database...
HQ built-in database started.
Booting the HQ server...
HQ server booted.
Login to HQ at: http://127.0.0.1:7080/

manticore:hyperic> grep jdbc hq-server.conf
server.database-url=jdbc:postgresql://localhost:5432/hq?protocolVersion=2

manticore:hyperic> ps -ef |grep hyperic|grep postmaster
hyperic 4917 4916 0 14:31:10 pts/2 0:00 /opt/local/hyperic/server-3.1.1/hqdb/bin/postmaster -D /opt/local/hyperic/serve
hyperic 4900 1868 0 14:31:08 pts/2 0:00 /opt/local/hyperic/server-3.1.1/hqdb/bin/postmaster -D /opt/local/hyperic/serve
hyperic 4916 4900 0 14:31:10 pts/2 0:00 /opt/local/hyperic/server-3.1.1/hqdb/bin/postmaster -D /opt/local/hyperic/serve
hyperic 5147 4757 0 14:33:24 pts/2 0:00 grep postmaster
hyperic 4915 4900 0 14:31:10 pts/2 0:00 /opt/local/hyperic/server-3.1.1/hqdb/bin/postmaster -D /opt/local/hyperic/serve

It is using the external, so why is it still starting the internal?
0 Kudos