3
我試圖連接到我的couchbase服務器(企業版本4.6.2)並打開一個使用.Net SDK的桶,代碼非常簡單但仍無法正常工作:Couchbase錯誤打開桶 - 無法引導
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) – Rizwan