Bug 1051299 - Installer fails with NullPointerException when rhq.storage.nodes is undefined
Summary: Installer fails with NullPointerException when rhq.storage.nodes is undefined
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Installer
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: DR01
: JON 3.3.0
Assignee: Stefan Negrea
QA Contact: Sunil Kondkar
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-10 02:43 UTC by Larry O'Leary
Modified: 2018-12-04 16:54 UTC (History)
3 users (show)

(edit)
When a user attempted to install a JBoss ON server with rhq.storage.nodes commented out or removed from rhq-server.properties, the installation failed if the installer was not performing a storage node installation as well.  Property checking is now improved to produce a more useful error output. The message is identical to the message displayed when the cluster is not available, and points the user to several possible root causes to assist with their investigations.
Clone Of:
(edit)
Last Closed: 2014-12-11 14:05:14 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 666833 None None None Never

Description Larry O'Leary 2014-01-10 02:43:21 UTC
Description of problem:
When attempting to install a JBoss ON server with rhq.storage.nodes commented out or removed form rhq-server.properties, the installation fails if the installer is not performing a storage node installation as well.

The failure and its message is not descriptive and meaningless to the user.

The installer will now exit due to previous errors: java.lang.Exception: Could not complete storage cluster schema installation: java.lang.NullPointerException

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

How reproducible:
Always

Steps to Reproduce:
1. Remove rhq.storage.nodes from rhq-server.properties
2. Run: rhqctl install --server

Actual results:
Install is aborted:

    ERROR [org.rhq.enterprise.server.installer.InstallerServiceImpl] Could not complete storage cluster schema installation: java.lang.NullPointerException: java.lang.NullPointerException
        at org.rhq.enterprise.server.installer.InstallerServiceImpl.parseNodeInformation(InstallerServiceImpl.java:1233) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at org.rhq.enterprise.server.installer.InstallerServiceImpl.createStorageNodeSchemaManager(InstallerServiceImpl.java:1241) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:547) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at org.rhq.enterprise.server.installer.InstallerServiceImpl.install(InstallerServiceImpl.java:316) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at org.rhq.enterprise.server.installer.Installer.doInstall(Installer.java:116) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at org.rhq.enterprise.server.installer.Installer.main(Installer.java:57) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_20]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_20]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_20]
        at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_20]
        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]
    ERROR [org.rhq.enterprise.server.installer.Installer] The installer will now exit due to previous errors: java.lang.Exception: Could not complete storage cluster schema installation: java.lang.NullPointerException
        at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:584) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at org.rhq.enterprise.server.installer.InstallerServiceImpl.install(InstallerServiceImpl.java:316) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at org.rhq.enterprise.server.installer.Installer.doInstall(Installer.java:116) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at org.rhq.enterprise.server.installer.Installer.main(Installer.java:57) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_20]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_20]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_20]
        at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_20]
        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]
    Caused by: java.lang.NullPointerException
        at org.rhq.enterprise.server.installer.InstallerServiceImpl.parseNodeInformation(InstallerServiceImpl.java:1233) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at org.rhq.enterprise.server.installer.InstallerServiceImpl.createStorageNodeSchemaManager(InstallerServiceImpl.java:1241) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:547) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA]
        ... 9 more

Expected results:
Install should fail indicating that either the rhq.storage.nodes property must be specified in rhq-server.properties or a storage node installation needs to be performed using the install command's --storage argument.

Additional info:
Not sure if there should be some nice way to recover from this gracefully. Considering that we have access to the database it seems that we should be able to determine what the correct storage node configuration is. If a storage node is not configured based on what we see in the database then we should produce a meaningful error stating that a storage node was not found and must first be installed and/or specified using the rhq.storage.nodes server configuration property.

Comment 1 Mike Foley 2014-01-10 13:13:07 UTC
made correction to the "version" field, setting it from jon 3.1.2 to jon 3.2

Comment 3 Stefan Negrea 2014-06-09 14:43:04 UTC
Updated the property checking and produce a more useful error message on error. The message is identical to the message displayed when the cluster is not available and points the user to serveral culprits.

pull request merged into master:
https://github.com/rhq-project/rhq/pull/47

Comment 4 Simeon Pinder 2014-07-31 15:52:38 UTC
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993

Comment 5 Sunil Kondkar 2014-08-06 11:37:18 UTC
Verified on JON 3.3 DR01 build.

Install fails with below message:

16:58:08,579 ERROR [org.rhq.enterprise.server.installer.InstallerServiceImpl] Failed to connect to the storage cluster. Please check the following:
        1) At least one storage node is running
        2) The rhq.storage.nodes property specifies the correct hostname/address of at least one storage node
        3) The rhq.storage.cql-port property has the correct value

16:58:08,581 ERROR [org.rhq.enterprise.server.installer.Installer] The installer will now exit due to previous errors: java.lang.Exception: Could not connect to the storage cluster: rhq.storage.nodes not set.


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