Home > Blockchain >  magento setup:upgrade showing could not validate a connection to elastic search
magento setup:upgrade showing could not validate a connection to elastic search

Time:02-11

I am cloning a magento repo. after i did composer update and then bin/magento setup:upgrade it is giving me the following error

-- Could not validate a connection to elastic search. no alive nodes found in your cluster --

the elastic search is up and running. If i install a fresh magento project (2.4.3) setup:upgrade command works fine.

I also checked the status of the elastic search and it showed as below pic elastic search status

I have already checked a previous thread relating to not connecting to elastic search. have tried every answers there and I believe that thread was a different problem.

CodePudding user response:

Are you using a database dump from another enviroment?

Check your database entries for elasticsearch host:

SELECT * FROM magento.core_config_data
    where path like '%elastic%'

you could well have hostname set to something other than your local setup. check keys:

search/engine/elastic_host
catalog/search/elasticsearch6_server_hostname

etc

CodePudding user response:

Its seems to be a elasticsearch connection problems, Verify the core_config_data according the @Andrew response.

If you are using docker, maybe can be a permission problems:

A permission 777 in your docker folders of your project can helps (of course, in local environments only), specially which has elasticsearch files (volumes and other configuration)

  • Related