Bug 970917

Summary: Installation via rhqctl install fails with Authentication error
Product: [Other] RHQ Project Reporter: Filip Brychta <fbrychta>
Component: InstallerAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.8CC: hrupp, jkremser, lzoubek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-07 08:40:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 951619    

Description Filip Brychta 2013-06-05 08:23:24 UTC
Description of problem:
$Summary
Cassandra is probably configured incorrectly during the installation. Predefined rhq.cassandra.username/rhq.cassandra.password in rhq-server.properties (rhqadmin/rhqadmin) don't work. When i change rhq.cassandra.username/rhq.cassandra.password in rhq-server.properties to cassandra/cassandra, this issue disappears.

Version-Release number of selected component (if applicable):
0ce256bb8e1a22058b0b58034eb3eb094bbbaf4b
http://hudson.qa.jboss.com/hudson/view/RHQ/job/rhq-master-gwt-locales/lastSuccessfulBuild/   Build #733 (Jun 5, 2013 1:02:18 AM)

How reproducible:
Always

Steps to Reproduce:
1. have a clean environment
2. create /var/lib/rhq with relevant permissions for non-root user
3. unzip rhq-server-4.8.0-SNAPSHOT.zip
4. cd rhq-server-4.8.0-SNAPSHOT/bin/
5. chmod +x rhqctl
6. ./rhq-server.sh start
7. ./rhqctl install

Actual results:
04:00:54,770 ERROR [org.rhq.enterprise.server.installer.Installer] An error occurred: java.lang.Exception: Could not complete Cassandra schema installation: Authentication error on host fbry-test.bc.jonqe.lab.eng.bos.redhat.com/10.16.23.154: Username and/or password are incorrect
	at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:497) [rhq-installer-util-4.8.0-SNAPSHOT.jar:4.8.0-SNAPSHOT]
	at org.rhq.enterprise.server.installer.InstallerServiceImpl.install(InstallerServiceImpl.java:258) [rhq-installer-util-4.8.0-SNAPSHOT.jar:4.8.0-SNAPSHOT]
	at org.rhq.enterprise.server.installer.Installer.doInstall(Installer.java:115) [rhq-installer-util-4.8.0-SNAPSHOT.jar:4.8.0-SNAPSHOT]
	at org.rhq.enterprise.server.installer.Installer.main(Installer.java:56) [rhq-installer-util-4.8.0-SNAPSHOT.jar:4.8.0-SNAPSHOT]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]
	at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]
	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]
Caused by: com.datastax.driver.core.exceptions.AuthenticationException: Authentication error on host fbry-test.bc.jonqe.lab.eng.bos.redhat.com/10.16.23.154: Username and/or password are incorrect
	at com.datastax.driver.core.Connection.initializeTransport(Connection.java:157) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.Connection.<init>(Connection.java:118) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.Connection.<init>(Connection.java:51) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.Connection$Factory.open(Connection.java:376) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:207) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:170) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:87) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:576) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.Cluster$Manager.access$100(Cluster.java:520) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.Cluster.<init>(Cluster.java:67) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:94) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:501) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
	at org.rhq.cassandra.util.ClusterBuilder.build(ClusterBuilder.java:100) [rhq-cassandra-util-4.8.0-SNAPSHOT.jar:4.8.0-SNAPSHOT]
	at org.rhq.cassandra.schema.AbstractManager.initCluster(AbstractManager.java:238) [rhq-cassandra-schema-4.8.0-SNAPSHOT.jar:4.8.0-SNAPSHOT]
	at org.rhq.cassandra.schema.AbstractManager.<init>(AbstractManager.java:87) [rhq-cassandra-schema-4.8.0-SNAPSHOT.jar:4.8.0-SNAPSHOT]
	at org.rhq.cassandra.schema.VersionManager.<init>(VersionManager.java:67) [rhq-cassandra-schema-4.8.0-SNAPSHOT.jar:4.8.0-SNAPSHOT]
	at org.rhq.cassandra.schema.SchemaManager.install(SchemaManager.java:63) [rhq-cassandra-schema-4.8.0-SNAPSHOT.jar:4.8.0-SNAPSHOT]
	at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:489) [rhq-installer-util-4.8.0-SNAPSHOT.jar:4.8.0-SNAPSHOT]
	... 9 more


Expected results:
No error

Comment 3 Jirka Kremser 2013-06-05 14:30:45 UTC
What happens if you omit the sixth step? i.e. run just ./rhqctl install

Comment 4 Filip Brychta 2013-06-05 14:56:24 UTC
(In reply to Jirka Kremser from comment #3)
> What happens if you omit the sixth step? i.e. run just ./rhqctl install

Without step 6:
10:50:41,161 ERROR [org.rhq.enterprise.server.installer.Installer] An error occurred: java.lang.Exception: Cannot obtain client connection to the RHQ app server!!

This is already known bug 967525 so the step 6 is our workaround for this bug.

Comment 5 Filip Brychta 2013-06-06 07:48:16 UTC
Update:
The issue disappeared on the latest master build Version: 4.8.0-SNAPSHOT
Build Number: 9c0489c Leaving it open just in case it was only coincidence. I will close it after several successful builds.

Comment 6 Filip Brychta 2013-06-07 08:40:24 UTC
This issue is no more visible on version bf44b14