2014-09-12 117 views
1

我试图获取在Azure上设置的Couchbase的新实例,并且无法从.net SDK进行连接。从.net访问Couchbase Azure Windows 2012 VM

这里的设置,我按照步骤: http://blog.couchbase.com/step-step-production-deployment-couchbase-windows-azure-virtual-machines(花了多次尝试获取这件事和蔚蓝的虚拟网络上运行)

已安装版本:2.5.1企业版(建设 - 1083)上Windows Server 2012 R2。

我只运行一个虚拟机开始。中等大小,除了沙发底外什么也没有。

已经在机器本身和天蓝色的云服务上打开了天蓝色的端口。根据此文档在虚拟机防火墙上设置了新的入站规则:http://docs.couchbase.com/couchbase-manual-2.0/#network-ports。在Azure云服务上,我从该文档(8091,8092,11210,11211)打开了标记为'node to client'的任何内容。

在浏览器中一切似乎都很好。在我的开发机器上,我可以从Azure VM外部IP加载couchbase。我已登录并将testdoc添加到“默认”存储区。我可以在浏览器中查看这个文档,并且看起来不错。

问题是当我开始尝试从.net应用程序访问。当我尝试执行.Execute获取testdoc时,出现'Unable to locate node'消息,并且生成的doc为空。

日志告诉我地址​​正常,但在System.Dns.GetAddrInfo(String name)处有错误。下面是完整的记录多达错误:

2014-09-12 14:40:58,291 [10] DEBUG Couchbase.CouchbasePool [(null)] <(null)> - Initializing Couchbase.CouchbasePool 

2014-09-12 14:40:58,345 [10] WARN Enyim.Caching.MemcachedClient [(null)] <(null)> - Creating new client. CID: ffcc1454-1146-4fac-94b6-c74dae07ca4b CouchbaseClient 

2014-09-12 14:40:58,348 [10] WARN Couchbase.CouchbasePool [(null)] <(null)> - Starting Couchbase.CouchbasePool 

2014-09-12 14:40:58,468 [10] WARN Couchbase.MessageStreamListener [(null)] <(null)> - Starting the listener. Queue=True 

2014-09-12 14:40:58,485 [3] WARN Couchbase.MessageStreamListener [(null)] <(null)> - Started working. 

2014-09-12 14:40:58,518 [3] WARN Couchbase.MessageStreamListener [(null)] <(null)> - Looking for the first working node. 

2014-09-12 14:40:58,621 [3] DEBUG Couchbase.ConfigHelper [(null)] <(null)> - Found config for bucket default. 

2014-09-12 14:40:58,622 [3] WARN Couchbase.MessageStreamListener [(null)] <(null)> - Resolved pool url http://xx.xxx.xx.xxx:8091/pools to http://xx.xxx.xx.xxx:8091/pools/default/bucketsStreaming/default?bucket_uuid=d679672b019cff2053f507a2f4fd642a 

2014-09-12 14:40:58,622 [3] WARN Couchbase.MessageStreamListener [(null)] <(null)> - Start receiving messages. 

2014-09-12 14:40:58,661 [3] INFO Couchbase.CouchbasePool [(null)] <(null)> - Received new configuration. 

2014-09-12 14:40:58,717 [cbp_thread] INFO Couchbase.CouchbasePool [(null)] <(null)> - Has vbucket. Server count: 1 

2014-09-12 14:40:58,803 [cbp_thread] ERROR Couchbase.CouchbasePool [(null)] <(null)> - Failed to initialize the pool. 
System.Net.Sockets.SocketException (0x80004005): The requested name is valid, but no data of the requested type was found 
at System.Net.Dns.GetAddrInfo(String name) 
at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) 
at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) 
at Couchbase.CouchbasePool.GetFirstAddress(String hostname) 
at Couchbase.CouchbasePool.InitVBucket(ClusterConfig config, ISaslAuthenticationProvider auth) 
at Couchbase.CouchbasePool.ReconfigurePool(ClusterConfig config) 

我怀疑,因为错误是DNS相关的,是我搞砸了的东西在CB机的配置,但我没有运气搞清楚出什么。有任何想法吗?

+0

是否配置了IP地址或主机名的集群? 如果是IP地址,它们是私人或公共IP地址。 – Paddy 2014-09-12 23:15:02

+0

使用内部主机名称,并将其映射到hosts文件中的内部IP。我希望在生产中将其他机器放置在子网上,并且能够使用公共IP/url在我的开发机器(而不是子网)上开发/测试它。 – brettman 2014-09-13 08:39:23

+1

得到它解决。必须将客户端机器放在同一虚拟网络上,调整主机文件,最后,将.net app.config更改为使用与安装时相同的主机名称作为couchbase。 更详细的位置:http://www.couchbase.com/communities/q-and-a/access-couchbase-azure-windows-2012-vm-net#node-3812 – brettman 2014-09-14 23:47:08

回答