# Illegal Character Authority Error Elasticsearch Filter

**URL:** <https://discuss.elastic.co/t/illegal-character-authority-error-elasticsearch-filter/190825>\
**Category:** Logstash\
**Created:** [July 16, 2019, 8:42pm UTC](https://discuss.elastic.co/t/illegal-character-authority-error-elasticsearch-filter/190825 "2019-07-16T20:42:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [July 16, 2019, 8:42pm UTC](https://discuss.elastic.co/t/illegal-character-authority-error-elasticsearch-filter/190825/1 "2019-07-16T20:42:45Z")

</div>

When performing an Elasticsearch filter query, I get the below error (I've replaced sensitive values with an equivilent number of `X`s.

```auto
[WARN][logstash.filters.elasticsearch] Failed to query elasticsearch for previous event {:index=>"servicenow-*", :error=>"Illegal character in authority at index 8: https://{:host=>\"xxxxxxxxx.xxxxxxxxx.net:9200\", :scheme=>\"https\", :protocol=>\"https\", :port=>9200}:9200/servicenow-%2A/_search?q=number%3AXXX0029703&size=1&sort=%40timestamp%3Adesc"}

```

What does it mean by, `illegal character in authority at index 8`?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 16, 2019, 10:04pm UTC](https://discuss.elastic.co/t/illegal-character-authority-error-elasticsearch-filter/190825/2 "2019-07-16T22:04:54Z")

</div>

That is an elasticsearch question, not a logstash question 🙂

---

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [July 16, 2019, 10:17pm UTC](https://discuss.elastic.co/t/illegal-character-authority-error-elasticsearch-filter/190825/3 "2019-07-16T22:17:31Z")

</div>

I figured out the issue, it was with the elasticsearch filter and a bug in it. I had to remove `ssl => enabled` and use `https://` in the hosts field.

---

<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:** [August 13, 2019, 10:17pm UTC](https://discuss.elastic.co/t/illegal-character-authority-error-elasticsearch-filter/190825/4 "2019-08-13T22:17:35Z")

</div>

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