Description of problem: When trying to install JBoss ON server with rhq.autoinstall.database=overwrite, the installation fails with the following Exception: 15:24:24,274 WARN [org.rhq.enterprise.server.installer.InstallerServiceImpl] The installer has been configured to OVERWRITE any existing data in the database. If you do install with this configuration, realize that all existing data in the database will be lost. 15:24:24,305 INFO [org.rhq.enterprise.server.installer.InstallerServiceImpl] The app server where the installation will go is found at: /home/biljana/JON_320_postgres_1/jon-server-3.2.0.GA/jbossas 15:24:24,305 INFO [org.rhq.enterprise.server.installer.InstallerServiceImpl] It looks like everything is OK and you can start the installation. 15:24:24,360 INFO [org.rhq.server.control.command.Install] The RHQ Server is ready to be upgraded by the server installer. 15:24:24,361 INFO [org.rhq.server.control.command.Install] Installing RHQ server 15:24:24,361 INFO [org.rhq.server.control.command.Install] The server installer is running 15:24:24,435 INFO [org.xnio] XNIO Version 3.0.7.GA-redhat-1 15:24:24,442 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.7.GA-redhat-1 15:24:24,452 INFO [org.jboss.remoting] JBoss Remoting version 3.2.16.GA-redhat-1 15:24:25,017 INFO [org.jboss.modules] JBoss Modules version 1.2.2.Final-redhat-1 15:24:25,101 INFO [org.rhq.enterprise.server.installer.InstallerServiceImpl] The server is preconfigured and ready for auto-install. 15:24:25,187 INFO [org.xnio] XNIO Version 3.0.7.GA-redhat-1 15:24:25,197 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.7.GA-redhat-1 15:24:25,210 INFO [org.jboss.remoting] JBoss Remoting version 3.2.16.GA-redhat-1 15:24:30,888 INFO [org.rhq.enterprise.server.installer.InstallerServiceImpl] Installing into app server version [7.2.1.Final-redhat-10] 15:24:31,354 INFO [org.rhq.enterprise.server.installer.ServerInstallUtil] Database is supported: postgresql8.4(postgresql:8.4) 15:24:31,366 INFO [org.rhq.enterprise.server.installer.InstallerServiceImpl] Database setup log file directory: /home/biljana/JON_320_postgres_1/jon-server-3.2.0.GA/logs 15:24:31,413 INFO [org.rhq.enterprise.server.installer.InstallerServiceImpl] Database schema exists but installer was told to overwrite it - a new schema will be created now. 15:24:33,905 INFO [org.rhq.core.db.setup.DBSetup] {DBSetup.uninstall.views.dropped}[0] views dropped successfully. 15:24:33,906 INFO [org.rhq.core.db.setup.DBSetup] {DBSetup.uninstall.tables.dropped}[159] tables dropped successfully. 15:24:33,906 INFO [org.rhq.core.db.setup.DBSetup] {DBSetup.uninstall.views.failed}[0] views failed to drop. 15:24:33,906 INFO [org.rhq.core.db.setup.DBSetup] {DBSetup.uninstall.tables.failed}[10] tables failed to drop. 15:24:50,773 INFO [org.rhq.core.db.setup.DBSetup] {DBSetup.setup.tables.created}[160] tables created successfully 15:24:50,773 INFO [org.rhq.core.db.setup.DBSetup] {DBSetup.setup.indexes.created}[100] indexes created successfully 15:24:50,774 INFO [org.rhq.core.db.setup.DBSetup] {DBSetup.setup.views.created}[0] views created successfully 15:24:52,682 INFO [org.rhq.core.db.setup.DBSetup] {DBSetup.setup.tables.created}[0] tables created successfully 15:24:52,682 INFO [org.rhq.core.db.setup.DBSetup] {DBSetup.setup.indexes.created}[0] indexes created successfully 15:24:52,682 INFO [org.rhq.core.db.setup.DBSetup] {DBSetup.setup.views.created}[0] views created successfully 15:24:52,706 INFO [org.rhq.enterprise.server.installer.InstallerServiceImpl] Storage cluster schema exists but installer was told to overwrite it - a the existing schema will be created now. 15:24:52,712 INFO [org.rhq.cassandra.schema.VersionManager] Preparing to drop storage schema. 15:24:52,714 INFO [org.rhq.cassandra.schema.SessionManager] Initializing session for [username: rmgwwtdg, cqlPort: 9142, nodes: [bkramerlt.usersys.redhat.com]] 15:24:52,886 INFO [org.rhq.cassandra.schema.AbstractManager] Shutting down existing cluster connections 15:24:52,887 INFO [org.rhq.cassandra.schema.SessionManager] Shutting down cluster 15:24:52,887 INFO [org.rhq.cassandra.schema.SessionManager] Initializing session for [username: cassandra, cqlPort: 9142, nodes: [bkramerlt.usersys.redhat.com]] 15:24:53,622 INFO [org.rhq.cassandra.schema.VersionManager] Storage schema does not exist. Drop operation not required. 15:24:53,638 INFO [org.rhq.cassandra.schema.VersionManager] RHQ admin user does not exist on the storage cluster. Drop operation not required. 15:24:53,639 INFO [org.rhq.cassandra.schema.VersionManager] Preparing to check storage schema compatibility. 15:24:53,650 ERROR [org.rhq.cassandra.schema.VersionManager] Storage cluster schema not installed. Please re-run the server installer to install the storage cluster schema properly. 15:24:53,651 INFO [org.rhq.cassandra.schema.VersionManager] Completed storage schema compatibility check. 15:24:53,652 ERROR [org.rhq.enterprise.server.installer.InstallerServiceImpl] Could not complete storage cluster schema installation: Storage schema is not properly installed. Please re-run the server installer to install storage schema.: java.lang.RuntimeException: org.rhq.cassandra.schema.exception.SchemaNotInstalledException: Storage schema is not properly installed. Please re-run the server installer to install storage schema. at org.rhq.cassandra.schema.VersionManager.checkCompatibility(VersionManager.java:286) [rhq-cassandra-schema-4.9.0.JON320GA.jar:4.9.0.JON320GA] at org.rhq.cassandra.schema.SchemaManager.checkCompatibility(SchemaManager.java:112) [rhq-cassandra-schema-4.9.0.JON320GA.jar:4.9.0.JON320GA] at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:557) [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_15] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_15] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_15] at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_15] 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: org.rhq.cassandra.schema.exception.SchemaNotInstalledException: Storage schema is not properly installed. Please re-run the server installer to install storage schema. at org.rhq.cassandra.schema.VersionManager.checkCompatibility(VersionManager.java:261) [rhq-cassandra-schema-4.9.0.JON320GA.jar:4.9.0.JON320GA] ... 11 more 15:24:53,654 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: Storage schema is not properly installed. Please re-run the server installer to install storage schema. 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_15] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_15] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_15] at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_15] 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.RuntimeException: org.rhq.cassandra.schema.exception.SchemaNotInstalledException: Storage schema is not properly installed. Please re-run the server installer to install storage schema. at org.rhq.cassandra.schema.VersionManager.checkCompatibility(VersionManager.java:286) [rhq-cassandra-schema-4.9.0.JON320GA.jar:4.9.0.JON320GA] at org.rhq.cassandra.schema.SchemaManager.checkCompatibility(SchemaManager.java:112) [rhq-cassandra-schema-4.9.0.JON320GA.jar:4.9.0.JON320GA] at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:557) [rhq-installer-util-4.9.0.JON320GA.jar:4.9.0.JON320GA] ... 9 more Caused by: org.rhq.cassandra.schema.exception.SchemaNotInstalledException: Storage schema is not properly installed. Please re-run the server installer to install storage schema. at org.rhq.cassandra.schema.VersionManager.checkCompatibility(VersionManager.java:261) [rhq-cassandra-schema-4.9.0.JON320GA.jar:4.9.0.JON320GA] ... 11 more Version-Release number of selected component (if applicable): JBoss ON 320 both Oracle and PostgreSQL How reproducible: Always Steps to Reproduce: 1. download and unzip jon-server-3.2.0.GA.zip 2. in the rhq-server.properties file set database properties, bind address and rhq.autoinstall.database=overwrite 3. execute ./rhqctl install Actual results: The JBoss ON server is not installed and above exception is logged. Expected results: The JBoss ON server is properly installed. Additional info:
Fixed in master: commit e7c5e42a0b1aff09242c808a967316b8bc798263 Author: Michael Burman <miburman> Date: Wed Sep 3 17:04:34 2014 +0300 [BZ 1063382] Drop potential stale connection so authenticationFailure is catched correctly to force reinstall of schema
Cherry-picked over to release/jon3.3.x commit 396bc486052c788109e76e376b8b161297316da2 Author: Michael Burman <miburman> Date: Wed Sep 3 17:04:34 2014 +0300 [BZ 1063382] Drop potential stale connection so authenticationFailure is catched correctly to force reinstall of schema (cherry picked from commit e7c5e42a0b1aff09242c808a967316b8bc798263) Signed-off-by: Thomas Segismont <tsegismo>
Moving to ON_QA as available for test with the following brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=385149
Verified on Version : 3.3.0.ER03 Build Number : 4aefe39:44e33a4