Couchbase error opening bucket - Could not bootstrap

Viewed 2606

I am trying to connect to my couchbase server (Enterprise ver 4.6.2) and open a bucket using the .Net SDK, the code is very simple but still fail to work:

        var cluster = new Cluster(new ClientConfiguration
        {
            Servers = new List<Uri> { new Uri("https://10.0.0.54:8091/") }
        });

        try
        {
            var bucket = cluster.OpenBucket("default");
        }
        catch (Exception ex)
        {
            Console.WriteLine("Error getting bucket.");
            Console.WriteLine(ex.Message);
        }

The inner exception details I get:

Message

Object reference not set to an instance of an object

StackTrace

Couchbase.IO.Services.PooledIOService.CheckEnabledServerFeatures(IConnection connection)
   at Couchbase.IO.Services.PooledIOService..ctor(IConnectionPool connectionPool)
   at Couchbase.IO.IOServiceFactory.<>c__DisplayClass0_0.<GetFactory>b__0(IConnectionPool pool)
   at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig(String bucketName, String username, String password)

The main exception I see is:

Could not bootstrap - check inner exceptions for details.

And the stack trace:

   at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String username, String password, IAuthenticator authenticator)
   at Couchbase.Core.ClusterController.CreateBucket(String bucketName, IAuthenticator authenticator)
   at Couchbase.Cluster.OpenBucket(String bucketname)
   at Couchbase.Program.Main(String[] args)

Any idea what the issue is?

2 Answers

Expose all required ports docker run -d -p 8091-8096:8091-8096 -p 11210:11210 -p 11211:11211 couchbase

Related