Bug 1019809 - Unable to install rhq server with oracle db
Unable to install rhq server with oracle db
Product: JBoss Operations Network
Classification: JBoss
Component: Installer (Show other bugs)
JON 3.2
Unspecified Unspecified
urgent Severity urgent
: ER03
: JON 3.2.0
Assigned To: Jay Shaughnessy
Mike Foley
: Documentation
Depends On:
Blocks: 1012435
  Show dependency treegraph
Reported: 2013-10-16 08:50 EDT by Filip Brychta
Modified: 2014-02-12 06:31 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-02 15:36:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
rhq server properties (14.72 KB, text/plain)
2013-10-16 09:05 EDT, Filip Brychta
no flags Details

  None (edit)
Description Filip Brychta 2013-10-16 08:50:13 EDT
Description of problem:
Installation of rhq server with oracle db fails probably because of incorrect validation of rhq-server.properties (properties are correct but installer throws validation error).

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

How reproducible:

Steps to Reproduce:
1. have a clean environment (rm -rf ~/.java/.userPrefs/rhq-*), oracle db is configured and running
2. unzip jon-server-3.2.0.ER3.zip
3. open jon-server-3.2.0.ER3/bin/rhq-server.properties
4. comment out properties related to PostgreSQL database
5. uncomment and set up properties related to Oracle database
6. ./rhqctl install (fill in required jboss.bind.address)

Actual results:
Installer throws following exception and then endlessly waits for server to initialize.

08:00:57,901 ERROR [org.rhq.enterprise.server.installer.Installer] An error occurred: java.lang.Exception: Validation errors:
[rhq.server.database.port] must exist and be set to a number : []
[rhq.server.database.db-name] must exist and be set to a valid string value
[rhq.server.database.server-name] must exist and be set to a valid string value

	at org.rhq.enterprise.server.installer.ServerProperties.validate(ServerProperties.java:316) [rhq-installer-util-4.9.0.JON320ER3.jar:4.9.0.JON320ER3]
	at org.rhq.enterprise.server.installer.ServerProperties.validate(ServerProperties.java:258) [rhq-installer-util-4.9.0.JON320ER3.jar:4.9.0.JON320ER3]
	at org.rhq.enterprise.server.installer.InstallerServiceImpl.saveServerProperties(InstallerServiceImpl.java:671) [rhq-installer-util-4.9.0.JON320ER3.jar:4.9.0.JON320ER3]
	at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:479) [rhq-installer-util-4.9.0.JON320ER3.jar:4.9.0.JON320ER3]
	at org.rhq.enterprise.server.installer.InstallerServiceImpl.install(InstallerServiceImpl.java:306) [rhq-installer-util-4.9.0.JON320ER3.jar:4.9.0.JON320ER3]
	at org.rhq.enterprise.server.installer.Installer.doInstall(Installer.java:116) [rhq-installer-util-4.9.0.JON320ER3.jar:4.9.0.JON320ER3]
	at org.rhq.enterprise.server.installer.Installer.main(Installer.java:57) [rhq-installer-util-4.9.0.JON320ER3.jar:4.9.0.JON320ER3]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]
	at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]
	at org.jboss.modules.Module.run(Module.java:270) [jboss-modules.jar:1.2.2.Final-redhat-1]
	at org.jboss.modules.Main.main(Main.java:411) [jboss-modules.jar:1.2.2.Final-redhat-1]

Expected results:
Installation works

Additional info:
This issue could be divided into following parts:
1- Oracle database section in rhq-server.properties has some of the properties set by default to unused (e.g. rhq.server.database.port=unused) but validator throws exception during installation.
2- Upgrade: these properties are not set in previous versions of jon as well so the upgrade process fails because of the validation.
3- Validation fails event though the properties are correct.
Comment 1 Filip Brychta 2013-10-16 09:05:15 EDT
Created attachment 812912 [details]
rhq server properties
Comment 4 Jay Shaughnessy 2013-10-16 16:00:17 EDT
fix has two commits...

release/jon3.2.x commit 5ab88813d7fb342ae08fd78d22a905867a6610bd
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Wed Oct 16 12:18:42 2013 -0400

    Handle the unused oracle database properties.  Note that the properties
    still require values, but the preset "unused" values are now OK.  Updated
    the comments in rhq-server.properties to hopefully be more clear for
    cherry-pick master e90767fc90dd7e2ca77e9097f5d193479007c06d

release/jon3.2.x commit 136fc88af020482453bbfd2da4b84ec6fc472789
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Wed Oct 16 15:57:46 2013 -0400

    Bug 1019809 - Unable to install rhq server with oracle db
    Second commit for this bug.
    Handle the fact that we were clearing the three relevant properties during
    server install on oracle, which then failed a late-stage validation.
    Cherry-pick master: dd24e958a5b72fd49520faef8714d9713014b656
Comment 6 Simeon Pinder 2013-10-17 02:56:04 EDT
Moving to ON_QA as available for test in ER3 respin brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=300341
Comment 7 Filip Brychta 2013-10-17 04:34:16 EDT
Verified on
Version: 3.2.0.ER3
Build Number: c0742ed:90dd474

Installation works for both, the oracle and postgres

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