title: Running multiple cassandra instances on one machine
body: <p>This is my second attempt at setting up a 3-node Cassandra cluster on my machine. I'm not able to start the first instance. 
  During startup I get</p>
  
  <pre><code>Exception encountered during startup
  org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml: file:/home/user1/TestCluster/node1/dsc-cassandra-2.2.8/conf/cassandra.yaml
  </code></pre>
  
  <p>and alot of lines that I'm not able to make any sense of (I fail to see why the yaml is invalid). </p>
  
  <p>My approach consisted of the following steps: </p>
  
  <ol>
  <li><p>I unzipped a tarball installation into 3 folders (as i want 3 instances). </p></li>
  <li><p>In each <code>cassandra.yaml</code>:</p>
  
  <ul>
  <li><code>cluster_name</code> was set </li>
  <li><code>seeds:</code> "127.0.0.2"  (same for all nodes)</li>
  <li><code>rpc_address, listen_address</code> were set to 127.0.0.2-4 for all nodes </li>
  <li><code>rpc_port</code> was set (9160, 9161, 9162) </li>
  <li><code>data_file_directories</code>,  <code>commitlog_directories</code>, <code>saved_caches_directory</code> were set for all </li>
  </ul></li>
  <li><p>In each <code>cassandra-env.sh</code> the <code>JMX_PORT</code> was set (8081,8082,8083)  </p></li>
  </ol>
  
  <p><code>etc/hosts</code> was edited so that 127.2-4 are aliases for 127.0.0.1 </p>
  
  <p><strong>My questions are:</strong> What am I doing wrong? How can this be fixed? Is there any other simple way to do this on ubuntu? </p>
  
  <p>I'm including the error incase it makes any sense. Will remove if it takes up too much space. </p>
  
  <pre><code>ERROR 12:19:12 Exception encountered during startup
  org.apache.cassandra.exceptions.ConfigurationException: Invalid yaml: file:/home/user1/TestCluster/node1/dsc-cassandra-2.2.8/conf/cassandra.yaml
      at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:118) ~[apache-cassandra-2.2.8.jar:2.2.8]
      at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:85) ~[apache-cassandra-2.2.8.jar:2.2.8]
      at org.apache.cassandra.config.DatabaseDescriptor.loadConfig(DatabaseDescriptor.java:135) ~[apache-cassandra-2.2.8.jar:2.2.8]
      at org.apache.cassandra.config.DatabaseDescriptor.&lt;clinit&gt;(DatabaseDescriptor.java:119) ~[apache-cassandra-2.2.8.jar:2.2.8]
      at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:507) [apache-cassandra-2.2.8.jar:2.2.8]
      at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:641) [apache-cassandra-2.2.8.jar:2.2.8]
  Caused by: org.yaml.snakeyaml.constructor.ConstructorException: null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=data_file_directories for JavaBean=org.apache.cassandra.config.Config@24a35978; No single argument constructor found for class [Ljava.lang.String;;  in 'reader', line 10, column 1:
      cluster_name: 'Testcluster'
      ^
      at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:333) ~[snakeyaml-1.11.jar:na]
      at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:182) ~[snakeyaml-1.11.jar:na]
      at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:141) ~[snakeyaml-1.11.jar:na]
      at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:127) ~[snakeyaml-1.11.jar:na]
      at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481) ~[snakeyaml-1.11.jar:na]
      at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:475) ~[snakeyaml-1.11.jar:na]
      at org.apache.cassandra.config.YamlConfigurationLoader.loadConfig(YamlConfigurationLoader.java:111) ~[apache-cassandra-2.2.8.jar:2.2.8]
      ... 5 common frames omitted
  Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create property=data_file_directories for JavaBean=org.apache.cassandra.config.Config@24a35978; No single argument constructor found for class [Ljava.lang.String;
      at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:299) ~[snakeyaml-1.11.jar:na]
      at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:189) ~[snakeyaml-1.11.jar:na]
      at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:331) ~[snakeyaml-1.11.jar:na]
      ... 11 common frames omitted
  Caused by: org.yaml.snakeyaml.error.YAMLException: No single argument constructor found for class [Ljava.lang.String;
      at org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.construct(Constructor.java:379) ~[snakeyaml-1.11.jar:na]
      at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:182) ~[snakeyaml-1.11.jar:na]
      at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:296) ~[snakeyaml-1.11.jar:na]
      ... 13 common frames omitted
  </code></pre>