.NET Couchbase client 3.0 issues

I have two issues with CouchbaseNetClient 3.0.

  1. BucketManager operations returns exception:
    var cluster = await Cluster.ConnectAsync(url, login,pass);
    //connection is valid
    await cluster.Buckets.FlushBucketAsync(“some_bucket”);
    or any other operation on Bucket triggers exception
    {“Value cannot be null.\r\nParameter name: uri”}

  2. The client does not resolve names from hosts files. Connection to server on ie.: http://yoda is not possible.
    I receive: “Cannot resolve DNS for yoda”. The connection is valid with ip address.

Hi @foximoxi,

Just wanted to let you know that I saw this and I will try to get to it when I get some time.

Thank you,
I added the source of the connector and it looks like it does not acquire/receive “management interface” from the connection properties.
I tested it with 6.0 and 6.5 instances with the same effect.

Hey @foximoxi,

I’m able to reproduce #2 myself, so I’ve opened a bug here: https://issues.couchbase.com/browse/NCBC-2462

I’m not able to reproduce #1 since I can’t get past #2. How were you able to?

This is a code I run:

var options = new ClusterOptions().WithBuckets(“mybucket”).WithCredentials(“login”, “password”).WithConnectionString(“couchbase://127.0.0.1”);
cluster = await Cluster.ConnectAsync(options).ConfigureAwait(false);
await cluster.WaitUntilReadyAsync(TimeSpan.FromSeconds(60));
await cluster.Buckets.FlushBucketAsync(“mybucket”);

during any operation on bucket (create,flush etc.) I receive an Exception.
What I found is the return from:

ServiceUriProvider.cs

public Uri GetRandomManagementUri() =>
_clusterContext.GetRandomNode().ManagementUri;

because ManagementUri is null.

I also run UnitTests attached to the SDK source withour errors.

Thank you

Oh, interesting, so 127.0.0.1 works but not localhost?

I have two instances. Local Couchbase 6.5 and remote 6.0.
I can connect using 127.0.0.1 or localhost or 192.168.0.2.
Remote CB 6.0 also.
But bucket operations are not possible.

Version 2.7.16 is working on both instances without problems.
I have both machines on Windows 10.

I suspect this is related to using an actual DNS client in the SDK now, rather than the OS, to resolve domain names. So it’s missing the hosts file override. We probably need to consider some changes there.

Instead of using couchbases:// try using http:// in connection string it may resolve your issue

We generally wouldn’t recommend that @SharashchandraUdupa. The DNS resolution is the same in any case.