Bug 805365 - Reinstalling via autoinstall options in rhq-server.properties does not work
Reinstalling via autoinstall options in rhq-server.properties does not work
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
x86_64 Linux
medium Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2012-03-20 22:56 EDT by Myee Riri
Modified: 2012-06-21 10:19 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 834315 (view as bug list)
Last Closed: 2012-06-21 09:38:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Myee Riri 2012-03-20 22:56:12 EDT
Description of problem:

The rhq-server.properties options


do not seem to work.

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

This is related to JON with the following version/build
Version: 3.0.0.GA
Build Number: e23441b:1ca6ad9

How reproducible:

Steps to Reproduce:
1. Install JON
2. Stop JON
3. Edit ${JON_INSTALL_DIR}/bin/rhq-server.properties
4. Ensure the following are set:
4. Delete some tables from the database
5 Start JON
Actual results:
The following exception occurs:

java.sql.SQLException: ORA-00942: table or view does not exist

Expected results:
I expect JON to reinstall automatically and overwrite the database tables as documented at


Maybe this is not intended to work for re-installations - but I think that should be explicit in the documentation.

Additional info:

Server info:
Linux xxxxx 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

Java Info:
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.10) (rhel-
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

Oracle Info:
Oracle 10g via thin JDBC connection

Let me know if you need more information, 

Comment 1 Mike Foley 2012-03-26 11:57:45 EDT
medium, no target release 

per bz triage (crouch, mfoley, asantos, loleary)
Comment 2 Heiko W. Rupp 2012-06-21 09:23:55 EDT
is this supposed to work?
Comment 3 John Mazzitelli 2012-06-21 09:38:58 EDT
(In reply to comment #2)
> Steps to Reproduce:
> 1. Install JON
> 2. Stop JON
> 3. Edit ${JON_INSTALL_DIR}/bin/rhq-server.properties
> 4. Ensure the following are set:
> rhq.autoinstall.enabled=true
> rhq.autoinstall.database=overwrite
> 4. Delete some tables from the database
> 5 Start JON

I think this is a misunderstanding of the auto-installer.

First, let me define some terms to make things clear. I will update the wiki docs with the following information to make sure the docs are more clear and more understandable.

1) Server Distribution - this is the zip distro file.
2) Installed Server Distribution - this is the Server Distribution that has been unzipped and all the server's files are located in some server installation directory that we will call <install-dir>. For example, the "Installed Server Distribution" has files like "<install-dir>/bin/rhq-server.sh" and directories like "<install-dir>/jbossas".
3) GUI Installer - this is the webapp installer.   When you run the Installed Server Distribution as it came out of box and you point a browser to localhost:7080, this is the installer you will see. You can go through the GUI Installer to install the server.
4) Auto-Installer - if you don't want to use the GUI Installer, prior to running the Installed Server Distribution, you can tweek the <install-dir>/bin/rhq-server.properties as you state above in replication procedures, and then run it. The running Installed Server Distribution will then kick off the Auto-Installer. 

Now, the Auto-Installer (as well as the GUI Installer) is only available the FIRST time you run the Installed Server Distribution. Once either the GUI Installer or Auto-Installer has finished, both the Auto-Installer and GUI Installer are turned off for the lifetime of that Installed Server Distribution.

You cannot change the properties "rhq.autoinstall.*" and expect the auto-installer to run after the GUI Installer or Auto-Installer already finished. Think about it - if that were the case, if you set "rhq.autoinstall.enabled=true", the auto-installer would run everytime you started the Installed Server Distribution! Unless, of course, you remembered to go back and re-edit that .properties file and turn it back off.

But, be that as it may, the point is - the GUI Installer and Auto-Installer are turned off once either one of those finishes the first time.

But you CAN do what you want. What you need to do is shutdown and then delete the Installed Server Distribution (via "<installed-dir>/bin/rhq-server.sh stop & rm -rf <installed-dir>" for example). Then you can unzip the Server Distribution again in the same <install-dir> location. At this point, you have a new Installed Server Distribution whose installers have not been run and are enabled. You can then go into rhq-server.properties, change it as you have above, and then run the new Installed Server Distribution.
Comment 4 John Mazzitelli 2012-06-21 10:19:10 EDT
I added this to the auto-installer wiki page:


"Also note that the auto-installer will only work the first time you start the server. Once you complete the installation (either via the auto-installation procedure or via the GUI installer), the rhq.autoinstall.* settings will be ignored and the auto-installer will be disabled. If you wish to re-install the server, you must remove the currently installed server files, unzip the original server distribution and repeat the steps as if you are installing the server for the first time."

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