简体   繁体   English

Vagrant Box上的Couchbase和ElasticSearch复制

[英]Couchbase & ElasticSearch Replication on Vagrant Box

I have successfully setup couchbase and elasticsearch on my machine, and configured the XDCR (cross datacenter replication) without a problem. 我已经在我的机器上成功设置了ouchbase和elasticsearch,并且配置了XDCR(跨数据中心复制)没有问题。 Now, however I am trying to achieve the same setup on a vagrant box. 现在,但是我正在尝试在无所事事的盒子上实现相同的设置。 I have elasticsearch and couchbase running without a problem, and port forwarding setup so I can access the couchbase admin console from my browser. 我的Elasticsearch和Couchbase运行正常,端口转发设置良好,因此我可以从浏览器访问Couchbase管理控制台。

When I try and setup the replication though I get the following error 当我尝试设置复制但我遇到以下错误时

Error {econnrefused,[{lhttpc_client,send_request,1}, {lhttpc_client,execute,9},
lhttpc_client,request,9}]} happened during REST call get to http://127.0.0.1:9091/pools.

I am setting up the replication with IP/hostname 127.0.0.1:9091 , which is what worked when I was doing it locally, ie without vagrant. 我正在使用IP/hostname 127.0.0.1:9091设置复制,这是在本地进行复制(即无游民)时起作用的。 Could this be the problem? 这可能是问题吗? Since localhost isn't referring to the vagrant machine? 由于localhost不是指无业游民的机器?

猜测是您尝试使用错误的端口进行复制-Couchbase使用的端口8091 而不是 9091

Ok, despite using versions of couchbase and elasticsearch that were supposed to be compatible, I decided to try the same approach with different versions, namely 好的,尽管使用了应该兼容的couchbase和elasticsearch版本,但我还是决定对不同版本尝试相同的方法,即

couchbase-server-enterprise_2.5.1_x86_64.deb
elasticsearch-1.0.1.deb
elasticsearch-transport-couchbase-1.3.0

Instead of port forwarding in my Vagrant file I also made sure I was using a private network 确保我正在使用专用网络,而不是在Vagrant文​​件中进行端口转发

config.vm.network "private_network", ip: "192.168.33.10"

and then when I attempted to setup replication using 192.168.33.10:9091 as the hostname it worked. 然后,当我尝试使用192.168.33.10:9091作为主机名设置复制时,它起作用了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM