Unable to install Plugin in Elastic Search 2.1


(Sushant Sood) #1

I am trying to install custom plugin in ES 2.1 using plugin tool in bin/plugin and i am getting exception of plugin descriptor even though plugin-descriptor.properties is available in resources folder of my project and it gets bundled in zip of the plugin.

command :

bin/plugin install file:///Users/git/plugin.zip

Error :

NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
ERROR: Could not find plugin descriptor 'plugin-descriptor.properties' in plugin zip


(David Pilato) #2

You need to read https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugin-authors.html


(Sushant Sood) #3

I read that documentation but the documentation does not explain well for plugin-descriptor.properties to be placed outside your plugin jar . Now it is working fine after I verified from PluginManager source code . It would have been better if we were allowed to keep the descriptor in plugin jar only .Thanks for your reply :slight_smile:


(David Pilato) #4

I'm afraid I did not understand your issue at first. Reading it again now makes me think that my answer was wrong because you obviously put the descriptor file in the right place.

Which now comes to a question: what was your issue and how did you fix it?

Also, if you think the documentation could be enhanced, feel free to contribute! Would be highly appreciated! :smiley:


#5

I got the same problem so for those who will encouter the same problem the solution is to modify your assembly plugin.xml file like this (note the reference to plugin-descriptor.properties) :

<?xml version="1.0"?>
<assembly>
    <id>plugin</id>
    <formats>
        <format>zip</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <files>
        <file>
            <source>${project.basedir}/plugin-metadata/plugin-descriptor.properties</source>
            <outputDirectory></outputDirectory>
            <filtered>true</filtered>
        </file>
    </files>
    <fileSets>
        <fileSet>
            <directory>src/main/config</directory>
            <outputDirectory>config</outputDirectory>
        </fileSet>
        <fileSet>
            <directory>src/main/bin</directory>
            <outputDirectory>bin</outputDirectory>
        </fileSet>
    </fileSets>
    <dependencySets>
        <dependencySet>
            <outputDirectory>/</outputDirectory>
            <useProjectArtifact>true</useProjectArtifact>
            <useTransitiveFiltering>true</useTransitiveFiltering>
            <useTransitiveDependencies>true</useTransitiveDependencies>
        </dependencySet>
    </dependencySets>
</assembly>

(system) #6