【问题标题】:Couchbase error opening bucket - Could not bootstrapCouchbase 错误打开存储桶 - 无法引导
【发布时间】:2017-08-05 17:34:38
【问题描述】:

我正在尝试连接到我的 couchbase 服务器(企业版 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)

知道问题是什么吗?

【问题讨论】:

  • 服务器是否监听https://10.0.0.54:8091
  • 是的,它可以从浏览器访问,只是从它没有的代码访问。
  • @JosefBláha 跟踪来自 sdk 的请求并检查响应代码(使用 Fiddler)
  • 您成功解决了这个问题吗?我遇到了同样的行为..

标签: c# couchbase


【解决方案1】:

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

【讨论】:

    【解决方案2】:

    公开所有需要的端口 docker run -d -p 8091-8096:8091-8096 -p 11210:11210 -p 11211:11211 沙发床

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多