【发布时间】:2014-09-06 22:17:41
【问题描述】:
我有两台服务器。其中一个充当使用 .NET 客户端连接到 couchbase 服务器的客户端。另一个是已配置的 couchbase 服务器。这些服务器托管在 Amazon EC2 中。现在我已经打开了 couchbase 服务器上的所有端口。但是,当我尝试使用 .NET 客户端进行连接时,初始化代码会挂起并且不会引发任何错误。除了 get 总是返回 null 之外,它还允许我保存和获取没有错误。我已经验证了 IP 和端口是可以访问和打开的。
这是我正在尝试的代码。
CouchbaseClient = new CouchbaseClient("api_cache",""); //hangs for about 10 seconds throws no error
CouchbaseClient.Store(StoreMode.Set, "test","test")); //throws no error;
var test = CouchbaseClient.Get("test"); //always returns null;
这是我的 web.config 中的代码
<configSections>
<section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<appSettings>
</appSettings>
<couchbase>
<servers>
<add uri="http://XX.XX.XX.XX:8091/pools" />
</servers>
</couchbase>
....
【问题讨论】:
标签: c# amazon-ec2 client-server couchbase