Hi
Is there any compatibility issues with the latest .NET 3.x SDK with couchbase CE 5? I’m having problems connecting, unable to get a bucket or n1ql query with 3.x but if i downgrade to 2.x its fine.
Thanks
Andy
Hi
Is there any compatibility issues with the latest .NET 3.x SDK with couchbase CE 5? I’m having problems connecting, unable to get a bucket or n1ql query with 3.x but if i downgrade to 2.x its fine.
Thanks
Andy
Per the version compat in the docs, there shouldn’t be an issue. There were some optimizations in 3.2 to pipeline authentication, but those are tested to compatibility at least back to 5.5.
Maybe turn up the log level and see what’s happening? Also, note that often the client doesn’t get details on authentication issues, so you may need to look at the cluster’s logs.
Ok thanks for this. Not seeing anything in the cluster logs. The version I’m currently on is actually Community Edition 5.0.0 build 3519
Had a look in the clients logs at the time but nothing of interest. Only thing I could see was a line similar to the following:
There was an error attempting to resolve hosts using DNS-SRV - “Non-Existent Domain”
Hostnames I’m using are 100% correct as they work the same in the 2.x .net client.
Thanks
Andy
If your on 5.0.0, you would expect this error as you’ll need to connect to a bucket directly by opening a bucket after trying to connect at the cluster level:
var cluster = await Cluster.ConnectAsync(...);
var bucket = await cluster.BucketAsync(...);
If you cannot connect at the bucket level, your logs should provide details into “why”.
ok so looking at the client logs. After calling BucketAsync I get an exception Couchbase.Management.Buckets.BucketNotFoundException - Bucket with name QContractor does not exist or cannot be reached. It does exist and was opened fine using v2.x libraries.
Before the exception i get several of these
Couchbase.Core.ClusterContext: Information: Cannot bootstrap bucket xxxx as Couchbase.
Couchbase.Core.ClusterContext: Information: Cannot bootstrap bucket xxxx as Memcached.
Couchbase.Core.ClusterContext: Information: Cannot bootstrap bucket xxxx as Ephemeral.
with several
System.Net.Sockets.SocketException (11001): No such host is known.
Assume this is the cluster host name which again is the same one that works in v2.x in the form
couchbase://xxxx.xxxx.xxxxx/
Another observation. From v2.7.20 onwards the .net client fails when querying. The previous version v2.7.18 is fine
Related to the problems in v3.6?
The SDK cannot connect reach the remote host (the cluster) for some reason. This wouldn’t be a SDK issue but an environment or configuration issue. If it was reachable with v2 it should be reachable with v3 as this is socket initially opening.
Checkout SDK Doctor as it helps with diagnose connectivity issues with CB.
The actual reason for the query failure should be posted. I don’t see any reason why a query would work in v2.7.18 and not in v2.7.20 or v3.X.
It might also be useful to post your v3 initialization code and configuration.
so I figured out the 2.7.18 to 2.7.20 issues. Configuration on my cluster a node had been added using the internal aws ip. The failures in the logs for 2.7.20 showed this private IP so this gave me the clue there. So I can now use up to 2.7.26 with no problems.
I just tried 3.6 and have the same issue
cluster = await Cluster.ConnectAsync(serviceConfig.Config.dbcluster, new ClusterOptions()
.WithCredentials(username: serviceConfig.Config.dbclusterusername, password: serviceConfig.Config.dbclusterpassword)
.WithLogging(factory));
// Fails here!
bucket = await cluster.BucketAsync("QContractor");