title: Rebalancing Cassandra 1.2 cluster when a seed node (from total of 2) is died using virtual nodes
body: <p>I have a Cassandra 1.2 cluster in my local machine with modified hosts:</p>
  
  <pre><code>#cassandra nodes
  m.y.i.p               m.y.i.p   (Node 1)&lt;---- seed 1
  m.y.i.p               127.0.0.3 (Node 2)
  m.y.i.p               127.0.0.4 (Node 3)&lt;---- seed 2
  m.y.i.p               127.0.0.5 (Node 4)
  m.y.i.p               127.0.0.6 (Node 5)
  </code></pre>
  
  <p>... so the cluster has a total of 5 nodes. I'm using Virtual Nodes, so I don't havo to set initial_token anywhere.</p>
  
  <p>The steps I've followed:</p>
  
  <ol>
  <li>Start the seed nodes (1 and 3)</li>
  <li>Start Nodes 2 and 4.</li>
  <li>Turn off Node 3.</li>
  <li>Try to join Node 5.</li>
  </ol>
  
  <p>The problem is in the 4th step, when I try to join Node 5 Cassandra throws this Exception:</p>
  
  <pre><code>   java.lang.IllegalStateException: unable to find sufficient sources for streaming range (-7204018021044318047,-6965052533844316617]
          at org.apache.cassandra.dht.RangeStreamer.getRangeFetchMap(RangeStreamer.java:205)
          at org.apache.cassandra.dht.RangeStreamer.addRanges(RangeStreamer.java:129)
          at org.apache.cassandra.dht.BootStrapper.bootstrap(BootStrapper.java:81)
          at org.apache.cassandra.service.StorageService.bootstrap(StorageService.java:890)
          at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:659)
          at org.apache.cassandra.service.StorageService.initServer(StorageService.java:514)
          at org.apache.cassandra.service.StorageService.initServer(StorageService.java:411)
          at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:278)
          at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:366)
          at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:409)
  java.lang.IllegalStateException: unable to find sufficient sources for streaming range (-7204018021044318047,-6965052533844316617]
          at org.apache.cassandra.dht.RangeStreamer.getRangeFetchMap(RangeStreamer.java:205)
          at org.apache.cassandra.dht.RangeStreamer.addRanges(RangeStreamer.java:129)
          at org.apache.cassandra.dht.BootStrapper.bootstrap(BootStrapper.java:81)
          at org.apache.cassandra.service.StorageService.bootstrap(StorageService.java:890)
          at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:659)
          at org.apache.cassandra.service.StorageService.initServer(StorageService.java:514)
          at org.apache.cassandra.service.StorageService.initServer(StorageService.java:411)
          at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:278)
          at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:366)
          at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:409)
  Exception encountered during startup: unable to find sufficient sources for streaming range (-7204018021044318047,-6965052533844316617]
  ERROR 16:55:47,634 Exception in thread Thread[StorageServiceShutdownHook,5,main]
  java.lang.NullPointerException
          at org.apache.cassandra.service.StorageService.stopRPCServer(StorageService.java:321)
          at org.apache.cassandra.service.StorageService$1.runMayThrow(StorageService.java:479)
          at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
          at java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>The range (-7204018021044318047,-6965052533844316617] just belongs to the died node (Node 3). Due to I'm using Virtual Nodes, I think that the ring must be rebalance:</p>
  
  <blockquote>
    <p>Rebalancing a cluster is no longer necessary when adding or removing nodes. When a node joins the
    cluster, it assumes responsibility for an even portion of data from the other nodes in the cluster. If a node
    fails, the load is spread evenly across other nodes in the cluster.</p>
  </blockquote>
  
  <p>But I'm wrong, obviously :). </p>
  
  <p>What can I do to join a new node in a existing cluster when a previous node is down? Please, note that I have 256 tokens per node, nodetool move isn't an option (I think).</p>
  
  <p>Thank you in advance, any info will be welcome!</p>