I have upgraded magento to 2.4.5 and when i ran setup upgrade command I received this error
"Could not validate a connection to Elasticsearch. No alive nodes found in your cluster".
Elastic Search is running, I have checked. Also tried to restart es by
sudo systemctl restart elasticsearch
but not working. Please Help
2 Answers 2
I assume your elasticsearch engine is installed locally (on localhost) and is enabled/active
(I also assume the version of your elastic search is 7)
this query will fix your issue:
update core_config_data set value='localhost' where path='catalog/search/elasticsearch7_server_hostname';
If your use docker or your architecture is different than a local lemp/lamp stack then you need to find the hostname where your elasticsearch is installed and modify the query accordingly
-
Hey I run the above command but still issue not resolvedRalph Rhodes– Ralph Rhodes2022年08月17日 11:50:09 +00:00Commented Aug 17, 2022 at 11:50
-
np, thanks for the feedback. Hope you get it sortedHerve Tribouilloy– Herve Tribouilloy2022年08月17日 13:22:04 +00:00Commented Aug 17, 2022 at 13:22
-
Yes I resolved it, It was due to different port number of ES in env file so i removed the port in env file, and now its workingRalph Rhodes– Ralph Rhodes2022年08月18日 06:16:44 +00:00Commented Aug 18, 2022 at 6:16
If you need error free access the site/terminal. Just try to disable given below modules
php bin/magento module:disable Magento_Elasticsearch Magento_InventoryElasticsearch Magento_Elasticsearch6 Magento_Elasticsearch7
Note: Before Disable module. You should check the first server/hosting provider side elasticsearch enable or disable.
Explore related questions
See similar questions with these tags.