Closed udaygtl closed 6 years ago
The same happens for version 6.0.0:
-> Downloading https://raw.githubusercontent.com/elasticfence/elasticsearch-http-user-auth/5.1.2/jar/elasticfence-5.1.2-SNAPSHOT.zip
[=================================================] 100%
Exception in thread "main" java.lang.IllegalArgumentException: plugin [elasticfence] is incompatible with version [6.0.0]; was designed for version [5.1.2]
at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:155)
at org.elasticsearch.plugins.InstallPluginCommand.verify(InstallPluginCommand.java:532)
at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:601)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:215)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:204)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:69)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47)
Correct, currently only elasticsearch 5.1 is supported, trying to use it on anything newer will give you that error. Elasticsearch requires you compile a new version of your plugin for each and every version, I suggest you downlaod the code and adjust for the version you need.
As @shaunbugler suggested. You can fix compatibility issue by adjusting version as follow:
After this run mvn package clean
You'll notice a new zip file with the specific version under jar
directory.
Upload it to somewhere in your github
Then use the raw link, something like https://raw.githubusercontent.com/******.zip
to install it as elasticsearch plugin. Or you can use Rawgit to get that link.
Hope this helps in some way ;)
Tried this approach. Replaced elasticsearch version with 5.2.0 in pom.xml and src/main/resources/plugin-metadata/plugin-descriptor.propertiers. Build is failing with the below error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project elasticfence: Compilation failure: Compilation failure:
[ERROR] /home/xxxx/xxxx/elasticsearch-http-user-auth/src/main/java/org/elasticsearch/plugin/elasticfence/AuthRestFilter.java:[19,30] cannot find symbol
[ERROR] symbol: class RestFilter
[ERROR] location: package org.elasticsearch.rest
[ERROR] /home/xxxx/xxxx/elasticsearch-http-user-auth/src/main/java/org/elasticsearch/plugin/elasticfence/AuthRestFilter.java:[20,30] cannot find symbol
[ERROR] symbol: class RestFilterChain
[ERROR] location: package org.elasticsearch.rest
[ERROR] /home/xxxx/xxxx/elasticsearch-http-user-auth/src/main/java/org/elasticsearch/plugin/elasticfence/AuthRestFilter.java:[24,37] cannot find symbol
[ERROR] symbol: class RestFilter
Much appreciated effort @abhinaythurlapati but unlike for instance Kibana, the Elasticsearch Java backend differences are more relevant and tricky to adjust in between releases and in general require broader adaptions to keep up with the Elastic bonanza. If it was that trivial, we would have done it more regularly ;)
@lmangani can you please elaborate more on issues of adopting new elasticsearch version? I like the simplicity of this plugin and I would like to work on updates for new versions. So maybe together we can figure it out :wink:
Hi, What is the workaround for the following classes. import org.elasticsearch.rest.RestFilter; import org.elasticsearch.rest.RestFilterChain; With ES 5.2.x onwards, support for RestFilter and RestFilterChain are removed.
Thanks for your attention everyone - @arulsince1975 There is unfortunately no workaround, porting Elasticsearch plugins to new versions is a pain without any magic cure other than careful research and/or comparing with other projects doing the same. I am no longer maintaining this project as I believe there are better alternatives nowadays, as opposed to when we started out many years ago. If anyone is willing to take over maintaining the project, just send us a message.
Hell,
Am using ElasticSearch 5.5.0 Version and trying to install elasticfence-5.1.2 and got incompatible version error .
Regards Uday