I see the following message in logstash after enabling security on elaticsearch side

Hello,

I am running elasticsearch cluster 7.9 with logstash to parse logfiles and ingest. After enabling security on elasticsearch I am seeing the following error messages into the logstash logs.

[ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"Got response code '401' contacting Elasticsearch at URL 'http://mgt-wazuh-01:9200/_xpack'"}

Any idea how to get rid of it?

Note: I am authenticating to it via elastic user which should have full access to the cluster all components.