Closed testmember012 closed 5 years ago
Hi @testmember012,
There are some points you could check to help figure out what's going wrong:
docker-compose up
has been executed. You could do that by doing a docker ps
command to see if the containers appear in the list. If they are not, chances are you have some errors or issues preventing the containers from starting and you should check those in the first place.localhost
or your local IP in order to connect to the elascticsearch instance (endpoint should be http://localhost:9200
or http://xx.xx.xx.xx:9200
). Note that 5601
port is meant to access the Kibana web tool, not the elasticsearch instance. Accessing http://localhost:9200 should show you the default json payload. Something like:
{
"name" : "szLA31y",
"cluster_name" : "yii2-test-cluster",
"cluster_uuid" : "gvvwC9WvSjOrwRi8laBc6w",
"version" : {
"number" : "6.1.4",
"build_hash" : "d838f2d",
"build_date" : "2018-03-14T08:28:22.470Z",
"build_snapshot" : false,
"lucene_version" : "7.1.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
networks
parameter in the docker-compose file, in our example, it is named app_tier
). This is important so that your php container can access your elasticsearch container. Also, do not forget to add an extra_hosts
parameter as indicated in the documentation so that your php container can access the Craft site through the apache container.Please, let us know if you still have issues.
Thanks. After changing the container name Elasticsearch connection was successful.
I did a setup of development environment using your Docker documetation. Setup was successful but while creating Elasticsearch connection, I get the following error :
Could not connect to the Elasticsearch instance at http://elasticsearch:9200. Please check the endpoint URL and authentication settings.
The details I used are: Endpoint URL : http://elasticsearch:9200 Username : elastic Password : changemeI had tried
http://localhost:5601/
as Endpoint URL too, but that also gave the same error. Am I using the correct details or is there any step that I had missed ?