I installed elastic and kibana 8.2.3 with Java 17 on ubuntu. Firstly I putted Elasticsearch.username, Elasticsearch.password. But it returns error below .
You need to pass a user and password in your curl request, this is what the response message is saying.
To create a token you need to pass the credentials of a user that has permissions to do that, your curl request does not have any user/password to authenticate in Elasticsearch.
Also, if you want to create a service account for kibana, you need to change fleet-server in your request to kibana.
You need something like this:
curl -X POST -u elastic:password "localhost:9200/_security/service/elastic/kibana/credential/token/token1?pretty"
In future please don't post pictures of text, logs or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.