0

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

asked Aug 17, 2022 at 10:36

2 Answers 2

0

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

answered Aug 17, 2022 at 10:58
3
  • Hey I run the above command but still issue not resolved Commented Aug 17, 2022 at 11:50
  • np, thanks for the feedback. Hope you get it sorted Commented 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 working Commented Aug 18, 2022 at 6:16
0

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.

answered Aug 17, 2022 at 10:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.