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.
2
Answers
Are you using a database dump from another enviroment?
Check your database entries for elasticsearch host:
you could well have hostname set to something other than your local setup. check keys:
etc
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)