Code
public static ICluster CreateCluster(string host, string username, string password, int clientThreads = 1)
{
// Configuration of the access of buckets
var bucketConfig = new BucketConfiguration
{
PoolConfiguration = new PoolConfiguration { MaxSize = clientThreads, MinSize = clientThreads, SendTimeout = 12000 }
};
// Cluster client configuration
var clientConfig = new ClientConfiguration
{
Servers = new List<Uri>() { new Uri($"http://{host}:8091/pools") },
UseSsl = false,
// "default" referes to default configuration and not default bucket
BucketConfigs = new Dictionary<string, BucketConfiguration> { { "default", bucketConfig } },
};
var cluster = new Cluster(clientConfig);
var authenticator = new PasswordAuthenticator(username, password);
cluster.Authenticate(authenticator);
return cluster;
}
Here is the stacktrace for the different exceptions:
Could not bootstrap - check inner exceptions for details.
at Couchbase.Core.ClusterController.CreateBucketImpl(String bucketName, String password, IAuthenticator authenticator)
at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password, IAuthenticator authenticator)
at Couchbase.Cluster.OpenBucket(String bucketName, String password)
at Couchbase.Cluster.OpenBucket(String bucketname)
at Brunata.Ulfberht.Cache.CouchbaseCache`1..ctor(ISerializer`1 serializer, CouchbaseCacheConfiguration config) in C:\Source\Repos\Ulfberht.RIS.Core\Ulfberht\CMN.Cache\CouchbaseCache.cs:line 68
Inner exceptions:
Could not bootstrap with CCCP.
at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig(String bucketName, String username, String password)
at Couchbase.Core.ClusterController.CreateBucketImpl(String bucketName, String password, IAuthenticator authenticator)
Value does not fall within the expected range.
at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.GetConfig(String bucketName, String username, String password)
at Couchbase.Core.ClusterController.CreateBucketImpl(String bucketName, String password, IAuthenticator authenticator)