Installing elasticsearch-image plugin from my repository isn't working

I tried to install elasticsearch-image plugin from by typing the commands

bin/plugin -install com.github.kzwang/elasticsearch-image/1.2.0
sudo service elasticsearch restart

And when I tried to index images and search for them I've got this Exception

{"error":"MapperParsingException[failed to parse]; nested: NoSuchMethodError[<init>([BZ)V]; ","status":400}

When I checked for this exception I found an issue here that talks about this exception.

As I searched more, I found that the reason why this exception is appearing is because the class implementation differs between ElasticSearch 1.3.2 AND ElasticSearch 1.7.2

The plugin is built for ElasticSearch 1.3.2, and it uses the class BytesStreamInput in those lines

Which all uses the constructor defined in ElasticSearch 1.3.2

But in ElasticSearch 1.7.2 that constructor is removed and replaced by

So what I did is forking the project

and removing the second parameter to be like in lines

Then tried to install the plugin from the forked project

I tried to use this command

sudo /usr/share/elasticsearch/bin/plugin --install com.github.abozanona.elasticsearch-image/1.2.1

But it gives me this error

Failed to install com.github.abozanona.elasticsearch-image/1.2.1, reason: failed to download out of all possible locations

I tried also to run this command

sudo ./plugin --install readonlyrest --url ''
sudo ./plugin -install abozanona/elasticsearch-image

But it gives me this error

Error while installing plugin, reason: IllegalArgumentException: Plugin installation assumed to be site plugin, but contains source code, aborting installation.

##My question
How can I install the modified plugin from ?

I assume from your description that you are running elasticsearch 1.7.2? The plugin cli back then was considerably lenient and error prone. You should really upgrade to a modern version, for many other reasons than just that.

With that said, you need to actually compile your fork. The zip that you are getting from github is of the sourcecode, and using that method of an autogenerated zip from github was meant specfically for site plugins (which have been removed since 5.0).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.