Couchbase client- Could not locate Node

I am new to couchbase server and installed the server in one system and trying to cache the data by ,net client in another server.


  • installed and setup “username1”/“password1”
  • created bucket … used “travel-sample”

Created app.config as below,

<servers bucket=“travel-sample” bucketPassword="" username=“username1” password =“password1”>
<add uri=“http://**...:8091/pools”/>

C# code: Fetch the hashtable data and trying to cache in couchbase as like below

private CouchbaseClient _instance;
public cacheHandler()
    _instance = new CouchbaseClient();
public long updateCache(ref Hashtable dataList)
    Stopwatch st = new Stopwatch();
    foreach (string key in dataList.Keys)
        IStoreOperationResult res = _instance.ExecuteStore(StoreMode.Set, key, dataList[key]);
        if (res.Success)
            success += 1;
            failed += 1;
            if (failed == 1)
                failedErr = res.Message;

    return st.ElapsedMilliseconds;

I am getting “Could not locate Node” error while ExecuteStore() …

PLease guide me if I am missing something… help me how to cache the data in my case

Hi @ashokpp83,

What version of Couchbase Server are you using? Are you using the official Couchbase .NET SDK?

I am using 5.10. downloaded yesterday from couchbase.

and using enyim.caching.dll (v library for client

Current stable version is 2.5.2, could you upgrade and retry?

Hi @ashokpp83

I don’t think you’re using the official .NET SDK, it’s called CouchbaseNetClient on nuget here, with the latest version being 2.5.2.

Once you’ve updated the client, you can setup your config like this:

  <section name="couchbase" type="Couchbase.Configuration.Client.Providers.CouchbaseClientSection, Couchbase.NetClient" />
    <add uri="couchbase://localhost" />
    <add name="mybucket" />

And then get a reference to a Couchbase bucket like this:

var cluster = new Cluster();
var bucket = cluster.OpenBucket("myBucket");
bucket.Upsert("key", myobject);

You can see more details in the Documentation here.

1 Like