Missing authentication credentials when visiting localhost:9200 after running elasticsearch.bat

{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm="security" charset="UTF-8"","ApiKey"]}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/]","header":{"WWW-Authenticate":["Basic realm="security" charset="UTF-8"","ApiKey"]}},"status":401}

How do you access ES, using a browser, or curl command?
If you used a browser, the browser will ask you enter username and password for basic auth

if you use CURL, You need to pass the credentials with your request with -u username:password like this:

curl -X GET  -u elastic:your_pass_here "https://localhost:9200"

And, Did you enable xpack security on Elasticsearch cluster, could you share the guide tat you are following and share the ES config also?

@Arthur_Medforth please do not just post an error with no other information, it makes it very hard to provide help if you are not providing context on what you are doing.

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