# BadResponseCodeError error=\>"Got response code '401'

**URL:** https://discuss.elastic.co/t/badresponsecodeerror-error-got-response-code-401/151342
**Category:** Logstash
**Created:** [October 7, 2018, 9:42am UTC](https://discuss.elastic.co/t/badresponsecodeerror-error-got-response-code-401/151342 "2018-10-07T09:42:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![af615dbd55cac2cacf32](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@af615dbd55cac2cacf32](https://discuss.elastic.co/u/af615dbd55cac2cacf32)
#### Post date: [October 7, 2018, 9:42am UTC](https://discuss.elastic.co/t/badresponsecodeerror-error-got-response-code-401/151342/1 "2018-10-07T09:42:16Z")

</div>

hello,

I posted a topic about Kibana disabled to login after x-pack security turned on. i resolved that issue and the topic url is below.

> [@Login is currently disabled after security on](https://discuss.elastic.co/t/login-is-currently-disabled-after-security-on/151298):
>
> now I am trying to initiate x-pack Security but seeing some errors. in Kibana: (i am seeing below error while screen showing "login" feature) "Login is currently disabled. Administrators should consult the Kibana logs for more details." I looked at the kibana log what the kibana page advised to me, and below errors were observed. {"type":"log","@timestamp":"2018-10-06T06:30:56Z","tags":["license","warning","xpack"],"pid":8247,"message":"License information from the X-Pack plugin could not be…

after that, elasticsearch and kibana look fine, but below errors were started on logstash.

[2018-10-07T18:34:49,538][WARN][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[http://127.0.0.1:9200/](http://127.0.0.1:9200/)", :error\_type=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::BadResponseCodeError, :error=\>"Got response code '401' contacting Elasticsearch at URL '[http://127.0.0.1:9200/](http://127.0.0.1:9200/)'"}  
[2018-10-07T18:34:49,654][INFO][logstash.licensechecker.licensereader] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://127.0.0.1:9200/](http://127.0.0.1:9200/), :path=\>"/"}  
[2018-10-07T18:34:49,658][WARN][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[http://127.0.0.1:9200/](http://127.0.0.1:9200/)", :error\_type=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::BadResponseCodeError, :error=\>"Got response code '401' contacting Elasticsearch at URL '[http://127.0.0.1:9200/](http://127.0.0.1:9200/)'"}

what i did on my logstash are below.

I created keystore for logstash and set ES\_USER and ES\_PWD there. then, add below line in the .conf.  
user =\> "${ES\_USER}"  
password =\> "${ES\_PWD}"

my elasticsearch and kibana are currently up without any errors. should i check 'role' with the logstash account username?

Please advise what i missed.

Thank you!

---

<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: [November 4, 2018, 9:42am UTC](https://discuss.elastic.co/t/badresponsecodeerror-error-got-response-code-401/151342/2 "2018-11-04T09:42:19Z")

</div>

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