Intermittently failed with 401 Unauthorized

Hi,
I'm using basic authentication with REST API but sometime server response 401 Unauthorized as:

401 Unauthorized {"error":{"root_cause":[{"type":"security_exception","reason":"unable to authenticate user [xxxxxxxxx] for REST request [xxxxxxxx]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"unable to authenticate user [xxxxxxxx] for REST request [xxxxxxxx]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}

Have anyone got the same issue? Please give me an advice to work around with this one.

Welcome to our community! :smiley:

Where do you see that error?

Hi,
I got this error sometime when i sent POST request to Elastic server.

It's likely your logs will contain more information.
For security reasons, if authentication fails we don't provide the root cause over HTTP (because the user isn't authenticated).

Hi Timv,
Yes, i think so. But the authentication almost success with the same user/password. It's sometime failed and make me confuse. So i would to to ask if anyone got the same issue and how we can fix it.

Without logs we don't know what the real issue is, so it's impossible for anyone to know whether they have the same issue.

Logs will really help with getting you to a solution.

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