Could not complete Cassandra schema installation (RHQ 4.8.0)
lukasz74nj Aug 22, 2013 12:25 PMHi,
I'm getting below exeption when running "rhqctl install" script to setup an initial installation of RHQ:
11:59:11,831 INFO [org.rhq.enterprise.server.installer.InstallerServiceImpl] Cassandra schema exists but installer was told to overwrite it - a the existing schema will be created now.
11:59:11,841 INFO [org.rhq.cassandra.schema.VersionManager] Preparing to drop RHQ schema
11:59:11,842 INFO [org.rhq.cassandra.schema.AbstractManager] Initializing session to connect to X.X.X.X
11:59:12,041 INFO [org.rhq.cassandra.schema.AbstractManager] Shutting down connections
11:59:12,042 ERROR [org.rhq.enterprise.server.installer.InstallerServiceImpl] Could not complete Cassandra schema installation: java.lang.NullPointerException: java.lang.NullPointerException
at org.rhq.cassandra.schema.AbstractManager.shutdown(AbstractManager.java:251) [rhq-cassandra-schema-4.8.0.jar:4.8.0]
at org.rhq.cassandra.schema.VersionManager.drop(VersionManager.java:142) [rhq-cassandra-schema-4.8.0.jar:4.8.0]
at org.rhq.cassandra.schema.SchemaManager.drop(SchemaManager.java:93) [rhq-cassandra-schema-4.8.0.jar:4.8.0]
at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:486) [rhq-installer-util-4.8.0.jar:4.8.0]
at org.rhq.enterprise.server.installer.InstallerServiceImpl.install(InstallerServiceImpl.java:258) [rhq-installer-util-4.8.0.jar:4.8.0]
at org.rhq.enterprise.server.installer.Installer.doInstall(Installer.java:115) [rhq-installer-util-4.8.0.jar:4.8.0]
at org.rhq.enterprise.server.installer.Installer.main(Installer.java:56) [rhq-installer-util-4.8.0.jar:4.8.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_25]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_25]
at org.jboss.modules.Module.run(Module.java:262) [jboss-modules.jar:1.2.0.CR1]
at org.jboss.modules.Main.main(Main.java:329) [jboss-modules.jar:1.2.0.CR1]
As I wanted to drop the schema, I set the "rhq.autoinstall.database" property to "overwrite" in rhq-server.properties.
How to fix this? RHQ version is 5.8.0.
So far, the RHQ setup process has been very flustrating for me. Also, I had to define below JVM property (in both scripts and Java Service Wrapper configuration files) to fix connection reset errors when using Oracle (the Oracle driver requires a random number generator to encrypt user credentials and on a server system there is not enough entropy to generate random numbers using the default generator):
-Djava.security.egd=file:///dev/urandom
It wouldn't hurt if the above property was defined by default. Otherwise, RHQ will not work on a server system when using Oracle (at least not with the 11.2.0.3 version of the JDBC driver).
Thanks,
Lukasz