IndexOutOfBoundsException in DefaultCouchbaseBucketConfig.nodeIndexForMaster, flushing not possible afterwards

@daschl

Please see the attached file for a trace log.
I managed to minimize the example a bit.
The whole thing happens within a test suite. Those loads of exceptions I wrote about above originate from a flush call right in the beginning, this was unnecessary. I removed the call and only ran one test from the suite. Then I only get the IndexOutOfBoundsException once in the beginning. The test starts but any database operation leads to a timeout, failing the test.

Furthermore I tried connecting to a Couchbase 3 cluster which resulted in “Requests cancelled in-flight” and strangely an AuthentificationException after it had already connected.

crash_log.zip (9.3 KB)

We create the bucket like:

DefaultCouchbaseEnvironment.Builder settings = DefaultCouchbaseEnvironment.builder();
        
couchbaseDb = CouchbaseCluster.create(settings.build(), "couchbase01.an-app-test.nl.a-host.com", "couchbase02.an-app-test.nl.a-host.com", "couchbase03.an-app-test.nl.a-host.com");
clusterManager.insertBucket(DefaultBucketSettings.builder().name(bucketName).replicas(2).quota(250).enableFlush(true));