# I am having problem with logstash

**URL:** <https://discuss.elastic.co/t/i-am-having-problem-with-logstash/308712>\
**Category:** Logstash\
**Created:** [July 2, 2022, 9:22am UTC](https://discuss.elastic.co/t/i-am-having-problem-with-logstash/308712 "2022-07-02T09:22:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodeRed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/codered/32/105429_2.png) [@CodeRed](https://discuss.elastic.co/u/CodeRed)\
**Post date:** [July 2, 2022, 9:22am UTC](https://discuss.elastic.co/t/i-am-having-problem-with-logstash/308712/1 "2022-07-02T09:22:06Z")

</div>

after i did add xpack.security.enabled :true to elasticserach.yml file then i set password but i was not able to restart logstash anymore  
this is what i see in logstash's log file  
Attempted to resurrect connection to dead ES instance, but got an error {:url=\>"[http://localhost:9200/](http://localhost:9200/)", :exception=\>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :message=\>"Got response code '401' contacting Elasticsearch at URL '[http://localhost:9200/](http://localhost:9200/)'"}

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [July 2, 2022, 12:09pm UTC](https://discuss.elastic.co/t/i-am-having-problem-with-logstash/308712/2 "2022-07-02T12:09:44Z")

</div>

Have you changed in LS output to support HTTPS:

```auto
elasticsearch {
    hosts => ["https://localhost:9200"]
    index => "indexname"
    ssl => true
    ssl_certificate_verification => true
}

```

---

<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:** [July 30, 2022, 12:10pm UTC](https://discuss.elastic.co/t/i-am-having-problem-with-logstash/308712/3 "2022-07-30T12:10:19Z")

</div>

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