title: DataStax Opscenter Agent doesn't connect: "Unable to locate cassandra.yaml configuration file"
body: <p>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.</p>
  
  <p>My <code>datastax_opscenter_agent-stderr.log</code> file contains the following:</p>
  
  <pre><code>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) 
  </code></pre>
  
  <p>There is in fact a <code>cassandra.yaml</code>file in the <code>C:\Program Files\DataStax Community\apache-cassandra\conf</code> directory, where it is supposed to be. The message above states that it looked in <code>C:\\Program Files\\DataStax Community\\apache-cassandra\\bin\\conf\\cassandra.yaml</code>, though (notice the \bin). </p>
  
  <p>Setting the <code>conf_location</code> option in the <code>opscenter\conf\clusters\local.conf</code>, as per the log's suggestion, results in the same error.</p>
  
  <p>The Windows Firewall has been turned off through all this.</p>
  
  <p><strong>Edit</strong> </p>
  
  <p>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 <code>cassanda.yaml</code> has changed from</p>
  
  <p>'C:\Program Files\DataStax Community\apache-cassandra\bin\conf\cassandra.yaml'</p>
  
  <p>to</p>
  
  <p>'C:\Program Files\DataStax Community\utils\conf\cassandra.yaml'</p>
  
  <p>I have no idea what I did to change this.</p>
  
  <p>I have tried copying <code>cassandra.yaml</code> to the directory above. This gets rid of the exception in <code>datastax_opscenter_agent-stderr.log</code>, 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 <code>CLQSH</code>, though. Obviously having <code>cassandra.yaml</code> in two different places is not ideal, either. </p>