0

I have installed Datastax Community Edition v2.0.3 on a Windows Server 2012 R2 Datacenter machine. After a vanilla install, I can't connect to the database with OpsCenter because the agent failed to start: it says "0 of 1 agents connected" in the top of the page. I can connect to the database itself using CQLSH. This problem does not occur with v2.0.2.

My datastax_opscenter_agent-stderr.log file contains the following:

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) 

There is in fact a cassandra.yamlfile in the C:\Program Files\DataStax Community\apache-cassandra\conf directory, where it is supposed to be. The message above states that it looked in C:\\Program Files\\DataStax Community\\apache-cassandra\\bin\\conf\\cassandra.yaml, though (notice the \bin).

Setting the conf_location option in the opscenter\conf\clusters\local.conf, as per the log's suggestion, results in the same error.

The Windows Firewall has been turned off through all this.

Edit

I've been tinkering a little bit, and now I get the same exception in the log, except the path where it's been looking for cassanda.yaml has changed from

'C:\Program Files\DataStax Community\apache-cassandra\bin\conf\cassandra.yaml'

to

'C:\Program Files\DataStax Community\utils\conf\cassandra.yaml'

I have no idea what I did to change this.

I have tried copying cassandra.yaml to the directory above. This gets rid of the exception in datastax_opscenter_agent-stderr.log, but OpsCenter still says "0 of 1 agents connected". However, the Dashboard is now showing data in the graphs. I am also able to add a keyspace to the schema, but it won't show up after I created it. It is accessible using CLQSH, though. Obviously having cassandra.yaml in two different places is not ideal, either.

3 Answers 3

1

For the location of cassandra.yaml, you can set cassandra_conf: "C:\Program Files\DataStax Community\apache-cassandra\bin\conf\cassandra.yaml" in address.yaml, substituting for the proper path if needed. You'll need to restart the agent service.

but OpsCenter still says "0 of 1 agents connected".

I would check the agent.log for any errors connecting to the central opscenterd process. The fact that it is collecting and storing data (graphs) means that it was able to connect at some point.

It may also be a version mismatch between opscenterd and the agent, but that would only occur if you upgraded one or the other independently. Version mismatches appear as non-connections in the UI.

I am also able to add a keyspace to the schema, but it won't show up after I created it.

It may take some a minute or so for the keyspace to show up in OpsCenter. If it still doesn't appear after refreshing the UI, can you share specifically how you created it?

1

I solved the problem with the help my equivalent SO question.

I was using quotes when setting the conf_location in the local.conf file, removing the quotes solved the problem.

1
  • My local.conf didn't have that entry, it had to be added.
    – stimpy77
    Feb 22, 2014 at 19:30
1

I had the same problem in Windows 7 x64 while installing DataStax Community Edition v1.2.15. I got it working and then after backup and rollback I used Beyond Compare to identify exactly what change actually fixed this. There is some ambiguity in Rik's otherwise correct answer and in the equivalent SO question, thus I am providing a more complete answer.

In C:\Program Files\DataStax Community\opscenter\conf\clusters\local.conf, the default contents of ..

[cassandra]
seed_hosts = 127.0.0.1

.. should instead be ..

[cassandra]
seed_hosts = 127.0.0.1
conf_location = C:\\Program Files\\DataStax Community\\apache-cassandra\\conf\\cassandra.yaml

Restart the services and then in OpsCenter if it still says "0 of 1 agents" click on the "Fix now" link. In my case it was not until I clicked on this link that it self-updated and showed "1 of 1" without any prompting or alerts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.