Hi,
Im using latest .net sdk 2.5 and 4.5.0-2601 Enterprise Edition (build-2601).
I have followed this tutorial on setting up multiple nodes locally ( Docker Service and Swarm Mode to Create Couchbase Cluster - The Couchbase Blog ) which worked fine. But problem is now that within my code when I call the ‘openBucket’ method on the cluster it eventually times out with following stack trace:
An unhandled exception has occurred while executing the request
System.AggregateException: Could not bootstrap - check inner exceptions for details. —> System.AggregateException: One or more errors occurred. —> System.NullReferenceException: Object reference not set to an instance of an object.
at Couchbase.IO.Services.IOServiceBase.CheckEnabledServerFeatures(IConnection connection)
at Couchbase.IO.IOServiceFactory.<>c__DisplayClass0_0.b__0(IConnectionPool pool)
at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig(String bucketName, String username, String password)
— End of inner exception stack trace —
at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig(String bucketName, String username, String password)
at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password, IAuthenticator authenticator)
— End of inner exception stack trace —
at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password, IAuthenticator authenticator)
at Fleetmatics.Toggle.Cache.Services.Storage.Couchbase.CouchbaseFeatureStore.d__2.MoveNext() in C:\BitBucket\Toggle.Command\Toggle.Cache.Services\Storage\Couchbase\CouchbaseFeatureStore.cs:line 63
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Polly.RetrySyntaxAsync.<>c__DisplayClass23_0.<b__1>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Polly.Retry.RetryEngine.d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Polly.Retry.RetryEngine.<ImplementationAsync>d__1
1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Polly.Policy.d__39.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at Fleetmatics.Toggle.Cache.Services.Storage.CompositeFeatureStore.d__4.MoveNext() in C:\BitBucket\Toggle.Command\Toggle.Cache.Services\Storage\CompositeFeatureStore.cs:line 36
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MediatR.Internal.RequestHandlerImpl`1.<>c__DisplayClass5_2.<b__5>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at Fleetmatics.Toggle.Command.Service.Controllers.ServiceHostController.d__3.MoveNext() in C:\BitBucket\Toggle.Command\Toggle.Command.Service\Controllers\ServiceHostController.cs:line 47
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__27.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__25.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__24.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ExceptionContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__22.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__20.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.d__3.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.d__7.MoveNext()
—> (Inner Exception #0) System.AggregateException: One or more errors occurred. —> System.NullReferenceException: Object reference not set to an instance of an object.
at Couchbase.IO.Services.IOServiceBase.CheckEnabledServerFeatures(IConnection connection)
at Couchbase.IO.IOServiceFactory.<>c__DisplayClass0_0.b__0(IConnectionPool pool)
at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig(String bucketName, String username, String password)
— End of inner exception stack trace —
at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig(String bucketName, String username, String password)
at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password, IAuthenticator authenticator)
—> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
at Couchbase.IO.Services.IOServiceBase.CheckEnabledServerFeatures(IConnection connection)
at Couchbase.IO.IOServiceFactory.<>c__DisplayClass0_0.b__0(IConnectionPool pool)
at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig(String bucketName, String username, String password)<—
<——> (Inner Exception #1) Couchbase.Core.BucketNotFoundException: 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.CreateBucket(String bucketName, String password, IAuthenticator authenticator)<—
my configuration is:
config = new ClientConfiguration
{
Servers = new List<Uri>
{
new Uri("http://127.0.0.1:8091/pools")
},
UseSsl = false,
DefaultOperationLifespan = 1000,
BucketConfigs = new Dictionary<string, BucketConfiguration>
{
{
"FeatureDefinition", new BucketConfiguration
{
BucketName = "FeatureDefinition",
UseSsl = false,
Password = "",
DefaultOperationLifespan = 2000,
PoolConfiguration = new PoolConfiguration
{
MaxSize = 10,
MinSize = 5,
SendTimeout = 12000
}
}
},
{
"FeatureValue", new BucketConfiguration
{
BucketName = "FeatureValue",
UseSsl = false,
Password = "",
DefaultOperationLifespan = 2000,
PoolConfiguration = new PoolConfiguration
{
MaxSize = 10,
MinSize = 5,
SendTimeout = 12000
}
}
}
}
};
cluster = new Cluster(config);
any help would be appreciated.
edit: using the following I am able to get a list of the two buckets that are in the database
var buckets = _cluster.CreateManager("Administrator", "password").ListBuckets().Value;
so I know that it can connect with the DB, but still stumped as to the timeout and errors above