Bug 985778 - Incorrect default of rhq.server.database.connection-url in rhq-server.properties
Incorrect default of rhq.server.database.connection-url in rhq-server.properties
Status: CLOSED NOTABUG
Product: RHQ Project
Classification: Other
Component: Core Server, Installer (Show other bugs)
4.8
Unspecified Unspecified
unspecified Severity urgent (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-18 04:44 EDT by Libor Zoubek
Modified: 2015-11-01 19:43 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-18 05:13:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Libor Zoubek 2013-07-18 04:44:16 EDT
Description of problem: I was facing weird issue. Before I tried to install RHQ server I wanted it to connect to postgres on remote host.

I did it by changing rhq-server.properties this way:

rhq.server.database.connection-url=jdbc:postgresql://<hostname>:5432/lzoubek1
rhq.server.database.user-name=rhqadmin
rhq.server.database.password=1eeb2f255e832171df8592078de921bc
rhq.server.database.type-mapping=PostgreSQL
rhq.server.database.server-name=<hostname>
rhq.server.database.port=5432
rhq.server.database.db-name=lzoubek1

then I installed RHQ via rhqctl, it worked fine (created tables and some initial data in postgres database and cassandra as well) but when rhqctl tried to start RHQ and rhq.ear started deploying, it was failing with long stacktrace on:

org.postgresql.util.PSQLException: ERROR: relation "rhq_server" does not exist

which seemed crazy, because installer just created those tables and they were of course present.

I found out that value of "rhq.server.database.connection-url" property was wrong. I've changed it's value to jdbc:postgres://<hostname>:5432/lzoubek1 (note postgres vs postgresql), then restarted server and it finally started to import resource types.

For some reason this cannot be reproduced when you connect to local postgres.

Version-Release number of selected component (if applicable):
>= 4.8

How reproducible: always

Expected results: change default value of rhq.server.database.connection-url to jdbc:postgres://127.0.0.1:5432/rhq

Additional Info: if we change this default, then we need to handle this in upgrade scenario. It seems that users running postgres on remote hosts were already hitting this bug.
Comment 1 Libor Zoubek 2013-07-18 05:13:47 EDT
changing to jdbc:postgres://127.0.0.1:5432/rhq does not help at all, the issue is different I'll open separate.

Note You need to log in before you can comment on or make changes to this bug.