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

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 following is mu .env file

`WARDEN_ENV_NAME=project-levo-m2 WARDEN_ENV_TYPE=magento2 WARDEN_WEB_ROOT=/ TRAEFIK_DOMAIN=project-levo-m2.test TRAEFIK_SUBDOMAIN=app

WARDEN_DB=1 WARDEN_ELASTICSEARCH=1 WARDEN_VARNISH=1 WARDEN_RABBITMQ=1 WARDEN_REDIS=1 ELASTICSEARCH_VERSION=7.9 MARIADB_VERSION=10.4 NODE_VERSION=10 COMPOSER_VERSION=1 PHP_VERSION=7.4 PHP_XDEBUG_3=1 RABBITMQ_VERSION=3.8 REDIS_VERSION=5.0 VARNISH_VERSION=6.0

WARDEN_SYNC_IGNORE=

WARDEN_ALLURE=0 WARDEN_SELENIUM=0 WARDEN_SELENIUM_DEBUG=0 WARDEN_BLACKFIRE=0 WARDEN_SPLIT_SALES=0 WARDEN_SPLIT_CHECKOUT=0 WARDEN_TEST_DB=0 WARDEN_MAGEPACK=0

BLACKFIRE_CLIENT_ID= BLACKFIRE_CLIENT_TOKEN= BLACKFIRE_SERVER_ID= BLACKFIRE_SERVER_TOKEN= `

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

@ihor-sviziev I already know what the issue was. Elasticsearch version I was using was 7.6, while minimal version built now is 7.10.

Elastic works like a charm after changing it’s version to 7.10

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 😃

Thaks, @TomekWie your answer was helpful and a solution for me.

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 😃

Trying to make official release working again but no luck.

Elasticsearch image used: docker.io/wardenenv/elasticsearch:7.6 Error on Magento Setup: ElasticSuite : Unable to validate connection to Elasticsearch server : No alive nodes found in your cluster curl -X GET 'https://elasticsearch:9200/' -> curl: (7) Failed to connect to localhost port 9200: Connection refused

Hi,

I have the same issue, I am running a MBP with an M1X Chip, elastic search and redis does not work, for elastic search I got the same error than @hassanas , for redis: qemu: uncaught target signal 11 (Segmentation fault) - core dumped

In both cases, the error is fixed by using latests images from docker hub, on my local (for the time being), I have updated the image in: environments/includes/redis.base.yaml to redis:${REDIS_VERSION:-5.0} And for Elasticsearch, in file: environments/includes/elasticsearcg.base.yaml image: elasticsearch:${ELASTICSEARCH_VERSION:-7.0}

Check the output of warden env logs -f elasticsearch. It may give you a hint what is wrong with your ES instance. Alternatively / additionally, run curl -X GET "elasticsearch:9200/_cluster/health?pretty" inside the Warden shell.