pdphilip / laravel-opensearch

An OpenSearch implementation of Laravel's Eloquent ORM
MIT License
16 stars 1 forks source link

Connection Issues with AWS OpenSearch on EC2 Deployment #1

Closed aaronseanph closed 3 months ago

aaronseanph commented 3 months ago

Hi @pdphilip Firstly, thank you for this amazing package—it makes querying OS/ES very straightforward.

I am encountering a connection issue when deploying to an EC2 instance with AWS Hosted OpenSearch. While everything works perfectly on my local machine, the connection hangs and fails when using the package on the EC2 instance.

Details:

pdphilip commented 3 months ago

Hey @aaronseanph, thanks for the kind words.

Have tried on AWS and got the same issue until I added the port 443 on the host, ex:

OS_HOSTS="https://xxxxxxxxxx:443"

I did see an error in the connector where some of the options were not applied (like SSLVerification - default true), so will update that, but that didn't affect my test.

If still no luck then see if you can connect with the OS PHP client directly: https://opensearch.org/docs/latest/clients/php/

If you can, then please share how you built the client (without sensitive details of course). Thanks

aaronseanph commented 3 months ago

@pdphilip Thank you so much for your quick response and for providing a working solution! The issue is now resolved, and the package is working perfectly on the EC2 instance with AWS Hosted OpenSearch.

I really appreciate your help and the amazing work you’ve done with this package. It has been a huge asset for our project.

Thanks again!

pdphilip commented 3 months ago

Great @aaronseanph, fantastic that you brought this to my attention. I'll update the docs so others don't trip over this one.

Good luck with your project