I am running ElasticSearch6 in my docker files.
if i run http://localhost:9200/ in my browser i get this information.
{
"name" : "shakedeal-1",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "X4OkctATTgmlcdLzmtJ4Yg",
"version" : {
"number" : "6.5.4",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "d2ef93d",
"build_date" : "2018-12-17T21:17:40.758843Z",
"build_snapshot" : false,
"lucene_version" : "7.5.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
Here are the contents of my docker/elasticSearch/config/elasticSearch.yml file.
---
## Default Elasticsearch configuration from elasticsearch-docker.
## from https://github.com/elastic/elasticsearch-docker/blob/master/build/elasticsearch/elasticsearch.yml
#
cluster.name: "docker-cluster"
node.name: "shakedeal-1"
network.host: 0.0.0.0
# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1
## Use single node discovery in order to disable production mode and avoid bootstrap checks
## see https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
#
discovery.type: single-node
Now if i install my magento2 using CLI command.
php bin/magento setup:install --base-url='http://tile500.co.pk/' \
--db-host='mysql' --db-name='Tile500New' --db-user='root' --db-password='tiger' \
--admin-firstname='Magento' --admin-lastname='User' --admin-email='[email protected]' \
--admin-user='admin' --admin-password='admin123' --language='en_US' \
--currency='USD' --timezone='America/Chicago' --use-rewrites=1 \
--search-engine='elasticsearch6' --elasticsearch-host='localhost' \
--elasticsearch-port='9200'
I get this error
[Progress: 601 / 1206]
Installing search configuration...
In SearchConfig.php line 81:
Could not validate a connection to Elasticsearch. No alive nodes found in your cluster