Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

ElasticSearch and local config #67

Open
tareiking opened this issue May 11, 2018 · 1 comment
Open

ElasticSearch and local config #67

tareiking opened this issue May 11, 2018 · 1 comment

Comments

@tareiking
Copy link

While setting up https://github.com/Chassis/Chassis-Elasticsearch locally I got a PHP Fatal error (below). Appears if you've set ELASTICSEARCH_HOST locally, our elasticpress integration attempts to verify via AWS.

To work around our autoconfig for ES I set $hm_platform['elasticsearch'] to false in local-config.php.

Making a note as I don't think there is an example of elasticsearch feature in our readme, which might be intentional.

[10-May-2018 23:59:02 UTC] PHP Fatal error:  Uncaught Aws\Exception\CredentialsException: Error retrieving credentials from the instance profile metadata server. (cURL error 28: Connection timed out after 1001 milliseconds (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)) in /vagrant/content/hm-platform/lib/aws-sdk/Aws/Credentials/InstanceProfileProvider.php:79
Stack trace:
#0 /vagrant/content/hm-platform/lib/aws-sdk/GuzzleHttp/Promise/Promise.php(203): Aws\Credentials\InstanceProfileProvider->Aws\Credentials\{closure}(Object(GuzzleHttp\Exception\ConnectException))
#1 /vagrant/content/hm-platform/lib/aws-sdk/GuzzleHttp/Promise/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(2, Array, Array)
#2 /vagrant/content/hm-platform/lib/aws-sdk/GuzzleHttp/Promise/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#3 /vagrant/content/hm-platform/lib/aws-sdk/GuzzleHttp/Handler/CurlMultiHandler.php(96): GuzzleHttp\Promise\TaskQueue->run()
#4 /vagrant/content/hm-platform/lib/aws-sdk/GuzzleHttp/Handler/CurlMultiHandler.php(12 in /vagrant/content/hm-platform/lib/aws-sdk/Aws/Credentials/InstanceProfileProvider.php on line 79
@roborourke
Copy link
Contributor

@tareiking the ES feature flag in the master branch is intended to behave this way in order to sign requests to ES. If you're using ElasticPress you only need to define EP_HOST as the full URL and port to elasticsearch eg. http://localhost:9200

Chassis-Elasticsearch defines ELASTICSEARCH_HOST and ELASTICSEARCH_PORT

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

No branches or pull requests

2 participants