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.