vCenter

 View Only
Expand all | Collapse all

Setup external postgresql-database

  • 1.  Setup external postgresql-database

    Posted Oct 22, 2007 07:00 PM
    Hi all,

    I've got a problem :-)

    I'm trying to set up Hyperic HQ 3.1.1 on a external postgresql database from scratch.
    But I got an error that a relations doesn't exist:
    /home/ubuntu/hyperic-hq-installer/installer-3.1.1/data/setup-interactive.xml:15: org.hyperic.util.NestedRuntimeException$NestedEx: Error checking for existing database: FEHLER: Relation »eam_config_props« existiert nicht


    There was a slightly different problem on JIRA:
    http://jira.hyperic.com/browse/HHQ-337?page=all

    Any hints ?

    Cheers
    Mirko


  • 2.  RE: Setup external postgresql-database

    Posted Oct 24, 2007 12:19 AM
    Hi Mirko!

    It seems you have found a bug.. Our DBUtil check to see if a table exists relies on the fact the SQLException will be in english. I have logged a bug for this:

    http://jira.hyperic.com/browse/HHQ-1154

    I'll investigate if there is a better way to do this check.. Obviously, doing a string comparison is not a good idea.

    -Ryan


  • 3.  RE: Setup external postgresql-database

    Posted Oct 24, 2007 06:46 PM
    Hi Ryan,

    thanks for your reply.
    Workaround is falling back to defaults by commenting out:
    #lc_messages = 'de_DE.UTF-8' # locale for system error message

    Do you expect any problems from one of the following parameters ?

    lc_monetary = 'de_DE.UTF-8' # locale for monetary formatting
    lc_numeric = 'de_DE.UTF-8' # locale for number formatting
    lc_time = 'de_DE.UTF-8' # locale for time formatting

    Cheers
    Mirko


  • 4.  RE: Setup external postgresql-database

    Posted Oct 24, 2007 06:54 PM
    Maybe I should have a look on the integrated postgresql configuration

    Next error on the way:

    --------------------------------------------------------------------------------
    An ERROR occurred, the installation cannot continue.
    FATAL EXCEPTION at /home/ubuntu/hyperic-hq-installer/installer-3.1.1/data/setup.xml:434: : The following error occurred while executing this line:
    /home/ubuntu/hyperic-hq-installer/installer-3.1.1/data/setup.xml:440: The following error occurred while executing this line:/home/ubuntu/hyperic-hq-installer/installer-3.1.1/data/setup.xml:554: The following error occurred while executing this line:/home/ubuntu/hyperic-hq-installer/installer-3.1.1/data/setup-db-PostgreSQL.xml:40: The following error occurred while executing this line:
    /home/ubuntu/hyperic-hq-installer/installer-3.1.1/data/setup-db-common.xml:73: The following error occurred while executing this line:
    /home/ubuntu/hyperic-hq-installer/installer-3.1.1/data/setup-db-common.xml:95: The following error occurred while executing this line:
    /home/ubuntu/hyperic-hq-installer/installer-3.1.1/data/db-upgrade.xml:28: Schema version not found!
    --------------------------------------------------------------------------------

    Message was edited by: excowboy


  • 5.  RE: Setup external postgresql-database

    Posted Oct 24, 2007 07:30 PM
    Thanks for the additional info Mirko. I have just fixed the original problem you logged, but it looks like there are other things that need to be done.

    I'll setup a PG instance using the DE locale to see if I can reproduce your second issue. I'll let you know what I find.

    -Ryan


  • 6.  RE: Setup external postgresql-database

    Posted Oct 24, 2007 08:01 PM
    Hi Ryan,

    many thanks. I'll have a look on it too, maybe not as deep as you do.
    Let me add and addional info: It doesn't matter if I create the database with UTF8 encoding or SQL_ASCII like you do. The error occurs as well.

    The error message points out an error on
    /home/ubuntu/hyperic-hq-installer/installer-3.1.1/data/setup-db-common.xml:73: The following error occurred while executing this line:
    Line 73 is
    <antcall target="upgrade-db"/>

    I think this is not necessary at this time because its a fresh install.

    btw: Maybe you can change the owner of the database sometime ;-)

    Name | Owner | Encoding
    -----------+---------+-----------
    hqdb | rmorgan | SQL_ASCII
    postgres | rmorgan | SQL_ASCII
    template0 | rmorgan | SQL_ASCII
    template1 | rmorgan | SQL_ASCII

    Cheers
    Mirko


  • 7.  RE: Setup external postgresql-database

    Posted Nov 01, 2007 11:44 PM
    Hi Mirko,

    I think my fix to http://jira.hyperic.com/browse/HHQ-1154 will get this working again. The other error you had:

    > /home/ubuntu/hyperic-hq-installer/installer-3.1.1/data/db-upgrade.xml:28: Schema version not found!

    Seems to be a different problem. When you entered in the JDBC connection URL, did you make sure to specify protocolVersion=2 as part of the connection string? For example:

    jdbc:postgresql://10.2.0.210:5432/hqdb?protocolVersion=2

    If you leave that part off, or mistype it you will get the error mentioned above. You will also see the following in your database log:

    ERROR: column "id" is of type integer but expression is of type character varying at character 29
    HINT: You will need to rewrite or cast the expression.
    STATEMENT: INSERT INTO EAM_AGENT_TYPE (ID,NAME) VALUES ($1,$2)

    Hope this resolves your issue,
    -Ryan


  • 8.  RE: Setup external postgresql-database

    Posted Nov 04, 2007 06:24 PM
    Hi Ryan,

    I had to grant my user some rights on the database. Works fine now
    Thanks for your help.

    Cheers,
    Mirko


  • 9.  RE: Setup external postgresql-database

    Posted Nov 28, 2007 08:11 AM
    Thanks, the bug has been fixed:

    http://jira.hyperic.com/browse/HHQ-1154

    Cheers,
    Mirko

    Message was edited by: excowboy


  • 10.  RE: Setup external postgresql-database

    Posted Nov 29, 2007 03:39 AM
    For anyone else curious about how to setup HQ with a external Postgres DB, Ive written up step by step instructions here:
    http://support.hyperic.com/confluence/display/DOCSHQ30/Database+Preparation


  • 11.  RE: Setup external postgresql-database

    Posted Dec 09, 2009 12:45 AM
    I get the same error message when doing a fress install from the 4.2 cross-platform installer.
    I commented out the relevent section from setup-db-common.xml to get around the problem.