从.net访问Azure Windows 2012 VM上的Couchbase [英] Access Couchbase on Azure Windows 2012 VM from .net

查看:72
本文介绍了从.net访问Azure Windows 2012 VM上的Couchbase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Azure上设置新的Couchbase实例,并且无法从.net SDK连接.

I'm trying to get a new instance of Couchbase set up on Azure, and having trouble connecting from the .net SDK.

对于设置,我在这里遵循了以下步骤: http://blog.couchbase.com/step-step-production-deployment-couchbase-windows-azure-virtual-machines (进行了几次尝试以使其在Azure虚拟网络上启动并运行)

For setup, I have followed steps here: http://blog.couchbase.com/step-step-production-deployment-couchbase-windows-azure-virtual-machines (took several attempts to get this up and running on an azure virtual network)

在Windows Server 2012 R2上已安装版本:2.5.1企业版(build-1083).

Have installed Version: 2.5.1 enterprise edition (build-1083) on windows Server 2012 R2.

一开始我只运行一个VM.中等大小,除了沙发床外什么也没有.

I'm running only one VM to begin with. Medium sized, serving nothing but couchbase.

在机器本身和azure云服务上都打开了azure端口.根据此文档,已在VM防火墙上设置了新的入站规则: http://docs.couchbase.com/couchbase-manual-2.0/#network-ports .在Azure云服务上,我打开了该文档中标记为客户端的节点"的所有内容(8091、8092、11210、11211).

Have opened azure ports both on the machine itself, and the azure cloud service. Have set new inbound rules on the VM firewall according this document: http://docs.couchbase.com/couchbase-manual-2.0/#network-ports. On the Azure cloud service, I've opened anything marked as 'node to client' from that document (8091, 8092, 11210, 11211).

在浏览器中一切似乎都很好.在我的开发机上,我可以从azure VM外部IP上加载Couchbase.我已经登录并将testdoc添加到默认"存储桶中.我可以在浏览器中查看此文档,一切看起来都很好.

Everything seems to be fine in the browser. From my dev machine, I can load couchbase from the azure VM external IP. I have logged in and added a testdoc to the 'default' bucket. I can view this document in the browser, and everthing appear good.

问题是当我开始尝试从.net应用程序访问时.当我尝试.ExecuteGet testdoc时,出现无法定位节点"消息,并且生成的文档为空.

The problem is when I start trying to access from .net application. When I try to .ExecuteGet the testdoc, I'm getting 'Unable to locate node' message, and the resulting doc is null.

日志告诉我该地址可以,但是System.Dns.GetAddrInfo(String name)出现错误.这是错误的完整日志:

Logs are telling me that the address is ok, but there is an error at System.Dns.GetAddrInfo(String name). Here is the full log up to the error:

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机器的配置上搞砸了,但是运气不好.有什么想法吗?

I suspect, as the error is DNS related, that I've screwed something up on the config of the CB machine, but I've had no luck figuring out what. Any ideas?

推荐答案

解决了.必须将客户端计算机放在相同的虚拟网络上,调整主机文件,最后,更改.net app.config以使用我在安装它时给长沙发基地提供的相同主机名.

Got it resolved. Had to put the client machine on the same virtual network, tweak the host file, and finally, change the .net app.config to use the same host name I gave to couchbase when installing it.

更多详细信息在这里: http://论坛.couchbase.com/t/access-couchbase-on-azure-windows-2012-vm-from-net/1580/5

more detail here: http://forums.couchbase.com/t/access-couchbase-on-azure-windows-2012-vm-from-net/1580/5

这篇关于从.net访问Azure Windows 2012 VM上的Couchbase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆