Unable to install elasticsearch-mapper-attachments plugin

Hi folks,

I'm unable to install elasticsearch-mapper-attachments plugin.

I run the following command:

bin/plugin install elasticsearch/elasticsearch-mapper-attachments/3.0.1

Result is:

root@PORLIN16000:/usr/share/elasticsearch# bin/plugin install elasticsearch/elasticsearch-mapper-attachments/3.0.1
-> Installing elasticsearch/elasticsearch-mapper-attachments/3.0.1...
Trying https://download.elastic.co/elasticsearch/elasticsearch-mapper-attachments/elasticsearch-mapper-attachments-3.0.1.zip ...
Downloading ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE
Verifying https://download.elastic.co/elasticsearch/elasticsearch-mapper-attachments/elasticsearch-mapper-attachments-3.0.1.zip checksums if available ...
Trying https://search.maven.org/remotecontent?filepath=elasticsearch/elasticsearch-mapper-attachments/3.0.1/elasticsearch-mapper-attachments-3.0.1.zip ...
Trying https://oss.sonatype.org/service/local/repositories/releases/content/elasticsearch/elasticsearch-mapper-attachments/3.0.1/elasticsearch-mapper-attachments-3.0.1.zip ...
Trying https://github.com/elasticsearch/elasticsearch-mapper-attachments/archive/3.0.1.zip ...
Trying https://github.com/elasticsearch/elasticsearch-mapper-attachments/archive/master.zip ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
ERROR: /tmp/elasticsearch-mapper-attachments9018927896515039098.zip

Of course HTTP_PROXY and HTTPS_PROXY are set.

Any idea?

Are you using elasticsearch 2.0 older than rc1?

I use Elasticsearch 2.0.0 rc1

Strange.

I don't get the exact same error:

$ bin/plugin install elasticsearch/elasticsearch-mapper-attachments/3.0.1
-> Installing elasticsearch/elasticsearch-mapper-attachments/3.0.1...
Trying https://download.elastic.co/elasticsearch/elasticsearch-mapper-attachments/elasticsearch-mapper-attachments-3.0.1.zip ...
Downloading .........................................................[...].....DONE
Verifying https://download.elastic.co/elasticsearch/elasticsearch-mapper-attachments/elasticsearch-mapper-attachments-3.0.1.zip checksums if available ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
ERROR: Plugin [elasticsearch-mapper-attachments] is incompatible with Elasticsearch [2.0.0-rc1]. Was designed for version [2.0.0-beta2]

Which is what I would expect in your case.

Mapper plugin has not been released for rc1. We need to do it. Will try to make it happen soonish.

Thank you

I try to install elasticsearch-mapper-attachments-es-2.1 with no success.

As there is no ready-to-use package to download I try to compile using gradle, as it is said in documentation. I have the following error message (note that I don't know gradle):

D:\Java\elasticsearch-mapper-attachments-es-2.1>gradle clean assemble

FAILURE: Build failed with an exception.

* What went wrong:
Task 'clean' not found in root project 'elasticsearch-mapper-attachments-es-2.1'.

* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.924 secs

D:\Java\elasticsearch-mapper-attachments-es-2.1>

I also tried to compile with Maven:

D:\Java\elasticsearch-mapper-attachments-es-2.1>mvn compile

I obtain the following error:

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] D:\Java\elasticsearch-mapper-attachments-es-2.1\src\main\java\org\elasticsearch\index\mapper\attachment\RegisterAttachmentType.java:[27,39] error: cannot find symbol
[ERROR]   symbol:   class IndexSettings
  location: package org.elasticsearch.index.settings
D:\Java\elasticsearch-mapper-attachments-es-2.1\src\main\java\org\elasticsearch\index\mapper\attachment\RegisterAttachmentType.java:[35,48] error: cannot find symbol
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.218 s
[INFO] Finished at: 2015-11-25T17:44:40+01:00
[INFO] Final Memory: 16M/82M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project elasticsearch-mapper-attachments: Compilation failure: Compilation failure:
[ERROR] D:\Java\elasticsearch-mapper-attachments-es-2.1\src\main\java\org\elasticsearch\index\mapper\attachment\RegisterAttachmentType.java:[27,39] error: cannot find symbol
[ERROR] symbol:   class IndexSettings
[ERROR] location: package org.elasticsearch.index.settings
[ERROR] D:\Java\elasticsearch-mapper-attachments-es-2.1\src\main\java\org\elasticsearch\index\mapper\attachment\RegisterAttachmentType.java:[35,48] error: cannot find symbol
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Could you please help me?

The code has been updated and release of the plugin done as well. See [ANN] Elasticsearch Mapper Attachment plugin 3.1.0 released

Thank you so much!!

Another trouble:

I can't access Internet from my server to download the pluggin, so I have to install it manually. I downloaded elasticsearch-mapper-attachments-es-2.1.zip but can't install it. The error message sounds like a file is missing in the archive.

root@SB-PPEKSM9-01:/usr/share/elasticsearch/bin# ./plugin install file:///opt/elasticsearch-mapper-attachments-es-2.1.zip
-> Installing from file:/opt/elasticsearch-mapper-attachments-es-2.1.zip...
Trying file:/opt/elasticsearch-mapper-attachments-es-2.1.zip ...
Downloading .....DONE
Verifying file:/opt/elasticsearch-mapper-attachments-es-2.1.zip checksums if available ...
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

Any idea?

I also tried elasticsearch-mapper-attachments-3.1.0.zip with same error

3.1.0 should work. Are you sure you downloaded the right zip file?
From which url?

https://codeload.github.com/elastic/elasticsearch-mapper-attachments/zip/v3.1.0

If you unzip it, you will find source code. Not a final artifact with compiled code.

Try this: https://download.elastic.co/elasticsearch/elasticsearch-mapper-attachments/elasticsearch-mapper-attachments-3.1.0.zip

That worked thank you

I have an error when I use the pluggin:

POST /trying-out-mapper-attachments
{
  "mappings": {
  "person": {
  "properties": {
  "cv": { "type": "attachment" }
}}}}

causes following error message:

{
   "error": {
      "root_cause": [
         {
            "type": "mapper_parsing_exception",
            "reason": "No handler for type [attachment] declared on field [cv]"
         }
      ],
      "type": "mapper_parsing_exception",
      "reason": "Failed to parse mapping [person]: No handler for type [attachment] declared on field [cv]",
      "caused_by": {
         "type": "mapper_parsing_exception",
         "reason": "No handler for type [attachment] declared on field [cv]"
      }
   },
   "status": 400
}

The pluggin seems to be installed correctly:

root@SB-PPEKSM9-01:/usr/share/elasticsearch/bin# ./plugin list
Installed plugins in /usr/share/elasticsearch/plugins:
    - mapper-attachments

Any idea?

what gives GET /_cat/plugins?v ?

nothing :-/

name component version type url 

It sounds the plugin is not norrectly installed but I don't know what goes wrong...

So you did not restart

It works after restarting. Thank you

Hi Guys,

I am running elastic 2.2.0. Can you please provide the compatible plugin version for elasticsearch-mapper-attachments.