Description of problem: When trying to install RHQ 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): RHQ 4.9.0 both Oracle and PostgreSQL How reproducible: Always Steps to Reproduce: 1. download and unzip rhq zip file; 2. in the rhq-server.properties file set database properties, bind address and rhq.autoinstall.database=overwrite 3. execute ./rhqctl install Actual results: The RHQ server is not installed and above exception is logged. Expected results: The RHQ server is properly installed. Additional info:
@bkramer: I have the exactly same problem. Did you solve your problem? Or did you find a way around? I tried to erase the schemas in the database and restart the process leaving "overwrite" but it didn't help.
This workaround works: => Drop user cascade (which erases tables, sequences, indexes, etc). => Use "auto" instead of "overwrite". => everything will be recreated from scratch.
(In reply to Bear from comment #2) > This workaround works: > => Drop user cascade (which erases tables, sequences, indexes, etc). > => Use "auto" instead of "overwrite". > => everything will be recreated from scratch. Sorry, didn't manage to reply before. Yes, that's exactly how I re-installed my JBoss ON.