0

Every time I save a new product I get that error

"No alive nodes found in your cluster"

My version of magento is 2.1.6 and the problem appeared after installing the elasticsearch module

enter image description here

What could be a solution to this problem? this also does not let me delete products or change their data

1

There are two things you should check.

  1. Check the elastic search hostname and the port are correct and accessible.

    telnet elastic-search-host port

  2. Run full reindex, which will create elastic search nodes during indexing.

2
  • @B G Kavinga where to check elastic search hostname and the port? – H_Parekh Dec 31 '18 at 9:44
  • You can find it under Stores=>Configuration=>Catalog=>Catalog Search – B G Kavinga Jan 3 '19 at 5:03
1

This error also appears when your elastic search server is not running, you can try if above solution is not working for you.

 sudo -i service elasticsearch start

You can check the status of elasticsearch node status by this command

 curl -XGET 'localhost:9200/_cat/health?v&pretty'
0

1. Check if ElasticSearch is working and accessible from Magento server

In order to test your connection, log in to your SSH and type

curl http://localhost:9200

If you get a JSon as response, your elasticsearch is working. Just replace the address and port above as your needs.

2. Check if the setting is correct in Magento

The settings are usually stored in the core_config_data table. A SELECT * FROM core_config_data WHERE path like '%elastic%' would be enough to retrieve the data.

It seems obvious, but we have a catch here:

In previous versions of Magento, those values were saved under the prefix catalog/search/elasticsearch*, but in newer versions the path got a 7 in the end.

Now, the hostname for example, is now saved as catalog/search/elasticsearch7_server_hostname.

In my case, I spent almost an hour to realize that after restoring an old db dump. I hope now you don't.

And of course, you can also change those values with bin/magento config:set, as follows:

  • bin/magento config:set catalog/search/elasticsearch7_server_hostname ELASTIC-HOSTNAME default is localhost
  • bin/magento config:set catalog/search/elasticsearch7_server_port ELASTIC-PORT default is 9200

and so on as described here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.