Dhaval Chheda
Dhaval Chheda

Reputation: 5147

not able to create index aws elasticsearch from laravel application using scout elasticsearch laravel

I am trying to connect from an ec2 instance to AWS Elasticsearch using scout-elasticsearch-laravel but it is failing.

my steps :-

added host to .env

SCOUT_DRIVER=elastic ( I tried elasticsearch also )
SCOUT_ELASTIC_HOST=https://vpc-cofxxx-xxx.xxxxxx.ap-south-1.es.amazonaws.com

i can curl the aws es endpoint and it works

right now it is giving below error :-

No alive nodes found in your cluster

But like I said curl is working and cluster health is in green.

I do not understand what I have misconfigured so any assistance will be appreciated.

Upvotes: 0

Views: 482

Answers (1)

Dhaval Chheda
Dhaval Chheda

Reputation: 5147

actually the fix was simple

I had to add port number after url

https//vpc-cofxxx-xxx.xxxxxx.ap-south-1.es.amazonaws.com:443

Reason for this confusion was I did a curl from my ec2 instance and without the port it returned OK so I did not think of this.

And also ensure you have php-curl installed.

However posting this answer just in case someone gets stuck.

Upvotes: 1

Related Questions