title: Couchbase Server - Cannot do a Get or Set if One Node Stopped
body: <p>I set up Couchbase 1.8 cluster on two nodes (Windows 2008 R2).</p>
  
  <p>1) Opened up all the necessary ports on the two servers as outlined here:
  <a href="http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-network-ports.html" rel="nofollow">http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-network-ports.html</a></p>
  
  <p>2) I did a simple setup, initially creating Node A (172.30.75.53) on a new Cluster.
  Changed the IPAddress to the Static IPAddress of the server as outlined here:
  <a href="http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractice-cloud-ip.html" rel="nofollow">http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractice-cloud-ip.html</a>
  Created using the default Couchbase bucket.</p>
  
  <p>3) Then installed Couchbase on Node B  (172.30.75.55).
  Changed the IPAddress to the Static IPAddress of the server.</p>
  
  <p>4) Back on Node A, I added Node B to the cluster.</p>
  
  <p>5) Did the initial re-balance in the Couchbase web console.</p>
  
  <p>6) In the Couchbase console, I could then see the two nodes up and running.</p>
  
  <p>I created a simple app C# sample app to test as below:</p>
  
  <p>In the config file pointed to Node A</p>
  
  <pre><code>var client = new CouchbaseClient();
  var setResult = client.ExecuteStore(StoreMode.Set, "someKey", "someData", new    TimeSpan(7, 0, 0, 0)); 
  var resultGet = client.ExecuteGet&lt;string&gt;("someKey");
  </code></pre>
  
  <p>Could then do a Get and Set with no issues (as expected).</p>
  
  <p>Then in my config file, changed to point to Node B.</p>
  
  <p>Could then do a Get as below (as expected):
      var resultGet = client.ExecuteGet("someKey");</p>
  
  <p>On Node A, shut down the CouchBase service by running:
  service_stop.bat</p>
  
  <p>With my test app still pointing to Node B, could still get and set (as expected). </p>
  
  <p>On Node A, started the Couchbase Service by running:
  service_start.bat
  On Node B, shut down the CouchBase service by running:
  service_stop.bat</p>
  
  <p>Then in my config file, changed to point to Node A.</p>
  
  <p>Now when trying to do a Get and Set as below while connected to Node A:
      var setResult = client.ExecuteStore(StoreMode.Set, "someKey", "someData", new TimeSpan(7, 0, 0, 0)); 
      var resultGet = client.ExecuteGet("someKey");</p>
  
  <p>Getting errors as below:</p>
  
  <p>-Store operation failed, see InnerResult or StatusCode for details"
  -Failed to Execute Operation
  -StatusCode : 0 </p>
  
  <p>Get failed. See InnerException or StatusCode for details"
  StatusCode : Null</p>
  
  <p>Therefore to conclude:</p>
  
  <p>a) Can do a Get and Set with Node A and Node B are running. (with client connected to Node A or Node B)</p>
  
  <p>b) Can do a Get and Set With Node A stopped and Node B running. (with client connected to Node B)</p>
  
  <p>c) CANNOT do a Get and Set With Node A running and Node B stopped. (with client connected to Node A) </p>
  
  <p>Any ideas?</p>
  
  <p>Thanks,</p>
  
  <p>Matt</p>