GetAllBucketSettings Causing ArgumentNullException

We’re running an application that’s polling an event journal to create a projection of our data. We’re currently getting this error:

Failed to get all buckets - {domain}/pools/default/buckets
System.ArgumentNullException: Value cannot be null. (Parameter ‘value’)
at Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable`1 value)
at Couchbase.Management.Buckets.BucketManager.GetBucketSettings(JToken json)
at Couchbase.Management.Buckets.BucketManager.GetAllBucketsAsync(GetAllBucketsOptions options)

I called that endpoint and the array that’s returned doesn’t include the “maxTTL” property. The response does include other information (name, bucketType, etc.) about it’s own bucket and the other buckets in the cluster.

At this point I’m stuck. Is the “maxTTL” a standard property that should always be returned from the server, or are the permissions misconfigured and the user doesn’t have access to that property? Or is this a new updated and that property isn’t always returned? Basically, is the problem with the Couchbase Server and it should’ve returned that propery and didn’t, or does the sdk assume it’ll be returned but now it’s not?

Couchbase Community Server Version 6.6
CouchbaseNetClient 3.1.3
Couchbase.Transactions 1.0.0-beta.2

User permissions:
Application Access [only 1 bucket], Read-Only Admin

Edit:
I double checked and the response does include “name”, “quota.rawRAM”, and “controllers.flush”. It looks like the other settings it looks for are null checked.

We’re not calling this method in our code, but we’re using the Couchbase.Transactions library. The source of the call is in the LostTransactionManager.DiscoverBuckets() method, via the DiscoverBucketsTimer.

1 Like

@Brian_Sain -

Can you try updating from Couchbase.Transactions 1.0.0-beta.2 to Couchbase.Transactions 1.0.0?

Jeff

Fortunately that didn’t help:

[17:42:35 WRN] GetAllBuckets failed due to ArgumentNullException. Cluster not ready?
[17:42:36 INF] Cluster ready. Retrying GetAllBuckets…
[17:42:36 INF] Attempting to get all buckets - {domain}/pools/default/buckets
[17:42:36 ERR] Failed to get all buckets -{domain}/pools/default/buckets
System.ArgumentNullException: Value cannot be null. (Parameter ‘value’)
Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable`1 value)
Couchbase.Management.Buckets.BucketManager.GetBucketSettings(JToken json)
Couchbase.Management.Buckets.BucketManager.GetAllBucketsAsync(GetAllBucketsOptions options)

Looking at the source for LostTransactionManager ArgumentNullException is expected in some cases.

This however, makes me think its a just a bug in the we don’t check the nullability of maxTtl field or any field when we read from the response. If the server is not idempotent here, we should be doing this.

Asking are .NET transactions expert here for his thoughts @Richard_Ponton : do we need to fix this in the SDK?

Update - looks like its a bug on the SDK: Loading...

Jeff

@Brian_Sain -

Patch here: http://review.couchbase.org/c/couchbase-net-client/+/153045 - will be in 3.1.6 release in June.

Jeff

1 Like