Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: AuthenticationException #3

Open
sandymantri opened this issue Jul 5, 2018 · 1 comment
Open

Error: AuthenticationException #3

sandymantri opened this issue Jul 5, 2018 · 1 comment

Comments

@sandymantri
Copy link

I have cloned this code on my local. Only instead of pointing to local elastic search, pointing to elasticsearch cloud. And trying to search all using following command:

$ node search_all.js

Getting Error:

retrieving all documents (displaying 20 at a time)...
{ Error: [security_exception] action [indices:data/read/search] requires authentication, with { header={ WWW-Authenticate="Basic realm="security" charset="UTF-8"" } }
at respond (/home/hp/prita/node-elasticsearch/node_modules/elasticsearch/src/lib/transport.js:308:15)
at checkRespForFailure (/home/hp/prita/node-elasticsearch/node_modules/elasticsearch/src/lib/transport.js:267:7)
at HttpConnector. (/home/hp/prita/node-elasticsearch/node_modules/elasticsearch/src/lib/connectors/http.js:165:7)
at IncomingMessage.wrapper (/home/hp/prita/node-elasticsearch/node_modules/lodash/lodash.js:4949:19)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
status: 401,
displayName: 'AuthenticationException',
message: '[security_exception] action [indices:data/read/search] requires authentication, with { header={ WWW-Authenticate="Basic realm=\"security\" charset=\"UTF-8\"" } }',
path: '/library/_search',
query: {},
body:
{ error:
{ root_cause: [Object],
type: 'security_exception',
reason: 'action [indices:data/read/search] requires authentication',
header: [Object] },
status: 401 },
statusCode: 401,
response: '{"error":{"root_cause":[{"type":"security_exception","reason":"action [indices:data/read/search] requires authentication","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"action [indices:data/read/search] requires authentication","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}',
wwwAuthenticateDirective: 'Basic realm="security" charset="UTF-8"',
toString: [Function],
toJSON: [Function] }

@falent
Copy link

falent commented Jan 27, 2019

Hi, have you solved this problem? I have the same :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants