title: Elasticsearch cluster reference
body: <p>I have spent quite a time reading forums, manuals and blogs trying to solve the problem of creating elasticsearch cluster reference in couchbase (under XDCR tab). </p>
  
  <p>Finally i decided to raise the problem to the community.</p>
  
  <p>I have:</p>
  
  <ul>
  <li>Couchbase 4.0.0-4051 Community Edition (build-4051)</li>
  <li>Elasticsearch 2.1.1 with plug-ins:
  
  <ul>
  <li>transport-couchbase 2.2.1.2</li>
  <li>head</li>
  </ul></li>
  </ul>
  
  <p>Elasticsearch started and uses the following configuration:</p>
  
  <ul>
  <li>cluster.name: es</li>
  <li>node.name: node-1</li>
  <li>node.master: true</li>
  <li>node.data: true</li>
  <li>couchbase.password: pass</li>
  <li>couchbase.username: root</li>
  <li>couchbase.maxConcurrentRequests: 1024</li>
  </ul>
  
  <blockquote>
    <p>[2016-01-20 15:59:19,741][INFO ][transport.couchbase      ] [node-1] publish_address {127.0.0.1:9091}</p>
  </blockquote>
  
  <p>The problem is that i can't create elasticsearch cluster reference in Couchbase web UI under XDCR tab, entering the following information:</p>
  
  <ul>
  <li>Cluster Name: es</li>
  <li>IP/hostname: 127.0.0.1:9091</li>
  <li>Username: root</li>
  <li>Password: *****</li>
  </ul>
  
  <p><a href="http://i.stack.imgur.com/TdGAs.png" rel="nofollow">Cluster reference setup</a></p>
  
  <p>After pressing Save, error message appears: "Attention - Unexpected server error, request logged." </p>
  
  <p>Here is the fragment from xdcr.log file </p>
  
  <blockquote>
    <p>[xdcr:debug,2016-01-20T16:31:16.848+02:00,ns_1@127.0.0.1&lt;0.419.0>:goxdcr_rest:stats:211]
    Unable to obtain stats for bucket "beer-sample" from goxdcr:</p>
    
    <p>{error,{badmatch,{error,timeout}},
           [{goxdcr_rest,send_with_timeout,5,
                         [{file,"src/goxdcr_rest.erl"},{line,60}]},
            {goxdcr_rest,query_goxdcr,4,[{file,"src/goxdcr_rest.erl"},{line,132}]},
            {goxdcr_rest,get_from_goxdcr,3,
                         [{file,"src/goxdcr_rest.erl"},{line,152}]},
            {goxdcr_rest,stats,1,[{file,"src/goxdcr_rest.erl"},{line,207}]},
            {goxdcr_stats_collector,grab_stats,1,
                                    [{file,"src/goxdcr_stats_collector.erl"},
                                     {line,37}]},
            {base_stats_collector,handle_info,2,
                                  [{file,"src/base_stats_collector.erl"},
                                   {line,89}]},
            {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,604}]},
            {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}</p>
  </blockquote>
  
  <p>Thanks, any help would be appreciated. </p>