docker-magento icon indicating copy to clipboard operation
docker-magento copied to clipboard

Elastic Search

Open niketkanoi opened this issue 5 years ago • 5 comments

Description Hello - Is there a specific config we have to do for Elastic search to work? I am on 2.4.2. here is my elastic search config in env.php 'system' => [ 'default' => [ 'catalog' => [ 'search' => [ 'engine' => 'elasticsearch7', 'elasticsearch7_server_hostname' => 'localhost', 'elasticsearch7_server_port' => '9200' ] ] ] ],

Steps To Reproduce

  1. Run bin/magento setup:upgrade

Expected Result Could not validate a connection to Elasticsearch. No alive nodes found in your cluster Screen Shot 2021-03-05 at 3 36 32 PM

Actual Result

niketkanoi avatar Mar 05 '21 21:03 niketkanoi

Doing a curl http://localhost:9200 { "name" : "cce87c07a8c9", "cluster_name" : "docker-cluster", "cluster_uuid" : "1wXuW-BmT46E6BYxd750ag", "version" : { "number" : "7.7.1", "build_flavor" : "default", "build_type" : "docker", "build_hash" : "ad56dce891c901a492bb1ee393f12dfff473a423", "build_date" : "2020-05-28T16:30:01.040088Z", "build_snapshot" : false, "lucene_version" : "8.5.1", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" }

niketkanoi avatar Mar 05 '21 22:03 niketkanoi

Entry in db attached Screen Shot 2021-03-05 at 4 04 22 PM

niketkanoi avatar Mar 05 '21 22:03 niketkanoi

I also updated my env.php with the below 'system' => [ 'default' => [ 'catalog' => [ 'search' => [ 'elasticsearch7_server_hostname' => 'elasticsearch' ] ] ] ],

But same issue, any ideas?

niketkanoi avatar Mar 05 '21 22:03 niketkanoi

I'm unable to replicate, a fresh install of docker-magento can successfully run bin/magento setup:upgrade. No changes needed at all to env.php (if you did make changes, back them out).

curl http://localhost:9200 showing a success response also means that the elasticsearch container is up and running.

markshust avatar Mar 28 '21 15:03 markshust

I have the same issue. It was working fine and suddenly stop working :(

curl http://localhost:9200 hits well

Any solution @niketkanoi ?

Maxi-07 avatar Nov 14 '22 05:11 Maxi-07