0

I am using warden for magento 2.4 in shell when I run bin/magento s:up I am facing following error:

could not validate a connection to Elasticsearch. No alive nodes found in your cluster

4 Answers 4

0

For Magento 2.4 Elasticsearch is mandatory. So you need to setup Elasticsearch. When running setup:upgrade it also needs Elasticsearch connection and alive nodes. You can set it in Magento admin Stores > Configuration > Catalog > Catalog > Catalog Search. Or you can add entries direct in database in core_config_data table catalog/search/elasticsearch7_server_hostname and catalog/search/elasticsearch7_server_port (Elasticsearch 7). If you have it set already, check what is blocking connection.

0

Magento 2.4.x template comes latest so when installing Magento 2.4.x you need to install elasticsearch first.

0

Check your elasticsearch installation and again compile the code.

0

In my case I was upgrading magento from 2.3.6 to 2.4.4. (PHP 8.1, Elasticsearch 7.16) My local environment was Warden on Ubuntu 20.04. To get rid of this error "Could not validate a connection to Elasticsearch. No alive nodes found in your cluster" (that was popping up during bin/magento setup:upgrade) I had to do two things:

  1. manually add "elasticsearch" to node <elasticsearch7_server_hostname> in vendor/magento/module-elasticsearch-7/etc/config.xml
  2. disable elasticsearch6 and enable elasticsearch7 module

bin/magento module:enable {Magento_Elasticsearch,Magento_InventoryElasticsearch,Magento_Elasticsearch7}

bin/magento module:disable Magento_Elasticsearch6

Hope, that my answer will help someone :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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