我已经在Windows Server 2012 R2 Datacenter机器上安装了Datastax Community Edition v2.0.3。 在安装vanilla之后,我无法使用OpsCenter连接到数据库,因为代理程序无法启动:它在页面顶部显示“0个代理程序已连接”。 我可以使用CQLSH连接到数据库本身。 v2.0.2不会出现此问题。
我的datastax_opscenter_agent-stderr.log文件包含以下内容:
2013-12-05 16:16:54 Commons Daemon procrun stderr initialized Exception in thread "Initialization" clojure.lang.ExceptionInfo: throw+: {:type :bad-permissions, :message "Unable to locate the cassandra.yaml configuration file. If your configuration file is not located with the Cassandra install, please set the 'conf_location' option in the Cassandra section of the OpsCenter cluster configuration file and restart opscenterd. Checked the following directories: [\"/etc/dse/cassandra/cassandra.yaml\" \"/etc/cassandra/conf/cassandra.yaml\" \"/etc/cassandra/cassandra.yaml\" \"C:\\\\Program Files\\\\DataStax Community\\\\apache-cassandra\\\\bin\\\\conf\\\\cassandra.yaml\"]"} {:object {:type :bad-permissions, :message "Unable to locate the cassandra.yaml configuration file. If your configuration file is not located with the Cassandra install, please set the 'conf_location' option in the Cassandra section of the OpsCenter cluster configuration file and restart opscenterd. Checked the following directories: [\"/etc/dse/cassandra/cassandra.yaml\" \"/etc/cassandra/conf/cassandra.yaml\" \"/etc/cassandra/cassandra.yaml\" \"C:\\\\Program Files\\\\DataStax Community\\\\apache-cassandra\\\\bin\\\\conf\\\\cassandra.yaml\"]"}, :environment {tar-location "C:\\Program Files\\DataStax Community\\apache-cassandra\\bin\\conf\\cassandra.yaml", conf nil, checked-files ["/etc/dse/cassandra/cassandra.yaml" "/etc/cassandra/conf/cassandra.yaml" "/etc/cassandra/cassandra.yaml" "C:\\Program Files\\DataStax Community\\apache-cassandra\\bin\\conf\\cassandra.yaml"]}} at opsagent.util.cassandra_util$cassandra_conf_location.invoke(cassandra_util.clj:118) at opsagent.util.cassandra_util$get_cassandra_conf.invoke(cassandra_util.clj:130) at opsagent.opsagent$create_thrift_conf_vars.invoke(opsagent.clj:52) at opsagent.opsagent$setup_thrift.invoke(opsagent.clj:138) at opsagent.jmx$determine_ip.invoke(jmx.clj:333) at opsagent.jmx$setup_jmx$fn__1309.invoke(jmx.clj:350) at clojure.lang.AFn.run(AFn.java:24) at java.lang.Thread.run(Unknown Source)
实际上在C:\Program Files\DataStax Community\apache-cassandra\conf目录中有一个cassandra.yaml文件,它应该是。 上面的消息指出,它看起来在C:\\Program Files\\DataStax Community\\apache-cassandra\\bin\\conf\\cassandra.yaml ,虽然(注意\ bin)。
根据日志的build议在opscenter\conf\clusters\local.conf设置conf_location选项会导致相同的错误。
Windows防火墙已closures所有这一切。
编辑
我一直在修补一下,现在我在日志中得到相同的exception,除了它一直在寻找的pathcassanda.yaml已经从
'C:\ Program Files \ DataStax Community \ apache-cassandra \ bin \ conf \ cassandra.yaml'
至
'C:\ Program Files \ DataStax Community \ utils \ conf \ cassandra.yaml'
我不知道我做了什么来改变这一点。
我曾尝试将cassandra.yaml复制到上面的目录中。 这消除了datastax_opscenter_agent-stderr.log中的exception,但OpsCenter仍然说“连接的代理数量为0”。 但是,仪表板现在在图表中显示数据。 我也能够为模式添加一个密钥空间,但是在创build之后它不会显示出来。 不过,它可以通过CLQSH访问。 很明显,在两个不同的地方有cassandra.yaml也不理想。
对于cassandra.yaml的位置,您可以在address.yaml中设置cassandra_conf: "C:\Program Files\DataStax Community\apache-cassandra\bin\conf\cassandra.yaml" ,根据需要replace正确的path。 您将需要重新启动代理服务。
但OpsCenter仍然说“连接1个代理”中的0个。
我会检查agent.log连接到中央opscenterd进程的任何错误。 收集和存储数据(graphics)的事实意味着它能够在某个时刻连接。
它也可能是opscenterd和代理之间的版本不匹配,但只有在您独立升级一个或另一个时才会发生。 版本不匹配在用户界面中显示为非连接。
我也能够为模式添加一个密钥空间,但是在创build之后它不会显示出来。
密钥空间可能需要一分钟左右才能显示在OpsCenter中。 如果在刷新UI后仍然没有出现,你能分享一下你是如何创build的吗?
我解决了问题,帮助我的同等SO问题 。
在local.conf文件中设置conf_location时,我使用了引号,删除引号解决了问题。
在安装DataStax Community Edition v1.2.15时,我在Windows 7 x64中遇到了同样的问题。 我得到了它的工作,然后在备份和回滚之后,我使用Beyond Compare来确定实际上修改了哪些内容。 Rik在其他方面的正确答案和相应的SO问题中有一些含糊的含义,因此我提供了一个更完整的答案。
在C:\ Program Files \ DataStax Community \ opscenter \ conf \ clusters \ local.conf中,默认的内容是..
[cassandra] seed_hosts = 127.0.0.1
应该改为..
[cassandra] seed_hosts = 127.0.0.1 conf_location = C:\\Program Files\\DataStax Community\\apache-cassandra\\conf\\cassandra.yaml
重新启动服务,然后在OpsCenter中,如果仍然显示“0 of 1 agents”,则单击“立即修复”链接。 在我的情况下,直到我点击这个链接,它自我更新,并显示“1的1”没有任何提示或警报。