无法使用CCCP引导:Couchbase memcached存储桶异常

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

我正在使用最新版本的CouchbaseNetClient NuGet软件包2.7.4来连接Couchbase 4.6.3企业版(在我的笔记本电脑上运行在docker上)。 C#代码:

var config = new ClientConfiguration
            {
                // assign one or more Couchbase Server URIs available for bootstrap
                Servers = new List<Uri>
                {
                    new Uri("http://192.168.99.100:8091/")
                },
                BucketConfigs = new Dictionary<string, BucketConfiguration> {
                    {"memcachetest", new BucketConfiguration {
                        PoolConfiguration = new PoolConfiguration {
                            MaxSize = 6,
                            MinSize = 4,
                            SendTimeout = 12000
                        },
                        Port = 8091,
                        DefaultOperationLifespan = 123,
                        Password = "",
                        Username = "",
                        BucketName = "memcachetest"
                    }}},
                UseSsl = false,
            };
            ClusterHelper.Initialize(config);

此代码适用于普通存储桶(下面的示例存储桶),但我无法连接到Memcached(memcachetest)存储桶。 couchbase buckets

以下行在打开存储桶时抛出各种异常。

private readonly IBucket _bucket = ClusterHelper.GetBucket("memcachetest", "");

exception

我曾尝试使用/不使用密码。从过去的两天开始,这一切都在我头上!任何帮助appriciated !!

c# couchbase
1个回答
3
投票

Memcached存储桶不支持CCCP。客户端将首先尝试CCCP,然后在CCCP失败时转移到HTTP Streaming - 这会被记录,可能是您偶然发现的。由于它是一个AggregateException,看起来可能有其他原因导致其失败 - 您必须查看每个异常的原因。注意,您可以通过将ConfigurationProviders设置为HttpStreaming来跳过CCCP for Memcached存储桶:

ClientConfiguration.ConfigurationProviders = ServerConfigurationProviders.HttpStreaming;
© www.soinside.com 2019 - 2024. All rights reserved.