# Ingest Attachment is not working \[err: InvalidIndexNameException\]

**URL:** <https://discuss.elastic.co/t/ingest-attachment-is-not-working-err-invalidindexnameexception/69261>\
**Category:** Elasticsearch\
**Created:** [December 16, 2016, 8:31am UTC](https://discuss.elastic.co/t/ingest-attachment-is-not-working-err-invalidindexnameexception/69261 "2016-12-16T08:31:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mysticmode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mysticmode/32/13350_2.png) [@mysticmode](https://discuss.elastic.co/u/mysticmode)\
**Post date:** [December 16, 2016, 8:31am UTC](https://discuss.elastic.co/t/ingest-attachment-is-not-working-err-invalidindexnameexception/69261/1 "2016-12-16T08:31:31Z")

</div>

```
org.elasticsearch.indices.InvalidIndexNameException: [_ingest] Invalid index name [_ingest], must not start with '_'
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validateIndexName(MetaDataCreateIndexService.java:164)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(MetaDataCreateIndexService.java:465)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100(MetaDataCreateIndexService.java:85)
    at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:215)
    at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:308)
    at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:134)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

```

Above is the error that I got in the log.

I'm using Debian and Installed elastic search through  
`sudo apt-get update && sudo apt-get install elasticsearch`

And I installed the plugin `ingest-attachment` through  
`sudo bin/plugin -i ingest-attachment -u https://artifacts.elastic.co/downloads/elasticsearch-plugins/ingest-attachment/ingest-attachment-5.1.1.zip`

The plugin is successfuly installed but it is showing error when I try to ingest attachment like this in python

```
import requests
import json

payload = json.dumps({
    'description': 'Process documents',
    'processors': [
        {
            'attachment': {
                'field': 'thedata',
                'indexed_chars': -1
            }
        },
        {
            'set': {
                'field': 'attachment.title',
                'value': '{{ title }}'
            }
        },
        {
            'set': {
                'field': 'attachment.page',
                'value': '{{ page }}'
            }
        }
    ]
})

print payload

r = requests.put('http://localhost:9200/_ingest/pipeline/attachment', data=payload)

print r.text

```

All these are actually working fine in my local macOS setup. But in the server (Debian OS) it's showing the error that I mentioned above.

Thanks!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 16, 2016, 8:47am UTC](https://discuss.elastic.co/t/ingest-attachment-is-not-working-err-invalidindexnameexception/69261/2 "2016-12-16T08:47:19Z")

</div>

Can you check what is coming back on the remote server when you run a simple `GET /` please?

---

<div class="post-metadata">

**Author:** ![mysticmode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mysticmode/32/13350_2.png) [@mysticmode](https://discuss.elastic.co/u/mysticmode)\
**Post date:** [December 16, 2016, 8:49am UTC](https://discuss.elastic.co/t/ingest-attachment-is-not-working-err-invalidindexnameexception/69261/3 "2016-12-16T08:49:05Z")

</div>

I can successfully run and get the result for the simple `/GET` query 🙂

```
{
  "status" : 200,
  "name" : "Varnae",
  "version" : {
    "number" : "1.0.3",
   "build_hash" : "NA",
   "build_timestamp" : "NA",
   "build_snapshot" : false,
   "lucene_version" : "4.6"
  },
  "tagline" : "You Know, for Search"
}
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 16, 2016, 8:49am UTC](https://discuss.elastic.co/t/ingest-attachment-is-not-working-err-invalidindexnameexception/69261/4 "2016-12-16T08:49:29Z")

</div>

So you have elasticsearch 1.0.3 running.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 13, 2017, 9:15am UTC](https://discuss.elastic.co/t/ingest-attachment-is-not-working-err-invalidindexnameexception/69261/6 "2017-01-13T09:15:12Z")

</div>

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