NodeLocator Error in 2.7.20+ accessing publicly available VM with open ports

Hi, I am accessing a publicly available VM, with no access to the internal ips.
I can reproduce an exception with this c# code:

var builder = new ConfigurationBuilder();
builder.AddJsonFile("config.json");
var jsonConfiguration = builder.Build();
var definition = new CouchbaseClientDefinition();
jsonConfiguration.GetSection("couchbase:basic").Bind(definition);
var clientConfig = new ClientConfiguration(definition);
var cluster = new Cluster(clientConfig);
var bucket = cluster.OpenBucket("trips");
Console.WriteLine("got bucket.");

Simple config.json:
{
“couchbase”: {
“basic”: {
“username”: “user”,
“password”: “pass”,
“servers”: [
“couchbase://publicurl.azure.com”
],
“buckets”: [
{
“name”: “trips”
}
]
}
}
}

The call to OpenBucket will throw an exception:
NullConfigException: NodeLocator is not defined.

I rolled back to 2.7.18, and the above code passes. 2.7.20 and 21 throw the exception.

I went through the changes between the two versions:
[https://github.com/couchbase/couchbase-net-client/compare/4db0ba50826075cfdc6584b410b7b52fefe0776b...3874b4862bcbfd0dbb3461a83c72bc6709209753]

I ran through the code, and found that if the code deleted in Src/Couchbase/IO/Services/PooledIOService.cs
is added back in, the sample code above works.

This is the deleted code that I put back in:
var connection = connectionPool.Connections.FirstOrDefault() ?? connectionPool.Acquire();
try
{
CheckEnabledServerFeatures(connection);
}
finally
{
connectionPool.Release(connection);
}

I am looking for a workaround or a fix to get around the error.
Thanks for any help.

Hi @howardkevin -

Thanks for reporting, I created a ticket as this sounds like a regression introduced by NCBC-2606; but doesn’t appear to happen in every case. Could you enable logging and post your logs in DEBUG or TRACE mode to the ticket?

-Jeff

Thanks, I noticed that the ticket says Affects Version/s: 2.7.18, and it should be 2.7.20. 2.7.18 is working.

It actually went in 2.7.19, so release date was updated to reflect this.

I think there is some underlying connectivity issue and what your seeing is a side effect. Can you run the SDK Doctor and post the results summary? Here are some docs.

I do think there is a regression there as well, which is why 2.7.19 works and 2.7.20 doesn’t.

-Jeff

I attached the SDK Doctor output.

Hi @howardkevin -

There is a patch being reviewed in Gerrit right now; should be released next week.

Thanks for the detailed description and ticket!

-Jeff