Closed navneetrai closed 7 years ago
@navneetrai
I am trying to setup elasticsearch with elastic.co cloud account. configuration is given below.
'elasticsearch' => [ 'index' => env('ELASTICSEARCH_INDEX', 'laravel'),
'config' => [
'hosts' => [
'http://xxxxxxxxxxxxxxxxxxxx.ap-southeast-1.aws.found.io:9200/'
],
],
],
I could not find a way to pass authentication details. It is throwing an error given below
[Elasticsearch\Common\Exceptions\BadRequest400Exception] security_exception: action [indices:data/write/bulk] requires authentication
[Elasticsearch\Common\Exceptions\BadRequest400Exception] {"error":{"root_cause":[{"type":"security_exception","reason":"action [indices:data/write/bulk] requires authentication","header":{"WWW-Authenticate":"Basic realm=\"shield\" charset=\"UTF- 8\""}}],"type":"security_exception","reason":"action [indices:data/write/bulk] requires authentication","header":{"WWW-Authenticate":"Basic realm=\"shield\" charset=\"UTF-8\""}},"status":4 01}
Any help is highly appreciated .
@ErickTamayo
@reyazmoosa
My config was similar to your's except I was not using http:// part in host. This worked perfectly for me (without any authentication info).
Thanks @navneetrai for the quick response.
Actually I had to pass username and password to authenticate. Following is the sample configuration worked for me
'elasticsearch' => [ 'index' => env('ELASTICSEARCH_INDEX', 'laravel'), 'config' => [ 'hosts' => [ 'https://myusername:mypassword@xxxxxxxxxxxxxx.ap-southeast-1.aws.found.io:9243/' ], ], ],
I think the sample configuration shown in readme should be changed to
The provider is picking us hosts from