Cannot do a Get or Set to Bucket if One Node Stopped.

40 views
Skip to first unread message

Matt M

unread,
Nov 9, 2012, 11:43:04 AM11/9/12
to couc...@googlegroups.com
I set up Couchbase 1.8 cluster on two nodes Windows 2008 R2.
Opened up all the necessary ports on the two servers as detailed on Couchbase documentation.

I did a simple setup, initially creating Node A  on a new Cluster.
Changed the IP Address to the Static IP Address as detailed on Couchbase documentation.

Then installed Couchbase on Node B .
Changed the IP Address to the Static IP Address as detailed on Couchbase documentation.

Back on Node A, I added Node B to the cluster.

Did the initial re-balance in the Couchbase web console.

In the Couchbase console, I could then see the two nodes up and running.

I created a simple app C# sample app to test as below:

In the config file pointed to Node A
In Code, Could then do a Get and Set with no issues (as expected).

Then in my config file, changed to point to Node B.
Could then do a Get 

On Node A, shut down the CouchBase service by running:
service_stop.bat
With my test app still pointing to Node B, could still get and set (as expected). 

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

Then in my config file, changed to point to Node A.
Now when trying to do a Get and Set as below while connected to Node A
Getting errors as below,

Store operation failed, see InnerResult or StatusCode for details
Failed to Execute Operation
StatusCode  0 

Get failed. See InnerException or StatusCode for details
StatusCode  Null

Therefore to conclude.
Can do a Get and Set with Node A and Node B are running. (with client connected to Node A or Node B)
Can do a Get and Set With Node A stopped and Node B running. (with client connected to Node B)
CANNOT do a Get and Set With Node A running and Node B stopped. (with client connected to Node A) 

Any ideas

Thanks,

Matt

MC Brown

unread,
Nov 9, 2012, 12:02:13 PM11/9/12
to couc...@googlegroups.com
Hi Matt,

Couchase Server operates as a cluster, and the data is automatically shared across the cluster. There is only one location for a given key and the corresponding value.

We don't share information between nodes, and in fact, when you connect the node that you connect to will provide a list of all the nodes in the cluster. Your client library (.NET in your case) will send the request to the appropriate node according to the key you specified when storing the data.

In the example you've given, I suspect it was was a fluke occurrence that the data you were storing when connecting to node B happened to be allocated B.

Bring up node A and shutting down node B would make that node unavailable, which is why your stores are then failing.

For failover scenarios that you describe we have a specific failover mechanism that shares data between nodes so that nodes can take over for other nodes, but this needs to be explicitly configured, and the failover operation must be manually (or if configured, automatically) initiated.

Does that help with your understanding of what is going on?

MC
--
MC Brown, VP, Technical Publications and Education
m...@couchbase.com
Skype: mcmcslp Mobile: +44 7411 295711 (GMT)





M. Nunberg

unread,
Nov 9, 2012, 12:29:11 PM11/9/12
to couc...@googlegroups.com
Hi, we're actually aware of this issue (this is a client-side issue
specific to C#), and have a fix for this pending :).

In the meantime, I believe the .NET client allows you to specify a list
of nodes to connect to; so just specify node A and node B in that list.

Matt M

unread,
Nov 9, 2012, 12:36:08 PM11/9/12
to couc...@googlegroups.com


Hi,

Thank you for the quick responses.
That does make sense. I tried doing a store again, but this time supplying the ExecuteStore method with a brand new key while connected to Node A (while Node B was down) and it worked this time (i.e. no error on the ExecuteStore).
Therefore, I am guessing that the key may be replicated between the different nodes but not the value/data ?
If the above is true, is there a way to also configure the cluster to replicate the data also? If so could you point me to any relevant documentation for this?

Thanks Again,

Matt 


 
Reply all
Reply to author
Forward
0 new messages