Couchbase .Net SDK error - "Could not bootstrap"



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("") }

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

The inner exception details I get:


Object reference not set to an instance of an object


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?


Hi @ido -

Bootstrapping errors mean that the client cannot connect to the remote cluster or that the bucket does exist or that an auth error occurred. FWIW I cut and pasted your code, changing the IP to my cluster, and was able to connect.

Can you post the entire exception and stacktrace? Also, check to see if you can connect to the server using your browser. Finally, which SDK version are you using?



Hey Jeff,

I am using version (SDK), its the latest one from Nuget.

I am able to connect from my browser and also run certain requests from Fiddler.

I installed Couchbase locally and it works well, but when trying to connect to my AWS instance (I used couchbase’s AMI on AWS Marketplace) it doesnt work.

Just to make it clear, from the browser and Fiddler, my AWS instance is accessible, but not from the code above. I checked the security groups and its all set well, so no issue there.

I also dont see any fiddler traffic when debugging the code…

Any idea?



I need more diagnostic information to determine what the problem is, can you:

  • Post the entire stacktrace

  • Enable logging and post the results during the bootstrapping process

Also I suggest you:

  • Run SDK Doctor against the cluster and see what it uncovers.

  • Read through this and make sure you have the correct port publicly exposed.