0
votes

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.

1
I don't know the package ` scout-elasticsearch-laravel`. Could you share a link?matchish

1 Answers

1
votes

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.