Unable to install elasticsearch-transport-couchbase

I installed elasticsearch(5.6.11) using elasticsearch install.

http://localhost:9200/ is worked fine.
{ "name" : "BmKqtDX", "cluster_name" : "elasticsearch", "cluster_uuid" : "bneVvPPXSQW4jx8Sq4QzDA", "version" : { "number" : "5.6.11", "build_hash" : "bc3eef4", "build_date" : "2018-08-16T15:25:17.293Z", "build_snapshot" : false, "lucene_version" : "6.6.1" }, "tagline" : "You Know, for Search" }

I got an error while installing elasticsearch plugin
elasticsearch-plugin install https://github.com/couchbaselabs/couchbase-elasticsearch-connector/releases/download/3.0.0-cypress/elasticsearch-transport-couchbase-3.0.0-cypress-es5.6.4.zip

error :
C:\elasticsearch\bin>elasticsearch-plugin install https://github.com/couchbasela bs/couchbase-elasticsearch-connector/releases/download/3.0.0-cypress/elasticsear ch-transport-couchbase-3.0.0-cypress-es5.6.4.zip -> Downloading https://github.com/couchbaselabs/couchbase-elasticsearch-connecto r/releases/download/3.0.0-cypress/elasticsearch-transport-couchbase-3.0.0-cypres s-es5.6.4.zip [=================================================] 100% Exception in thread "main" java.lang.IllegalArgumentException: plugin [transport -couchbase] is incompatible with version [5.6.11]; was designed for version [5.6 .4] at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.ja va:146) at org.elasticsearch.plugins.InstallPluginCommand.verify(InstallPluginCo mmand.java:501) at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginC ommand.java:570) at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginC ommand.java:218) at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginC ommand.java:202) at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwar eCommand.java:70) at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:1 34) at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69) at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:1 34) at org.elasticsearch.cli.Command.main(Command.java:90) at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47)

My couchbase server version - 5.0
Elasticsearch version 5.6.11
OS - windows 8.1

Can you help me?
Thank you.

Hi,
Below is the version-compatibility link
https://docs.couchbase.com/elasticsearch-connector/3.0/release-notes.html#version-compatibility
Can you try downloading version 5.6.4 and let us know if it works for you.

1 Like

Thank you @akshata.trivedi.

I installed Elasticsearch version 5.6.4.
My Elasticsearch installation directory is C:\elasticsearch-5.6.4

I successfully installed elasticsearch transport couchbase using elasticsearch-plugin install https://github.com/couch baselabs/couchbase-elasticsearch-connector/releases/download/3.0.0-cypress/elast icsearch-transport-couchbase-3.0.0-cypress-es5.6.4.zip .

transport-couchbase path is C:\elasticsearch-5.6.4\plugins\transport-couchbase

I edited Elasticsearch configuration file(C:\elasticsearch-5.6.4\config)
couchbase.username: xxxx; couchbase.password: xxxx; couchbase.maxConcurrentRequests: 1024

configure the Elasticsearch plug-in with the following curl command using configuration
curl -X PUT http://localhost:9200/_template/couchbase -d @plugins/tr ansport-couchbase/couchbase_template.json

But my elasticsearch directory is not /usr/share/elasticsearch
I got an error
Warning: Couldn't read data from file Warning: "plugins/transport-couchbase/couchbase_template.json", this makes an Warning: empty POST. {"error":{"root_cause":[{"type":"parse_exception","reason":"request body is requ ired"}],"type":"parse_exception","reason":"request body is required"},"status":4 00}

I try following command also. but i got error.
curl -X PUT http://localhost:9200/_template/couchbase -d C:/elasticsearch-5.6.4/plugins/transport-couchbase/couchbase_template.json
Error
{"error":"Content-Type header [application/x-www-form-urlencoded] is not support ed","status":406}

Can you help me to solve this issue?
Thank you.

Can you double check the path for your file. From the error it looks like the path is not correct.

Because this command curl -X PUT http://localhost:9200/_template/couchbase -d C:/elasticsearch-5.6.4/plugins/transport-couchbase/couchbase_template.json
This curl command is pointing at a file in the elastic search connector distribution which does not look is properly set.

1 Like

Thank you @akshata.trivedi.
I used following curl command
curl -X PUT "http://localhost:9200/_template/couchbase" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"template\" : \"*\" , \"order\" : 10, \"mappings\" : { \"couchbaseCheckpoint\" : { \"_source\" : { \ "includes\" : [\"doc.*\"] }, \"dynamic_templates\": [ { \"store_no_index\": { \" match\": \"*\", \"mapping\": { \"store\" : \"no\", \"index\" : \"no\", \"include _in_all\" : false } } } ] }, \"_default_\" : { \"_source\" : { \"includes\" : [\ "meta.*\"] }, \"properties\" : { \"meta\" : { \"type\" : \"object\", \"include_i n_all\" : false } } } }}"

I got {“acknowledged”:true} .
Thank you.