# Logstash got response code 401 contacting elasticsearch url

**URL:** <https://discuss.elastic.co/t/logstash-got-response-code-401-contacting-elasticsearch-url/317081>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [October 20, 2022, 8:40am UTC](https://discuss.elastic.co/t/logstash-got-response-code-401-contacting-elasticsearch-url/317081 "2022-10-20T08:40:42Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mammodde](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mammodde](https://discuss.elastic.co/u/mammodde)\
**Post date:** [October 21, 2022, 7:18am UTC](https://discuss.elastic.co/t/logstash-got-response-code-401-contacting-elasticsearch-url/317081/6 "2022-10-21T07:18:55Z")

</div>

> [@mammodde](#):
>
> `Got response code '401' contacting Elasticsearch at URL 'https://es01:9200/_xpack'`

if i try to do a curl:

`curl --cacert ./path-to-cert.crt -u user:password https://es01:9200/_xpack`

this is what i receive

```auto
{"build":{"hash":"--------",
"date":"2022-08-26T12:11:43.232597118Z"},
"license":{"uid":"----------",
"type":"basic","mode":"basic","status":"active"},
"features":{"aggregate_metric":{"available":true,"enabled":true},
"analytics":{"available":true,"enabled":true},
"archive":{"available":false,"enabled":true},
"ccr":{"available":false,"enabled":true},
"data_streams":{"available":true,"enabled":true},
"data_tiers":{"available":true,"enabled":true},
"enrich":{"available":true,"enabled":true},
"eql":{"available":true,"enabled":true},
"frozen_indices":{"available":true,"enabled":true},
"graph":{"available":false,"enabled":true},
"ilm":{"available":true,"enabled":true},
"logstash":{"available":false,"enabled":true},
"ml":{"available":false,"enabled":true},
"monitoring":{"available":true,"enabled":true},
"rollup":{"available":true,"enabled":true},
"searchable_snapshots":{"available":false,"enabled":true},
"security":{"available":true,"enabled":true},
"slm":{"available":true,"enabled":true},
"spatial":{"available":true,"enabled":true},
"sql":{"available":true,"enabled":true},
"transform":{"available":true,"enabled":true},
"voting_only":{"available":true,"enabled":true},
"watcher":{"available":false,"enabled":true}},
"tagline":"You know, for X"}

```

it could be that `"logstash":{"available":false,"enabled":true},` the problem? I just noticed it, but i really don't know how to change that

---

_[View the full topic](https://discuss.elastic.co/t/logstash-got-response-code-401-contacting-elasticsearch-url/317081)._
