当Cassandra需要validation时,DataStax OpsCenter代理无法启动

问题

我无法让OpsCenter连接到datastax-agent。 看起来datastax代理启动并尝试连接到cassandra失败,因为它不知道正确的凭据,但它也不启动Jetty服务器从opscenter接收凭据。 所以它重试和重试,但从来没有连接。 当cassandra允许所有连接(不authentication),我的设置工作正常。

startup.logagent.log都显示重复:

ERROR [main] 2015-03-03 21:19:43,106无法连接到Cassandra,正在重试com.datastax.driver.core.exceptions.AuthenticationException:主机上的validation错误/127.0.0.1:9042:主机/127.0.0.1 :9042需要身份validation,但在群集configuration中找不到身份validation器

build立

我在EC2实例的官方http://debian.datastax.com/community stable main下安装了Ubuntu 14.04.LTS下的datastax-agent (5.1)。 我的address.yml如下所示:

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

我也尝试添加cassandra_install_location: /opt/cassandra但似乎没有帮助。 Cassandra(2.1)通过tarball安装,并以ubuntu用户身份运行,datastax-agent也以ubuntu运行。

当cassandra需要validation时,我缺less什么来获得datastax-agent和opscenter的通信?

编辑:

启动后的startup.log

 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 

尼古拉斯检查这个文件 。 将cassandra设置为使用内部身份validation时,将在opscenterd服务器上的opscenter的集群configuration文件中设置cassandra用户名和密码。 该文件被命名为.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. 

如果设置正确并且代理仍然无法连接,那么您也可以检查address.yaml中设置的各个IP地址对于您的安装是否正确。

具体来说,cassandra节点可以通过公共内部到达opscenterd服务器吗? validationlocal_interface的IP地址是否与nodetool状态输出中所显示的节点的IP相匹配。 validationopscenterd服务器是否可以使用代理rpc广播地址ip到达节点上的代理。

您可以尝试在您的address.yamlconfiguration文件中手动configuration凭据。

 cassandra_user: <username> cassandra_pass: <password> 

查看datastax代理configuration和升级指南到5.1 ,因为一些参数已经改变。

克莱门特的回答为我工作。 在Solaris 11上使用5.1(从Solaris开始,没有提供软件包安装,因此需要手动安装tar,还需要手动启动Cassandra,代理和opscenter。另请注意,opscenter脚本需要调整,因为它决定了可以使用'epoll'作为反应器,不支持。强制使用'select'工作。)