0

when running some command in magento 2.4.3 such as "setup: upgrade" an error is generated in elasticsearch how can I solve this? I'll put pictures below.

enter image description here

6
  • You mean before setup:upgrade elasticsearch is running and status is active? Because now I see elasticsearch is down. Also what version of elasticsearch you using? Commented Jan 10, 2022 at 8:47
  • I meant that it seems to work, however when I run a magento command like setup:upgrade it stops working and stays that way. Commented Jan 10, 2022 at 14:45
  • So what Elasticsearch version you are using? Commented Jan 11, 2022 at 6:15
  • i use version 7.9 Commented Jan 11, 2022 at 6:43
  • What version are set in admin configuration? Should be Elasticsearch7. Commented Jan 11, 2022 at 6:46

3 Answers 3

0

It's a issue of elastic search connection. to test it just goto admin -> Store -> Configuration -> Catalog -> Catalog Search then you can see elastic search details like host and port.

so just run "curl -XGET [host]:[port]" and you will able to identify that connection is not working or not

1
  • yes it is working, however if I run setup:upgrade it stops. Commented Jan 10, 2022 at 14:44
0

You can simply try to restart Elasticsearch first: For example on Ubuntu:

sudo service elasticsearch restart

If it still not working, try to debug with error message shown on the terminal.

1
  • it to run elasticsearch every time setup:upgrade is run. ): Commented Jan 10, 2022 at 14:44
0

Maybe your elasticsearch is broken in some way. Could try to reinstall it. Or you could use https://github.com/duydo/evm . Very good tool, can switch Elasticsearch version if required. Also easy to run. Remove your current ES and install this one. Try to use it. If same problem, try to look for custom modules, that maybe try to reindex something to elasticsearch. Disable it and try again.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.