Question

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.

Était-ce utile?

La solution

I fixed this problem by setting the conf_location property as below:

conf_location = C:\Program Files\DataStax Community\apache-cassandra\conf\cassandra.yaml

Initially I was using quotes around the path, which didn't work. Removing the quotes did the trick.

Autres conseils

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 khaledh's otherwise correct answer and in the equivalent SF 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.

I fixed this issue by adding entry in the agent configuration file address.yaml,

Steps,

  1. Login to Agent machine

  2. Stop agent

  3. Add the JAVA_HOME if not already added

  4. Edit ( create if not exists ) address.yaml ( located at /etc/datastax-agent/ if you have installed OpsCenter Agents using package manager )

  5. Add entry as

cassandra_conf:

  1. Start the agent

  2. Restart the opscenter - the new agent wonts show up until you restart opscenter

cassandra_conf: /usr/lib/cassandra-2.0.5/conf/cassandra.yaml

Create the if not exists

( For DataStax version 5.0.1 for both Opscenter and Agent )

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top