LogStash unable to retrieve license information from license. Response code '401' contacting Elasticsearch at URL 'http://elasticsearch:9200/_xpack' LogStash unable to retrieve license information from license. Response code '401' contacting Elasticsearch at URL 'http://elasticsearch:9200/_xpack' elasticsearch elasticsearch

LogStash unable to retrieve license information from license. Response code '401' contacting Elasticsearch at URL 'http://elasticsearch:9200/_xpack'


_xpack error can also occur when the monitoring data from logstash is not able to reach elasticsearch.

Have you checked if the below works?

xpack.monitoring.elasticsearch.username: "logstash_system"xpack.monitoring.elasticsearch.password: => "l12345" 

You can check if the credentials are correct by running something like below:

curl -XGET http://<elasticsearch IP>:9200 -u logstash_system:l12345 orcurl -XGET https://<elasticsearch IP>:9200 -u logstash_system:l12345 -k