2

On my server I have installed elasticsearch-2.2.1 and couchbase server version 4.1.0. The aim is to transfer data from bucket x on couchbase to elastic search.

Ive installed the transport-couchbase plugin on elastic-search which will basically allow for xdcr from the server to elastic search.

As I understand it, transport-couchbase listens by default on port 9091 so in essence I'm supposed to create a cluster reference that points to that port (both couchbase and elastic search are installed on the same machine).

When I try create the reference I get an internal server error. The logs don't give me much information regarding the issue and I can ping the port. However when I try to telnet the machine on the port it refuses connection.

the server is sitting behind a proxy and i am starting to think that the issue lies within either couchbase server or elasticsearch ( transport-couchbase plugin)

Im going out on a limb here but I think maybe im supposed to configure the plugin so that it accepts requests going through tthe proxy. If this is the issue, is there a way to embed proxy settings into the plugin so that it can accept connections for xdcr?

PS: When I did this whole process on a separate machine that isnt sitting behind a proxy, everything worked fine. So I have a strong suspicion that it is proxy issues

Kazi
  • 71
  • 5

2 Answers2

2

If you can't telnet or browse to port 9091, this most likely indicates a network config issue. The plugin binds to the interface that elasticsearch binds to. The first thing to check is that the bind_host and publish_host in elasticsearch.yml is configured to bind to an interface that allows connections from wherever the proxy is located and that the proxy is really connecting on that interface.

David Ostrovsky
  • 2,461
  • 12
  • 13
  • 1
    Thanks david, it seems there was another dev with a similar issue. He solved it by changing the network.host setting in the elasticsearch.yml file to be the IP address of the machine. I tried that and it worked beautifully – Kazi May 14 '16 at 16:28
  • @Kazi, this is the correct answer. The `network.host` had to be set explicitly to `127.0.0.1` in my case. – Dyin Jul 26 '16 at 18:15
0

There is a thread in github for the bug in transport plugin where it might not bind to all interfaces : https://github.com/couchbaselabs/elasticsearch-transport-couchbase/issues/134

The above solutions didn't work for me, however I added this line: -Djava.net.preferIPv4Stack=true to /etc/elasticsearch/jvm.options and it seemed fixed the issue in my case