Couchbase错误打开桶 - 无法引导

问题描述 投票:4回答:2

我正在尝试连接到我的couchbase服务器(Enterprise ver 4.6.2)并使用.Net SDK打开一个存储桶,代码非常简单但仍然无法工作:

        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);
        }

我得到的内部异常细节:

信息

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)

我看到的主要例外是:

Could not bootstrap - check inner exceptions for details.

并且堆栈跟踪:

   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)

知道问题是什么吗?

c# couchbase
2个回答
1
投票

我对社区版有同样的问题。在我的情况下,我没有在尝试访问它之前创建默认存储桶。此外,如果您的服务器/群集或存储桶需要凭据,您还需要输入这些凭据。


0
投票

公开所有必需的端口docker run -d -p 8091-8096:8091-8096 -p 11210:11210 -p 11211:11211 couchbase

© www.soinside.com 2019 - 2024. All rights reserved.