DataStax OpsCenter agent fails to start when Cassandra requires authentication

cassandradatastax-enterpriseopscenter

Problem

I can not get OpsCenter get to connect to datastax-agent. It seems that datastax-agent starts and tries to connect to cassandra, fails because it does not know the correct credentials, but it also does not start the Jetty server to receive the credentials from opscenter. So it retries and retries but never connects. When cassandra allows all connections (no authentication), my setup works fine.

startup.log as well as agent.log both show repeated:

ERROR [main] 2015-03-03 21:19:43,106 Can't connect to Cassandra, retrying
com.datastax.driver.core.exceptions.AuthenticationException: Authentication error on host /127.0.0.1:9042: Host /127.0.0.1:9042 requires authentication, but no authenticator found in Cluster configuration

Setup

I installed datastax-agent (5.1) under Ubuntu 14.04.LTS from the official http://debian.datastax.com/community stable main on a EC2 instance. My address.yml looks like this:

stomp_interface: PUBLIC_IP_OF_OPSCENTER_NODE
local_interface: PUBLIC_IP_OF_NODE
agent_rpc_interface: PRIVATE_IP_OF_NODE
agent_rpc_broadcast_address: PUBLIC_IP_OF_NODE

I also tried to add cassandra_install_location: /opt/cassandra but it does not seem to help. Cassandra (2.1) is installed via tarball and runs as user ubuntu, datastax-agent also runs as ubuntu.

Question

What am I missing to get datastax-agent and opscenter communcating when cassandra requires authentication?

Edits:

The startup.log after launch:

log4j:WARN No appenders could be found for logger (com.datastax.driver.core.SystemProperties).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
 INFO [main] 2015-03-10 11:35:50,361 Loading conf files: /var/lib/datastax-agent/conf/address.yaml
 INFO [main] 2015-03-10 11:35:50,412 Java vendor/version: Java HotSpot(TM) 64-Bit Server VM/1.7.0_76
 INFO [main] 2015-03-10 11:35:50,412 DataStax Agent version: 5.1.0
 INFO [main] 2015-03-10 11:35:50,490 Default config values: { ... }
 INFO [main] 2015-03-10 11:35:50,685 Waiting for the config from OpsCenter
 INFO [main] 2015-03-10 11:35:50,686 Using XX.XX.XXX.XXX as the cassandra broadcast address
 INFO [main] 2015-03-10 11:35:50,686 New JMX connection (127.0.0.1:7199)
 INFO [main] 2015-03-10 11:35:50,889 cassandra RPC address is  nil
ERROR [main] 2015-03-10 11:35:51,048 Can't connect to Cassandra, retrying
 com.datastax.driver.core.exceptions.AuthenticationException: Authentication error on host /127.0.0.1:9042: Host /127.0.0.1:9042 requires authentication, but no authenticator found in Cluster configuration

Best Answer

Nicolas check out this documentation. With cassandra set to use internal authentication, the cassandra username and password are set in the cluster configuration file for opscenter on the opscenterd server. The file is named .conf

[cassandra] username
The thrift username to Cassandra if thrift authentication is enabled.
[cassandra] password
The thrift password to Cassandra if thrift authentication is enabled.

If that is set properly and your agents still can't connect then you might also check that the various ip addresses set in your address.yaml are correct for your installation.

Specifically, can the cassandra node reach the opscenterd server via the public internface? Verify that the local_interface ip address matches the ip for the node as seen in the nodetool status output. Verify that the opscenterd server can reach the agent on the node using the agent rpc broadcast address ip.

Related Topic