SDK Periodically throws Cluster not supporting Data Services error

Quick question;

We’ve encountered a problem and I have a hypothesis on what the problem was , but I’m not 100% sure of it. And if anyone knows it’ll save me having to do an environment setup to test and validate it.

Using the .Net SDK, you can specify in a config file the node addresses to connect to.

  1. Let’s say one of those nodes did not have the data service installed (only query and index)

  2. The SDK ends up using that config line to attempt opening a bucket

  3. The bucket is succesfully opened and the code attempts an operation on it (let’s say an insert)

Is it expected that couchbase will return a ‘Cluster does not support Data Service’ error? Or should it manage operations regardless of what node is in the config, provided you have a node with data services in your cluster?

Thanks!

@spcmnky -

The client should route the request to a node that indeed has the service installed (assuming you have a node in your cluster with the data services enabled).

The bootstrapping is independent of the configured service; you can bootstrap from a node without the data service for example.

-Jeff

1 Like

Thanks for the quick reply!

Sadly that means it isn’t my problem - I was hoping it was, it would have been an easy fix. Guess I’ll keep digging.

EDIT:
The issue is periodic (a few days in between) and restarting our service that connects to couchbase solves the problem every time, this is rather complicated to reproduce (we don’t actually know why it starts throwing the ‘data service’ error). There are no errors from the couchbase side of things or on other apps connecting to the cluster. There also seems to be very little info on this other than a bug fixed back in 3.0 (because the message itself is pretty clear and straightforward).

Other than obviously not having a node configured for data services in our cluster, does anyone know if there are any typical issues that could throw the ‘Cluster does not support Data Service’ error from the .Net SDK? (Since we restarted our app yesterday I’m stuck waiting until it happens again)

@spcmnky -

That sounds suspiciously like a bug. Can you enable logging and provide them? Also, which version of the SDK and Couchbase are you using?

-Jeff

Couchbase (4 nodes on AWS Ubuntu instances);
4.1.0-5005 Enterprise Edition (build-5005).
Nothing at all in the logs - like I said all the other apps run fine and have not had this problem - I really think it’s on the app side. I can still upload them all to support but I doubt it’s relevant.

C# App:
AWSSDK 2.3.52.0
Running on windows

The logs on the app were set to writing -error level logs- to a file, and all the rest just to the logviewer which for reasons beyond me was paused :expressionless: So all I have for the incident is the following every 5 seconds over a few hours (because we keep trying the operation if for some reason the app fails to get through):

2016-07-04 14:49:35.3771 AppSync.<Start>b__3 => AppSync.DoPeriodicSync => AppLog.Error Error Uncaught exception - ServiceNotSupportedException
The cluster does not support Data services.
   at Couchbase.Core.Buckets.CouchbaseRequestExecuter.SendWithRetry[T](IOperation`1 operation)
   at Couchbase.CouchbaseBucket.Get[T](String key)
   at [...]

Obviously I’m running the viewer now, but I can’t provide the logs until it happens again :disappointed:

UPDATE (And updated the title)::
So there is actually not much more in the logs
-Ridiculously often the on going connection with couchbase is lost while it’s idle (kind of normal) so it reconnects before doing an operation; Eventually that re-connection leads to the error above.

2016-07-08 14:05:14.2050|INFO|Found 1 operation requests.
2016-07-08 14:05:14.2050|INFO|Processing operation request ID 37414.
2016-07-08 14:05:14.2050|INFO|Is OBJECT operation request
2016-07-08 14:05:14.2050|INFO|Connection with couchbase lost trying to reset connection.
2016-07-08 14:05:14.2050|INFO|Closing connection to bucket
2016-07-08 14:05:14.2050|INFO|Opening connection to bucket
2016-07-08 14:05:15.5930|INFO|Deleted processed operation request 37414

vs

2016-07-08 14:12:41.3990|INFO|Found 1 operation requests.
2016-07-08 14:12:41.3990|INFO|Processing operation request ID 37416.
2016-07-08 14:12:41.3990|INFO|Is OBJECT operation request
2016-07-08 14:12:41.3990|INFO|Connection with couchbase lost trying to reset connection.
2016-07-08 14:12:41.3990|INFO|Closing connection to bucket 
2016-07-08 14:12:41.3990|INFO|Opening connection to bucket 
2016-07-08 14:12:43.2560|ERROR|Uncaught exception - ServiceNotSupportedException
The cluster does not support Data services.
   at Couchbase.Core.Buckets.CouchbaseRequestExecuter.SendWithRetry[T](IOperation`1 operation)
   at Couchbase.CouchbaseBucket.Get[T](String key) [...]

2016-07-08 14:12:43.2560|INFO|Going to sleep for 5 seconds.
2016-07-08 14:12:48.2790|INFO|Found 1 operation requests.
2016-07-08 14:12:48.2790|INFO|Processing operation request ID 37416.
2016-07-08 14:12:48.2790|INFO|Is OBJECT operation request
2016-07-08 14:12:48.2790|ERROR|Uncaught exception - ServiceNotSupportedException
The cluster does not support Data services.
   at Couchbase.Core.Buckets.CouchbaseRequestExecuter.SendWithRetry[T](IOperation`1 operation)
   at Couchbase.CouchbaseBucket.Get[T](String key) [...]

I feel like we can manage that error and force the connection closed to then re-open it - but I still totally stumped as to what could cause this. I guess the next step is to upload the couchbase logs to support even though there doesn’t seem to be anything in them… unless I’m missing something.

Could it be possible that while other processes we have (on other machines) constantly communicate with couchbase they do not encounter this, while here we regularly lose the connection while idling and eventually get the error?