# Connecting logstash on elastic with security enabled

**URL:** <https://discuss.elastic.co/t/connecting-logstash-on-elastic-with-security-enabled/305636>\
**Category:** Logstash\
**Created:** [May 25, 2022, 7:01pm UTC](https://discuss.elastic.co/t/connecting-logstash-on-elastic-with-security-enabled/305636 "2022-05-25T19:01:08Z")\
**Posts on this page:** 1\
**Showing post:** 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:** [May 26, 2022, 4:55pm UTC](https://discuss.elastic.co/t/connecting-logstash-on-elastic-with-security-enabled/305636/8 "2022-05-26T16:55:02Z")

</div>

See [this](https://discuss.elastic.co/t/getting-illegal-state-exception-error-while-pushing-logs-to-elasticsearch/290029/2) answer. Once you have indexed an document in which [host] is a string, any event in which [host] is an object will be rejected.

---

_[View the full topic](https://discuss.elastic.co/t/connecting-logstash-on-elastic-with-security-enabled/305636)._
